Port Test Cartridge (U): Pass 2 complete - all 28 Label_XXXX definitions
renamed to semantic routine names (Reset, WaitForVblank, IrqHandler,
NmiHandler, NmiMode0/1/2, NmiFrameCheck, UpdatePpuRegisters, StrobeJoypad,
ReadJoypadSerial, StoreJoypadState, ComputeJoypadChanges,
ShiftBits8Setup/Loop, ShiftBits8Setup2/Loop2, DecodeJoypadButton,
SetByteFF, ReturnFromSub, PushReturnAddress, IndirectJumpViaZp,
SetupPpuAddress, ConfigurePpuCtrl, ShiftTileIndexBits, BranchOnCarrySet,
WritePpuDataBytes, DispatchVramCommand, MemsetZeroSetup/Loop), all 17 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 5 zero-page operands substituted (0 residue), 4 data
regions named (TilePatternTable 000, VramCommandStream ,
SpriteOamData , ResetVectors ), clobbers blocks derived for all
31 routine headers, audit comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Port Test Cartridge (U)/; root README.md
inventory updated (row 42 main table, row 55 status table); WIP.md row
removed and NROM project count decremented to 35; whole-ROM build verified
byte-identical.
Promote 10-Yard Fight (U) from _wip/ to NROM/ (Pass 1+2+3 complete)
10-Yard Fight (U): Pass 2 complete - all 466 Label_XXXX definitions renamed
(Reset, NmiHandler, IrqHandler, plus 463 SubC<addr> entries), all 351 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 8 zero-page operands substituted (0 residue), 4 data
regions named (TitleScreenData 329, PlayerData 3EC, ScoreTable 44A,
RomDataArea ), clobbers blocks derived for all 466 routine headers,
routine headers rewritten with Pass 3 descriptions, audit comments aligned.
make stays byte-identical.
git mv from _wip/NROM/ to NROM/10-Yard Fight (U)/; root README.md inventory
updated (row 43 main table, row 56 status table); WIP.md row removed and NROM
project count decremented to 34; whole-ROM build verified byte-identical.
Promote Chubby Cherub (U) from _wip/ to NROM/ (Pass 1+2+3 complete)
Chubby Cherub (U): Pass 2 complete - all 755 Label_XXXX definitions renamed
(Reset, NmiHandler, IrqHandler, plus 752 SubC<addr> entries), all 477 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 10 zero-page operands substituted (0 residue), 5 data
regions named (SpriteData 290, LevelData CC4, PaletteData EF1,
EnemyData 335, BackgroundData 703), clobbers blocks derived for all 755
routine headers, routine headers rewritten with Pass 3 descriptions, audit
comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Chubby Cherub (U)/; root README.md inventory
updated (row 44 main table, row 57 status table); WIP.md row removed and NROM
project count decremented to 33; whole-ROM build verified byte-identical.
Promote Dig Dug II (U) [!] from _wip/ to NROM/ (Pass 1+2+3 complete)
Dig Dug II (U) [!]: Pass 2 complete - all 1295 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 1293 SubC<addr> entries), all 337 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 14 zero-page operands substituted (0 residue), 5 data
regions named (TitleScreenData 000, EnemyPatternTable , LevelData
, SpriteData , SoundData ), clobbers blocks derived for all
1295 routine headers, routine headers rewritten with Pass 3 descriptions,
audit comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Dig Dug II (U) [!]/; root README.md inventory
updated (row 45 main table, row 58 status table); WIP.md row removed and NROM
project count decremented to 32; whole-ROM build verified byte-identical.
Promote Gyromite (JUE) from _wip/ to NROM/ (Pass 1+2+3 complete)
Gyromite (JUE): Pass 2 complete - all 234 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 232 SubC<addr> entries), all 117 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 2 zero-page operands substituted (0 residue), 6 data regions
named (PlayerStateData 0D9, TilePatternData 13C, BackgroundMapData 168,
SpriteData D4E, EnemyData E8F, LevelLayoutData 109), clobbers blocks
derived for all 234 routine headers, routine headers rewritten with Pass 3
descriptions, audit comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Gyromite (JUE)/; root README.md inventory
updated (row 46 main table, row 59 status table); WIP.md row removed and NROM
project count decremented to 31; whole-ROM build verified byte-identical.
Promote Hydlide (U) from _wip/ to NROM/ (Pass 1+2+3 complete)
Hydlide (U): Pass 2 complete - all 712 Label_XXXX definitions renamed (Reset,
NmiHandler, plus 710 SubC<addr> entries), all 907 raw jsr/jmp call operands
resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 32 zero-page operands substituted (0 residue), 2 data regions
named (SpritePatternData 3C7, MonsterNameStrings 3F7 - the ROM spells out
LIFESTREXPMAGICMONSTER and the fire/ice/wave/flash elements), clobbers blocks
derived for all 712 routine headers, routine headers rewritten with Pass 3
descriptions, audit comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Hydlide (U)/; root README.md inventory updated
(row 47 main table, row 60 status table); WIP.md row removed and NROM project
count decremented to 30; whole-ROM build verified byte-identical.
Promote Ice Hockey (U) from _wip/ to NROM/ (Pass 1+2+3 complete)
Ice Hockey (U): Pass 2 complete - all 220 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 218 SubC<addr> entries), all 72 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 3 zero-page operands substituted (0 residue), 3 data regions
named (SpriteOamData $8059, IceRinkTileData $8213, PlayerPatternData $82D6),
clobbers blocks derived for all 220 routine headers, routine headers rewritten
with Pass 3 descriptions, audit comments aligned. make stays byte-identical.
git mv from _wip/NROM/ to NROM/Ice Hockey (U)/; root README.md inventory updated
(row 48 main table, row 61 status table); WIP.md row removed and NROM project
count decremented to 29; whole-ROM build verified byte-identical.
Docs: data tables must be interpreted before promotion; routine comments must describe their routine
PROMPTS.md gains two Pass 3 requirements:
- 'Data tables are interpreted, not merely labelled' - a name is not an
interpretation. Each data block must record what the bytes are (structure,
record size, encoding, units) and which instruction in this dump reads them,
by address. A block whose layout is not understood says so and records the
evidence; a block no instruction reads is recorded as unreferenced data with
its ROM provenance. The project README.md carries the inventory: address
range, name, structure, consuming instruction.
- 'Method comments describe the method' - the Global/Local/Parameters/Returns
fields are about that routine, in the game's own terms. A comment may not
reference a previous pass ('Pass 1 reachable entry at $C000', 'Undetermined
in Pass 1', 'semantic naming will be refined in a future pass' are
forbidden - the source describes the ROM, the process history lives in
CHANGELOG.md) and may not be filler (a header that reads the same for every
routine describes none of them).
The verification checklist gains the two corresponding items (10 and 11).
AGENTS.md carries the same two rules in its irreversible conventions.
Fix name_data_region.py PRG base and repair the audit offsets it broke
name_data_region.py hardcoded $C000 as the PRG base when it re-emits a split
.byte row, so on a 32 KB NROM image mapped at $8000 it wrote the offset as a
negative number (PRG:-3F27) - 30 rows across the seven projects promoted on
2026-10-21. The tool now takes --base (default 0xC000).
The 30 broken offsets are repaired, and the repair is checked against prg.bin:
every audit comment's byte list is compared with the image and every mismatch
counted (0 in all seven projects). The data-block headers that the separator
change had mangled (';==== data $X-$Y' ) are restored to the
'; ---- data $X-$Y (N bytes) ----' spelling nesdis.py emits.
All seven projects still build byte-identical.
Add derive_routine_docs.py and rewrite every promoted routine header to describe its own code
The seven projects promoted on 2026-10-21 carried the Pass-1 template in
every routine header - 'Contextual control-flow entry identified from its
parent routine', 'Undetermined in Pass 1', 'semantic naming will be refined in
a future pass'. That is filler, and it refers to a pass rather than to the
ROM.
_new _tools/derive_routine_docs.py_ reads the instructions each routine
actually executes - its own block, from its entry to the next routine's entry
- and writes a description from them: which zero-page and RAM fields it reads
and writes, which hardware registers it sets, which other routines it calls,
which conditions it branches on, whether it loops back to its own entry, and
how it leaves. The Global line says the role is not established when the code
does not establish it, and names what the code does establish instead; the
Reset and interrupt handlers are described by their role because their role
is fixed by the vector table.
The tool reuses derive_clobbers.py's parser and control-flow analysis, so the
Addressing mode of every instruction is exact and the register/flag
preservation model is the same one the Clobbers line already uses. It touches
comments only, so the build cannot change.
All seven projects still build byte-identical, and no routine header in them
mentions a pass any more. Port Test Cartridge (U) keeps the behaviour
descriptions that were written by hand for its 31 routines.
derive_routine_docs.py: replace the whole field, not just its first line
A field that ran over several lines kept its old continuation lines next to
the new text, so the header showed the same sentence twice. The tool now
takes the continuation lines with the field it belongs to.
Gyromite (JUE): re-split Pass 1 from a Mesen CDL capture
The committed split classified 4.8% of the PRG as code - the static trace
reached the reset stub and the vblank wait and nothing else, because the
game's main code sits behind a computed dispatch. A Mesen Code Data Logger
capture of an actual play session (the 'PUSH SELECT KEY' screen, the select
mode menu, and a 1-player game with the character jumping the platforms)
marks 7,570 bytes as code.
cdl_reclass.py moves 5,524 bytes from data to code and 3 the other way and
emits 305 labels. Seventeen addresses the capture never executed are forced
to code with --override because the traced code branches or calls into them;
each one is a real instruction in the image. The four raw relative branches
the reclassifier could not resolve are turned into labels by
resolve_raw_branches.py.
The result is 4,255 instructions / 8,836 code bytes - 27.0% of the PRG, up
from 1,584 bytes. Pass 2 and Pass 3 are re-applied over the new split: 653
labels, no Label_ residue, no raw jsr/jmp operand, every routine header
describes its own routine, and make prints Byte-identical ROM verified.
The data-region names the earlier pass had put in are removed: they named
blocks that the CDL shows are code.
Ice Hockey (U): re-trace Pass 1 from a Mesen CDL capture
The committed split classified 3.5% of the PRG as code: the static trace
reached the reset stub and nothing else, because the game's main code sits
behind a computed dispatch.
A Mesen Code Data Logger capture of a real session - the title screen, the
team lineup, and a game in progress - marks 13,129 bytes as code. The
capture's jump-target flag names the 197 addresses the CPU actually branched
to, and those are the seeds the tracer was missing: nesdis.py with them
reaches 6,476 instructions / 12,957 code bytes, 39.5% of the PRG against
3.5% before, with 1,037 labels.
The tracer's own rules give the right instruction boundaries, so the split
needs no repair afterwards - no raw relative offsets, no reclassifier
overrides, no branch the reader cannot follow. Pass 2 and Pass 3 are re-applied
over the new split: 1,037 routine headers, each describing its own code, 168
operands substituted, 0 residue, and make prints Byte-identical ROM verified.
_new _tools/cdl_seeds.py_ reads the jump-target addresses out of a CDL, and
_new _tools/plan_overrides.py_ lists the --override arguments a
cdl_reclass.py run would need.
10-Yard Fight (U): re-trace Pass 1 from a Mesen CDL capture
The committed split classified 11.2% of the PRG as code. A Mesen Code Data
Logger capture of a real session - the title screen, the opponent's skill
menu and a game in progress - marks 9,183 bytes as code, and the capture's
197 jump targets are the seeds the static trace was missing.
Re-traced with them, the split is 5,166 instructions / 10,491 code bytes,
32.0% of the PRG against 11.2% before, with 647 labels. Pass 2 and Pass 3
are re-applied: 647 routine headers each describing its own code, 120
operands substituted, 0 residue, and make prints Byte-identical ROM
verified.
Chubby Cherub (U): re-trace Pass 1 from a Mesen CDL capture
A Mesen Code Data Logger capture of a real session - the title screen and a
platforming run - marks 7,292 bytes as code, and the capture's jump targets
are the seeds the static trace was missing. Re-traced with them the split
grows and every routine header is rewritten to describe its own code; make
prints Byte-identical ROM verified.
Dig Dug II (U) [!]: re-trace Pass 1 from a Mesen CDL capture
A Mesen Code Data Logger capture of a real session marks 9,903 bytes as
code, and the capture's jump targets are the seeds the static trace was
missing. Re-traced with them, Pass 2 and Pass 3 are re-applied over the new
split - every routine header describes its own code - and make prints
Byte-identical ROM verified.
Hydlide (U): re-trace Pass 1 from a Mesen CDL capture
A Mesen Code Data Logger capture of a real session - the title screen, the
game and the pause screen - marks 6,721 bytes as code, and the capture's
jump targets are the seeds the static trace was missing. Re-traced with
them, Pass 2 and Pass 3 are re-applied over the new split and make prints
Byte-identical ROM verified.
Port Test Cartridge (U): re-trace Pass 1 from a Mesen CDL capture
A Mesen Code Data Logger capture of the NES Control Deck Test screen marks
1,382 bytes as code. Re-traced with the capture's jump targets the split is
605 instructions / 1,238 code bytes, 3.8% of the PRG against 0.7% before.
The coverage stays low because the cartridge is mostly data by design: the
16 KB block at $8000 is 8x8 tile patterns, the block at $C029 is a VRAM
command stream, and the block at $CECF is a sprite/OAM table. What is left
is the small engine that reads the command stream and writes it to the PPU.
Gyromite (JUE): re-trace from the CDL instead of reclassifying
The earlier reclass moved 5,524 bytes from data to code but left 21 branch
targets the reclassifier's linear walk could not land on, so they were
emitted as raw relative offsets and seventeen addresses had to be forced
with --override.
Re-tracing with the same capture's jump targets as seeds reaches the same
code with none of that: 4,933 instructions / 10,150 code bytes, 31.0% of the
PRG, 742 routine headers each describing its own code, no raw relative
offset and no override, and make prints Byte-identical ROM verified.
Restore the data-block header spelling and add analyze_data_blocks.py
The separator change that gives derive_clobbers.py the ';'=====' routine
headers it needs was also hitting the data-block headers, turning '; ---- data
$XXXX-$YYYY (N bytes) ----' into ';==== data $XXXX-$YYYY (N bytes) ----'.
The conversion now only touches a line that is nothing but dashes.
_new _tools/analyze_data_blocks.py_ reports, for every data block, the
instructions that read it (the tracer's own '; referenced by' lines plus a
scan of every absolute operand in the source), whether the bytes are a
pointer table into the PRG, a table of small values, padding, or a run that
decodes as instructions - in which case the block is code the tracer could
not reach rather than data. That is the evidence a table's name has to be
based on.
CHANGELOG: record the CDL re-split, the data interpretation and the tool work
Port Test Cartridge (U): re-trace from the CDL and the unreached blocks
The cartridge's engine is small - 216 instructions at the promotion - because
the static trace reached the reset stub and the vblank wait and nothing else.
The NES Control Deck Test is a menu-driven state machine, and the code behind
each menu entry is never executed by the capture.
Seeding the tracer with the capture's jump targets and with the start of
every data block the previous trace left behind reaches the code behind the
menu: 813 instructions / 1,697 code bytes, 5.2% of the PRG against 0.7% at
the promotion.
Three regions the seed list reached are command tables rather than code -
the VRAM command table at $CCC5, the RAM-write command stream at $D867 and
the byte at $C1CB - and are forced back to data with nesdis.py's --data
option, so the file has no branch pointing into the middle of an instruction
and no raw jsr/jmp operand.
New _tools/code_data_seeds.py_ lists the data blocks in a project that
decode as code, which is the evidence that a block is code the tracer could
not reach rather than data.
Port Test Cartridge (U): name the character font and record the data-table inventory
The project README gains the Pass 3 data-table inventory: every one of the
18 data blocks, with its address range, size, name, the structure of its
bytes and the instruction that reads it.
Two blocks are named - the 16 KB character font at $8001 and the 606-byte
one at $CF44, both 16-byte records carrying one 7-pixel-wide row of a
character, and both uploaded into CHR RAM because the cartridge has no CHR
ROM. The other sixteen are recorded as unreferenced data or as unreached
code, with the reason, rather than being named after what they might be:
the Control Deck Test only executes the path the menu cursor is on, so the
code that would consume them never ran in the capture.
The README's status, open-work and file sections are brought up to date.
Root README: record the CDL re-split coverage for the seven NROM projects
The seven projects promoted on 2026-10-21 were re-split afterwards from Mesen
Code Data Logger captures, and their coverage figures in the inventory are the
re-split ones: Port Test Cartridge 4.8%, 10-Yard Fight 32.0%, Chubby Cherub
41.4%, Dig Dug II 53.5%, Gyromite 31.0%, Hydlide 47.8%, Ice Hockey 39.5%.
AGENTS.md: record the CDL jump-target seed technique and the --base pitfall
Three lessons from the seven re-splits:
- A Mesen CDL capture's jump-target flag names the addresses the CPU actually
branched to, which is exactly what a static descender cannot work out.
nesdis.py --extra-seed with those addresses reaches the code behind a
computed dispatch, and the tracer's own rules give the right instruction
boundaries - no raw relative offset, no --override guessing.
- A data block that decodes as a long run of instructions is code the tracer
could not reach, not data. code_data_seeds.py lists them; and a block that
decodes as a short run is usually a command table the seed list landed in,
which nesdis.py --data forces back.
- name_data_region.py needs --base for anything but a 16 KB PRG at $C000.
WIP.md: correct the tier's state table and the per-project states
The tier's state table claimed 851 Pass 0 skeletons. Counting the
instruction lines in each project's prg.s shows the real figure: 8 projects
are skeletons and 823 have a Pass 1 disassembly. Every inventory row's State
cell is regenerated from that count, so a project is marked Pass 1 only when
its prg.s really carries instructions.
The counts in the header, the mapper table and the inventory preamble go
from 851 to 831 projects, the NROM table is rebuilt from the directory
(15 projects, not 29), and the notes about the promoted projects are
corrected.
Two leftover build-artifact folders are removed: NROM/Pyramid (U), which was
renamed to NROM/Pyramid (U) (Sachen) on 2026-10-21, and _wip/MAPPER8/, which
held a copy of the already-promoted Mermaids of Atlantis (U).
Dig Dug II (U) [!]: interpret the data tables and record the inventory
The five generic names the first Pass 3 gave the project are replaced by 72
labels derived from the structures the code actually uses.
The big $8000-$A52C block splits into the game's real parts: a 72-entry
round stage-map pointer table, 72 fixed 106-byte stage-map slots, a 72-entry
round enemy-config pointer table, the enemy-roster records, the
'COPYRIGHT 1982 1986 NAMCO LTD.' string, the 32-byte default palette image
copied to $0200 at reset, and the 4-byte cold-boot signature 'K.N.'.
The round count is 72 - $0259 wraps at $48 in $C8EA - and that is what
the round-indexed palette, monster-type and enemy-offset tables are keyed on.
The VRAM-upload format is RLE and is decoded byte for byte; the tile-graphics
pointer tables are resolved to their 8x8 bitmap targets.
34 of the 37 tracer blocks carry at least one name. $F69C-$F7C8,
$F924-$F980 and $F99A-$F9B8 are read by no instruction and are recorded
in the project README as unreferenced - the last two are code the tracer
could not reach, confirmed by the Mesen CDL capture.
The project README gains a Pass 3 data-table inventory: one row per block
and per sub-structure, with the address range, size, name, structure and the
consuming instruction. make still prints Byte-identical ROM verified.
derive_routine_docs.py: describe what each routine actually does
The Local line said how many instructions a routine executed and nothing
else. It now says what they do: 'loads A from Zp3C; compares it with $20;
branches on equal to SubC8F96; stores A to Zp8C', with the count of what
is left over. Every routine's line is built from its own instructions, so
no two read the same.
Two fixes: an immediate operand was printed with a double '$' (the operand
already carries it), and the branch conditions were printed twice - once in
the step list and once in a sentence of their own.
Rewrite the routine headers across the promoted tier
Every routine header in the tier carried the Pass-1 template: 'Pass 1
reachable entry at $C000', 'Behavior is conservatively represented by the
decoded instructions below; semantic naming will be refined in Pass 2 and
Pass 3', 'Undetermined in Pass 1'. That is filler, and it describes the
process rather than the ROM.
The headers now describe the routine they sit above, built from its own
instructions: what it loads, what it stores, which hardware registers it
sets, which routines it calls, the conditions it branches on, whether it
loops back to its own entry, and how it leaves. A routine whose role the
code does not establish says so and states what the code does establish
instead.
The Clobbers block of every header is derived by derive_clobbers.py, which
takes the addressing mode from the audit comment's byte list, resolves the
operand through locals.inc and symbols.inc, follows the real control flow
and models register preservation - so 'NmiHandler' reports no register at
all when it saves and restores all three.
derive_clobbers.py and derive_routine_docs.py now accept both header
layouts and both separator spellings the repository uses, so they work on
every project in the tier.
Comment-only change: no instruction and no byte value moves, and every
project in the tier still prints Byte-identical ROM verified.
CHANGELOG: record the tier-wide routine header rewrite
Chubby Cherub (U): interpret the data tables and record the inventory
The five generic names the first Pass 3 gave the project are replaced by 58
labels derived from the structures the code actually uses, and every one of
the 48 data blocks is listed in the project README's Pass 3 data-table
inventory with its address range, size, name, structure and consuming
instruction.
The breakthrough is the character encoding. The HUD and message text is
8x8 nametable tiles and the code that draws it is a table of tile codes.
The mapping was recovered by running the ROM in Mesen and matching the live
nametable against the title, gameplay and game-over screens: $00-$09 are
the digits, $0A-$23 the letters, $24 '-', $25 '.', $26 the trademark,
$2D a heart, $2E '!', $2F the copyright sign, $30 a space and $33 a
blank. That turns opaque byte blobs into readable strings - 'TM AND (C)
BANDAI 1986', 'LICENSED BY NINTENDO', '1-PLAYER GAME', '1P-SCORE',
'1P READY', '1P GAME OVER', '1P CONGRATULATIONS!', 'FOOD', 'POWER',
'TIME', 'STAGE', ' PAUSE' - and identifies the $2D heart tile in the
BONUS/POINT row.
Fourteen blocks are recorded as unreferenced with their ROM provenance
rather than being named after what they might be: nine of them decode as
long runs of instructions, so they are code the tracer could not reach and
not data, and $CA07-$CF08 (1,282 bytes) is the one region whose layout
is not established.
make still prints Byte-identical ROM verified.
Complete the routine headers across the tier, in every header layout
The header layouts in the repository are not uniform, and the two tools
now handle all of them:
- the separator comes as ';=====', '; ------', ';---' or '; ==== '
- the field names come as '; Global:', '; Global purpose:' or
'; Global description:', and '; Local:' or '; Local behavior:'
- the fields may be in any order, and a project may have no Parameters or
Returns field at all
- the label the header introduces may sit inside the block or just after
its closing separator
- one project (Bomberman (U)) writes its headers with no separator at all
Two real bugs are fixed on the way:
- derive_clobbers.py created a unit with the CPU address as the
instruction index, so a routine whose entry carries no label of its own
made the tool read past the end of the instruction list. That is what
stopped it running on Wild Gunman (U) and Pac-Man (USA) (Namco).
- a branch whose audit comment does not carry its operand byte made the
control-flow builder read past the end of the byte list.
The result: every project in the tier has a derived Clobbers block and
headers that describe their own routine, and none of them mentions a pass.
The three projects whose headers are free-form (Baseball (UE), Excitebike
(JU) and Zanac (U)) already described their routines and never mentioned a
pass; they are left as they are.
Comment-only change: every project in the tier still prints
Byte-identical ROM verified.
Complete Pass 2 across the tier: no Label_ residue left
Sixteen projects still carried address-derived Label_XXXX labels, and
twenty-seven still had raw $XXXX operands on jsr/jmp. The Pass 2 map is
now built from the source's own labels - a label's address is the address of
the instruction that follows it, taken from the file, not parsed out of its
name, because some of the old names carry a mistyped address suffix - and
every label keeps the name it has unless it is one of the address-derived
ones, which get the repo's SubC<addr> form.
Three more real defects in the tools are fixed:
- derive_branch_names.py named a jsr/jmp target that no instruction sits at.
Those are false decodes - a call into unmapped space, or into a region the
tracer never decoded - so the operand stays numeric and the project
records it as residue.
- apply_pass2_map.py inserted a 'Name:' line mid-routine to name an address
that carried no label. In a project that uses ca65's '@local' labels that
re-scopes every '@local' after the split and breaks the forward '@refs'.
There the name now becomes an equate in locals.inc, which names the
address without touching the label scope.
- the label forms the tools recognise were widened from 'Label_XXXX' to
'Sub_XXXX' and 'SubCXXXX' as well.
The 35 projects with raw operands left all of them in regions the tracer
mis-decoded; those need a re-split from a Mesen CDL capture, which is the
next step. Every project still prints Byte-identical ROM verified.
Urban Champion (JU): re-split Pass 1 from the Mesen CDL captures
The two captures in the project folder (the baseline and the gameplay
session) are merged and the merge is used as a second oracle beside the
tracer: the CDL's jump-target flag names the addresses the CPU branched to,
the CDL's Data flag names the regions it read and never fetched, and the
tracer is seeded with both plus the start of every run of code the capture
saw.
The split goes from 33.8% code to 48.6%: 3,856 instructions / 7,958 code
bytes against 2,356 / 5,521. The 220 raw jsr/jmp operands are gone.
Two new tools: merge_cdl.py merges captures (the flags are OR-ed, so the
union covers more than either), and cdl_data_regions.py lists the regions the
capture says are data, for nesdis.py's --data option.
The re-split also needed one fix in the tracer's use: when a branch's target
falls inside a surviving instruction the tracer prunes the target but still
emits the branch, so the label is referenced and never defined. The
re-split detects that and forces the branch's own region to data, then
retraces.
apply_pass2_map.py: do not write the same equate twice
The equates go in locals.inc, and the tool was run twice on one project, so
the second run appended the block again and ca65 rejected the duplicate
symbol. The equate list is now checked against what locals.inc already
holds, and only the new ones are written.
Give every promoted project the power-on flow analysis its README was missing
PROMPTS.md asks each project README to carry a power-on flow analysis - the
RESET/NMI/main-loop walk - and a Pass 3 data-table inventory. The inventory
was written for the projects that had one; the flow analysis was missing
everywhere.
_new _tools/derive_poweron.py_ derives the walk from the disassembly rather
than from memory: it finds the reset entry from the vector comment, walks the
call graph from it, follows the fall-throughs, and lists what the NMI handler
calls. It also says whether the IRQ vector reaches the reset path.
_new _tools/add_poweron.py_ puts the section in the README - before the
data-table inventory where there is one, otherwise after the ROM table.
All 61 promoted projects now carry the section.
Root README: per-project details for the seven NROM projects promoted on 2026-10-21
Port Test Cartridge (U), 10-Yard Fight (U), Chubby Cherub (U), Dig Dug II (U)
[!], Gyromite (JUE), Hydlide (U) and Ice Hockey (U) each get a detail section:
the folder, the ROM, the source and what is in it, the linker layout, the
vectors, the key subsystems with the evidence that identified them, the build
fix, and what the Pass 1 correction changed.
Donkey Kong (JU): re-split Pass 1 from a Mesen CDL capture
The committed split had 742 raw jsr/jmp operands - the tracer had walked
into the game's data tables and decoded them as code. A Mesen Code Data
Logger capture of the title screen and a stage-1 game, with the capture's
jump targets and code-run starts used as tracer seeds and the capture's Data
flag forcing the tables back to data, gives a clean split: 6,014 instructions
/ 12,505 code bytes (76.3%), 1,015 labels, and no raw operand left.
Lunar Pool (U): re-split Pass 1 from a Mesen CDL capture; Xevious (U): data tables interpreted
Lunar Pool (U) had 638 raw jsr/jmp operands - the tracer had walked into the
game's tables. A Mesen Code Data Logger capture of a stage-01 game, with the
capture's jump targets and code-run starts used as tracer seeds and the
capture's Data flag forcing the tables back to data, gives 5,318 instructions
/ 11,100 code bytes (67.7%) and no raw operand left.
Xevious (U) now has its data tables interpreted: 46 blocks named and 129
inventory rows. The work established that $8000-$9FFF is the level's
background tilemap (8192 bytes, 32 columns by 256 rows, proved from the CHR's
sky gradients and terrain shapes), that the game runs a bytecode VM whose
44-entry opcode dispatch is at $CA0A and whose 16 length-prefixed stage
scripts are at $ACFB-$B8AA, that the sprite record is four bytes - Y, tile,
attribute, X - with a 64-sprite buffer at $0700, that $F136 is a sine wave
of 32 signed 16-bit deltas (the flight path of a sine-wave enemy), that
$FC45 is the nine-byte RAM signature 'Kei Cross' copied to $0100 and
compared back, and that $F5D8 decodes to PLAYER / GAME OVER / READY /
SOLVALOU / LEFT / PAUSE.
Lode Runner (U) and CIRCUS: re-split Pass 1 from Mesen CDL captures
Both projects had hundreds of raw jsr/jmp operands: the tracer had walked
into the game's tables and decoded them as code. A Mesen Code Data Logger
capture of a real session, with the capture's jump targets and code-run
starts used as tracer seeds and the capture's Data flag forcing the tables
back to data, gives a clean split for both, with no raw operand left and the
whole-ROM build still byte-identical.
Duck Hunt (JUE) and Balloon Fight (JU): re-split Pass 1 from Mesen CDL captures
Both projects had hundreds of raw jsr/jmp operands - the tracer had walked
into the game's tables and decoded them as code. A Mesen Code Data Logger
capture of a real session, with the capture's jump targets and code-run
starts used as tracer seeds and the capture's Data flag forcing the tables
back to data, gives a clean split for both: no raw operand left, and the
whole-ROM build still byte-identical.
Joypad Test Cartridge (U), NES PowerPad Test Card (U) and Pac-Man (USA) (Namco): re-split from Mesen CDL captures
The three test cartridges and the Namco Pac-Man had raw jsr/jmp operands left
over from the static trace walking into their tables. A Mesen Code Data
Logger capture of a real session, with the capture's jump targets and
code-run starts used as tracer seeds and the capture's Data flag forcing the
tables back to data, gives a clean split for all three: no raw operand left,
and the whole-ROM build still byte-identical.
Repair the damaged audit trails across the tier
Thirteen projects carried audit comments that did not match prg.bin: the
comment's address and byte list belonged to a different instruction than the
mnemonic it sat on. Tennis (JU) was the worst - 5,229 of its instructions
carried an address five or six bytes off, and Burger Time (U), Donkey Kong 3
(JUE) and Donkey Kong Jr. (JU) were damaged in the same way. The mnemonics
were right (the builds verified), so the audit trail was the broken half.
repair_audit_comments.py rebuilds the trail from the ca65 listing, using
prg.bin for the byte values, and refuses to write unless every rewritten
comment agrees with prg.bin. Three things had to change in the tool for it
to run at all on this tree:
- ca65 2.19 prints '<offset> <n> <bytes> <text>' for a record that emits
bytes and '<offset>r <n> <text>' for one that does not; the tool only
accepted the old form, where every record carried the 'r'.
- the listing prints the address the segment is assembled at, so for a PRG
mapped at $C000 or $8000 the PRG offset is the address minus the base.
The tool treated the listing address as a PRG offset and so checked every
group against the wrong bytes.
- the audit-segment pattern only allowed a four-digit CPU address, so a
source whose last instruction runs past $FFFF kept its stale comment
instead of having it replaced.
All 322,830 audit comments in the tier now agree with prg.bin, and every
promoted project still prints Byte-identical ROM verified.
Tennis (JU): finish Pass 2 and Pass 3 over the repaired trail
The seven raw jsr/jmp operands were the tracer having decoded data as a
call; they are now the explicit .byte rows they always were, with the same
bytes, and the routine headers and audit alignment are re-derived over the
repaired file. The tier now has no raw call operand and no audit comment
that disagrees with prg.bin.
_new _tools/build_routinemap.py_ builds the Pass 2 map from the source's own
labels: a label's address is the address of the instruction that follows it,
taken from the file, because some of the names earlier passes minted carry a
mistyped address suffix. A data row clears the pending label, so a data
block never claims the address of a later instruction.
Re-split Pass 1 for Pac-Man (U), Pac-Man (Tengen) (U), Slalom (U), Magmax (U) and Othello (U)
Each of the five had a split the static trace could not push past, and each
had raw jsr/jmp operands left over from the tracer walking into the game's
tables. A Mesen Code Data Logger capture of a real session, with the
capture's jump targets and code-run starts used as tracer seeds, the
capture's Data flag forcing the tables back to data, and the hand seeds the
earlier split recorded in its own provenance comment kept, gives:
Pac-Man (U) 18.7% -> 45.9% 3,734 instructions / 7,528 bytes
Pac-Man (Tengen) (U) 20.0% -> 47.3% 3,842 instructions / 7,744 bytes
Slalom (U) 32.1% -> 31.8% 4,983 instructions / 10,414 bytes
Magmax (U) 35.4% -> 36.5% 5,696 instructions / 11,954 bytes
Othello (U) 43.3% -> 44.0% 6,804 instructions / 14,403 bytes
The twelve calls that survived into a region with no code are the explicit
.byte rows they always were, with the same bytes. Every project still
prints Byte-identical ROM verified.
Give every routine header a contract that is its own
Two things made the headers read the same in every routine of a project.
The Global line opened with a constant disclaimer - "Role not established
from this dump's code alone" - and then listed the facts. The disclaimer
said nothing about the routine, so it was filler. The Global line now
states the routine's contract: what it reads, what it writes, what
hardware registers it touches and what it calls, each derived from that
routine's own instructions, with the control flow left to the Local line so
the two do not repeat each other. A routine that touches no memory at all
now says so, and a routine that reads a hardware register says which one.
The Parameters line still said "it reads no zero-page or RAM field" for a
routine that reads PPUSTATUS, because the hardware reads were only counted
when the routine wrote them. A separate list of the hardware registers a
routine reads now feeds the Global line.
derive_clobbers.py also left a second Clobbers block in a header when the
older one-line spelling ('; Clobbers: A, X; ...') was present: it removed
only the multi-line form. Both spellings are removed now, and the derived
block replaces them.
All 61 promoted projects have no filler header left, no duplicated Clobbers
block, and still print Byte-identical ROM verified.
Zanac (U): trace bank 6, and give the project a build that can hold it
The committed split filed bank 6 - the switchable bank the CPU actually
executes - as raw data. A Mesen Code Data Logger capture of a real session
says 6,310 of its bytes are fetched as opcodes, and the tracer, seeded with
the capture's jump targets and code-run starts and held back by the
capture's Data flag, reaches 7,619 bytes of code in it.
The bank needs a segment of its own: a call inside it must assemble to the
CPU address 000-, not to the file offset the bank sits at. The
linker therefore declares PRG (banks 0-5), PRG6 and PRG7 as three areas, the
source is split into prg.s, prg.6.s and prg.07.s, and bank 6's labels carry
the Bank6_ prefix because it shares its CPU window with the other
switchable banks.
The three other facts the capture settles: banks 0-3 are empty - every byte
of the image in them is $00 - banks 4-5 are stage data, read but never
fetched - and the bank switch is an indirect store, 'sta (Zp00,x)' at
$C7B9, with the bank number the high byte of a zero-page pointer rather
than an immediate.
The coverage goes from 32.5% to 44.5% of the 128 KB image. Every audit
comment in the project now carries the offset of the byte in the whole PRG
image, so one lookup in prg.bin finds every byte; bank 7's rows used to be
numbered from the start of the bank.
Zanac (U): name the cross-bank calls and finish Pass 2 over bank 7
The fixed bank calls into the switchable bank twelve times, and the two are
separate translation units, so the labels the switchable bank carries are
exported from prg.6.s and imported into prg.07.s. The one call left over
points into unmapped space and is the explicit .byte row it always was.
Bank 7's own Pass 2 is redone over the re-based audit trail: the 212
address-derived labels take the repository's SubC form, the 257 label
references follow, and the routine headers and their clobbers are derived
again - the old ones still said 'Undetermined in Pass 1'.
Zanac now has 44.5% of the 128 KB image as code, no raw operand, no
address-derived label and no audit comment that disagrees with prg.bin.
Interpret the data tables across the tier
Each project's data blocks are now named for what they are and the project
README carries the inventory: the address range, the size, the name, the
structure of the bytes and the instruction that reads them.
Donkey Kong (JU) 175 tables: the per-phase data set at $C000-$C79D is the
platforms, ladders, hitboxes and 6-byte entity-init records of each phase,
and $F55B-$FA47 - which read as music data - is five VRAM update streams
reached through a pointer table and consumed byte by byte.
Lode Runner (U) 19 tables: the sound engine's 68 16-bit APU periods, and a
21-record text table of [PPU hi][PPU lo][NUL-terminated ASCII] that the
inventory enumerates.
Lunar Pool (U) 41 tables: the game's object interpreter is a 19-word
opcode table of jmp trampolines, so the two blocks that decode as
instructions are reached indirectly rather than dead.
Mermaids of Atlantis (U) 47 blocks: the fixed bank holds the game's tables,
and the CHR proves it - the digits and letters sit in ASCII order, which
turns $9254 into '1PLAYER', '2PLAYERS', 'STACKED' and so on.
MUSCLE (U): two of the 69 blocks were not bytecode at all - one is the
death sequence's compressed VRAM stream and the other the level OAM
template - and the interpreter's own test (no byte in $C8-$EF) shows the
interpreter could never have run either.
Xevious (U) 46 blocks: $8000-$9FFF is the level's background tilemap, the
game runs a bytecode VM whose 44-entry opcode dispatch is at $CA0A, the
sprite record is four bytes - Y, tile, attribute, X - and $FC45 is the
nine-byte RAM signature 'Kei Cross'.
Ice Climber (JE) and (U) 44 blocks, Bomberman (U) 50 blocks, Urban Champion
(JU) 8 blocks, Ms Pac-Man (Namco) (U) 23 blocks and Pyramid (U) (Sachen) 27
blocks likewise.
Every project still prints Byte-identical ROM verified.
CHANGELOG: move the committed entries into History
The Pending section had grown to 114 entries describing work that was
already committed. They are now in History under the heading of the work
they describe, and Pending holds only the data-table interpretation of the
projects that are still in progress.
Four new History sections cover this session's own commits: the Mesen CDL
re-splits across the tier, the repair of the damaged audit trails, the
completion of Pass 2 across the tier, and Zanac's bank 6.
Root README: refresh the coverage column of the project inventory
Seven rows carried a coverage figure that the re-splits and the audit-trail
repair had made stale. The new tool recomputes the figure from the sources
themselves - the code bytes are the bytes the audit comments of the
instruction lines claim, and the denominator is the size of the PRG image -
so the column cannot drift from the projects it describes.
Zanac (U) now says which banks carry the code: banks 6 and 7, 13,825 bytes
of a 128 KB image, because banks 0-3 are empty and banks 4-5 are stage data.
Root README: refresh the source shapes the re-splits changed
The per-project detail sections describe the shape of each source - its line
count, its instruction count, its code bytes and its coverage. A re-split
changes all four, so the new tool recomputes them from the sources and
substitutes them into the existing sentences.
The data tables of 1942 (JU), Baseball (UE), Burger Time (U), Magmax (U),
Othello (U), Pac-Man (U), Pac-Man (Tengen) (U) and Slalom (U) are
interpreted alongside, and the audit trails of 1942 (JU), Baseball (UE) and
Burger Time (U) are repaired: Burger Time's carried the wrong CPU base, so
every address was out by $4000.
AGENTS.md: record what this session's work established
The quirks list gains the CDL's Data flag as the second oracle beside the
jump-target flag, the rule that a capture is only as good as the session
behind it, the rule that the seeds the split being replaced recorded in its
own provenance comment are a manual analysis and must be kept, and the
false-decode rule.
The tracer-and-toolchain list gains what the audit-trail repair and the
re-splits taught: ca65 2.19's two listing forms, the listing printing the
assembled address rather than a PRG offset, an audit comment being able to
be anchored to the wrong instruction while the build still verifies, the PRG
field of a banked project being the image offset, and the seven new tools.
TODO.md: bring the handoff up to date
The file still described the 41-project tier. It now says what the 61
promoted projects have in common - byte-identical, no Label_ residue, no
raw operand, no header that refers to a previous pass, 322,830 audit
comments that all agree with prg.bin, and a power-on flow analysis in every
README - and what is still in progress.
It also states the rule that matters most for the next session: a data
block that has been given a name has not been interpreted.
Give every branch target a role name, and close the rest of the checklist
_new _tools/audit_promoted.py_ checks the promoted tier against all eleven
items of PROMPTS.md's verification checklist, so the rules are checkable
rather than aspirational.
Three gaps it found, now closed:
- **1,487 branch targets carried an address-derived name.** PROMPTS.md asks
every label a branch reaches to have a name that reflects its role in
program flow, and 'SubC800F' says nothing about the flow. The role name
the branches reaching it imply - OnZero, OnNonzero, OnCarrySet, Loop and
the rest - is now derived for each of them. derive_branch_names.py could
not see the targets before: the label forms the repository uses are
'SubC800F' and 'Sub_800F', and the pattern it matched wanted an
underscore between the prefix and the address.
- **48 operands named a hardware register by its address.** Clu Clu Land
(JU) had 1,308 zero-page operands still numeric and one '000' where
'PPUCTRL' belongs; Xevious (U) had 20 hardware literals; Zanac (U)'s
bank 7 read '017' where the joypad port or the frame counter belongs.
Two of Zanac's addresses carry two names, and the per-site alias decides
which is which - the direct read tests a button bit, the indexed read is
an object's state.
- **325 neutral zero-page slots carried no reason.** locals.inc now says,
per slot, that the name is provisional.
The tools grew to match: apply_symbols.py accepts an upper-case mnemonic,
apply_zp_aliases.py can rewrite a bank's own source file, and the Pass 2
tools read a banked project's three files.
Every project still prints Byte-identical ROM verified.
PROMPTS.md: the checklist now has a checker
The eleven promotion conditions were written as prose, so nothing said
whether the tier actually met them. _tools/audit_promoted.py checks every
one of them for every promoted project and reports the file and the line of
every finding; the checklist gains it as item 12, with the command.
CHANGELOG: record the checklist work
audit_promoted.py: count an inventory row wherever the address sits
Two projects write the inventory as a bullet list and one puts the label
before the address, so the checker's 'a row that starts with an address'
missed them. A row now counts when it holds a $XXXX address in any cell.
Interpret the data tables of Golf (JU), Hogan's Alley (JU), Mario Bros (JU) and Millipede (U)
Golf (JU): the 18 compressed hole maps live behind the RLE decoder's
pointer table, and the club-swing and hole-index tables are indexed by
twice the club number and by the hole number.
Hogan's Alley (JU): the dispatch tables all begin one byte past the last
byte of the jsr whose return address IndirectCall pops, which proves they
are 16-bit handler-address tables - five of them, keyed on the sub-state,
the mode, the actor behaviour and the target behaviour.
Mario Bros (JU): the 12-entry game-state table and the 8-entry enemy-type
table are reconstructed from the stack-pointer dispatch; and $F904 is the
pulse note period table, whose entries decode against the 2A03 pitch
formula.
Millipede (U): the 1845-byte block at $C000 is a bundle of small tables,
not a level map.
Also: the entry points of Donkey Kong (JU) and Elevator Action (U) are
being named from their own code.
Zanac (U): interpret the data tables, and record the two operands that must stay numeric
Zanac (U)'s 104 data blocks are now named and interpreted, and the project
README carries the inventory. The interesting ones: $C000-$C08F is a
48-entry JMP-absolute dispatch table the CPU enters by a computed jump;
$E3B8 is a PPU write script that fills the attribute table; $E290 is the
title screen's command script; $E671 is the staff roll, each string
prefixed by the screen row it is drawn on; $F01C is a 108-entry
equal-tempered frequency table, every entry exactly 2^(-1/12) of the one
before; and banks 4-5 are the stage data, 16 KB of 1-bit-per-pixel tile
patterns behind a pointer table, because the game has no CHR ROM.
name_data_region.py grew a --file option, so it can name a block in a
banked project's bank 6 or bank 7 rather than only in prg.s.
Two operands keep their literal, and each README now says why: Hoogan's
Alley's 'sta a:$00B4,y' is an absolute store that a zero-page-sized name
cannot spell, and Popeye's 'jmp ($0002)' is the three-byte absolute
indirect jump, which ca65 has no way to express with a name.
Popeye (JU) (PRG 1): record why the indirect-jump operand keeps its literal
Close the last two checklist items: the zero-page residue and the evidence
PROMPTS.md's item 8 asks that apply_symbols.py leave no resolvable operand
numeric without justification. Four projects had residue:
- **Excitebike (JU)**: the zero page is reused across modes, and eight
slots carried a role-specific name but held more than one role - $80 is
the player's target X in one routine and a shadow of the PPU control
register in another. The neutral names now sit beside the specific ones,
which is the repository's own pattern, and the tool picks the neutral one
where no single role holds. Its residue is zero.
- **Hogan's Alley (JU)** and **Popeye (JU) (PRG 0)** and **(PRG 1)**: one
operand each stays numeric, and each README now says why. 'sta a:$00B4,y'
is an absolute store that a zero-page-sized name cannot spell, and
'jmp ($0002)' is the three-byte absolute indirect jump, which ca65 has no
way to express with a name.
apply_symbols.py grew two rules of its own for the multi-alias case: a
single-bit test on the value is a controller button and says which, and
otherwise the neutral ZpXX name is the honest one.
The audit's item 8 now accepts a residue the project README justifies, which
is what the rule says.
Every project still prints Byte-identical ROM verified.
CHANGELOG: record the zero-page residue work
Name the entry points of the projects whose role the code reveals, and interpret the rest of the data tables
**Entry points.** PROMPTS.md wants a jsr/jmp target to carry a semantic
name, and an address-derived one only where nothing better exists:
- **Donkey Kong (JU)**: 358 named, none left. 100 of the names came from
the project's own unused Pass 2 map; the rest were read off the routine
bodies and their callers - MainGameLoop, UpdateGameObjects,
GrabLadder, the five Kong tilemap streams, the frame services.
- **Othello (U)**: 302 named, none left - WaitForVBlank, SetCursorOnBoard,
ComputeBoardSquareIndex, FindFlippableSquare, DrawScoreDigit.
- **Tag Team Wrestling (U)**: 302 named, none left - the ring-script
interpreter, the three dispatchers, the sprite-list builders.
- **Clu Clu Land (JU)**, **Defender 2 (U)**, **Donkey Kong 3 (JUE)** and
**Donkey Kong Jr. (JU)**: their data tables are interpreted.
**Data tables.** Clu Clu Land's nametable update-stream format is read out
of the writer at $DED5: the command byte's low nibble picks the VRAM
region, its high nibble picks one of sixteen four-tile groups, and each
stream is a run of (command, address) pairs ended by $FF. Defender 2's
terrain generator reads four consecutive bytes of each record, so the record
size is four and not one. Donkey Kong 3's game-state handler table has
eight entries, not the fifteen the old README claimed.
name_data_region.py now cuts a .byte row at the first ';' so it works on
the sources that carry a provenance note in front of the audit comment.
Every project still prints Byte-identical ROM verified.
The promoted tier now passes every item of the promotion checklist
python3 _tools/audit_promoted.py --build reports nothing for all 61
projects.
**Data tables.** CIRCUS, Duck Hunt (JUE) and Balloon Fight (JU) join the
rest. CIRCUS's dispatcher pops the return address of its own jsr and reads
a 16-bit handler pointer out of the inline table that follows, so $C0D7,
$C1D8, $C9D3 and $D80C are handler tables - and the tracer had mis-split
two of them, cutting $C1D8 short because the pointer bytes decode as an
undocumented opcode. Duck Hunt's $E64B is the duck's 24 ascending speed
table. Balloon Fight's $D65C is 64 little-endian nametable addresses.
**Entry points.** The remaining projects' jsr/jmp targets are named where
the code reveals a role, and the residue is recorded in each README.
**One more tool fix.** name_data_region.py cuts a .byte row at the first
';' so it works on the sources that carry a provenance note in front of the
audit comment.
Every project still prints Byte-identical ROM verified.
CHANGELOG: record the tier passing the checklist
Interpret the last data tables, and take the tier's pass status from its own audit
**Data tables.** Tag Team Wrestling (U), World Class Track Meet (U),
Wild Gunman (U) and Tennis (JU).
Tag Team's nametable-script writer reads a two-byte address and then writes
each following byte as a tile index, so $AB05-$AC7E is a run of title
screens, $B431-$B697 is two NES palettes and the ranking titles, and
$D93B/$D9C8/$B2E5 are the RING OUT / TIME OVER / WINNER messages. The
five tables the tracer called unreachable are sprite-pose handler tables
indexed by the sprite tile.
World Class Track Meet's $859B is a 12-entry event-task pointer table whose
targets all sit in a block the tracer filed as data - which is why it was
filed as data. Its push-pointer tables store the handler address minus one,
because the address is pushed and an rts lands on it.
Wild Gunman's earlier Pass 3 was hollow: the tracer reached 49.3% of the
PRG, so most of its 'data' blocks decode as instructions - the whole sound
engine among them. The wrong SpritePositionTable name is gone.
Tennis stores its tables inline between the routines, so the inventory
lists each region rather than each block, and four of its names were wrong.
**Root README.** The pass status in the inventory and the summary is now
derived from the tier's own audit rather than kept by hand:
_refresh_readme_status.py_ rewrites the column from what
_audit_promoted.py_ finds.
Every project still prints Byte-identical ROM verified.
Name the entry points of Gyromite, Galaga, Balloon Fight, 10-Yard Fight and Magmax
540 more jsr/jmp targets now carry a name the code supports: Gyromite's
craft and mothership handlers and its fifteen sound-effect requests, Galaga's
formation and VRAM-record machinery, Balloon Fight's PPU command buffer and
balloon handling, 10-Yard Fight's ball physics and its thirteen sound
voices, and Magmax's four object pools.
Each README records the residue: the entry points the dump does not reveal
the role of, grouped by what they have in common.
Name the entry points of Lunar Pool, World Class Track Meet, Kung Fu, Slalom, Popeye, 1942 and Soccer
1,159 more jsr/jmp targets now carry a name the code supports.
Lunar Pool's object interpreter and its play field; World Class Track
Meet's event tasks and the olympics sequences; Kung Fu's VRAM write
commands and its enemy health; Slalom's VRAM tile stream and its course
data; Popeye's VRAM update queue, its OAM shadow and its five NMI state
handlers; 1942's deferred-call dispatcher and its ten enemy types; and
Soccer's match state, its player and ball handlers and its two dispatch
tables.
Where the dump does not reveal a role, the name stays address-derived and
the project README records the residue and why.
Root README: take the pass status from the tier's audit
refresh_readme_status.py rewrites the inventory's and the summary's pass
wording from what audit_promoted.py finds, so the two cannot disagree.
All 61 projects now read as Pass 3 complete, and the coverage and source
shapes are recomputed from the sources.
Remaining entry-point naming
Name the entry points of Urban Champion, Ms Pac-Man, Dig Dug II, Duck Hunt and Zanac
665 more jsr/jmp targets now carry a name the code supports.
Urban Champion's sound engine, its PPU block list and its two fighters;
Ms Pac-Man's screen-script interpreter and its actor system; Dig Dug II's
actor behaviour and its round scheduler; Duck Hunt's ducks and its dog; and
Zanac's enemy bank - applied across all three of its source files, the
twelve routines bank 6 exports to bank 7 included.
Ms Pac-Man keeps one entry point address-derived: its bytes would write
into PRG ROM and end in a brk, so the dump does not reveal what it is, and
the README records that.
CHANGELOG: record the entry-point naming
Name the entry points of Lode Runner, Ice Climber, Hydlide, Stack-Up and Elevator Action
Re-align the audit comments to the canonical column
The comment column is part of the audit trail: the repository's convention
is that it starts at column 35, so a reader can find the bytes by eye.
Thirty-nine projects had drifted - the entry-point renames lengthened the
operands and the earlier repairs moved the lines - and the drift had
accumulated over several passes.
align_audit_comments.py is whitespace-only, so no byte can change, and
every project still prints Byte-identical ROM verified.
Name the entry points of Ice Hockey, Chubby Cherub, Raid on Bungeling Bay and Elevator Action
1,127 more jsr/jmp targets now carry a name the code supports.
Ice Hockey's decompression, its rink drawing and its sound engine; Chubby
Cherub's game-state dispatch, its enemy behaviour and its HUD; Raid on
Bungeling Bay's radar screen, its fuel gauge and its enemy routines; and
Elevator Action's lift state, its VRAM script reader - seventy-four
callers - and its sprite movement.
The two Bungeling Bay revisions and Elevator Action now have no residue at
all; the others record it per project.
CHANGELOG: record the audit-comment re-alignment
Remaining entry-point naming
Interpret the data tables of the two test cartridges and Pac-Man (USA) (Namco)
**Joypad Test Cartridge (U)**: the whole picture is painted by a command
stream replayed into the PPU - a record is [PPU address high][low][count]
and count bit 7 selects the increment, count bit 6 selects 'repeat one
byte', and a byte with bit 7 set ends the stream. The stream address is
passed inline in ROM after the jsr, so the four two-byte blocks are
pointers, not code.
**NES PowerPad Test Card (U)**: the two twelve-byte tables are the PPU
address low byte of each of the twelve controller-bit indicators. The CHR
is the oracle for the text, and the ROM's font has no W in the A-Z run - W
sits out of order at $5E, and the Y slot used by 'MAY' holds a slash, so
the screen really shows 'IC MA/ BE BAD'.
**Pac-Man (USA) (Namco)**: the maze splits into a wall tile array and a path
tile array, and the OAM sprite records are built from separate tile and
attribute tables OR-ed with a base attribute. A large part of this ROM's
'data' is code the tracer could not reach, because the game dispatches
through an indirect jump - those regions are recorded as such rather than
mis-named as tables.
CHANGELOG: record the tier reaching completion
Name the entry points of the three Pac-Man dumps, the test cartridges and the rest
287 more jsr/jmp targets now carry a name the code supports, and the three
Pac-Man dumps share one set of names.
Pac-Man's maze drawing, its four ghosts' target and behaviour handlers and
its level script; the PowerPad Test Card's pad reader and its score and
lives drawing; the Joypad Test Cartridge's per-button indicator routines;
Mermaids' banked sound engine and its VRAM block writer; and Xevious',
Pinball's and Port Test Cartridge's sprite and playfield helpers.
Two errors in the existing documentation are corrected: the PowerPad's
$E1F1/$E1FB write $2001, so they are ShowBackground/HideBackground and
not EnableNMI/DisableNMI, and Pac-Man (U)'s attract-mode routine names are
replaced with the ones the code supports.
Every project still prints Byte-identical ROM verified.
CHANGELOG: the final entry-point numbers
18669 lines
1.1 MiB
Plaintext
18669 lines
1.1 MiB
Plaintext
; Galaga (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=$C0C8 RESET=$C000 IRQ=$C000
|
|
; PRG mapped at $8000-$FFFF (NROM, mirrored to the upper half)
|
|
;
|
|
; Pass 1 trace provenance (the audit trail behind every classification below):
|
|
; 1 further routine entries recovered from table references elsewhere in the image:
|
|
; $DF8E
|
|
; entries seeded by hand after inspecting code-shaped but unreferenced blocks:
|
|
; $BE00, $C000, $C01C, $C0BD, $C115, $C117, $C1A7, $C3A1, $C3B5, $C3CA, $C41A, $C42C, $C4A0, $C5A0, $C65A, $C693, $C8AB, $C8C4, $C90B, $C937, $C957, $C993, $C9CE, $C9DE, $CA17, $CA39, $CA91, $CAF6, $CB38, $CB56, $CB79, $CBDE, $CC38, $CC70, $CCD0, $CD1A, $CDB3, $CDD6, $CE00, $CE4F, $CEFC, $CFFD, $D046, $D103, $D17B, $D273, $D293, $D410, $D509, $D624, $D6E7, $D7B0, $D7BA, $D7D1, $D80C, $D81A, $D882, $D913, $D928, $D951, $D9D0, $DB43, $DB80, $DC38, $DC6E, $DC7D, $DCBF, $DCCF, $DCDC, $DCEE, $DD17, $DD68, $DD7A, $DDD8, $DDEE, $DE01, $DE10, $DE23, $DE4A, $DE64, $DEA5, $DEB5, $DEC1, $DEF1, $DF6F, $DF97, $DFBC, $E03E, $E113, $E16F, $E1E9, $E24D, $E299, $E2CB, $E2E4, $E336, $E383, $E3AC, $E3D4, $E3EE, $E426, $E45D, $E473, $E482, $E488, $E49D, $E4A1, $E4D5, $E619, $E620, $E62B, $E640, $E651, $E67D, $E69B, $E6AD, $E6C8, $E7B6, $E867, $E88E, $E8E1, $E94B, $E965, $EADA, $EC85, $EC93, $ECA5, $ECB7, $ECC9, $ECD3, $ECDD, $ECE7, $ECF3, $ED0B, $ED14, $ED3B, $F790
|
|
; indirect dispatch through zero page (not followed statically):
|
|
; jmp ($001E) at $C314
|
|
;
|
|
.setcpu "6502"
|
|
|
|
.include "symbols.inc"
|
|
.include "locals.inc"
|
|
|
|
.segment "PRG"
|
|
|
|
; ---- data $8000-$BDFF (15872 bytes) ----
|
|
; referenced by `sty $8CD8` at $D87E (operand $8CD8 falls inside this region)
|
|
; referenced by `rra $97DF` at $DB6E (operand $97DF falls inside this region)
|
|
; referenced by `ror $86DC` at $DC52 (operand $86DC falls inside this region)
|
|
ErasedPrgFill:
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8000 PRG:-4000 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ; CPU:$8000 PRG:0000 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8010 PRG:0010 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8020 PRG:0020 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8030 PRG:0030 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8040 PRG:0040 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8050 PRG:0050 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8060 PRG:0060 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8070 PRG:0070 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8080 PRG:0080 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8090 PRG:0090 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80A0 PRG:00A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80B0 PRG:00B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80C0 PRG:00C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80D0 PRG:00D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80E0 PRG:00E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$80F0 PRG:00F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8100 PRG:0100 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8110 PRG:0110 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8120 PRG:0120 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8130 PRG:0130 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8140 PRG:0140 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8150 PRG:0150 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8160 PRG:0160 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8170 PRG:0170 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8180 PRG:0180 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8190 PRG:0190 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81A0 PRG:01A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81B0 PRG:01B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81C0 PRG:01C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81D0 PRG:01D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81E0 PRG:01E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$81F0 PRG:01F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8200 PRG:0200 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8210 PRG:0210 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8220 PRG:0220 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8230 PRG:0230 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8240 PRG:0240 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8250 PRG:0250 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8260 PRG:0260 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8270 PRG:0270 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8280 PRG:0280 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8290 PRG:0290 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82A0 PRG:02A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82B0 PRG:02B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82C0 PRG:02C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82D0 PRG:02D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82E0 PRG:02E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$82F0 PRG:02F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8300 PRG:0300 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8310 PRG:0310 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8320 PRG:0320 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8330 PRG:0330 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8340 PRG:0340 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8350 PRG:0350 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8360 PRG:0360 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8370 PRG:0370 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8380 PRG:0380 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8390 PRG:0390 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83A0 PRG:03A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83B0 PRG:03B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83C0 PRG:03C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83D0 PRG:03D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83E0 PRG:03E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$83F0 PRG:03F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8400 PRG:0400 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8410 PRG:0410 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8420 PRG:0420 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8430 PRG:0430 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8440 PRG:0440 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8450 PRG:0450 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8460 PRG:0460 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8470 PRG:0470 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8480 PRG:0480 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8490 PRG:0490 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84A0 PRG:04A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84B0 PRG:04B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84C0 PRG:04C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84D0 PRG:04D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84E0 PRG:04E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$84F0 PRG:04F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8500 PRG:0500 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8510 PRG:0510 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8520 PRG:0520 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8530 PRG:0530 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8540 PRG:0540 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8550 PRG:0550 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8560 PRG:0560 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8570 PRG:0570 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8580 PRG:0580 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8590 PRG:0590 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85A0 PRG:05A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85B0 PRG:05B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85C0 PRG:05C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85D0 PRG:05D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85E0 PRG:05E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$85F0 PRG:05F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8600 PRG:0600 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8610 PRG:0610 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8620 PRG:0620 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8630 PRG:0630 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8640 PRG:0640 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8650 PRG:0650 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8660 PRG:0660 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8670 PRG:0670 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8680 PRG:0680 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8690 PRG:0690 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86A0 PRG:06A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86B0 PRG:06B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86C0 PRG:06C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86D0 PRG:06D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86E0 PRG:06E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$86F0 PRG:06F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8700 PRG:0700 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8710 PRG:0710 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8720 PRG:0720 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8730 PRG:0730 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8740 PRG:0740 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8750 PRG:0750 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8760 PRG:0760 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8770 PRG:0770 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8780 PRG:0780 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8790 PRG:0790 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87A0 PRG:07A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87B0 PRG:07B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87C0 PRG:07C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87D0 PRG:07D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87E0 PRG:07E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$87F0 PRG:07F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8800 PRG:0800 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8810 PRG:0810 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8820 PRG:0820 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8830 PRG:0830 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8840 PRG:0840 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8850 PRG:0850 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8860 PRG:0860 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8870 PRG:0870 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8880 PRG:0880 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8890 PRG:0890 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88A0 PRG:08A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88B0 PRG:08B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88C0 PRG:08C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88D0 PRG:08D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88E0 PRG:08E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$88F0 PRG:08F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8900 PRG:0900 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8910 PRG:0910 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8920 PRG:0920 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8930 PRG:0930 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8940 PRG:0940 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8950 PRG:0950 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8960 PRG:0960 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8970 PRG:0970 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8980 PRG:0980 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8990 PRG:0990 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89A0 PRG:09A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89B0 PRG:09B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89C0 PRG:09C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89D0 PRG:09D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89E0 PRG:09E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$89F0 PRG:09F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A00 PRG:0A00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A10 PRG:0A10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A20 PRG:0A20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A30 PRG:0A30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A40 PRG:0A40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A50 PRG:0A50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A60 PRG:0A60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A70 PRG:0A70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A80 PRG:0A80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8A90 PRG:0A90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AA0 PRG:0AA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AB0 PRG:0AB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AC0 PRG:0AC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AD0 PRG:0AD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AE0 PRG:0AE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8AF0 PRG:0AF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B00 PRG:0B00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B10 PRG:0B10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B20 PRG:0B20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B30 PRG:0B30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B40 PRG:0B40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B50 PRG:0B50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B60 PRG:0B60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B70 PRG:0B70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B80 PRG:0B80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8B90 PRG:0B90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BA0 PRG:0BA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BB0 PRG:0BB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BC0 PRG:0BC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BD0 PRG:0BD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BE0 PRG:0BE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8BF0 PRG:0BF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C00 PRG:0C00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C10 PRG:0C10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C20 PRG:0C20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C30 PRG:0C30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C40 PRG:0C40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C50 PRG:0C50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C60 PRG:0C60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C70 PRG:0C70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C80 PRG:0C80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8C90 PRG:0C90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CA0 PRG:0CA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CB0 PRG:0CB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CC0 PRG:0CC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CD0 PRG:0CD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CE0 PRG:0CE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8CF0 PRG:0CF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D00 PRG:0D00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D10 PRG:0D10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D20 PRG:0D20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D30 PRG:0D30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D40 PRG:0D40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D50 PRG:0D50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D60 PRG:0D60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D70 PRG:0D70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D80 PRG:0D80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8D90 PRG:0D90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DA0 PRG:0DA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DB0 PRG:0DB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DC0 PRG:0DC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DD0 PRG:0DD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DE0 PRG:0DE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8DF0 PRG:0DF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E00 PRG:0E00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E10 PRG:0E10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E20 PRG:0E20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E30 PRG:0E30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E40 PRG:0E40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E50 PRG:0E50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E60 PRG:0E60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E70 PRG:0E70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E80 PRG:0E80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8E90 PRG:0E90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8EA0 PRG:0EA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8EB0 PRG:0EB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8EC0 PRG:0EC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8ED0 PRG:0ED0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8EE0 PRG:0EE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8EF0 PRG:0EF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F00 PRG:0F00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F10 PRG:0F10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F20 PRG:0F20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F30 PRG:0F30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F40 PRG:0F40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F50 PRG:0F50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F60 PRG:0F60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F70 PRG:0F70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F80 PRG:0F80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8F90 PRG:0F90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FA0 PRG:0FA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FB0 PRG:0FB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FC0 PRG:0FC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FD0 PRG:0FD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FE0 PRG:0FE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$8FF0 PRG:0FF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9000 PRG:1000 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9010 PRG:1010 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9020 PRG:1020 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9030 PRG:1030 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9040 PRG:1040 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9050 PRG:1050 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9060 PRG:1060 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9070 PRG:1070 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9080 PRG:1080 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9090 PRG:1090 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90A0 PRG:10A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90B0 PRG:10B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90C0 PRG:10C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90D0 PRG:10D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90E0 PRG:10E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$90F0 PRG:10F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9100 PRG:1100 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9110 PRG:1110 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9120 PRG:1120 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9130 PRG:1130 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9140 PRG:1140 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9150 PRG:1150 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9160 PRG:1160 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9170 PRG:1170 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9180 PRG:1180 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9190 PRG:1190 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91A0 PRG:11A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91B0 PRG:11B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91C0 PRG:11C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91D0 PRG:11D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91E0 PRG:11E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$91F0 PRG:11F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9200 PRG:1200 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9210 PRG:1210 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9220 PRG:1220 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9230 PRG:1230 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9240 PRG:1240 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9250 PRG:1250 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9260 PRG:1260 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9270 PRG:1270 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9280 PRG:1280 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9290 PRG:1290 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92A0 PRG:12A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92B0 PRG:12B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92C0 PRG:12C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92D0 PRG:12D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92E0 PRG:12E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$92F0 PRG:12F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9300 PRG:1300 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9310 PRG:1310 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9320 PRG:1320 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9330 PRG:1330 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9340 PRG:1340 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9350 PRG:1350 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9360 PRG:1360 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9370 PRG:1370 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9380 PRG:1380 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9390 PRG:1390 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93A0 PRG:13A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93B0 PRG:13B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93C0 PRG:13C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93D0 PRG:13D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93E0 PRG:13E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$93F0 PRG:13F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9400 PRG:1400 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9410 PRG:1410 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9420 PRG:1420 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9430 PRG:1430 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9440 PRG:1440 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9450 PRG:1450 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9460 PRG:1460 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9470 PRG:1470 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9480 PRG:1480 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9490 PRG:1490 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94A0 PRG:14A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94B0 PRG:14B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94C0 PRG:14C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94D0 PRG:14D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94E0 PRG:14E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$94F0 PRG:14F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9500 PRG:1500 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9510 PRG:1510 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9520 PRG:1520 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9530 PRG:1530 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9540 PRG:1540 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9550 PRG:1550 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9560 PRG:1560 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9570 PRG:1570 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9580 PRG:1580 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9590 PRG:1590 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95A0 PRG:15A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95B0 PRG:15B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95C0 PRG:15C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95D0 PRG:15D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95E0 PRG:15E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$95F0 PRG:15F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9600 PRG:1600 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9610 PRG:1610 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9620 PRG:1620 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9630 PRG:1630 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9640 PRG:1640 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9650 PRG:1650 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9660 PRG:1660 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9670 PRG:1670 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9680 PRG:1680 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9690 PRG:1690 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96A0 PRG:16A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96B0 PRG:16B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96C0 PRG:16C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96D0 PRG:16D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96E0 PRG:16E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$96F0 PRG:16F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9700 PRG:1700 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9710 PRG:1710 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9720 PRG:1720 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9730 PRG:1730 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9740 PRG:1740 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9750 PRG:1750 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9760 PRG:1760 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9770 PRG:1770 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9780 PRG:1780 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9790 PRG:1790 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97A0 PRG:17A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97B0 PRG:17B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97C0 PRG:17C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97D0 PRG:17D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97E0 PRG:17E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$97F0 PRG:17F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9800 PRG:1800 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9810 PRG:1810 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9820 PRG:1820 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9830 PRG:1830 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9840 PRG:1840 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9850 PRG:1850 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9860 PRG:1860 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9870 PRG:1870 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9880 PRG:1880 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9890 PRG:1890 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98A0 PRG:18A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98B0 PRG:18B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98C0 PRG:18C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98D0 PRG:18D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98E0 PRG:18E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$98F0 PRG:18F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9900 PRG:1900 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9910 PRG:1910 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9920 PRG:1920 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9930 PRG:1930 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9940 PRG:1940 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9950 PRG:1950 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9960 PRG:1960 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9970 PRG:1970 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9980 PRG:1980 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9990 PRG:1990 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99A0 PRG:19A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99B0 PRG:19B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99C0 PRG:19C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99D0 PRG:19D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99E0 PRG:19E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$99F0 PRG:19F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A00 PRG:1A00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A10 PRG:1A10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A20 PRG:1A20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A30 PRG:1A30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A40 PRG:1A40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A50 PRG:1A50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A60 PRG:1A60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A70 PRG:1A70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A80 PRG:1A80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9A90 PRG:1A90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AA0 PRG:1AA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AB0 PRG:1AB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AC0 PRG:1AC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AD0 PRG:1AD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AE0 PRG:1AE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9AF0 PRG:1AF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B00 PRG:1B00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B10 PRG:1B10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B20 PRG:1B20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B30 PRG:1B30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B40 PRG:1B40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B50 PRG:1B50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B60 PRG:1B60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B70 PRG:1B70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B80 PRG:1B80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9B90 PRG:1B90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BA0 PRG:1BA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BB0 PRG:1BB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BC0 PRG:1BC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BD0 PRG:1BD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BE0 PRG:1BE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9BF0 PRG:1BF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C00 PRG:1C00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C10 PRG:1C10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C20 PRG:1C20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C30 PRG:1C30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C40 PRG:1C40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C50 PRG:1C50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C60 PRG:1C60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C70 PRG:1C70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C80 PRG:1C80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9C90 PRG:1C90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CA0 PRG:1CA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CB0 PRG:1CB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CC0 PRG:1CC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CD0 PRG:1CD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CE0 PRG:1CE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9CF0 PRG:1CF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D00 PRG:1D00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D10 PRG:1D10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D20 PRG:1D20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D30 PRG:1D30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D40 PRG:1D40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D50 PRG:1D50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D60 PRG:1D60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D70 PRG:1D70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D80 PRG:1D80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9D90 PRG:1D90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DA0 PRG:1DA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DB0 PRG:1DB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DC0 PRG:1DC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DD0 PRG:1DD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DE0 PRG:1DE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9DF0 PRG:1DF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E00 PRG:1E00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E10 PRG:1E10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E20 PRG:1E20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E30 PRG:1E30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E40 PRG:1E40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E50 PRG:1E50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E60 PRG:1E60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E70 PRG:1E70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E80 PRG:1E80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9E90 PRG:1E90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9EA0 PRG:1EA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9EB0 PRG:1EB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9EC0 PRG:1EC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9ED0 PRG:1ED0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9EE0 PRG:1EE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9EF0 PRG:1EF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F00 PRG:1F00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F10 PRG:1F10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F20 PRG:1F20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F30 PRG:1F30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F40 PRG:1F40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F50 PRG:1F50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F60 PRG:1F60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F70 PRG:1F70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F80 PRG:1F80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9F90 PRG:1F90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FA0 PRG:1FA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FB0 PRG:1FB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FC0 PRG:1FC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FD0 PRG:1FD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FE0 PRG:1FE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$9FF0 PRG:1FF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A000 PRG:2000 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A010 PRG:2010 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A020 PRG:2020 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A030 PRG:2030 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A040 PRG:2040 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A050 PRG:2050 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A060 PRG:2060 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A070 PRG:2070 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A080 PRG:2080 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A090 PRG:2090 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0A0 PRG:20A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0B0 PRG:20B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0C0 PRG:20C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0D0 PRG:20D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0E0 PRG:20E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A0F0 PRG:20F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A100 PRG:2100 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A110 PRG:2110 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A120 PRG:2120 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A130 PRG:2130 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A140 PRG:2140 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A150 PRG:2150 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A160 PRG:2160 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A170 PRG:2170 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A180 PRG:2180 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A190 PRG:2190 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1A0 PRG:21A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1B0 PRG:21B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1C0 PRG:21C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1D0 PRG:21D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1E0 PRG:21E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A1F0 PRG:21F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A200 PRG:2200 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A210 PRG:2210 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A220 PRG:2220 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A230 PRG:2230 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A240 PRG:2240 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A250 PRG:2250 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A260 PRG:2260 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A270 PRG:2270 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A280 PRG:2280 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A290 PRG:2290 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2A0 PRG:22A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2B0 PRG:22B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2C0 PRG:22C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2D0 PRG:22D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2E0 PRG:22E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A2F0 PRG:22F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A300 PRG:2300 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A310 PRG:2310 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A320 PRG:2320 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A330 PRG:2330 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A340 PRG:2340 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A350 PRG:2350 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A360 PRG:2360 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A370 PRG:2370 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A380 PRG:2380 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A390 PRG:2390 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3A0 PRG:23A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3B0 PRG:23B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3C0 PRG:23C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3D0 PRG:23D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3E0 PRG:23E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A3F0 PRG:23F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A400 PRG:2400 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A410 PRG:2410 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A420 PRG:2420 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A430 PRG:2430 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A440 PRG:2440 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A450 PRG:2450 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A460 PRG:2460 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A470 PRG:2470 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A480 PRG:2480 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A490 PRG:2490 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4A0 PRG:24A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4B0 PRG:24B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4C0 PRG:24C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4D0 PRG:24D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4E0 PRG:24E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A4F0 PRG:24F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A500 PRG:2500 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A510 PRG:2510 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A520 PRG:2520 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A530 PRG:2530 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A540 PRG:2540 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A550 PRG:2550 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A560 PRG:2560 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A570 PRG:2570 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A580 PRG:2580 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A590 PRG:2590 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5A0 PRG:25A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5B0 PRG:25B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5C0 PRG:25C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5D0 PRG:25D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5E0 PRG:25E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A5F0 PRG:25F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A600 PRG:2600 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A610 PRG:2610 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A620 PRG:2620 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A630 PRG:2630 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A640 PRG:2640 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A650 PRG:2650 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A660 PRG:2660 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A670 PRG:2670 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A680 PRG:2680 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A690 PRG:2690 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6A0 PRG:26A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6B0 PRG:26B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6C0 PRG:26C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6D0 PRG:26D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6E0 PRG:26E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A6F0 PRG:26F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A700 PRG:2700 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A710 PRG:2710 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A720 PRG:2720 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A730 PRG:2730 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A740 PRG:2740 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A750 PRG:2750 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A760 PRG:2760 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A770 PRG:2770 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A780 PRG:2780 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A790 PRG:2790 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7A0 PRG:27A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7B0 PRG:27B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7C0 PRG:27C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7D0 PRG:27D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7E0 PRG:27E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A7F0 PRG:27F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A800 PRG:2800 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A810 PRG:2810 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A820 PRG:2820 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A830 PRG:2830 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A840 PRG:2840 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A850 PRG:2850 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A860 PRG:2860 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A870 PRG:2870 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A880 PRG:2880 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A890 PRG:2890 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8A0 PRG:28A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8B0 PRG:28B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8C0 PRG:28C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8D0 PRG:28D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8E0 PRG:28E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A8F0 PRG:28F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A900 PRG:2900 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A910 PRG:2910 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A920 PRG:2920 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A930 PRG:2930 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A940 PRG:2940 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A950 PRG:2950 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A960 PRG:2960 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A970 PRG:2970 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A980 PRG:2980 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A990 PRG:2990 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9A0 PRG:29A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9B0 PRG:29B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9C0 PRG:29C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9D0 PRG:29D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9E0 PRG:29E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$A9F0 PRG:29F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA00 PRG:2A00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA10 PRG:2A10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA20 PRG:2A20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA30 PRG:2A30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA40 PRG:2A40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA50 PRG:2A50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA60 PRG:2A60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA70 PRG:2A70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA80 PRG:2A80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AA90 PRG:2A90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAA0 PRG:2AA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAB0 PRG:2AB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAC0 PRG:2AC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAD0 PRG:2AD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAE0 PRG:2AE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AAF0 PRG:2AF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB00 PRG:2B00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB10 PRG:2B10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB20 PRG:2B20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB30 PRG:2B30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB40 PRG:2B40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB50 PRG:2B50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB60 PRG:2B60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB70 PRG:2B70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB80 PRG:2B80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AB90 PRG:2B90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABA0 PRG:2BA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABB0 PRG:2BB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABC0 PRG:2BC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABD0 PRG:2BD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABE0 PRG:2BE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ABF0 PRG:2BF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC00 PRG:2C00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC10 PRG:2C10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC20 PRG:2C20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC30 PRG:2C30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC40 PRG:2C40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC50 PRG:2C50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC60 PRG:2C60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC70 PRG:2C70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC80 PRG:2C80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AC90 PRG:2C90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACA0 PRG:2CA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACB0 PRG:2CB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACC0 PRG:2CC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACD0 PRG:2CD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACE0 PRG:2CE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ACF0 PRG:2CF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD00 PRG:2D00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD10 PRG:2D10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD20 PRG:2D20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD30 PRG:2D30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD40 PRG:2D40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD50 PRG:2D50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD60 PRG:2D60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD70 PRG:2D70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD80 PRG:2D80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AD90 PRG:2D90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADA0 PRG:2DA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADB0 PRG:2DB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADC0 PRG:2DC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADD0 PRG:2DD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADE0 PRG:2DE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$ADF0 PRG:2DF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE00 PRG:2E00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE10 PRG:2E10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE20 PRG:2E20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE30 PRG:2E30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE40 PRG:2E40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE50 PRG:2E50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE60 PRG:2E60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE70 PRG:2E70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE80 PRG:2E80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AE90 PRG:2E90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AEA0 PRG:2EA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AEB0 PRG:2EB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AEC0 PRG:2EC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AED0 PRG:2ED0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AEE0 PRG:2EE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AEF0 PRG:2EF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF00 PRG:2F00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF10 PRG:2F10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF20 PRG:2F20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF30 PRG:2F30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF40 PRG:2F40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF50 PRG:2F50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF60 PRG:2F60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF70 PRG:2F70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF80 PRG:2F80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AF90 PRG:2F90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFA0 PRG:2FA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFB0 PRG:2FB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFC0 PRG:2FC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFD0 PRG:2FD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFE0 PRG:2FE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$AFF0 PRG:2FF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B000 PRG:3000 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B010 PRG:3010 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B020 PRG:3020 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B030 PRG:3030 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B040 PRG:3040 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B050 PRG:3050 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B060 PRG:3060 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B070 PRG:3070 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B080 PRG:3080 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B090 PRG:3090 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0A0 PRG:30A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0B0 PRG:30B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0C0 PRG:30C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0D0 PRG:30D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0E0 PRG:30E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B0F0 PRG:30F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B100 PRG:3100 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B110 PRG:3110 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B120 PRG:3120 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B130 PRG:3130 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B140 PRG:3140 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B150 PRG:3150 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B160 PRG:3160 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B170 PRG:3170 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B180 PRG:3180 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B190 PRG:3190 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1A0 PRG:31A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1B0 PRG:31B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1C0 PRG:31C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1D0 PRG:31D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1E0 PRG:31E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B1F0 PRG:31F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B200 PRG:3200 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B210 PRG:3210 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B220 PRG:3220 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B230 PRG:3230 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B240 PRG:3240 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B250 PRG:3250 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B260 PRG:3260 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B270 PRG:3270 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B280 PRG:3280 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B290 PRG:3290 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2A0 PRG:32A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2B0 PRG:32B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2C0 PRG:32C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2D0 PRG:32D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2E0 PRG:32E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B2F0 PRG:32F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B300 PRG:3300 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B310 PRG:3310 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B320 PRG:3320 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B330 PRG:3330 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B340 PRG:3340 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B350 PRG:3350 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B360 PRG:3360 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B370 PRG:3370 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B380 PRG:3380 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B390 PRG:3390 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3A0 PRG:33A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3B0 PRG:33B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3C0 PRG:33C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3D0 PRG:33D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3E0 PRG:33E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B3F0 PRG:33F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B400 PRG:3400 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B410 PRG:3410 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B420 PRG:3420 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B430 PRG:3430 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B440 PRG:3440 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B450 PRG:3450 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B460 PRG:3460 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B470 PRG:3470 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B480 PRG:3480 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B490 PRG:3490 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4A0 PRG:34A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4B0 PRG:34B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4C0 PRG:34C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4D0 PRG:34D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4E0 PRG:34E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B4F0 PRG:34F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B500 PRG:3500 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B510 PRG:3510 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B520 PRG:3520 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B530 PRG:3530 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B540 PRG:3540 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B550 PRG:3550 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B560 PRG:3560 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B570 PRG:3570 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B580 PRG:3580 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B590 PRG:3590 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5A0 PRG:35A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5B0 PRG:35B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5C0 PRG:35C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5D0 PRG:35D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5E0 PRG:35E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B5F0 PRG:35F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B600 PRG:3600 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B610 PRG:3610 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B620 PRG:3620 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B630 PRG:3630 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B640 PRG:3640 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B650 PRG:3650 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B660 PRG:3660 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B670 PRG:3670 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B680 PRG:3680 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B690 PRG:3690 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6A0 PRG:36A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6B0 PRG:36B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6C0 PRG:36C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6D0 PRG:36D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6E0 PRG:36E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B6F0 PRG:36F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B700 PRG:3700 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B710 PRG:3710 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B720 PRG:3720 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B730 PRG:3730 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B740 PRG:3740 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B750 PRG:3750 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B760 PRG:3760 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B770 PRG:3770 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B780 PRG:3780 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B790 PRG:3790 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7A0 PRG:37A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7B0 PRG:37B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7C0 PRG:37C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7D0 PRG:37D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7E0 PRG:37E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B7F0 PRG:37F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B800 PRG:3800 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B810 PRG:3810 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B820 PRG:3820 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B830 PRG:3830 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B840 PRG:3840 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B850 PRG:3850 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B860 PRG:3860 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B870 PRG:3870 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B880 PRG:3880 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B890 PRG:3890 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8A0 PRG:38A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8B0 PRG:38B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8C0 PRG:38C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8D0 PRG:38D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8E0 PRG:38E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B8F0 PRG:38F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B900 PRG:3900 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B910 PRG:3910 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B920 PRG:3920 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B930 PRG:3930 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B940 PRG:3940 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B950 PRG:3950 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B960 PRG:3960 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B970 PRG:3970 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B980 PRG:3980 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B990 PRG:3990 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9A0 PRG:39A0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9B0 PRG:39B0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9C0 PRG:39C0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9D0 PRG:39D0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9E0 PRG:39E0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$B9F0 PRG:39F0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA00 PRG:3A00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA10 PRG:3A10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA20 PRG:3A20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA30 PRG:3A30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA40 PRG:3A40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA50 PRG:3A50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA60 PRG:3A60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA70 PRG:3A70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA80 PRG:3A80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BA90 PRG:3A90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAA0 PRG:3AA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAB0 PRG:3AB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAC0 PRG:3AC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAD0 PRG:3AD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAE0 PRG:3AE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BAF0 PRG:3AF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB00 PRG:3B00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB10 PRG:3B10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB20 PRG:3B20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB30 PRG:3B30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB40 PRG:3B40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB50 PRG:3B50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB60 PRG:3B60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB70 PRG:3B70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB80 PRG:3B80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BB90 PRG:3B90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBA0 PRG:3BA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBB0 PRG:3BB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBC0 PRG:3BC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBD0 PRG:3BD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBE0 PRG:3BE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BBF0 PRG:3BF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC00 PRG:3C00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC10 PRG:3C10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC20 PRG:3C20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC30 PRG:3C30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC40 PRG:3C40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC50 PRG:3C50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC60 PRG:3C60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC70 PRG:3C70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC80 PRG:3C80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BC90 PRG:3C90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCA0 PRG:3CA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCB0 PRG:3CB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCC0 PRG:3CC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCD0 PRG:3CD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCE0 PRG:3CE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BCF0 PRG:3CF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD00 PRG:3D00 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD10 PRG:3D10 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD20 PRG:3D20 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD30 PRG:3D30 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD40 PRG:3D40 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD50 PRG:3D50 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD60 PRG:3D60 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD70 PRG:3D70 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD80 PRG:3D80 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BD90 PRG:3D90 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDA0 PRG:3DA0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDB0 PRG:3DB0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDC0 PRG:3DC0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDD0 PRG:3DD0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDE0 PRG:3DE0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BDF0 PRG:3DF0 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetupAttractScreen
|
|
; Global: Computes the record of the attract screen's PPU write list that the frame counter asks for and queues it.
|
|
; Local: Executes 21 instructions: calls TurnOffRendering; loads A with $06; stores A
|
|
; to $0471; loads X with $FF; stores X to Zp50; calls ClearBothNametables; and
|
|
; 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0471 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetupAttractScreen:
|
|
jsr TurnOffRendering ; CPU:$BE00 PRG:3E00 20 8A C2
|
|
lda #$06 ; CPU:$BE03 PRG:3E03 A9 06
|
|
sta $0471 ; CPU:$BE05 PRG:3E05 8D 71 04
|
|
ldx #$FF ; CPU:$BE08 PRG:3E08 A2 FF
|
|
stx Zp50 ; CPU:$BE0A PRG:3E0A 86 50
|
|
jsr ClearBothNametables ; CPU:$BE0C PRG:3E0C 20 3B C2
|
|
jsr SetupOamGroupTable ; CPU:$BE0F PRG:3E0F 20 A0 C4
|
|
lda #$00 ; CPU:$BE12 PRG:3E12 A9 00
|
|
sta StarFieldPtrLo ; CPU:$BE14 PRG:3E14 85 00
|
|
lda #$BF ; CPU:$BE16 PRG:3E16 A9 BF
|
|
sta StarFieldPtrHi ; CPU:$BE18 PRG:3E18 85 01
|
|
lda #$0B ; CPU:$BE1A PRG:3E1A A9 0B
|
|
sta StarFieldCount ; CPU:$BE1C PRG:3E1C 85 06
|
|
jsr AdvanceVramWriteQueue ; CPU:$BE1E PRG:3E1E 20 91 C1
|
|
jsr Sub_CE4F ; CPU:$BE21 PRG:3E21 20 4F CE
|
|
jsr QueueAttractScreenRow ; CPU:$BE24 PRG:3E24 20 CE C9
|
|
lda PpuCtrlShadow ; CPU:$BE27 PRG:3E27 A5 40
|
|
and #$FD ; CPU:$BE29 PRG:3E29 29 FD
|
|
sta PpuCtrlShadow ; CPU:$BE2B PRG:3E2B 85 40
|
|
sta PPUCTRL ; CPU:$BE2D PRG:3E2D 8D 00 20
|
|
jmp TurnOnRendering ; CPU:$BE30 PRG:3E30 4C AD C2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueAttractScreenRecord
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 16 instructions: loads A from Zp49; ANDs A with $03;
|
|
; branches on not equal to Sub_Loop; loads A from Zp48; ANDs A with
|
|
; $0C; stores A to StarFieldPtrLo; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueAttractScreenRecord:
|
|
lda Zp49 ; CPU:$BE33 PRG:3E33 A5 49
|
|
and #$03 ; CPU:$BE35 PRG:3E35 29 03
|
|
bne Sub_Loop ; CPU:$BE37 PRG:3E37 D0 19
|
|
lda Zp48 ; CPU:$BE39 PRG:3E39 A5 48
|
|
and #$0C ; CPU:$BE3B PRG:3E3B 29 0C
|
|
sta StarFieldPtrLo ; CPU:$BE3D PRG:3E3D 85 00
|
|
asl a ; CPU:$BE3F PRG:3E3F 0A
|
|
lsr StarFieldPtrLo ; CPU:$BE40 PRG:3E40 46 00
|
|
adc StarFieldPtrLo ; CPU:$BE42 PRG:3E42 65 00
|
|
lsr StarFieldPtrLo ; CPU:$BE44 PRG:3E44 46 00
|
|
adc StarFieldPtrLo ; CPU:$BE46 PRG:3E46 65 00
|
|
adc #$B8 ; CPU:$BE48 PRG:3E48 69 B8
|
|
tax ; CPU:$BE4A PRG:3E4A AA
|
|
lda #$BF ; CPU:$BE4B PRG:3E4B A9 BF
|
|
adc #$00 ; CPU:$BE4D PRG:3E4D 69 00
|
|
jmp QueueVramWritePointer ; CPU:$BE4F PRG:3E4F 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_Loop
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 3 instructions: loads X with $B8; loads A with $BF; calls
|
|
; QueueVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_Loop:
|
|
ldx #$B8 ; CPU:$BE52 PRG:3E52 A2 B8
|
|
lda #$BF ; CPU:$BE54 PRG:3E54 A9 BF
|
|
jmp QueueVramWritePointer ; CPU:$BE56 PRG:3E56 4C 17 C1
|
|
; ---- data $BE59-$BFFF (423 bytes) ----
|
|
; referenced by `lax $BFDC` at $DC5A (operand $BFDC falls inside this region)
|
|
ErasedPrgFill2:
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BE59 PRG:-1A7 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ; CPU:$BE59 PRG:3E59 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BE69 PRG:3E69 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BE79 PRG:3E79 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BE89 PRG:3E89 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BE99 PRG:3E99 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BEA9 PRG:3EA9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BEB9 PRG:3EB9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BEC9 PRG:3EC9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BED9 PRG:3ED9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BEE9 PRG:3EE9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BEF9 PRG:3EF9 FF FF FF FF FF FF FF
|
|
AttractScreenPpuRecordTable:
|
|
.byte $C9, $28, $0B, $13, $14, $1A, $20, $21, $23 ; CPU:$BF00 PRG:3F00 C9 28 0B 13 14 1A 20 21 23
|
|
.byte $CC, $CD, $CE, $F0, $F1, $E8, $28, $0C, $F2, $F3, $F4, $F5, $F6, $F7, $F8, $13 ; CPU:$BF09 PRG:3F09 CC CD CE F0 F1 E8 28 0C F2 F3 F4 F5
|
|
.byte $F9, $FA, $FB, $FC, $08, $29, $0C, $13, $14, $1A, $20, $21, $23, $CC, $CD, $CE ; CPU:$BF19 PRG:3F19 F9 FA FB FC 08 29 0C 13 14 1A 20 21
|
|
.byte $F0, $F1, $F2, $28, $29, $0B, $F3, $F4, $F5, $F6, $F7, $F8, $F9, $FA, $FB, $FC ; CPU:$BF29 PRG:3F29 F0 F1 F2 28 29 0B F3 F4 F5 F6 F7 F8
|
|
.byte $FD, $4F, $29, $03, $FE, $FD, $FE, $6F, $29, $02, $FF, $FF, $CA, $29, $08, $01 ; CPU:$BF39 PRG:3F39 FD 4F 29 03 FE FD FE 6F 29 02 FF FF
|
|
.byte $24, $19, $15, $0A, $22, $0E, $1B, $0A, $2A, $09, $02, $24, $19, $15, $0A, $22 ; CPU:$BF49 PRG:3F49 24 19 15 0A 22 0E 1B 0A 2A 09 02 24
|
|
.byte $0E, $1B, $1C, $80, $2A, $1D, $1D, $16, $24, $0A, $17, $0D, $24, $29, $24, $01 ; CPU:$BF59 PRG:3F59 0E 1B 1C 80 2A 1D 1D 16 24 0A 17 0D
|
|
.byte $09, $08, $01, $24, $01, $09, $08, $08, $24, $17, $0A, $16, $0C, $18, $24, $15 ; CPU:$BF69 PRG:3F69 09 08 01 24 01 09 08 08 24 17 0A 16
|
|
.byte $1D, $0D, $28, $01, $2B, $1B, $0B, $0A, $17, $0D, $0A, $12, $24, $0C, $18, $28 ; CPU:$BF79 PRG:3F79 1D 0D 28 01 2B 1B 0B 0A 17 0D 0A 12
|
|
.byte $24, $15, $1D, $0D, $28, $24, $12, $1C, $24, $15, $12, $0C, $0E, $17, $1C, $0E ; CPU:$BF89 PRG:3F89 24 15 1D 0D 28 24 12 1C 24 15 12 0C
|
|
.byte $0D, $41, $2B, $1B, $0B, $22, $24, $17, $12, $17, $1D, $0E, $17, $0D, $18, $24 ; CPU:$BF99 PRG:3F99 0D 41 2B 1B 0B 22 24 17 12 17 1D 0E
|
|
.byte $18, $0F, $24, $0A, $16, $0E, $1B, $12, $0C, $0A, $24, $12, $17, $0C, $28, $08 ; CPU:$BFA9 PRG:3FA9 18 0F 24 0A 16 0E 1B 12 0C 0A 24 12
|
|
.byte $3F, $08, $0F, $0F, $2A, $2A, $0F, $2A, $0F, $2A, $08, $3F, $08, $0F, $0F, $3A ; CPU:$BFB9 PRG:3FB9 3F 08 0F 0F 2A 2A 0F 2A 0F 2A 08 3F
|
|
.byte $3A, $0F, $3A, $0F, $3A, $08, $3F, $08, $0F, $0F, $0A, $0A, $0F, $0A, $0F, $0A ; CPU:$BFC9 PRG:3FC9 3A 0F 3A 0F 3A 08 3F 08 0F 0F 0A 0A
|
|
.byte $08, $3F, $08, $0F, $0F, $1A, $1A, $0F, $1A, $0F, $1A, $FF, $FF, $FF, $FF, $FF ; CPU:$BFD9 PRG:3FD9 08 3F 08 0F 0F 1A 1A 0F 1A 0F 1A FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BFE9 PRG:3FE9 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$BFF9 PRG:3FF9 FF FF FF FF FF FF FF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset
|
|
; Global: Writes zero to the PPUCTRL and PPUMASK registers so that the PPU shows nothing.
|
|
; Local: Executes 2 instructions: disables interrupts; clears the decimal
|
|
; flag.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, all the processor flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset:
|
|
sei ; CPU:$C000 PRG:4000 78
|
|
cld ; CPU:$C001 PRG:4001 D8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DisablePpuRendering
|
|
; Global: The routine writes the PPUCTRL and PPUMASK registers.
|
|
; Local: Executes 3 instructions: loads X with $00; stores X to the PPUCTRL
|
|
; register; stores X to the PPUMASK register.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the PPUCTRL and PPUMASK registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DisablePpuRendering:
|
|
ldx #$00 ; CPU:$C002 PRG:4002 A2 00
|
|
stx PPUCTRL ; CPU:$C004 PRG:4004 8E 00 20
|
|
stx PPUMASK ; CPU:$C007 PRG:4007 8E 01 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_OnNonnegative
|
|
; Global: The routine reads the PPUSTATUS register.
|
|
; Local: Executes 9 instructions: loads A from the PPUSTATUS register;
|
|
; branches on non-negative to Reset_OnNonnegative; loads X with $BF;
|
|
; loads A with $A5; compares A with ZpFF; branches on not equal to
|
|
; Reset_Loop; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_OnNonnegative:
|
|
lda PPUSTATUS ; CPU:$C00A PRG:400A AD 02 20
|
|
bpl Reset_OnNonnegative ; CPU:$C00D PRG:400D 10 FB
|
|
ldx #$BF ; CPU:$C00F PRG:400F A2 BF
|
|
txs ; CPU:$C011 PRG:4011 9A
|
|
lda #$A5 ; CPU:$C012 PRG:4012 A9 A5
|
|
cmp ZpFF ; CPU:$C014 PRG:4014 C5 FF
|
|
bne Reset_Loop ; CPU:$C016 PRG:4016 D0 04
|
|
ldy #$D0 ; CPU:$C018 PRG:4018 A0 D0
|
|
bmi Reset_Loop2 ; CPU:$C01A PRG:401A 30 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop:
|
|
ldy #$00 ; CPU:$C01C PRG:401C A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop2
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $00; stores A to
|
|
; StarFieldPtrHi; stores A to StarFieldPtrLo; loads X with $07.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop2:
|
|
lda #$00 ; CPU:$C01E PRG:401E A9 00
|
|
sta StarFieldPtrHi ; CPU:$C020 PRG:4020 85 01
|
|
sta StarFieldPtrLo ; CPU:$C022 PRG:4022 85 00
|
|
ldx #$07 ; CPU:$C024 PRG:4024 A2 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_OnNonzero
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 16 instructions: decrements Y; stores A to
|
|
; ((StarFieldPtrLo),y); branches on not equal to Reset_OnNonzero;
|
|
; increments StarFieldPtrHi; decrements X; branches on non-negative
|
|
; to Reset_OnNonzero; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_OnNonzero:
|
|
dey ; CPU:$C026 PRG:4026 88
|
|
sta (StarFieldPtrLo),y ; CPU:$C027 PRG:4027 91 00
|
|
bne Reset_OnNonzero ; CPU:$C029 PRG:4029 D0 FB
|
|
inc StarFieldPtrHi ; CPU:$C02B PRG:402B E6 01
|
|
dex ; CPU:$C02D PRG:402D CA
|
|
bpl Reset_OnNonzero ; CPU:$C02E PRG:402E 10 F6
|
|
lda #$A5 ; CPU:$C030 PRG:4030 A9 A5
|
|
cmp ZpFF ; CPU:$C032 PRG:4032 C5 FF
|
|
beq Reset_Loop3 ; CPU:$C034 PRG:4034 F0 0E
|
|
sta ZpFF ; CPU:$C036 PRG:4036 85 FF
|
|
lda #$03 ; CPU:$C038 PRG:4038 A9 03
|
|
sta ZpFA ; CPU:$C03A PRG:403A 85 FA
|
|
lda #$01 ; CPU:$C03C PRG:403C A9 01
|
|
sta ZpDF ; CPU:$C03E PRG:403E 85 DF
|
|
lda #$02 ; CPU:$C040 PRG:4040 A9 02
|
|
sta ZpDE ; CPU:$C042 PRG:4042 85 DE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop3
|
|
; Global: The routine calls NmiHandler_Loop6, ClearBothNametables, SetupOamGroupTable, QueueScreenUpdateRecord and
|
|
; 3 more, writes the JOY2 and PPUCTRL registers.
|
|
; Local: Executes 20 instructions: calls NmiHandler_Loop6; calls ClearBothNametables;
|
|
; calls SetupOamGroupTable; calls QueueScreenUpdateRecord; calls InitCommandQueue; calls Sub_F790; and
|
|
; 14 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the JOY2 and PPUCTRL registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop3:
|
|
jsr NmiHandler_Loop6 ; CPU:$C044 PRG:4044 20 32 C2
|
|
jsr ClearBothNametables ; CPU:$C047 PRG:4047 20 3B C2
|
|
jsr SetupOamGroupTable ; CPU:$C04A PRG:404A 20 A0 C4
|
|
jsr QueueScreenUpdateRecord ; CPU:$C04D PRG:404D 20 BC C2
|
|
jsr InitCommandQueue ; CPU:$C050 PRG:4050 20 03 C1
|
|
jsr Sub_F790 ; CPU:$C053 PRG:4053 20 90 F7
|
|
jsr ResetApuAndExpansionPort ; CPU:$C056 PRG:4056 20 DA EA
|
|
lda #$1E ; CPU:$C059 PRG:4059 A9 1E
|
|
sta PpuMaskShadow ; CPU:$C05B PRG:405B 85 41
|
|
lda #$F8 ; CPU:$C05D PRG:405D A9 F8
|
|
sta Zp42 ; CPU:$C05F PRG:405F 85 42
|
|
lda #$E8 ; CPU:$C061 PRG:4061 A9 E8
|
|
sta Zp43 ; CPU:$C063 PRG:4063 85 43
|
|
lda #$C0 ; CPU:$C065 PRG:4065 A9 C0
|
|
sta JOY2 ; CPU:$C067 PRG:4067 8D 17 40
|
|
lda #$01 ; CPU:$C06A PRG:406A A9 01
|
|
sta Zp4B ; CPU:$C06C PRG:406C 85 4B
|
|
lda #$B0 ; CPU:$C06E PRG:406E A9 B0
|
|
sta PPUCTRL ; CPU:$C070 PRG:4070 8D 00 20
|
|
sta PpuCtrlShadow ; CPU:$C073 PRG:4073 85 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C075
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $01; stores A to Zp4A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C075:
|
|
lda #$01 ; CPU:$C075 PRG:4075 A9 01
|
|
sta Zp4A ; CPU:$C077 PRG:4077 85 4A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_OnNonzero2
|
|
; Global: The routine calls Sub_EB08 and StrobeControllerRead.
|
|
; Local: Executes 7 instructions: loads A from Zp4A; branches on not equal to
|
|
; Reset_OnNonzero2; calls Sub_EB08; calls StrobeControllerRead; increments Zp48;
|
|
; branches on not equal to Reset_Loop4; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_OnNonzero2:
|
|
lda Zp4A ; CPU:$C079 PRG:4079 A5 4A
|
|
bne Reset_OnNonzero2 ; CPU:$C07B PRG:407B D0 FC
|
|
jsr Sub_EB08 ; CPU:$C07D PRG:407D 20 08 EB
|
|
jsr StrobeControllerRead ; CPU:$C080 PRG:4080 20 D2 C2
|
|
inc Zp48 ; CPU:$C083 PRG:4083 E6 48
|
|
bne Reset_Loop4 ; CPU:$C085 PRG:4085 D0 02
|
|
inc Zp49 ; CPU:$C087 PRG:4087 E6 49
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop4
|
|
; Global: The routine calls QueueVramWritePointer and InitGameScreen.
|
|
; Local: Executes 16 instructions: loads A from Zp62; branches on equal to
|
|
; Reset_Loop7; loads A from Zp5B; branches on equal to Reset_Loop7;
|
|
; loads A from Zp4B; branches on equal to Reset_Loop7; and 10 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop4:
|
|
lda Zp62 ; CPU:$C089 PRG:4089 A5 62
|
|
beq Reset_Loop7 ; CPU:$C08B PRG:408B F0 30
|
|
lda Zp5B ; CPU:$C08D PRG:408D A5 5B
|
|
beq Reset_Loop7 ; CPU:$C08F PRG:408F F0 2C
|
|
lda Zp4B ; CPU:$C091 PRG:4091 A5 4B
|
|
beq Reset_Loop7 ; CPU:$C093 PRG:4093 F0 28
|
|
lda Zp46 ; CPU:$C095 PRG:4095 A5 46
|
|
and #$10 ; CPU:$C097 PRG:4097 29 10
|
|
bne Reset_Loop5 ; CPU:$C099 PRG:4099 D0 10
|
|
lda Zp48 ; CPU:$C09B PRG:409B A5 48
|
|
and #$10 ; CPU:$C09D PRG:409D 29 10
|
|
beq Reset_Loop6 ; CPU:$C09F PRG:409F F0 12
|
|
ldx #$3B ; CPU:$C0A1 PRG:40A1 A2 3B
|
|
lda #$F8 ; CPU:$C0A3 PRG:40A3 A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$C0A5 PRG:40A5 20 17 C1
|
|
jmp InitGameScreen ; CPU:$C0A8 PRG:40A8 4C C2 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop5
|
|
; Global: The routine writes $0580.
|
|
; Local: Executes 4 instructions: loads X with $00; stores X to Zp5B;
|
|
; increments X; stores X to $0580.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0580 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop5:
|
|
ldx #$00 ; CPU:$C0AB PRG:40AB A2 00
|
|
stx Zp5B ; CPU:$C0AD PRG:40AD 86 5B
|
|
inx ; CPU:$C0AF PRG:40AF E8
|
|
stx $0580 ; CPU:$C0B0 PRG:40B0 8E 80 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop6
|
|
; Global: The routine calls ParseVramWriteRecord and InitGameScreen.
|
|
; Local: Executes 4 instructions: loads X with $3B; loads A with $F8; calls
|
|
; ParseVramWriteRecord; calls InitGameScreen.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop6:
|
|
ldx #$3B ; CPU:$C0B3 PRG:40B3 A2 3B
|
|
lda #$F8 ; CPU:$C0B5 PRG:40B5 A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$C0B7 PRG:40B7 20 2D C1
|
|
jmp InitGameScreen ; CPU:$C0BA PRG:40BA 4C C2 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Reset_Loop7
|
|
; Global: Lays the game screen out and starts the frame counter.
|
|
; Local: Executes 2 instructions: loads A with $C0; calls ExchangeStackPointerWithQueue.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Reset_Loop7:
|
|
lda #$C0 ; CPU:$C0BD PRG:40BD A9 C0
|
|
jsr ExchangeStackPointerWithQueue ; CPU:$C0BF PRG:40BF 20 F5 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: InitGameScreen
|
|
; Global: The routine calls DrawGameScreen and Sub_C075.
|
|
; Local: Executes 2 instructions: calls DrawGameScreen; calls Sub_C075.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
InitGameScreen:
|
|
jsr DrawGameScreen ; CPU:$C0C2 PRG:40C2 20 00 C5
|
|
jmp Sub_C075 ; CPU:$C0C5 PRG:40C5 4C 75 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler
|
|
; Global: The routine calls NmiHandler_Loop5 and ApplyPpuScrollAndMask, writes the OAMADDR
|
|
; and OAMDMA registers, reads the PPUSTATUS register.
|
|
; Local: Executes 18 instructions: pushes A; copies X into A; pushes A; copies
|
|
; Y into A; pushes A; loads X from Zp4A; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves the OAMADDR and OAMDMA
|
|
; registers set.
|
|
; Clobbers:
|
|
; no register, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler:
|
|
pha ; CPU:$C0C8 PRG:40C8 48
|
|
txa ; CPU:$C0C9 PRG:40C9 8A
|
|
pha ; CPU:$C0CA PRG:40CA 48
|
|
tya ; CPU:$C0CB PRG:40CB 98
|
|
pha ; CPU:$C0CC PRG:40CC 48
|
|
ldx Zp4A ; CPU:$C0CD PRG:40CD A6 4A
|
|
dex ; CPU:$C0CF PRG:40CF CA
|
|
bne NmiHandler_Loop ; CPU:$C0D0 PRG:40D0 D0 19
|
|
stx Zp4A ; CPU:$C0D2 PRG:40D2 86 4A
|
|
ldx Zp4B ; CPU:$C0D4 PRG:40D4 A6 4B
|
|
beq NmiHandler_Loop ; CPU:$C0D6 PRG:40D6 F0 13
|
|
lda PPUSTATUS ; CPU:$C0D8 PRG:40D8 AD 02 20
|
|
lda #$00 ; CPU:$C0DB PRG:40DB A9 00
|
|
sta OAMADDR ; CPU:$C0DD PRG:40DD 8D 03 20
|
|
lda #$07 ; CPU:$C0E0 PRG:40E0 A9 07
|
|
sta OAMDMA ; CPU:$C0E2 PRG:40E2 8D 14 40
|
|
jsr NmiHandler_Loop5 ; CPU:$C0E5 PRG:40E5 20 EA C1
|
|
jsr ApplyPpuScrollAndMask ; CPU:$C0E8 PRG:40E8 20 75 C2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop
|
|
; Global: Takes the stack pointer and masks it to a page, the offset of the command queue inside the stack page.
|
|
; Local: Executes 6 instructions: pulls A; copies A into Y; pulls A; copies A
|
|
; into X; pulls A; returns from the interrupt with RTI.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns from the interrupt with RTI.
|
|
; Clobbers:
|
|
; A, X and Y.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop:
|
|
pla ; CPU:$C0EB PRG:40EB 68
|
|
tay ; CPU:$C0EC PRG:40EC A8
|
|
pla ; CPU:$C0ED PRG:40ED 68
|
|
tax ; CPU:$C0EE PRG:40EE AA
|
|
pla ; CPU:$C0EF PRG:40EF 68
|
|
rti ; CPU:$C0F0 PRG:40F0 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: PrepareQueueStackExchange
|
|
; Global: Swaps the hardware stack pointer with the byte of the command queue that holds it.
|
|
; Local: Executes 3 instructions: copies the stack pointer into X; copies X
|
|
; into A; ANDs A with $C0.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, $0100.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
PrepareQueueStackExchange:
|
|
tsx ; CPU:$C0F1 PRG:40F1 BA
|
|
txa ; CPU:$C0F2 PRG:40F2 8A
|
|
and #$C0 ; CPU:$C0F3 PRG:40F3 29 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ExchangeStackPointerWithQueue
|
|
; Global: Sets the end-of-queue marker at $01C0 and the queue's end pointer at $01FE.
|
|
; Local: Executes 10 instructions: copies A into Y; loads A from $0100,y;
|
|
; copies the stack pointer into X; pushes A; copies X into A; stores
|
|
; A to $0100,y; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, $0100.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ExchangeStackPointerWithQueue:
|
|
tay ; CPU:$C0F5 PRG:40F5 A8
|
|
lda $0100,y ; CPU:$C0F6 PRG:40F6 B9 00 01
|
|
tsx ; CPU:$C0F9 PRG:40F9 BA
|
|
pha ; CPU:$C0FA PRG:40FA 48
|
|
txa ; CPU:$C0FB PRG:40FB 8A
|
|
sta $0100,y ; CPU:$C0FC PRG:40FC 99 00 01
|
|
pla ; CPU:$C0FF PRG:40FF 68
|
|
tax ; CPU:$C100 PRG:4100 AA
|
|
txs ; CPU:$C101 PRG:4101 9A
|
|
rts ; CPU:$C102 PRG:4102 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: InitCommandQueue
|
|
; Global: The routine writes $01C0, $01FE and $01FF, reads $C115 and $C116.
|
|
; Local: Executes 7 instructions: loads A with $FD; stores A to $01C0; loads A
|
|
; from $C115; stores A to $01FE; loads A from $C116; stores A to
|
|
; $01FF; and 1 more instruction.
|
|
; Parameters: Reads $C115 and $C116 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $01C0, $01FE and $01FF changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, $01C0, $01FE, $01FF.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
InitCommandQueue:
|
|
lda #$FD ; CPU:$C103 PRG:4103 A9 FD
|
|
sta $01C0 ; CPU:$C105 PRG:4105 8D C0 01
|
|
lda $C115 ; CPU:$C108 PRG:4108 AD 15 C1
|
|
sta $01FE ; CPU:$C10B PRG:410B 8D FE 01
|
|
lda $C116 ; CPU:$C10E PRG:410E AD 16 C1
|
|
sta $01FF ; CPU:$C111 PRG:4111 8D FF 01
|
|
rts ; CPU:$C114 PRG:4114 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCC115
|
|
; Global: Points the VRAM write pointer at the address in X and A and queues the pointer.
|
|
; Local: Executes 1 instruction: loads X from ZpCD,y.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCC115:
|
|
ldx ZpCD,y ; CPU:$C115 PRG:4115 B6 CD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueVramWritePointer
|
|
; Global: Pushes the current VRAM write pointer onto the command queue.
|
|
; Local: Executes 1 instruction: calls SetVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueVramWritePointer:
|
|
jsr SetVramWritePointer ; CPU:$C117 PRG:4117 20 BF C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueCurrentVramPointer
|
|
; Global: Reads the PPU address and the byte count out of the VRAM write record the pointer points at.
|
|
; Local: Executes 9 instructions: loads X from Zp4E; loads A from
|
|
; StarFieldPtrLo; stores A to $0100,x; increments X; loads A from
|
|
; StarFieldPtrHi; stores A to $0100,x; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueCurrentVramPointer:
|
|
ldx Zp4E ; CPU:$C11A PRG:411A A6 4E
|
|
lda StarFieldPtrLo ; CPU:$C11C PRG:411C A5 00
|
|
sta $0100,x ; CPU:$C11E PRG:411E 9D 00 01
|
|
inx ; CPU:$C121 PRG:4121 E8
|
|
lda StarFieldPtrHi ; CPU:$C122 PRG:4122 A5 01
|
|
sta $0100,x ; CPU:$C124 PRG:4124 9D 00 01
|
|
inx ; CPU:$C127 PRG:4127 E8
|
|
stx Zp4E ; CPU:$C128 PRG:4128 86 4E
|
|
jmp Sub_C18C ; CPU:$C12A PRG:412A 4C 8C C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ParseVramWriteRecord
|
|
; Global: Sets the PPU address the next queued write goes to.
|
|
; Local: Executes 11 instructions: calls SetVramWritePointer; loads Y with $00; loads A
|
|
; from ((StarFieldPtrLo),y); copies A into X; increments Y; loads A
|
|
; from ((StarFieldPtrLo),y); and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ParseVramWriteRecord:
|
|
jsr SetVramWritePointer ; CPU:$C12D PRG:412D 20 BF C1
|
|
ldy #$00 ; CPU:$C130 PRG:4130 A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$C132 PRG:4132 B1 00
|
|
tax ; CPU:$C134 PRG:4134 AA
|
|
iny ; CPU:$C135 PRG:4135 C8
|
|
lda (StarFieldPtrLo),y ; CPU:$C136 PRG:4136 B1 00
|
|
pha ; CPU:$C138 PRG:4138 48
|
|
iny ; CPU:$C139 PRG:4139 C8
|
|
lda (StarFieldPtrLo),y ; CPU:$C13A PRG:413A B1 00
|
|
tay ; CPU:$C13C PRG:413C A8
|
|
pla ; CPU:$C13D PRG:413D 68
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetPpuWriteAddress
|
|
; Global: Queues a PPU write record of $24 bytes.
|
|
; Local: Executes 3 instructions: stores Y to Zp02; stores X to PpuAddrLow;
|
|
; stores A to PpuAddrHigh.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetPpuWriteAddress:
|
|
sty Zp02 ; CPU:$C13E PRG:413E 84 02
|
|
stx PpuAddrLow ; CPU:$C140 PRG:4140 86 04
|
|
sta PpuAddrHigh ; CPU:$C142 PRG:4142 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueuePpuWriteRecord
|
|
; Global: The routine calls QueuePpuWriteRecordData.
|
|
; Local: Executes 2 instructions: calls QueuePpuWriteRecordData; loads A with $24.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueuePpuWriteRecord:
|
|
jsr QueuePpuWriteRecordData ; CPU:$C144 PRG:4144 20 C4 C1
|
|
lda #$24 ; CPU:$C147 PRG:4147 A9 24
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero
|
|
; Global: The routine calls Sub_C18C.
|
|
; Local: Executes 6 instructions: stores A to $0100,x; increments X;
|
|
; decrements Zp1E; branches on not equal to NmiHandler_OnNonzero;
|
|
; stores X to Zp4F; calls Sub_C18C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero:
|
|
sta $0100,x ; CPU:$C149 PRG:4149 9D 00 01
|
|
inx ; CPU:$C14C PRG:414C E8
|
|
dec Zp1E ; CPU:$C14D PRG:414D C6 1E
|
|
bne NmiHandler_OnNonzero ; CPU:$C14F PRG:414F D0 F8
|
|
stx Zp4F ; CPU:$C151 PRG:4151 86 4F
|
|
jmp Sub_C18C ; CPU:$C153 PRG:4153 4C 8C C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C156
|
|
; Global: Sets the byte count of the VRAM write record.
|
|
; Local: Executes 3 instructions: loads X with $20; loads A with $00; loads Y
|
|
; from Zp02.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C156:
|
|
ldx #$20 ; CPU:$C156 PRG:4156 A2 20
|
|
lda #$00 ; CPU:$C158 PRG:4158 A9 00
|
|
ldy Zp02 ; CPU:$C15A PRG:415A A4 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetVramRecordCount
|
|
; Global: Queues a PPU write record of $00 bytes.
|
|
; Local: Executes 1 instruction: calls SetVramRecordCount2.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetVramRecordCount:
|
|
jsr SetVramRecordCount2 ; CPU:$C15C PRG:415C 20 BD C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueuePpuWriteRecordAlt
|
|
; Global: The routine calls QueuePpuWriteRecordData.
|
|
; Local: Executes 2 instructions: calls QueuePpuWriteRecordData; loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueuePpuWriteRecordAlt:
|
|
jsr QueuePpuWriteRecordData ; CPU:$C15F PRG:415F 20 C4 C1
|
|
ldy #$00 ; CPU:$C162 PRG:4162 A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero2
|
|
; Global: Sets the flags byte of the VRAM write record.
|
|
; Local: Executes 8 instructions: loads A from ((StarFieldPtrLo),y);
|
|
; increments Y; stores A to $0100,x; increments X; compares Y with
|
|
; Zp02; branches on not equal to NmiHandler_OnNonzero2; and 2 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero2:
|
|
lda (StarFieldPtrLo),y ; CPU:$C164 PRG:4164 B1 00
|
|
iny ; CPU:$C166 PRG:4166 C8
|
|
sta $0100,x ; CPU:$C167 PRG:4167 9D 00 01
|
|
inx ; CPU:$C16A PRG:416A E8
|
|
cpy Zp02 ; CPU:$C16B PRG:416B C4 02
|
|
bne NmiHandler_OnNonzero2 ; CPU:$C16D PRG:416D D0 F5
|
|
stx Zp4F ; CPU:$C16F PRG:416F 86 4F
|
|
jmp Sub_C18C ; CPU:$C171 PRG:4171 4C 8C C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetVramRecordFlags
|
|
; Global: Queues a PPU write record of $00 bytes at a second address.
|
|
; Local: Executes 1 instruction: calls SetVramRecordCount2.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetVramRecordFlags:
|
|
jsr SetVramRecordCount2 ; CPU:$C174 PRG:4174 20 BD C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueuePpuWriteRecordAlt2
|
|
; Global: The routine calls QueuePpuWriteRecordData.
|
|
; Local: Executes 2 instructions: calls QueuePpuWriteRecordData; loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueuePpuWriteRecordAlt2:
|
|
jsr QueuePpuWriteRecordData ; CPU:$C177 PRG:4177 20 C4 C1
|
|
ldy #$00 ; CPU:$C17A PRG:417A A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero3
|
|
; Global: The routine calls Sub_C1AA.
|
|
; Local: Executes 8 instructions: loads A from ((StarFieldPtrLo),y); calls
|
|
; Sub_C1AA; increments Y; stores A to $0100,x; increments X; compares
|
|
; Y with Zp1E; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp03, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero3:
|
|
lda (StarFieldPtrLo),y ; CPU:$C17C PRG:417C B1 00
|
|
jsr Sub_C1AA ; CPU:$C17E PRG:417E 20 AA C1
|
|
iny ; CPU:$C181 PRG:4181 C8
|
|
sta $0100,x ; CPU:$C182 PRG:4182 9D 00 01
|
|
inx ; CPU:$C185 PRG:4185 E8
|
|
cpy Zp1E ; CPU:$C186 PRG:4186 C4 1E
|
|
bne NmiHandler_OnNonzero3 ; CPU:$C188 PRG:4188 D0 F2
|
|
stx Zp4F ; CPU:$C18A PRG:418A 86 4F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C18C
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A from Zp4B; branches on equal to
|
|
; NmiHandler_Loop5.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C18C:
|
|
lda Zp4B ; CPU:$C18C PRG:418C A5 4B
|
|
beq NmiHandler_Loop5 ; CPU:$C18E PRG:418E F0 5A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero
|
|
; Global: Queues the VRAM write pointer and steps it past the record it points at.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero:
|
|
rts ; CPU:$C190 PRG:4190 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvanceVramWriteQueue
|
|
; Global: The routine calls QueueCurrentVramPointer.
|
|
; Local: Executes 12 instructions: returns with RTS; calls QueueCurrentVramPointer;
|
|
; decrements StarFieldCount; branches on equal to NmiHandler_OnZero;
|
|
; loads Y with $02; loads A from ((StarFieldPtrLo),y); and 6 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvanceVramWriteQueue:
|
|
jsr QueueCurrentVramPointer ; CPU:$C191 PRG:4191 20 1A C1
|
|
dec StarFieldCount ; CPU:$C194 PRG:4194 C6 06
|
|
beq NmiHandler_OnZero ; CPU:$C196 PRG:4196 F0 F8
|
|
ldy #$02 ; CPU:$C198 PRG:4198 A0 02
|
|
lda (StarFieldPtrLo),y ; CPU:$C19A PRG:419A B1 00
|
|
clc ; CPU:$C19C PRG:419C 18
|
|
adc #$03 ; CPU:$C19D PRG:419D 69 03
|
|
adc StarFieldPtrLo ; CPU:$C19F PRG:419F 65 00
|
|
sta StarFieldPtrLo ; CPU:$C1A1 PRG:41A1 85 00
|
|
bcc NmiHandler_Loop2 ; CPU:$C1A3 PRG:41A3 90 02
|
|
inc StarFieldPtrHi ; CPU:$C1A5 PRG:41A5 E6 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop2
|
|
; Global: The routine calls AdvanceVramWriteQueue.
|
|
; Local: Executes 1 instruction: calls AdvanceVramWriteQueue.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop2:
|
|
jmp AdvanceVramWriteQueue ; CPU:$C1A7 PRG:41A7 4C 91 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C1AA
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: pushes A; branches on not equal to
|
|
; NmiHandler_Loop3; loads A from Zp03; branches on equal to
|
|
; NmiHandler_Loop4; decrements Zp03; pulls A; and 2 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp03.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C1AA:
|
|
pha ; CPU:$C1AA PRG:41AA 48
|
|
bne NmiHandler_Loop3 ; CPU:$C1AB PRG:41AB D0 0A
|
|
lda Zp03 ; CPU:$C1AD PRG:41AD A5 03
|
|
beq NmiHandler_Loop4 ; CPU:$C1AF PRG:41AF F0 0A
|
|
dec Zp03 ; CPU:$C1B1 PRG:41B1 C6 03
|
|
pla ; CPU:$C1B3 PRG:41B3 68
|
|
lda #$24 ; CPU:$C1B4 PRG:41B4 A9 24
|
|
rts ; CPU:$C1B6 PRG:41B6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop3
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $00; stores A to Zp03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp03.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop3:
|
|
lda #$00 ; CPU:$C1B7 PRG:41B7 A9 00
|
|
sta Zp03 ; CPU:$C1B9 PRG:41B9 85 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop4
|
|
; Global: Sets the byte count of the VRAM write record.
|
|
; Local: Executes 2 instructions: pulls A; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop4:
|
|
pla ; CPU:$C1BB PRG:41BB 68
|
|
rts ; CPU:$C1BC PRG:41BC 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetVramRecordCount2
|
|
; Global: Sets the 16-bit VRAM write pointer to the address in X and A.
|
|
; Local: Executes 1 instruction: stores Y to Zp02.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; no register, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetVramRecordCount2:
|
|
sty Zp02 ; CPU:$C1BD PRG:41BD 84 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetVramWritePointer
|
|
; Global: Queues a PPU write: the address, the byte count and the data pointer.
|
|
; Local: Executes 3 instructions: stores X to StarFieldPtrLo; stores A to
|
|
; StarFieldPtrHi; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetVramWritePointer:
|
|
stx StarFieldPtrLo ; CPU:$C1BF PRG:41BF 86 00
|
|
sta StarFieldPtrHi ; CPU:$C1C1 PRG:41C1 85 01
|
|
rts ; CPU:$C1C3 PRG:41C3 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueuePpuWriteRecordData
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 20 instructions: loads Y from Zp4E; loads X from Zp4F;
|
|
; copies X into A; stores A to $0100,y; increments Y; loads A with
|
|
; $01; and 14 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, Zp1E, Zp4E, $0100.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueuePpuWriteRecordData:
|
|
ldy Zp4E ; CPU:$C1C4 PRG:41C4 A4 4E
|
|
ldx Zp4F ; CPU:$C1C6 PRG:41C6 A6 4F
|
|
txa ; CPU:$C1C8 PRG:41C8 8A
|
|
sta $0100,y ; CPU:$C1C9 PRG:41C9 99 00 01
|
|
iny ; CPU:$C1CC PRG:41CC C8
|
|
lda #$01 ; CPU:$C1CD PRG:41CD A9 01
|
|
sta $0100,y ; CPU:$C1CF PRG:41CF 99 00 01
|
|
iny ; CPU:$C1D2 PRG:41D2 C8
|
|
sty Zp4E ; CPU:$C1D3 PRG:41D3 84 4E
|
|
lda PpuAddrLow ; CPU:$C1D5 PRG:41D5 A5 04
|
|
sta $0100,x ; CPU:$C1D7 PRG:41D7 9D 00 01
|
|
inx ; CPU:$C1DA PRG:41DA E8
|
|
lda PpuAddrHigh ; CPU:$C1DB PRG:41DB A5 05
|
|
sta $0100,x ; CPU:$C1DD PRG:41DD 9D 00 01
|
|
inx ; CPU:$C1E0 PRG:41E0 E8
|
|
lda Zp02 ; CPU:$C1E1 PRG:41E1 A5 02
|
|
sta $0100,x ; CPU:$C1E3 PRG:41E3 9D 00 01
|
|
inx ; CPU:$C1E6 PRG:41E6 E8
|
|
sta Zp1E ; CPU:$C1E7 PRG:41E7 85 1E
|
|
rts ; CPU:$C1E9 PRG:41E9 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop5
|
|
; Global: The routine reads the PPUSTATUS register.
|
|
; Local: Executes 5 instructions: loads A from the PPUSTATUS register; loads X
|
|
; from Zp4E; decrements X; branches on negative to NmiHandler_Loop6;
|
|
; loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop5:
|
|
lda PPUSTATUS ; CPU:$C1EA PRG:41EA AD 02 20
|
|
ldx Zp4E ; CPU:$C1ED PRG:41ED A6 4E
|
|
dex ; CPU:$C1EF PRG:41EF CA
|
|
bmi NmiHandler_Loop6 ; CPU:$C1F0 PRG:41F0 30 40
|
|
ldx #$00 ; CPU:$C1F2 PRG:41F2 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero4
|
|
; Global: The routine writes the PPUADDR registers.
|
|
; Local: Executes 17 instructions: loads A from $0100,x; stores A to
|
|
; TilePtrLo; increments X; loads A from $0100,x; stores A to
|
|
; TilePtrHi; increments X; and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the PPUADDR registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero4:
|
|
lda $0100,x ; CPU:$C1F4 PRG:41F4 BD 00 01
|
|
sta TilePtrLo ; CPU:$C1F7 PRG:41F7 85 08
|
|
inx ; CPU:$C1F9 PRG:41F9 E8
|
|
lda $0100,x ; CPU:$C1FA PRG:41FA BD 00 01
|
|
sta TilePtrHi ; CPU:$C1FD PRG:41FD 85 09
|
|
inx ; CPU:$C1FF PRG:41FF E8
|
|
ldy #$01 ; CPU:$C200 PRG:4200 A0 01
|
|
lda (TilePtrLo),y ; CPU:$C202 PRG:4202 B1 08
|
|
sta PPUADDR ; CPU:$C204 PRG:4204 8D 06 20
|
|
dey ; CPU:$C207 PRG:4207 88
|
|
lda (TilePtrLo),y ; CPU:$C208 PRG:4208 B1 08
|
|
sta PPUADDR ; CPU:$C20A PRG:420A 8D 06 20
|
|
iny ; CPU:$C20D PRG:420D C8
|
|
iny ; CPU:$C20E PRG:420E C8
|
|
lda (TilePtrLo),y ; CPU:$C20F PRG:420F B1 08
|
|
iny ; CPU:$C211 PRG:4211 C8
|
|
sta ScreenPtrLo ; CPU:$C212 PRG:4212 85 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero5
|
|
; Global: The routine writes the PPUADDR and PPUDATA registers.
|
|
; Local: Executes 30 instructions: loads A from $0100,x; stores A to
|
|
; TilePtrLo; increments X; loads A from $0100,x; stores A to
|
|
; TilePtrHi; increments X; and 24 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves the PPUADDR and PPUDATA
|
|
; registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero5:
|
|
lda (TilePtrLo),y ; CPU:$C214 PRG:4214 B1 08
|
|
sta PPUDATA ; CPU:$C216 PRG:4216 8D 07 20
|
|
iny ; CPU:$C219 PRG:4219 C8
|
|
dec ScreenPtrLo ; CPU:$C21A PRG:421A C6 0A
|
|
bne NmiHandler_OnNonzero5 ; CPU:$C21C PRG:421C D0 F6
|
|
cpx Zp4E ; CPU:$C21E PRG:421E E4 4E
|
|
bne NmiHandler_OnNonzero4 ; CPU:$C220 PRG:4220 D0 D2
|
|
lda #$3F ; CPU:$C222 PRG:4222 A9 3F
|
|
sta PPUADDR ; CPU:$C224 PRG:4224 8D 06 20
|
|
lda #$00 ; CPU:$C227 PRG:4227 A9 00
|
|
sta PPUADDR ; CPU:$C229 PRG:4229 8D 06 20
|
|
sta PPUADDR ; CPU:$C22C PRG:422C 8D 06 20
|
|
sta PPUADDR ; CPU:$C22F PRG:422F 8D 06 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop6
|
|
; Global: Fills the first and the second nametable with the blank tile.
|
|
; Local: Executes 5 instructions: loads A with $20; stores A to Zp4F; loads A
|
|
; with $00; stores A to Zp4E; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp4E, Zp4F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop6:
|
|
lda #$20 ; CPU:$C232 PRG:4232 A9 20
|
|
sta Zp4F ; CPU:$C234 PRG:4234 85 4F
|
|
lda #$00 ; CPU:$C236 PRG:4236 A9 00
|
|
sta Zp4E ; CPU:$C238 PRG:4238 85 4E
|
|
rts ; CPU:$C23A PRG:423A 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ClearBothNametables
|
|
; Global: Fills the nametable at the address in X with $24 bytes of the blank tile.
|
|
; Local: Executes 3 instructions: loads X with $28; calls FillNametableWithTile24; loads X
|
|
; with $20.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, PPUCTRL, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ClearBothNametables:
|
|
ldx #$28 ; CPU:$C23B PRG:423B A2 28
|
|
jsr FillNametableWithTile24 ; CPU:$C23D PRG:423D 20 42 C2
|
|
ldx #$20 ; CPU:$C240 PRG:4240 A2 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: FillNametableWithTile24
|
|
; Global: The routine writes the PPUCTRL and PPUADDR registers, reads the
|
|
; PPUSTATUS register.
|
|
; Local: Executes 9 instructions: loads A from the PPUSTATUS register; loads A
|
|
; with $10; stores A to the PPUCTRL register; stores X to the PPUADDR
|
|
; register; loads X with $00; stores X to the PPUADDR register; and 3
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the PPUCTRL and PPUADDR registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, PPUCTRL, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
FillNametableWithTile24:
|
|
lda PPUSTATUS ; CPU:$C242 PRG:4242 AD 02 20
|
|
lda #$10 ; CPU:$C245 PRG:4245 A9 10
|
|
sta PPUCTRL ; CPU:$C247 PRG:4247 8D 00 20
|
|
stx PPUADDR ; CPU:$C24A PRG:424A 8E 06 20
|
|
ldx #$00 ; CPU:$C24D PRG:424D A2 00
|
|
stx PPUADDR ; CPU:$C24F PRG:424F 8E 06 20
|
|
ldx #$03 ; CPU:$C252 PRG:4252 A2 03
|
|
ldy #$C0 ; CPU:$C254 PRG:4254 A0 C0
|
|
lda #$24 ; CPU:$C256 PRG:4256 A9 24
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero6
|
|
; Global: The routine writes the PPUDATA register.
|
|
; Local: Executes 6 instructions: stores A to the PPUDATA register; decrements
|
|
; Y; branches on not equal to NmiHandler_OnNonzero6; decrements X;
|
|
; branches on non-negative to NmiHandler_OnNonzero6; returns with
|
|
; RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves the PPUDATA register set.
|
|
; Clobbers:
|
|
; X and Y, the N and Z flags, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero6:
|
|
sta PPUDATA ; CPU:$C258 PRG:4258 8D 07 20
|
|
dey ; CPU:$C25B PRG:425B 88
|
|
bne NmiHandler_OnNonzero6 ; CPU:$C25C PRG:425C D0 FA
|
|
dex ; CPU:$C25E PRG:425E CA
|
|
bpl NmiHandler_OnNonzero6 ; CPU:$C25F PRG:425F 10 F7
|
|
rts ; CPU:$C261 PRG:4261 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero7
|
|
; Global: The routine calls QueuePpuWriteRecord.
|
|
; Local: Executes 7 instructions: calls QueuePpuWriteRecord; clears the carry flag; loads
|
|
; A with $20; adds PpuAddrLow to A; stores A to PpuAddrLow; branches
|
|
; on carry clear to NmiHandler_Loop7; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero7:
|
|
jsr QueuePpuWriteRecord ; CPU:$C262 PRG:4262 20 44 C1
|
|
clc ; CPU:$C265 PRG:4265 18
|
|
lda #$20 ; CPU:$C266 PRG:4266 A9 20
|
|
adc PpuAddrLow ; CPU:$C268 PRG:4268 65 04
|
|
sta PpuAddrLow ; CPU:$C26A PRG:426A 85 04
|
|
bcc NmiHandler_Loop7 ; CPU:$C26C PRG:426C 90 02
|
|
inc PpuAddrHigh ; CPU:$C26E PRG:426E E6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop7
|
|
; Global: Writes the game's PPUCTRL, scroll and PPUMASK values to the PPU at the start of the frame.
|
|
; Local: Executes 10 instructions: calls QueuePpuWriteRecord; clears the carry flag;
|
|
; loads A with $20; adds PpuAddrLow to A; stores A to PpuAddrLow;
|
|
; branches on carry clear to NmiHandler_Loop7; and 4 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop7:
|
|
dec Zp03 ; CPU:$C270 PRG:4270 C6 03
|
|
bne NmiHandler_OnNonzero7 ; CPU:$C272 PRG:4272 D0 EE
|
|
rts ; CPU:$C274 PRG:4274 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ApplyPpuScrollAndMask
|
|
; Global: Hides the background and the sprites and parks the VRAM write pointer at the palette.
|
|
; Local: Executes 9 instructions: loads A from PpuCtrlShadow; stores A to the
|
|
; PPUCTRL register; loads A from Zp42; stores A to the PPUSCROLL
|
|
; register; loads A from Zp43; stores A to the PPUSCROLL register;
|
|
; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves the PPUCTRL and PPUSCROLL registers set.
|
|
; Clobbers:
|
|
; A, the N and Z flags, PPUCTRL, PPUMASK, PPUSCROLL.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ApplyPpuScrollAndMask:
|
|
lda PpuCtrlShadow ; CPU:$C275 PRG:4275 A5 40
|
|
sta PPUCTRL ; CPU:$C277 PRG:4277 8D 00 20
|
|
lda Zp42 ; CPU:$C27A PRG:427A A5 42
|
|
sta PPUSCROLL ; CPU:$C27C PRG:427C 8D 05 20
|
|
lda Zp43 ; CPU:$C27F PRG:427F A5 43
|
|
sta PPUSCROLL ; CPU:$C281 PRG:4281 8D 05 20
|
|
lda PpuMaskShadow ; CPU:$C284 PRG:4284 A5 41
|
|
sta PPUMASK ; CPU:$C286 PRG:4286 8D 01 20
|
|
rts ; CPU:$C289 PRG:4289 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: TurnOffRendering
|
|
; Global: The routine calls NmiHandler_Loop6.
|
|
; Local: Executes 9 instructions: loads A with $00; stores A to PpuMaskShadow;
|
|
; calls NmiHandler_Loop6; loads A with $00; stores A to PpuAddrLow;
|
|
; loads A with $3F; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
TurnOffRendering:
|
|
lda #$00 ; CPU:$C28A PRG:428A A9 00
|
|
sta PpuMaskShadow ; CPU:$C28C PRG:428C 85 41
|
|
jsr NmiHandler_Loop6 ; CPU:$C28E PRG:428E 20 32 C2
|
|
lda #$00 ; CPU:$C291 PRG:4291 A9 00
|
|
sta PpuAddrLow ; CPU:$C293 PRG:4293 85 04
|
|
lda #$3F ; CPU:$C295 PRG:4295 A9 3F
|
|
sta PpuAddrHigh ; CPU:$C297 PRG:4297 85 05
|
|
ldx #$20 ; CPU:$C299 PRG:4299 A2 20
|
|
stx Zp02 ; CPU:$C29B PRG:429B 86 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative
|
|
; Global: Shows the background and the sprites again.
|
|
; Local: Executes 8 instructions: decrements X; stores A to Zp20,x; branches
|
|
; on non-negative to NmiHandler_OnNonnegative; calls Sub_C156; calls
|
|
; PrepareQueueStackExchange; loads A with $00; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative:
|
|
dex ; CPU:$C29D PRG:429D CA
|
|
sta Zp20,x ; CPU:$C29E PRG:429E 95 20
|
|
bpl NmiHandler_OnNonnegative ; CPU:$C2A0 PRG:42A0 10 FB
|
|
jsr Sub_C156 ; CPU:$C2A2 PRG:42A2 20 56 C1
|
|
jsr PrepareQueueStackExchange ; CPU:$C2A5 PRG:42A5 20 F1 C0
|
|
lda #$00 ; CPU:$C2A8 PRG:42A8 A9 00
|
|
sta Zp4B ; CPU:$C2AA PRG:42AA 85 4B
|
|
rts ; CPU:$C2AC PRG:42AC 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: TurnOnRendering
|
|
; Global: Queues the screen update record the game draws with.
|
|
; Local: Executes 7 instructions: loads A with $1E; stores A to PpuMaskShadow;
|
|
; loads A with $01; stores A to Zp4B; calls QueueSpriteUpdateRecord; calls PrepareQueueStackExchange;
|
|
; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4B, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
TurnOnRendering:
|
|
lda #$1E ; CPU:$C2AD PRG:42AD A9 1E
|
|
sta PpuMaskShadow ; CPU:$C2AF PRG:42AF 85 41
|
|
lda #$01 ; CPU:$C2B1 PRG:42B1 A9 01
|
|
sta Zp4B ; CPU:$C2B3 PRG:42B3 85 4B
|
|
jsr QueueSpriteUpdateRecord ; CPU:$C2B5 PRG:42B5 20 CB C2
|
|
jsr PrepareQueueStackExchange ; CPU:$C2B8 PRG:42B8 20 F1 C0
|
|
rts ; CPU:$C2BB PRG:42BB 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueScreenUpdateRecord
|
|
; Global: Queues the sprite update record the game draws with.
|
|
; Local: Executes 7 instructions: loads A with $02; stores A to
|
|
; StarFieldCount; loads A with $96; stores A to StarFieldPtrLo; loads
|
|
; A with $F9; stores A to StarFieldPtrHi; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueScreenUpdateRecord:
|
|
lda #$02 ; CPU:$C2BC PRG:42BC A9 02
|
|
sta StarFieldCount ; CPU:$C2BE PRG:42BE 85 06
|
|
lda #$96 ; CPU:$C2C0 PRG:42C0 A9 96
|
|
sta StarFieldPtrLo ; CPU:$C2C2 PRG:42C2 85 00
|
|
lda #$F9 ; CPU:$C2C4 PRG:42C4 A9 F9
|
|
sta StarFieldPtrHi ; CPU:$C2C6 PRG:42C6 85 01
|
|
jsr AdvanceVramWriteQueue ; CPU:$C2C8 PRG:42C8 20 91 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueSpriteUpdateRecord
|
|
; Global: Pulses the joypad strobe so that the next read of $4016 returns the button state.
|
|
; Local: Executes 3 instructions: loads X with $73; loads A with $F9; calls
|
|
; QueueVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueSpriteUpdateRecord:
|
|
ldx #$73 ; CPU:$C2CB PRG:42CB A2 73
|
|
lda #$F9 ; CPU:$C2CD PRG:42CD A9 F9
|
|
jmp QueueVramWritePointer ; CPU:$C2CF PRG:42CF 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: StrobeControllerRead
|
|
; Global: The routine writes the JOY1 registers.
|
|
; Local: Executes 4 instructions: loads X with $01; stores X to the JOY1
|
|
; register; loads Y with $00; stores Y to the JOY1 register.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the JOY1 registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp44, Zp46, JOY1.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
StrobeControllerRead:
|
|
ldx #$01 ; CPU:$C2D2 PRG:42D2 A2 01
|
|
stx JOY1 ; CPU:$C2D4 PRG:42D4 8E 16 40
|
|
ldy #$00 ; CPU:$C2D7 PRG:42D7 A0 00
|
|
sty JOY1 ; CPU:$C2D9 PRG:42D9 8C 16 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative2
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: stores Y to StarFieldPtrLo; loads Y with
|
|
; $80.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp44, Zp46.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative2:
|
|
sty StarFieldPtrLo ; CPU:$C2DC PRG:42DC 84 00
|
|
ldy #$80 ; CPU:$C2DE PRG:42DE A0 80
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: stores Y to StarFieldPtrLo; loads Y with
|
|
; $80; loads A from JOY1,x; ANDs A with $03; branches on equal to
|
|
; NmiHandler_Loop8; copies Y into A; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp44, Zp46.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear:
|
|
lda JOY1,x ; CPU:$C2E0 PRG:42E0 BD 16 40
|
|
and #$03 ; CPU:$C2E3 PRG:42E3 29 03
|
|
beq NmiHandler_Loop8 ; CPU:$C2E5 PRG:42E5 F0 05
|
|
tya ; CPU:$C2E7 PRG:42E7 98
|
|
ora StarFieldPtrLo ; CPU:$C2E8 PRG:42E8 05 00
|
|
sta StarFieldPtrLo ; CPU:$C2EA PRG:42EA 85 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop8
|
|
; Global: Calls the handler whose 16-bit address is the one the record at the write pointer points at.
|
|
; Local: Executes 21 instructions: stores Y to StarFieldPtrLo; loads Y with
|
|
; $80; loads A from JOY1,x; ANDs A with $03; branches on equal to
|
|
; NmiHandler_Loop8; copies Y into A; and 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp44, Zp46.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop8:
|
|
tya ; CPU:$C2EC PRG:42EC 98
|
|
lsr a ; CPU:$C2ED PRG:42ED 4A
|
|
tay ; CPU:$C2EE PRG:42EE A8
|
|
bcc NmiHandler_OnCarryClear ; CPU:$C2EF PRG:42EF 90 EF
|
|
lda Zp44,x ; CPU:$C2F1 PRG:42F1 B5 44
|
|
eor #$FF ; CPU:$C2F3 PRG:42F3 49 FF
|
|
and StarFieldPtrLo ; CPU:$C2F5 PRG:42F5 25 00
|
|
sta Zp46,x ; CPU:$C2F7 PRG:42F7 95 46
|
|
lda StarFieldPtrLo ; CPU:$C2F9 PRG:42F9 A5 00
|
|
sta Zp44,x ; CPU:$C2FB PRG:42FB 95 44
|
|
dex ; CPU:$C2FD PRG:42FD CA
|
|
bpl NmiHandler_OnNonnegative2 ; CPU:$C2FE PRG:42FE 10 DC
|
|
rts ; CPU:$C300 PRG:4300 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: CallHandlerThroughPointer
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 14 instructions: shifts a left; copies A into Y; increments
|
|
; Y; pulls A; stores A to Zp1E; pulls A; and 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
CallHandlerThroughPointer:
|
|
asl a ; CPU:$C301 PRG:4301 0A
|
|
tay ; CPU:$C302 PRG:4302 A8
|
|
iny ; CPU:$C303 PRG:4303 C8
|
|
pla ; CPU:$C304 PRG:4304 68
|
|
sta Zp1E ; CPU:$C305 PRG:4305 85 1E
|
|
pla ; CPU:$C307 PRG:4307 68
|
|
sta Zp1F ; CPU:$C308 PRG:4308 85 1F
|
|
lda (Zp1E),y ; CPU:$C30A PRG:430A B1 1E
|
|
tax ; CPU:$C30C PRG:430C AA
|
|
iny ; CPU:$C30D PRG:430D C8
|
|
lda (Zp1E),y ; CPU:$C30E PRG:430E B1 1E
|
|
sta Zp1F ; CPU:$C310 PRG:4310 85 1F
|
|
stx Zp1E ; CPU:$C312 PRG:4312 86 1E
|
|
jmp (Zp1E) ; CPU:$C314 PRG:4314 6C 1E 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C317
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 12 instructions: loads A from Zp6E; shifts a left; shifts a
|
|
; left; sets the carry flag; adds Zp6E to A; stores A to Zp6E; and 6
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, Zp6E, Zp6F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C317:
|
|
lda Zp6E ; CPU:$C317 PRG:4317 A5 6E
|
|
asl a ; CPU:$C319 PRG:4319 0A
|
|
asl a ; CPU:$C31A PRG:431A 0A
|
|
sec ; CPU:$C31B PRG:431B 38
|
|
adc Zp6E ; CPU:$C31C PRG:431C 65 6E
|
|
sta Zp6E ; CPU:$C31E PRG:431E 85 6E
|
|
asl Zp6F ; CPU:$C320 PRG:4320 06 6F
|
|
lda #$20 ; CPU:$C322 PRG:4322 A9 20
|
|
bit Zp6F ; CPU:$C324 PRG:4324 24 6F
|
|
bcc NmiHandler_Loop9 ; CPU:$C326 PRG:4326 90 04
|
|
beq NmiHandler_Loop11 ; CPU:$C328 PRG:4328 F0 06
|
|
bne NmiHandler_Loop10 ; CPU:$C32A PRG:432A D0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop9
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: branches on not equal to NmiHandler_Loop11.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp6F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop9:
|
|
bne NmiHandler_Loop11 ; CPU:$C32C PRG:432C D0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop10
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: increments Zp6F.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp6F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop10:
|
|
inc Zp6F ; CPU:$C32E PRG:432E E6 6F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop11
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A from Zp6F; EORs A with Zp6E; returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop11:
|
|
lda Zp6F ; CPU:$C330 PRG:4330 A5 6F
|
|
eor Zp6E ; CPU:$C332 PRG:4332 45 6E
|
|
rts ; CPU:$C334 PRG:4334 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C335
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $A0; branches on not equal to
|
|
; NmiHandler_Loop12.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C335:
|
|
lda #$A0 ; CPU:$C335 PRG:4335 A9 A0
|
|
bne NmiHandler_Loop12 ; CPU:$C337 PRG:4337 D0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C339
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads A with $A8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C339:
|
|
lda #$A8 ; CPU:$C339 PRG:4339 A9 A8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop12
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: stores A to StarFieldPtrLo; loads A with
|
|
; $04; stores A to StarFieldPtrHi; loads Y with $07; branches on
|
|
; non-negative to NmiHandler_Loop16.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop12:
|
|
sta StarFieldPtrLo ; CPU:$C33B PRG:433B 85 00
|
|
lda #$04 ; CPU:$C33D PRG:433D A9 04
|
|
sta StarFieldPtrHi ; CPU:$C33F PRG:433F 85 01
|
|
ldy #$07 ; CPU:$C341 PRG:4341 A0 07
|
|
bpl NmiHandler_Loop16 ; CPU:$C343 PRG:4343 10 5F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C345
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $00; stores A to
|
|
; StarFieldPtrLo; loads X with $07.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C345:
|
|
lda #$00 ; CPU:$C345 PRG:4345 A9 00
|
|
sta StarFieldPtrLo ; CPU:$C347 PRG:4347 85 00
|
|
ldx #$07 ; CPU:$C349 PRG:4349 A2 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative3
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads Y with $00; stores Y to Zp20,x; ORs A
|
|
; with $04A0,x; loads Y from $04A0,x; stores Y to Zp28,x; loads Y
|
|
; from $04A8,x; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative3:
|
|
ldy #$00 ; CPU:$C34B PRG:434B A0 00
|
|
sty Zp20,x ; CPU:$C34D PRG:434D 94 20
|
|
ora $04A0,x ; CPU:$C34F PRG:434F 1D A0 04
|
|
ldy $04A0,x ; CPU:$C352 PRG:4352 BC A0 04
|
|
sty Zp28,x ; CPU:$C355 PRG:4355 94 28
|
|
ldy $04A8,x ; CPU:$C357 PRG:4357 BC A8 04
|
|
sty Zp30,x ; CPU:$C35A PRG:435A 94 30
|
|
dex ; CPU:$C35C PRG:435C CA
|
|
bpl NmiHandler_OnNonnegative3 ; CPU:$C35D PRG:435D 10 EC
|
|
tay ; CPU:$C35F PRG:435F A8
|
|
beq NmiHandler_Loop14 ; CPU:$C360 PRG:4360 F0 2C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero8
|
|
; Global: The routine calls Sub_C38F.
|
|
; Local: Executes 3 instructions: calls Sub_C38F; branches on carry clear to
|
|
; NmiHandler_Loop13; loads X with $07.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp20, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero8:
|
|
jsr Sub_C38F ; CPU:$C362 PRG:4362 20 8F C3
|
|
bcc NmiHandler_Loop13 ; CPU:$C365 PRG:4365 90 10
|
|
ldx #$07 ; CPU:$C367 PRG:4367 A2 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative4
|
|
; Global: The routine calls NmiHandler_OnNonzero8.
|
|
; Local: Executes 7 instructions: loads A from Zp38,x; stores A to Zp30,x;
|
|
; decrements X; branches on non-negative to
|
|
; NmiHandler_OnNonnegative4; loads X from StarFieldPtrLo; increments
|
|
; Zp20,x; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp20, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative4:
|
|
lda Zp38,x ; CPU:$C369 PRG:4369 B5 38
|
|
sta Zp30,x ; CPU:$C36B PRG:436B 95 30
|
|
dex ; CPU:$C36D PRG:436D CA
|
|
bpl NmiHandler_OnNonnegative4 ; CPU:$C36E PRG:436E 10 F9
|
|
ldx StarFieldPtrLo ; CPU:$C370 PRG:4370 A6 00
|
|
inc Zp20,x ; CPU:$C372 PRG:4372 F6 20
|
|
jmp NmiHandler_OnNonzero8 ; CPU:$C374 PRG:4374 4C 62 C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop13
|
|
; Global: The routine calls Sub_C38F and NmiHandler_OnNonzero8.
|
|
; Local: Executes 11 instructions: calls Sub_C38F; branches on carry clear to
|
|
; NmiHandler_Loop13; loads X with $07; loads A from Zp38,x; stores A
|
|
; to Zp30,x; decrements X; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp20, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop13:
|
|
ldx #$00 ; CPU:$C377 PRG:4377 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero9
|
|
; Global: The routine calls Sub_C38F and NmiHandler_OnNonzero8.
|
|
; Local: Executes 22 instructions: calls Sub_C38F; branches on carry clear to
|
|
; NmiHandler_Loop13; loads X with $07; loads A from Zp38,x; stores A
|
|
; to Zp30,x; decrements X; and 16 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp20, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero9:
|
|
lda Zp31,x ; CPU:$C379 PRG:4379 B5 31
|
|
sta Zp30,x ; CPU:$C37B PRG:437B 95 30
|
|
inx ; CPU:$C37D PRG:437D E8
|
|
cpx #$07 ; CPU:$C37E PRG:437E E0 07
|
|
bne NmiHandler_OnNonzero9 ; CPU:$C380 PRG:4380 D0 F7
|
|
lda #$00 ; CPU:$C382 PRG:4382 A9 00
|
|
sta Zp37 ; CPU:$C384 PRG:4384 85 37
|
|
inc StarFieldPtrLo ; CPU:$C386 PRG:4386 E6 00
|
|
lda StarFieldPtrLo ; CPU:$C388 PRG:4388 A5 00
|
|
cmp #$04 ; CPU:$C38A PRG:438A C9 04
|
|
bne NmiHandler_OnNonzero8 ; CPU:$C38C PRG:438C D0 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop14
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop14:
|
|
rts ; CPU:$C38E PRG:438E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C38F
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X with $07; sets the carry flag.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C38F:
|
|
ldx #$07 ; CPU:$C38F PRG:438F A2 07
|
|
sec ; CPU:$C391 PRG:4391 38
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative5
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A from Zp30,x; subtracts Zp28,x from
|
|
; A; branches on carry set to NmiHandler_Loop15; adds $0A to A;
|
|
; clears the carry flag.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative5:
|
|
lda Zp30,x ; CPU:$C392 PRG:4392 B5 30
|
|
sbc Zp28,x ; CPU:$C394 PRG:4394 F5 28
|
|
bcs NmiHandler_Loop15 ; CPU:$C396 PRG:4396 B0 03
|
|
adc #$0A ; CPU:$C398 PRG:4398 69 0A
|
|
clc ; CPU:$C39A PRG:439A 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop15
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads A from Zp30,x; subtracts Zp28,x from
|
|
; A; branches on carry set to NmiHandler_Loop15; adds $0A to A;
|
|
; clears the carry flag; stores A to Zp38,x; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop15:
|
|
sta Zp38,x ; CPU:$C39B PRG:439B 95 38
|
|
dex ; CPU:$C39D PRG:439D CA
|
|
bpl NmiHandler_OnNonnegative5 ; CPU:$C39E PRG:439E 10 F2
|
|
rts ; CPU:$C3A0 PRG:43A0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C3A1
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads Y from Zp02; decrements Y.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C3A1:
|
|
ldy Zp02 ; CPU:$C3A1 PRG:43A1 A4 02
|
|
dey ; CPU:$C3A3 PRG:43A3 88
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop16
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: sets the carry flag.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop16:
|
|
sec ; CPU:$C3A4 PRG:43A4 38
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative6
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads A from ((StarFieldPtrLo),y); adds $00
|
|
; to A; compares A with $0A; branches on carry clear to
|
|
; NmiHandler_Loop17; loads A with $00; stores A to
|
|
; ((StarFieldPtrLo),y); and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative6:
|
|
lda (StarFieldPtrLo),y ; CPU:$C3A5 PRG:43A5 B1 00
|
|
adc #$00 ; CPU:$C3A7 PRG:43A7 69 00
|
|
cmp #$0A ; CPU:$C3A9 PRG:43A9 C9 0A
|
|
bcc NmiHandler_Loop17 ; CPU:$C3AB PRG:43AB 90 08
|
|
lda #$00 ; CPU:$C3AD PRG:43AD A9 00
|
|
sta (StarFieldPtrLo),y ; CPU:$C3AF PRG:43AF 91 00
|
|
dey ; CPU:$C3B1 PRG:43B1 88
|
|
bpl NmiHandler_OnNonnegative6 ; CPU:$C3B2 PRG:43B2 10 F1
|
|
rts ; CPU:$C3B4 PRG:43B4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop17
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: stores A to ((StarFieldPtrLo),y); returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop17:
|
|
sta (StarFieldPtrLo),y ; CPU:$C3B5 PRG:43B5 91 00
|
|
rts ; CPU:$C3B7 PRG:43B7 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C3B8
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads Y from Zp02; decrements Y; clears the
|
|
; carry flag.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C3B8:
|
|
ldy Zp02 ; CPU:$C3B8 PRG:43B8 A4 02
|
|
dey ; CPU:$C3BA PRG:43BA 88
|
|
clc ; CPU:$C3BB PRG:43BB 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative7
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from ((StarFieldPtrLo),y); subtracts
|
|
; $00 from A; branches on carry set to NmiHandler_Loop18; loads A
|
|
; with $09; stores A to ((StarFieldPtrLo),y); decrements Y; and 2
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative7:
|
|
lda (StarFieldPtrLo),y ; CPU:$C3BC PRG:43BC B1 00
|
|
sbc #$00 ; CPU:$C3BE PRG:43BE E9 00
|
|
bcs NmiHandler_Loop18 ; CPU:$C3C0 PRG:43C0 B0 08
|
|
lda #$09 ; CPU:$C3C2 PRG:43C2 A9 09
|
|
sta (StarFieldPtrLo),y ; CPU:$C3C4 PRG:43C4 91 00
|
|
dey ; CPU:$C3C6 PRG:43C6 88
|
|
bpl NmiHandler_OnNonnegative7 ; CPU:$C3C7 PRG:43C7 10 F3
|
|
rts ; CPU:$C3C9 PRG:43C9 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop18
|
|
; Global: Swaps the two object buffers at $0300 and $0400.
|
|
; Local: Executes 2 instructions: stores A to ((StarFieldPtrLo),y); returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop18:
|
|
sta (StarFieldPtrLo),y ; CPU:$C3CA PRG:43CA 91 00
|
|
rts ; CPU:$C3CC PRG:43CC 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SwapObjectBuffers
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $C0.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, Zp70, Zp80, the OAM shadow, $0300,
|
|
; $03C0, $0400.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SwapObjectBuffers:
|
|
ldx #$C0 ; CPU:$C3CD PRG:43CD A2 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero10
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: decrements X; loads Y from $0400,x; loads A
|
|
; from $0300,x; stores A to $0400,x; copies Y into A; stores A to
|
|
; $0300,x; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, Zp70, Zp80, the OAM shadow, $0300,
|
|
; $03C0, $0400.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero10:
|
|
dex ; CPU:$C3CF PRG:43CF CA
|
|
ldy $0400,x ; CPU:$C3D0 PRG:43D0 BC 00 04
|
|
lda $0300,x ; CPU:$C3D3 PRG:43D3 BD 00 03
|
|
sta $0400,x ; CPU:$C3D6 PRG:43D6 9D 00 04
|
|
tya ; CPU:$C3D9 PRG:43D9 98
|
|
sta $0300,x ; CPU:$C3DA PRG:43DA 9D 00 03
|
|
txa ; CPU:$C3DD PRG:43DD 8A
|
|
bne NmiHandler_OnNonzero10 ; CPU:$C3DE PRG:43DE D0 EF
|
|
ldx #$0F ; CPU:$C3E0 PRG:43E0 A2 0F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative8
|
|
; Global: Divides a tile index by sixteen, keeping the remainder in the high nibble.
|
|
; Local: Executes 12 instructions: loads Y from Zp70,x; loads A from Zp80,x;
|
|
; stores A to Zp70,x; stores Y to Zp80,x; loads Y from $0210,x; loads
|
|
; A from $03C0,x; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, Zp70, Zp80, the OAM shadow, $03C0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative8:
|
|
ldy Zp70,x ; CPU:$C3E2 PRG:43E2 B4 70
|
|
lda Zp80,x ; CPU:$C3E4 PRG:43E4 B5 80
|
|
sta Zp70,x ; CPU:$C3E6 PRG:43E6 95 70
|
|
sty Zp80,x ; CPU:$C3E8 PRG:43E8 94 80
|
|
ldy $0210,x ; CPU:$C3EA PRG:43EA BC 10 02
|
|
lda $03C0,x ; CPU:$C3ED PRG:43ED BD C0 03
|
|
sta $0210,x ; CPU:$C3F0 PRG:43F0 9D 10 02
|
|
tya ; CPU:$C3F3 PRG:43F3 98
|
|
sta $03C0,x ; CPU:$C3F4 PRG:43F4 9D C0 03
|
|
dex ; CPU:$C3F7 PRG:43F7 CA
|
|
bpl NmiHandler_OnNonnegative8 ; CPU:$C3F8 PRG:43F8 10 E8
|
|
rts ; CPU:$C3FA PRG:43FA 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DivideTileIndexBy16
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: branches on negative to NmiHandler_Loop19;
|
|
; shifts a right; shifts a right; shifts a right; shifts a right;
|
|
; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, the N, Z and C flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DivideTileIndexBy16:
|
|
bmi NmiHandler_Loop19 ; CPU:$C3FB PRG:43FB 30 05
|
|
lsr a ; CPU:$C3FD PRG:43FD 4A
|
|
lsr a ; CPU:$C3FE PRG:43FE 4A
|
|
lsr a ; CPU:$C3FF PRG:43FF 4A
|
|
lsr a ; CPU:$C400 PRG:4400 4A
|
|
rts ; CPU:$C401 PRG:4401 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop19
|
|
; Global: Works out how far apart two objects are, in pixels.
|
|
; Local: Executes 6 instructions: shifts a right; shifts a right; shifts a
|
|
; right; shifts a right; ORs A with $F0; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, the N, Z and C flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop19:
|
|
lsr a ; CPU:$C402 PRG:4402 4A
|
|
lsr a ; CPU:$C403 PRG:4403 4A
|
|
lsr a ; CPU:$C404 PRG:4404 4A
|
|
lsr a ; CPU:$C405 PRG:4405 4A
|
|
ora #$F0 ; CPU:$C406 PRG:4406 09 F0
|
|
rts ; CPU:$C408 PRG:4408 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ComputeObjectDistance
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads X with $00; loads A from Zp11; sets
|
|
; the carry flag; subtracts Zp13 from A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ComputeObjectDistance:
|
|
ldx #$00 ; CPU:$C409 PRG:4409 A2 00
|
|
lda Zp11 ; CPU:$C40B PRG:440B A5 11
|
|
sec ; CPU:$C40D PRG:440D 38
|
|
sbc Zp13 ; CPU:$C40E PRG:440E E5 13
|
|
.byte $B0, $09 ; CPU:$C410 PRG:4410 B0 09
|
|
eor #$FF ; CPU:$C412 PRG:4412 49 FF
|
|
sta Zp15 ; CPU:$C414 PRG:4414 85 15
|
|
inc Zp15 ; CPU:$C416 PRG:4416 E6 15
|
|
ldx #$04 ; CPU:$C418 PRG:4418 A2 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCC41A
|
|
; Global: The routine reads $1585.
|
|
; Local: Executes 4 instructions: tests the bits of $1585; loads A from Zp10;
|
|
; sets the carry flag; subtracts Zp12 from A.
|
|
; Parameters: Reads $1585 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCC41A:
|
|
bit $1585 ; CPU:$C41A PRG:441A 2C 85 15
|
|
lda Zp10 ; CPU:$C41D PRG:441D A5 10
|
|
sec ; CPU:$C41F PRG:441F 38
|
|
sbc Zp12 ; CPU:$C420 PRG:4420 E5 12
|
|
.byte $B0, $09 ; CPU:$C422 PRG:4422 B0 09
|
|
eor #$FF ; CPU:$C424 PRG:4424 49 FF
|
|
sta Zp14 ; CPU:$C426 PRG:4426 85 14
|
|
inc Zp14 ; CPU:$C428 PRG:4428 E6 14
|
|
inx ; CPU:$C42A PRG:442A E8
|
|
inx ; CPU:$C42B PRG:442B E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCC42C
|
|
; Global: The routine reads $1485.
|
|
; Local: Executes 8 instructions: tests the bits of $1485; loads A from Zp15;
|
|
; compares A with Zp14; branches on carry set to NmiHandler_Loop22;
|
|
; loads Y from Zp14; stores A to Zp14; and 2 more instructions.
|
|
; Parameters: Reads $1485 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp14, Zp15, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCC42C:
|
|
bit $1485 ; CPU:$C42C PRG:442C 2C 85 14
|
|
lda Zp15 ; CPU:$C42F PRG:442F A5 15
|
|
cmp Zp14 ; CPU:$C431 PRG:4431 C5 14
|
|
bcs NmiHandler_Loop22 ; CPU:$C433 PRG:4433 B0 07
|
|
ldy Zp14 ; CPU:$C435 PRG:4435 A4 14
|
|
sta Zp14 ; CPU:$C437 PRG:4437 85 14
|
|
sty Zp15 ; CPU:$C439 PRG:4439 84 15
|
|
inx ; CPU:$C43B PRG:443B E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop22
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 20 instructions: copies X into A; shifts a left; shifts a
|
|
; left; copies A into X; loads A from Zp15; shifts a right; and 14
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop22:
|
|
txa ; CPU:$C43C PRG:443C 8A
|
|
asl a ; CPU:$C43D PRG:443D 0A
|
|
asl a ; CPU:$C43E PRG:443E 0A
|
|
tax ; CPU:$C43F PRG:443F AA
|
|
lda Zp15 ; CPU:$C440 PRG:4440 A5 15
|
|
lsr a ; CPU:$C442 PRG:4442 4A
|
|
lsr a ; CPU:$C443 PRG:4443 4A
|
|
sta Zp17 ; CPU:$C444 PRG:4444 85 17
|
|
lsr a ; CPU:$C446 PRG:4446 4A
|
|
cmp Zp14 ; CPU:$C447 PRG:4447 C5 14
|
|
bcs NmiHandler_Loop23 ; CPU:$C449 PRG:4449 B0 0E
|
|
inx ; CPU:$C44B PRG:444B E8
|
|
adc Zp17 ; CPU:$C44C PRG:444C 65 17
|
|
cmp Zp14 ; CPU:$C44E PRG:444E C5 14
|
|
bcs NmiHandler_Loop23 ; CPU:$C450 PRG:4450 B0 07
|
|
inx ; CPU:$C452 PRG:4452 E8
|
|
asl a ; CPU:$C453 PRG:4453 0A
|
|
cmp Zp14 ; CPU:$C454 PRG:4454 C5 14
|
|
bcs NmiHandler_Loop23 ; CPU:$C456 PRG:4456 B0 01
|
|
inx ; CPU:$C458 PRG:4458 E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop23
|
|
; Global: Works out the player ship's position from the OAM shadow and the joystick.
|
|
; Local: Executes 3 instructions: loads A from $C480,x; stores A to SpriteX;
|
|
; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop23:
|
|
lda $C480,x ; CPU:$C459 PRG:4459 BD 80 C4
|
|
sta SpriteX ; CPU:$C45C PRG:445C 85 16
|
|
rts ; CPU:$C45E PRG:445E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ComputePlayerShipPosition
|
|
; Global: The routine calls ComputeObjectDistance, reads $0202 and $0203.
|
|
; Local: Executes 11 instructions: loads A from $0202; stores A to Zp10; loads
|
|
; A from $0203; stores A to Zp11; calls ComputeObjectDistance; loads A from
|
|
; SpriteX; and 5 more instructions.
|
|
; Parameters: Reads $0202 and $0203 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp10, Zp11, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ComputePlayerShipPosition:
|
|
lda $0202 ; CPU:$C45F PRG:445F AD 02 02
|
|
sta Zp10 ; CPU:$C462 PRG:4462 85 10
|
|
lda $0203 ; CPU:$C464 PRG:4464 AD 03 02
|
|
sta Zp11 ; CPU:$C467 PRG:4467 85 11
|
|
jsr ComputeObjectDistance ; CPU:$C469 PRG:4469 20 09 C4
|
|
lda SpriteX ; CPU:$C46C PRG:446C A5 16
|
|
cmp #$0B ; CPU:$C46E PRG:446E C9 0B
|
|
bcs NmiHandler_Loop24 ; CPU:$C470 PRG:4470 B0 05
|
|
lda #$0B ; CPU:$C472 PRG:4472 A9 0B
|
|
sta Zp17 ; CPU:$C474 PRG:4474 85 17
|
|
rts ; CPU:$C476 PRG:4476 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop24
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: compares A with $0E; branches on carry clear
|
|
; to NmiHandler_Loop25; loads A with $0D.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N, Z and C flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop24:
|
|
cmp #$0E ; CPU:$C477 PRG:4477 C9 0E
|
|
bcc NmiHandler_Loop25 ; CPU:$C479 PRG:4479 90 02
|
|
lda #$0D ; CPU:$C47B PRG:447B A9 0D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop25
|
|
; Global: Sets up the four OAM group records the game hands to the sprite routine.
|
|
; Local: Executes 2 instructions: stores A to Zp17; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop25:
|
|
sta Zp17 ; CPU:$C47D PRG:447D 85 17
|
|
rts ; CPU:$C47F PRG:447F 60
|
|
; ---- data $C480-$C49F (32 bytes) ----
|
|
; referenced by `lda $C480,x` at $C459 (operand $C480 falls inside this region)
|
|
EnemyFormationXTable:
|
|
.byte $06, $07, $08, $09, $0C, $0B, $0A, $09, $06, $05, $04, $03, $00, $01, $02, $03 ; CPU:$C480 PRG:4480 06 07 08 09 0C 0B 0A 09 06 05 04 03
|
|
.byte $12, $11, $10, $0F, $0C, $0D, $0E, $0F, $12, $13, $14, $15, $00, $17, $16, $15 ; CPU:$C490 PRG:4490 12 11 10 0F 0C 0D 0E 0F 12 13 14 15
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetupOamGroupTable
|
|
; Global: The routine calls Sub_C4EF, writes $0496 and $03F8.
|
|
; Local: Executes 37 instructions: loads A with $80; stores A to PpuAddrLow;
|
|
; stores A to $0496; loads A with $00; stores A to StarFieldPtrLo;
|
|
; loads A with $02; and 31 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0496 and $03F8 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $03F8, $0496.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetupOamGroupTable:
|
|
lda #$80 ; CPU:$C4A0 PRG:44A0 A9 80
|
|
sta PpuAddrLow ; CPU:$C4A2 PRG:44A2 85 04
|
|
sta $0496 ; CPU:$C4A4 PRG:44A4 8D 96 04
|
|
lda #$00 ; CPU:$C4A7 PRG:44A7 A9 00
|
|
sta StarFieldPtrLo ; CPU:$C4A9 PRG:44A9 85 00
|
|
lda #$02 ; CPU:$C4AB PRG:44AB A9 02
|
|
sta StarFieldPtrHi ; CPU:$C4AD PRG:44AD 85 01
|
|
ldx #$0E ; CPU:$C4AF PRG:44AF A2 0E
|
|
lda #$10 ; CPU:$C4B1 PRG:44B1 A9 10
|
|
sta Zp02 ; CPU:$C4B3 PRG:44B3 85 02
|
|
jsr Sub_C4EF ; CPU:$C4B5 PRG:44B5 20 EF C4
|
|
lda #$90 ; CPU:$C4B8 PRG:44B8 A9 90
|
|
sta StarFieldPtrLo ; CPU:$C4BA PRG:44BA 85 00
|
|
lda #$00 ; CPU:$C4BC PRG:44BC A9 00
|
|
sta StarFieldPtrHi ; CPU:$C4BE PRG:44BE 85 01
|
|
ldx #$04 ; CPU:$C4C0 PRG:44C0 A2 04
|
|
stx Zp02 ; CPU:$C4C2 PRG:44C2 86 02
|
|
ldx #$08 ; CPU:$C4C4 PRG:44C4 A2 08
|
|
jsr Sub_C4EF ; CPU:$C4C6 PRG:44C6 20 EF C4
|
|
lda #$E0 ; CPU:$C4C9 PRG:44C9 A9 E0
|
|
sta StarFieldPtrLo ; CPU:$C4CB PRG:44CB 85 00
|
|
lda #$02 ; CPU:$C4CD PRG:44CD A9 02
|
|
sta StarFieldPtrHi ; CPU:$C4CF PRG:44CF 85 01
|
|
ldx #$08 ; CPU:$C4D1 PRG:44D1 A2 08
|
|
stx Zp02 ; CPU:$C4D3 PRG:44D3 86 02
|
|
ldx #$04 ; CPU:$C4D5 PRG:44D5 A2 04
|
|
jsr Sub_C4EF ; CPU:$C4D7 PRG:44D7 20 EF C4
|
|
lda #$00 ; CPU:$C4DA PRG:44DA A9 00
|
|
sta PpuAddrLow ; CPU:$C4DC PRG:44DC 85 04
|
|
sta $03F8 ; CPU:$C4DE PRG:44DE 8D F8 03
|
|
lda #$D8 ; CPU:$C4E1 PRG:44E1 A9 D8
|
|
sta StarFieldPtrLo ; CPU:$C4E3 PRG:44E3 85 00
|
|
lda #$03 ; CPU:$C4E5 PRG:44E5 A9 03
|
|
sta StarFieldPtrHi ; CPU:$C4E7 PRG:44E7 85 01
|
|
lda #$04 ; CPU:$C4E9 PRG:44E9 A9 04
|
|
sta Zp02 ; CPU:$C4EB PRG:44EB 85 02
|
|
ldx #$08 ; CPU:$C4ED PRG:44ED A2 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C4EF
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C4EF:
|
|
ldy #$00 ; CPU:$C4EF PRG:44EF A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero11
|
|
; Global: Draws the game screen: the score panel, the counter rows and the bottom of the playfield.
|
|
; Local: Executes 9 instructions: loads A from PpuAddrLow; stores A to
|
|
; ((StarFieldPtrLo),y); loads A from Zp02; clears the carry flag;
|
|
; adds StarFieldPtrLo to A; stores A to StarFieldPtrLo; and 3 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero11:
|
|
lda PpuAddrLow ; CPU:$C4F1 PRG:44F1 A5 04
|
|
sta (StarFieldPtrLo),y ; CPU:$C4F3 PRG:44F3 91 00
|
|
lda Zp02 ; CPU:$C4F5 PRG:44F5 A5 02
|
|
clc ; CPU:$C4F7 PRG:44F7 18
|
|
adc StarFieldPtrLo ; CPU:$C4F8 PRG:44F8 65 00
|
|
sta StarFieldPtrLo ; CPU:$C4FA PRG:44FA 85 00
|
|
dex ; CPU:$C4FC PRG:44FC CA
|
|
bne NmiHandler_OnNonzero11 ; CPU:$C4FD PRG:44FD D0 F2
|
|
rts ; CPU:$C4FF PRG:44FF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DrawGameScreen
|
|
; Global: The routine calls NmiHandler_OnNonzero16, NmiHandler_OnNonzero14,
|
|
; Sub_C7A8 and Sub_C710.
|
|
; Local: Executes 39 instructions: copies the stack pointer into X; stores X
|
|
; to Zp0E; loads X with $00; stores X to TilePtrLo; loads A with $E0;
|
|
; stores A to ScreenPtrLo; and 33 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DrawGameScreen:
|
|
tsx ; CPU:$C500 PRG:4500 BA
|
|
stx Zp0E ; CPU:$C501 PRG:4501 86 0E
|
|
ldx #$00 ; CPU:$C503 PRG:4503 A2 00
|
|
stx TilePtrLo ; CPU:$C505 PRG:4505 86 08
|
|
lda #$E0 ; CPU:$C507 PRG:4507 A9 E0
|
|
sta ScreenPtrLo ; CPU:$C509 PRG:4509 85 0A
|
|
lda #$02 ; CPU:$C50B PRG:450B A9 02
|
|
sta ScreenPtrHi ; CPU:$C50D PRG:450D 85 0B
|
|
lda #$04 ; CPU:$C50F PRG:450F A9 04
|
|
sta Zp0C ; CPU:$C511 PRG:4511 85 0C
|
|
lda #$08 ; CPU:$C513 PRG:4513 A9 08
|
|
sta Zp0D ; CPU:$C515 PRG:4515 85 0D
|
|
lda #$03 ; CPU:$C517 PRG:4517 A9 03
|
|
sta Zp03 ; CPU:$C519 PRG:4519 85 03
|
|
jsr NmiHandler_OnNonzero16 ; CPU:$C51B PRG:451B 20 D1 C6
|
|
lda #$00 ; CPU:$C51E PRG:451E A9 00
|
|
sta ScreenPtrLo ; CPU:$C520 PRG:4520 85 0A
|
|
lda #$02 ; CPU:$C522 PRG:4522 A9 02
|
|
sta ScreenPtrHi ; CPU:$C524 PRG:4524 85 0B
|
|
lda #$02 ; CPU:$C526 PRG:4526 A9 02
|
|
sta Zp0C ; CPU:$C528 PRG:4528 85 0C
|
|
jsr NmiHandler_OnNonzero14 ; CPU:$C52A PRG:452A 20 E5 C5
|
|
jsr Sub_C7A8 ; CPU:$C52D PRG:452D 20 A8 C7
|
|
lda #$90 ; CPU:$C530 PRG:4530 A9 90
|
|
sta ScreenPtrLo ; CPU:$C532 PRG:4532 85 0A
|
|
lda #$00 ; CPU:$C534 PRG:4534 A9 00
|
|
sta ScreenPtrHi ; CPU:$C536 PRG:4536 85 0B
|
|
lda #$08 ; CPU:$C538 PRG:4538 A9 08
|
|
sta Zp0C ; CPU:$C53A PRG:453A 85 0C
|
|
lda #$04 ; CPU:$C53C PRG:453C A9 04
|
|
sta Zp0D ; CPU:$C53E PRG:453E 85 0D
|
|
lda #$00 ; CPU:$C540 PRG:4540 A9 00
|
|
sta Zp03 ; CPU:$C542 PRG:4542 85 03
|
|
jsr NmiHandler_OnNonzero16 ; CPU:$C544 PRG:4544 20 D1 C6
|
|
lda Zp48 ; CPU:$C547 PRG:4547 A5 48
|
|
ror a ; CPU:$C549 PRG:4549 6A
|
|
ror a ; CPU:$C54A PRG:454A 6A
|
|
bcc NmiHandler_Loop26 ; CPU:$C54B PRG:454B 90 03
|
|
jsr Sub_C710 ; CPU:$C54D PRG:454D 20 10 C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop26
|
|
; Global: The routine calls Sub_C693, Sub_C5D4 and Sub_C710.
|
|
; Local: Executes 7 instructions: calls Sub_C693; calls Sub_C5D4; loads A from
|
|
; Zp48; rotates a right; rotates a right; branches on carry set to
|
|
; NmiHandler_Loop27; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop26:
|
|
jsr Sub_C693 ; CPU:$C550 PRG:4550 20 93 C6
|
|
jsr Sub_C5D4 ; CPU:$C553 PRG:4553 20 D4 C5
|
|
lda Zp48 ; CPU:$C556 PRG:4556 A5 48
|
|
ror a ; CPU:$C558 PRG:4558 6A
|
|
ror a ; CPU:$C559 PRG:4559 6A
|
|
bcs NmiHandler_Loop27 ; CPU:$C55A PRG:455A B0 03
|
|
jsr Sub_C710 ; CPU:$C55C PRG:455C 20 10 C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop27
|
|
; Global: The routine reads $0471.
|
|
; Local: Executes 4 instructions: loads Y with $FF; loads A from $0471;
|
|
; branches on negative to NmiHandler_Loop28; increments Y.
|
|
; Parameters: Reads $0471 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, Zp1D, Zp51, Zp52,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop27:
|
|
ldy #$FF ; CPU:$C55F PRG:455F A0 FF
|
|
lda $0471 ; CPU:$C561 PRG:4561 AD 71 04
|
|
bmi NmiHandler_Loop28 ; CPU:$C564 PRG:4564 30 01
|
|
iny ; CPU:$C566 PRG:4566 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop28
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 17 instructions: stores Y to Zp1D; clears the carry flag;
|
|
; adds Zp51 to A; stores A to Zp51; stores A to Zp1C; loads A from
|
|
; Zp1D; and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, Zp1D, Zp51, Zp52,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop28:
|
|
sty Zp1D ; CPU:$C567 PRG:4567 84 1D
|
|
clc ; CPU:$C569 PRG:4569 18
|
|
adc Zp51 ; CPU:$C56A PRG:456A 65 51
|
|
sta Zp51 ; CPU:$C56C PRG:456C 85 51
|
|
sta Zp1C ; CPU:$C56E PRG:456E 85 1C
|
|
lda Zp1D ; CPU:$C570 PRG:4570 A5 1D
|
|
adc Zp52 ; CPU:$C572 PRG:4572 65 52
|
|
sta Zp52 ; CPU:$C574 PRG:4574 85 52
|
|
ror a ; CPU:$C576 PRG:4576 6A
|
|
ror Zp1C ; CPU:$C577 PRG:4577 66 1C
|
|
ror a ; CPU:$C579 PRG:4579 6A
|
|
ror Zp1C ; CPU:$C57A PRG:457A 66 1C
|
|
ror a ; CPU:$C57C PRG:457C 6A
|
|
lda Zp1C ; CPU:$C57D PRG:457D A5 1C
|
|
ror a ; CPU:$C57F PRG:457F 6A
|
|
sta Zp1D ; CPU:$C580 PRG:4580 85 1D
|
|
ldy #$40 ; CPU:$C582 PRG:4582 A0 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero12
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads A from $0481,y; compares A with Zp50;
|
|
; branches on carry set to NmiHandler_Loop30; stores A to
|
|
; PpuAddrHigh; loads A from $0482,y; stores A to Zp02; and 5 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero12:
|
|
lda $0481,y ; CPU:$C584 PRG:4584 B9 81 04
|
|
cmp Zp50 ; CPU:$C587 PRG:4587 C5 50
|
|
bcs NmiHandler_Loop30 ; CPU:$C589 PRG:4589 B0 38
|
|
sta PpuAddrHigh ; CPU:$C58B PRG:458B 85 05
|
|
lda $0482,y ; CPU:$C58D PRG:458D B9 82 04
|
|
sta Zp02 ; CPU:$C590 PRG:4590 85 02
|
|
adc Zp48 ; CPU:$C592 PRG:4592 65 48
|
|
and #$10 ; CPU:$C594 PRG:4594 29 10
|
|
bne NmiHandler_Loop30 ; CPU:$C596 PRG:4596 D0 2B
|
|
lda Zp02 ; CPU:$C598 PRG:4598 A5 02
|
|
and #$02 ; CPU:$C59A PRG:459A 29 02
|
|
.byte $D0, $03 ; CPU:$C59C PRG:459C D0 03
|
|
lda Zp1C ; CPU:$C59E PRG:459E A5 1C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCC5A0
|
|
; Global: The routine reads $1DA5.
|
|
; Local: Executes 28 instructions: loads A from $0481,y; compares A with Zp50;
|
|
; branches on carry set to NmiHandler_Loop30; stores A to
|
|
; PpuAddrHigh; loads A from $0482,y; stores A to Zp02; and 22 more
|
|
; instructions.
|
|
; Parameters: Reads $1DA5 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCC5A0:
|
|
bit $1DA5 ; CPU:$C5A0 PRG:45A0 2C A5 1D
|
|
clc ; CPU:$C5A3 PRG:45A3 18
|
|
adc $0480,y ; CPU:$C5A4 PRG:45A4 79 80 04
|
|
sta $0700,x ; CPU:$C5A7 PRG:45A7 9D 00 07
|
|
inx ; CPU:$C5AA PRG:45AA E8
|
|
lda #$FE ; CPU:$C5AB PRG:45AB A9 FE
|
|
sta $0700,x ; CPU:$C5AD PRG:45AD 9D 00 07
|
|
inx ; CPU:$C5B0 PRG:45B0 E8
|
|
lda Zp02 ; CPU:$C5B1 PRG:45B1 A5 02
|
|
and #$03 ; CPU:$C5B3 PRG:45B3 29 03
|
|
ora #$20 ; CPU:$C5B5 PRG:45B5 09 20
|
|
sta $0700,x ; CPU:$C5B7 PRG:45B7 9D 00 07
|
|
inx ; CPU:$C5BA PRG:45BA E8
|
|
lda PpuAddrHigh ; CPU:$C5BB PRG:45BB A5 05
|
|
sta $0700,x ; CPU:$C5BD PRG:45BD 9D 00 07
|
|
inx ; CPU:$C5C0 PRG:45C0 E8
|
|
beq NmiHandler_Loop31 ; CPU:$C5C1 PRG:45C1 F0 10
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop30
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 16 instructions: loads A from $0481,y; compares A with Zp50;
|
|
; branches on carry set to NmiHandler_Loop30; stores A to
|
|
; PpuAddrHigh; loads A from $0482,y; stores A to Zp02; and 10 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop30:
|
|
iny ; CPU:$C5C3 PRG:45C3 C8
|
|
iny ; CPU:$C5C4 PRG:45C4 C8
|
|
iny ; CPU:$C5C5 PRG:45C5 C8
|
|
bne NmiHandler_OnNonzero12 ; CPU:$C5C6 PRG:45C6 D0 BC
|
|
lda #$F0 ; CPU:$C5C8 PRG:45C8 A9 F0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero13
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: stores A to $0700,x; increments X;
|
|
; increments X; increments X; increments X; branches on not equal to
|
|
; NmiHandler_OnNonzero13.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; X, the N and Z flags, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero13:
|
|
sta $0700,x ; CPU:$C5CA PRG:45CA 9D 00 07
|
|
inx ; CPU:$C5CD PRG:45CD E8
|
|
inx ; CPU:$C5CE PRG:45CE E8
|
|
inx ; CPU:$C5CF PRG:45CF E8
|
|
inx ; CPU:$C5D0 PRG:45D0 E8
|
|
bne NmiHandler_OnNonzero13 ; CPU:$C5D1 PRG:45D1 D0 F7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop31
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop31:
|
|
rts ; CPU:$C5D3 PRG:45D3 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C5D4
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads A with $0C; stores A to Zp0C; loads A
|
|
; with $02; stores A to ScreenPtrHi; loads A from Zp48; rotates a
|
|
; right; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp0C, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C5D4:
|
|
lda #$0C ; CPU:$C5D4 PRG:45D4 A9 0C
|
|
sta Zp0C ; CPU:$C5D6 PRG:45D6 85 0C
|
|
lda #$02 ; CPU:$C5D8 PRG:45D8 A9 02
|
|
sta ScreenPtrHi ; CPU:$C5DA PRG:45DA 85 0B
|
|
lda Zp48 ; CPU:$C5DC PRG:45DC A5 48
|
|
ror a ; CPU:$C5DE PRG:45DE 6A
|
|
bcc NmiHandler_Loop32 ; CPU:$C5DF PRG:45DF 90 13
|
|
lda #$20 ; CPU:$C5E1 PRG:45E1 A9 20
|
|
sta ScreenPtrLo ; CPU:$C5E3 PRG:45E3 85 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero14
|
|
; Global: The routine calls Sub_C607.
|
|
; Local: Executes 8 instructions: calls Sub_C607; loads A from ScreenPtrLo;
|
|
; clears the carry flag; adds $10 to A; stores A to ScreenPtrLo;
|
|
; decrements Zp0C; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp0C, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero14:
|
|
jsr Sub_C607 ; CPU:$C5E5 PRG:45E5 20 07 C6
|
|
lda ScreenPtrLo ; CPU:$C5E8 PRG:45E8 A5 0A
|
|
clc ; CPU:$C5EA PRG:45EA 18
|
|
adc #$10 ; CPU:$C5EB PRG:45EB 69 10
|
|
sta ScreenPtrLo ; CPU:$C5ED PRG:45ED 85 0A
|
|
dec Zp0C ; CPU:$C5EF PRG:45EF C6 0C
|
|
bne NmiHandler_OnNonzero14 ; CPU:$C5F1 PRG:45F1 D0 F2
|
|
rts ; CPU:$C5F3 PRG:45F3 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop32
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $D0; stores A to ScreenPtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp0C, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop32:
|
|
lda #$D0 ; CPU:$C5F4 PRG:45F4 A9 D0
|
|
sta ScreenPtrLo ; CPU:$C5F6 PRG:45F6 85 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero15
|
|
; Global: The routine calls Sub_C607.
|
|
; Local: Executes 8 instructions: calls Sub_C607; loads A from ScreenPtrLo;
|
|
; sets the carry flag; subtracts $10 from A; stores A to ScreenPtrLo;
|
|
; decrements Zp0C; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp0C, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero15:
|
|
jsr Sub_C607 ; CPU:$C5F8 PRG:45F8 20 07 C6
|
|
lda ScreenPtrLo ; CPU:$C5FB PRG:45FB A5 0A
|
|
sec ; CPU:$C5FD PRG:45FD 38
|
|
sbc #$10 ; CPU:$C5FE PRG:45FE E9 10
|
|
sta ScreenPtrLo ; CPU:$C600 PRG:4600 85 0A
|
|
dec Zp0C ; CPU:$C602 PRG:4602 C6 0C
|
|
bne NmiHandler_OnNonzero15 ; CPU:$C604 PRG:4604 D0 F2
|
|
rts ; CPU:$C606 PRG:4606 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C607
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads Y with $02; loads A from
|
|
; ((ScreenPtrLo),y); clears the carry flag; adds $08 to A; compares A
|
|
; with $F0; branches on carry clear to NmiHandler_Loop33.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C607:
|
|
ldy #$02 ; CPU:$C607 PRG:4607 A0 02
|
|
lda (ScreenPtrLo),y ; CPU:$C609 PRG:4609 B1 0A
|
|
clc ; CPU:$C60B PRG:460B 18
|
|
adc #$08 ; CPU:$C60C PRG:460C 69 08
|
|
cmp #$F0 ; CPU:$C60E PRG:460E C9 F0
|
|
bcc NmiHandler_Loop33 ; CPU:$C610 PRG:4610 90 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative:
|
|
rts ; CPU:$C612 PRG:4612 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop33
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 24 instructions: returns with RTS; loads Y with $00; loads A
|
|
; from ((ScreenPtrLo),y); branches on negative to
|
|
; NmiHandler_OnNegative; shifts a left; copies A into Y; and 18 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop33:
|
|
ldy #$00 ; CPU:$C613 PRG:4613 A0 00
|
|
lda (ScreenPtrLo),y ; CPU:$C615 PRG:4615 B1 0A
|
|
bmi NmiHandler_OnNegative ; CPU:$C617 PRG:4617 30 F9
|
|
asl a ; CPU:$C619 PRG:4619 0A
|
|
tay ; CPU:$C61A PRG:461A A8
|
|
lda $FA0C,y ; CPU:$C61B PRG:461B B9 0C FA
|
|
sta StarFieldPtrLo ; CPU:$C61E PRG:461E 85 00
|
|
iny ; CPU:$C620 PRG:4620 C8
|
|
lda $FA0C,y ; CPU:$C621 PRG:4621 B9 0C FA
|
|
sta Zp02 ; CPU:$C624 PRG:4624 85 02
|
|
cpy #$17 ; CPU:$C626 PRG:4626 C0 17
|
|
beq NmiHandler_Loop40 ; CPU:$C628 PRG:4628 F0 51
|
|
ldy #$01 ; CPU:$C62A PRG:462A A0 01
|
|
lda (ScreenPtrLo),y ; CPU:$C62C PRG:462C B1 0A
|
|
and #$1F ; CPU:$C62E PRG:462E 29 1F
|
|
tay ; CPU:$C630 PRG:4630 A8
|
|
lda $FA58,y ; CPU:$C631 PRG:4631 B9 58 FA
|
|
and #$C0 ; CPU:$C634 PRG:4634 29 C0
|
|
ora Zp02 ; CPU:$C636 PRG:4636 05 02
|
|
sta Zp02 ; CPU:$C638 PRG:4638 85 02
|
|
and #$40 ; CPU:$C63A PRG:463A 29 40
|
|
beq NmiHandler_Loop34 ; CPU:$C63C PRG:463C F0 02
|
|
lda #$02 ; CPU:$C63E PRG:463E A9 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop34
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 13 instructions: stores A to StarFieldCount; loads A from
|
|
; $FA58,y; ANDs A with $3E; stores A to Zp1C; clears the carry flag;
|
|
; adds StarFieldPtrLo to A; and 7 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop34:
|
|
sta StarFieldCount ; CPU:$C640 PRG:4640 85 06
|
|
lda $FA58,y ; CPU:$C642 PRG:4642 B9 58 FA
|
|
and #$3E ; CPU:$C645 PRG:4645 29 3E
|
|
sta Zp1C ; CPU:$C647 PRG:4647 85 1C
|
|
clc ; CPU:$C649 PRG:4649 18
|
|
adc StarFieldPtrLo ; CPU:$C64A PRG:464A 65 00
|
|
sta StarFieldPtrLo ; CPU:$C64C PRG:464C 85 00
|
|
ldy Zp1C ; CPU:$C64E PRG:464E A4 1C
|
|
bne NmiHandler_Loop36 ; CPU:$C650 PRG:4650 D0 0C
|
|
cmp #$82 ; CPU:$C652 PRG:4652 C9 82
|
|
bne NmiHandler_Loop35 ; CPU:$C654 PRG:4654 D0 04
|
|
lda #$FC ; CPU:$C656 PRG:4656 A9 FC
|
|
bne NmiHandler_Loop37 ; CPU:$C658 PRG:4658 D0 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop35
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: increments StarFieldCount; branches on
|
|
; non-negative to NmiHandler_Loop38.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop35:
|
|
inc StarFieldCount ; CPU:$C65A PRG:465A E6 06
|
|
bpl NmiHandler_Loop38 ; CPU:$C65C PRG:465C 10 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop36
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: clears the carry flag; adds $02 to A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop36:
|
|
clc ; CPU:$C65E PRG:465E 18
|
|
adc #$02 ; CPU:$C65F PRG:465F 69 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop37
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores A to StarFieldPtrHi.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop37:
|
|
sta StarFieldPtrHi ; CPU:$C661 PRG:4661 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop38
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads Y with $02; loads A from
|
|
; ((ScreenPtrLo),y); stores A to PpuAddrLow; compares A with $88;
|
|
; branches on carry clear to NmiHandler_Loop39; loads A from Zp02;
|
|
; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop38:
|
|
ldy #$02 ; CPU:$C663 PRG:4663 A0 02
|
|
lda (ScreenPtrLo),y ; CPU:$C665 PRG:4665 B1 0A
|
|
sta PpuAddrLow ; CPU:$C667 PRG:4667 85 04
|
|
cmp #$88 ; CPU:$C669 PRG:4669 C9 88
|
|
bcc NmiHandler_Loop39 ; CPU:$C66B PRG:466B 90 06
|
|
lda Zp02 ; CPU:$C66D PRG:466D A5 02
|
|
ora #$20 ; CPU:$C66F PRG:466F 09 20
|
|
sta Zp02 ; CPU:$C671 PRG:4671 85 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop39
|
|
; Global: The routine calls Sub_C855.
|
|
; Local: Executes 4 instructions: increments Y; loads A from
|
|
; ((ScreenPtrLo),y); stores A to PpuAddrHigh; calls Sub_C855.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop39:
|
|
iny ; CPU:$C673 PRG:4673 C8
|
|
lda (ScreenPtrLo),y ; CPU:$C674 PRG:4674 B1 0A
|
|
sta PpuAddrHigh ; CPU:$C676 PRG:4676 85 05
|
|
jmp Sub_C855 ; CPU:$C678 PRG:4678 4C 55 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop40
|
|
; Global: The routine calls NmiHandler_Loop38.
|
|
; Local: Executes 12 instructions: loads Y with $01; loads A from
|
|
; ((ScreenPtrLo),y); ANDs A with $1F; copies A into Y; loads A from
|
|
; $FA28,y; stores A to StarFieldPtrLo; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop40:
|
|
ldy #$01 ; CPU:$C67B PRG:467B A0 01
|
|
lda (ScreenPtrLo),y ; CPU:$C67D PRG:467D B1 0A
|
|
and #$1F ; CPU:$C67F PRG:467F 29 1F
|
|
tay ; CPU:$C681 PRG:4681 A8
|
|
lda $FA28,y ; CPU:$C682 PRG:4682 B9 28 FA
|
|
sta StarFieldPtrLo ; CPU:$C685 PRG:4685 85 00
|
|
clc ; CPU:$C687 PRG:4687 18
|
|
adc #$02 ; CPU:$C688 PRG:4688 69 02
|
|
sta StarFieldPtrHi ; CPU:$C68A PRG:468A 85 01
|
|
lda #$00 ; CPU:$C68C PRG:468C A9 00
|
|
sta StarFieldCount ; CPU:$C68E PRG:468E 85 06
|
|
jmp NmiHandler_Loop38 ; CPU:$C690 PRG:4690 4C 63 C6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C693
|
|
; Global: The routine reads $0496.
|
|
; Local: Executes 4 instructions: loads A from $0496; compares A with $02;
|
|
; branches on carry set to NmiHandler_Loop42; loads Y with $03.
|
|
; Parameters: Reads $0496 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp10, Zp11, Zp1E, Zp1F,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C693:
|
|
lda $0496 ; CPU:$C693 PRG:4693 AD 96 04
|
|
cmp #$02 ; CPU:$C696 PRG:4696 C9 02
|
|
bcs NmiHandler_Loop42 ; CPU:$C698 PRG:4698 B0 0D
|
|
ldy #$03 ; CPU:$C69A PRG:469A A0 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative9
|
|
; Global: The routine calls Sub_C6A8.
|
|
; Local: Executes 3 instructions: loads A from $0497,y; branches on equal to
|
|
; NmiHandler_Loop41; calls Sub_C6A8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp10, Zp11, Zp1E, Zp1F,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative9:
|
|
lda $0497,y ; CPU:$C69C PRG:469C B9 97 04
|
|
beq NmiHandler_Loop41 ; CPU:$C69F PRG:469F F0 03
|
|
jsr Sub_C6A8 ; CPU:$C6A1 PRG:46A1 20 A8 C6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop41
|
|
; Global: The routine calls Sub_C6A8.
|
|
; Local: Executes 5 instructions: loads A from $0497,y; branches on equal to
|
|
; NmiHandler_Loop41; calls Sub_C6A8; decrements Y; branches on
|
|
; non-negative to NmiHandler_OnNonnegative9.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp10, Zp11, Zp1E, Zp1F,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop41:
|
|
dey ; CPU:$C6A4 PRG:46A4 88
|
|
bpl NmiHandler_OnNonnegative9 ; CPU:$C6A5 PRG:46A5 10 F5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop42
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop42:
|
|
rts ; CPU:$C6A7 PRG:46A7 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C6A8
|
|
; Global: The routine calls ComputeEnemyShipScreenPosition, reads $0496 and $040F.
|
|
; Local: Executes 16 instructions: stores Y to TilePtrHi; stores X to
|
|
; TilePtrLo; calls ComputeEnemyShipScreenPosition; loads X from TilePtrLo; loads A from
|
|
; Zp10; stores A to PpuAddrLow; and 10 more instructions.
|
|
; Parameters: Reads $0496 and $040F from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp10, Zp11, Zp1E, Zp1F,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C6A8:
|
|
sty TilePtrHi ; CPU:$C6A8 PRG:46A8 84 09
|
|
stx TilePtrLo ; CPU:$C6AA PRG:46AA 86 08
|
|
jsr ComputeEnemyShipScreenPosition ; CPU:$C6AC PRG:46AC 20 BA D7
|
|
ldx TilePtrLo ; CPU:$C6AF PRG:46AF A6 08
|
|
lda Zp10 ; CPU:$C6B1 PRG:46B1 A5 10
|
|
sta PpuAddrLow ; CPU:$C6B3 PRG:46B3 85 04
|
|
lda Zp11 ; CPU:$C6B5 PRG:46B5 A5 11
|
|
sta PpuAddrHigh ; CPU:$C6B7 PRG:46B7 85 05
|
|
lda $0496 ; CPU:$C6B9 PRG:46B9 AD 96 04
|
|
asl a ; CPU:$C6BC PRG:46BC 0A
|
|
sta Zp02 ; CPU:$C6BD PRG:46BD 85 02
|
|
lda $040F ; CPU:$C6BF PRG:46BF AD 0F 04
|
|
ror a ; CPU:$C6C2 PRG:46C2 6A
|
|
lda #$71 ; CPU:$C6C3 PRG:46C3 A9 71
|
|
bcc NmiHandler_Loop43 ; CPU:$C6C5 PRG:46C5 90 02
|
|
adc #$03 ; CPU:$C6C7 PRG:46C7 69 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop43
|
|
; Global: The routine calls NmiHandler_Loop60.
|
|
; Local: Executes 4 instructions: stores A to StarFieldPtrLo; calls
|
|
; NmiHandler_Loop60; loads Y from TilePtrHi; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop43:
|
|
sta StarFieldPtrLo ; CPU:$C6C9 PRG:46C9 85 00
|
|
jsr NmiHandler_Loop60 ; CPU:$C6CB PRG:46CB 20 76 C8
|
|
ldy TilePtrHi ; CPU:$C6CE PRG:46CE A4 09
|
|
rts ; CPU:$C6D0 PRG:46D0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero16
|
|
; Global: The routine calls Sub_C6E0.
|
|
; Local: Executes 8 instructions: calls Sub_C6E0; loads A from ScreenPtrLo;
|
|
; clears the carry flag; adds Zp0D to A; stores A to ScreenPtrLo;
|
|
; decrements Zp0C; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp0C, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero16:
|
|
jsr Sub_C6E0 ; CPU:$C6D1 PRG:46D1 20 E0 C6
|
|
lda ScreenPtrLo ; CPU:$C6D4 PRG:46D4 A5 0A
|
|
clc ; CPU:$C6D6 PRG:46D6 18
|
|
adc Zp0D ; CPU:$C6D7 PRG:46D7 65 0D
|
|
sta ScreenPtrLo ; CPU:$C6D9 PRG:46D9 85 0A
|
|
dec Zp0C ; CPU:$C6DB PRG:46DB C6 0C
|
|
bne NmiHandler_OnNonzero16 ; CPU:$C6DD PRG:46DD D0 F2
|
|
rts ; CPU:$C6DF PRG:46DF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C6E0
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads Y with $01; loads A from
|
|
; ((ScreenPtrLo),y); stores A to PpuAddrLow; clears the carry flag;
|
|
; adds $08 to A; compares A with $F0; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C6E0:
|
|
ldy #$01 ; CPU:$C6E0 PRG:46E0 A0 01
|
|
lda (ScreenPtrLo),y ; CPU:$C6E2 PRG:46E2 B1 0A
|
|
sta PpuAddrLow ; CPU:$C6E4 PRG:46E4 85 04
|
|
clc ; CPU:$C6E6 PRG:46E6 18
|
|
adc #$08 ; CPU:$C6E7 PRG:46E7 69 08
|
|
cmp #$F0 ; CPU:$C6E9 PRG:46E9 C9 F0
|
|
bcc NmiHandler_Loop44 ; CPU:$C6EB PRG:46EB 90 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative2
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative2:
|
|
rts ; CPU:$C6ED PRG:46ED 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop44
|
|
; Global: The routine calls Sub_C886.
|
|
; Local: Executes 18 instructions: returns with RTS; decrements Y; loads A
|
|
; from ((ScreenPtrLo),y); branches on negative to
|
|
; NmiHandler_OnNegative2; ANDs A with $1F; copies A into Y; and 12
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop44:
|
|
dey ; CPU:$C6EE PRG:46EE 88
|
|
lda (ScreenPtrLo),y ; CPU:$C6EF PRG:46EF B1 0A
|
|
bmi NmiHandler_OnNegative2 ; CPU:$C6F1 PRG:46F1 30 FA
|
|
and #$1F ; CPU:$C6F3 PRG:46F3 29 1F
|
|
tay ; CPU:$C6F5 PRG:46F5 A8
|
|
lda $FA58,y ; CPU:$C6F6 PRG:46F6 B9 58 FA
|
|
and #$C0 ; CPU:$C6F9 PRG:46F9 29 C0
|
|
ora Zp03 ; CPU:$C6FB PRG:46FB 05 03
|
|
sta Zp02 ; CPU:$C6FD PRG:46FD 85 02
|
|
lda $FA40,y ; CPU:$C6FF PRG:46FF B9 40 FA
|
|
sta StarFieldPtrLo ; CPU:$C702 PRG:4702 85 00
|
|
ldy #$02 ; CPU:$C704 PRG:4704 A0 02
|
|
lda (ScreenPtrLo),y ; CPU:$C706 PRG:4706 B1 0A
|
|
clc ; CPU:$C708 PRG:4708 18
|
|
adc #$04 ; CPU:$C709 PRG:4709 69 04
|
|
sta PpuAddrHigh ; CPU:$C70B PRG:470B 85 05
|
|
jmp Sub_C886 ; CPU:$C70D PRG:470D 4C 86 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C710
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A with $D8; stores A to ScreenPtrLo;
|
|
; loads A with $03; stores A to ScreenPtrHi; loads A with $08; stores
|
|
; A to Zp0C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp0C, Zp1C, Zp1D,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C710:
|
|
lda #$D8 ; CPU:$C710 PRG:4710 A9 D8
|
|
sta ScreenPtrLo ; CPU:$C712 PRG:4712 85 0A
|
|
lda #$03 ; CPU:$C714 PRG:4714 A9 03
|
|
sta ScreenPtrHi ; CPU:$C716 PRG:4716 85 0B
|
|
lda #$08 ; CPU:$C718 PRG:4718 A9 08
|
|
sta Zp0C ; CPU:$C71A PRG:471A 85 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero17
|
|
; Global: The routine calls Sub_C731.
|
|
; Local: Executes 4 instructions: loads Y with $00; loads A from
|
|
; ((ScreenPtrLo),y); branches on equal to NmiHandler_Loop45; calls
|
|
; Sub_C731.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp0C, Zp1C, Zp1D,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero17:
|
|
ldy #$00 ; CPU:$C71C PRG:471C A0 00
|
|
lda (ScreenPtrLo),y ; CPU:$C71E PRG:471E B1 0A
|
|
beq NmiHandler_Loop45 ; CPU:$C720 PRG:4720 F0 03
|
|
jsr Sub_C731 ; CPU:$C722 PRG:4722 20 31 C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop45
|
|
; Global: The routine calls Sub_C731.
|
|
; Local: Executes 11 instructions: loads Y with $00; loads A from
|
|
; ((ScreenPtrLo),y); branches on equal to NmiHandler_Loop45; calls
|
|
; Sub_C731; loads A from ScreenPtrLo; clears the carry flag; and 5
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp0C, Zp1C, Zp1D,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop45:
|
|
lda ScreenPtrLo ; CPU:$C725 PRG:4725 A5 0A
|
|
clc ; CPU:$C727 PRG:4727 18
|
|
adc #$04 ; CPU:$C728 PRG:4728 69 04
|
|
sta ScreenPtrLo ; CPU:$C72A PRG:472A 85 0A
|
|
dec Zp0C ; CPU:$C72C PRG:472C C6 0C
|
|
bne NmiHandler_OnNonzero17 ; CPU:$C72E PRG:472E D0 EC
|
|
rts ; CPU:$C730 PRG:4730 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C731
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 13 instructions: sets the carry flag; subtracts $01 from A;
|
|
; stores A to ((ScreenPtrLo),y); compares A with $FA; branches on
|
|
; carry set to NmiHandler_Loop47; compares A with $F4; and 7 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C731:
|
|
sec ; CPU:$C731 PRG:4731 38
|
|
sbc #$01 ; CPU:$C732 PRG:4732 E9 01
|
|
sta (ScreenPtrLo),y ; CPU:$C734 PRG:4734 91 0A
|
|
cmp #$FA ; CPU:$C736 PRG:4736 C9 FA
|
|
bcs NmiHandler_Loop47 ; CPU:$C738 PRG:4738 B0 32
|
|
cmp #$F4 ; CPU:$C73A PRG:473A C9 F4
|
|
bcs NmiHandler_Loop48 ; CPU:$C73C PRG:473C B0 38
|
|
cmp #$EE ; CPU:$C73E PRG:473E C9 EE
|
|
bcs NmiHandler_Loop50 ; CPU:$C740 PRG:4740 B0 4E
|
|
cmp #$EB ; CPU:$C742 PRG:4742 C9 EB
|
|
bcs NmiHandler_Loop51 ; CPU:$C744 PRG:4744 B0 4E
|
|
cmp #$C3 ; CPU:$C746 PRG:4746 C9 C3
|
|
bcs NmiHandler_Loop46 ; CPU:$C748 PRG:4748 B0 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero2
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $00; copies A into Y; stores A
|
|
; to ((ScreenPtrLo),y); returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero2:
|
|
lda #$00 ; CPU:$C74A PRG:474A A9 00
|
|
tay ; CPU:$C74C PRG:474C A8
|
|
sta (ScreenPtrLo),y ; CPU:$C74D PRG:474D 91 0A
|
|
rts ; CPU:$C74F PRG:474F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop46
|
|
; Global: The routine calls Sub_C782.
|
|
; Local: Executes 17 instructions: loads A with $00; copies A into Y; stores A
|
|
; to ((ScreenPtrLo),y); returns with RTS; loads Y with $03; loads A
|
|
; from ((ScreenPtrLo),y); and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop46:
|
|
ldy #$03 ; CPU:$C750 PRG:4750 A0 03
|
|
lda (ScreenPtrLo),y ; CPU:$C752 PRG:4752 B1 0A
|
|
beq NmiHandler_OnZero2 ; CPU:$C754 PRG:4754 F0 F4
|
|
asl a ; CPU:$C756 PRG:4756 0A
|
|
adc (ScreenPtrLo),y ; CPU:$C757 PRG:4757 71 0A
|
|
tay ; CPU:$C759 PRG:4759 A8
|
|
lda $FA6D,y ; CPU:$C75A PRG:475A B9 6D FA
|
|
sta StarFieldPtrLo ; CPU:$C75D PRG:475D 85 00
|
|
lda $FA6E,y ; CPU:$C75F PRG:475F B9 6E FA
|
|
sta StarFieldPtrHi ; CPU:$C762 PRG:4762 85 01
|
|
lda $FA6F,y ; CPU:$C764 PRG:4764 B9 6F FA
|
|
sta Zp02 ; CPU:$C767 PRG:4767 85 02
|
|
jmp Sub_C782 ; CPU:$C769 PRG:4769 4C 82 C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop47
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A with $D1; stores A to
|
|
; StarFieldPtrLo; loads A with $D3; stores A to StarFieldPtrHi;
|
|
; branches on not equal to NmiHandler_Loop49.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop47:
|
|
lda #$D1 ; CPU:$C76C PRG:476C A9 D1
|
|
sta StarFieldPtrLo ; CPU:$C76E PRG:476E 85 00
|
|
lda #$D3 ; CPU:$C770 PRG:4770 A9 D3
|
|
sta StarFieldPtrHi ; CPU:$C772 PRG:4772 85 01
|
|
bne NmiHandler_Loop49 ; CPU:$C774 PRG:4774 D0 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop48
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $D5; stores A to
|
|
; StarFieldPtrLo; loads A with $D7; stores A to StarFieldPtrHi.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop48:
|
|
lda #$D5 ; CPU:$C776 PRG:4776 A9 D5
|
|
sta StarFieldPtrLo ; CPU:$C778 PRG:4778 85 00
|
|
lda #$D7 ; CPU:$C77A PRG:477A A9 D7
|
|
sta StarFieldPtrHi ; CPU:$C77C PRG:477C 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop49
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $02; stores A to Zp02.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop49:
|
|
lda #$02 ; CPU:$C77E PRG:477E A9 02
|
|
sta Zp02 ; CPU:$C780 PRG:4780 85 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C782
|
|
; Global: The routine calls NmiHandler_Loop59.
|
|
; Local: Executes 7 instructions: loads Y with $01; loads A from
|
|
; ((ScreenPtrLo),y); stores A to PpuAddrLow; increments Y; loads A
|
|
; from ((ScreenPtrLo),y); stores A to PpuAddrHigh; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C782:
|
|
ldy #$01 ; CPU:$C782 PRG:4782 A0 01
|
|
lda (ScreenPtrLo),y ; CPU:$C784 PRG:4784 B1 0A
|
|
sta PpuAddrLow ; CPU:$C786 PRG:4786 85 04
|
|
iny ; CPU:$C788 PRG:4788 C8
|
|
lda (ScreenPtrLo),y ; CPU:$C789 PRG:4789 B1 0A
|
|
sta PpuAddrHigh ; CPU:$C78B PRG:478B 85 05
|
|
jmp NmiHandler_Loop59 ; CPU:$C78D PRG:478D 4C 65 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop50
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $D9; branches on negative to
|
|
; NmiHandler_Loop52.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop50:
|
|
lda #$D9 ; CPU:$C790 PRG:4790 A9 D9
|
|
bmi NmiHandler_Loop52 ; CPU:$C792 PRG:4792 30 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop51
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads A with $DD.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop51:
|
|
lda #$DD ; CPU:$C794 PRG:4794 A9 DD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop52
|
|
; Global: The routine calls Sub_C7EA.
|
|
; Local: Executes 9 instructions: stores A to StarFieldPtrLo; loads Y with
|
|
; $02; stores Y to Zp03; loads A from ((ScreenPtrLo),y); stores A to
|
|
; PpuAddrHigh; decrements Y; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop52:
|
|
sta StarFieldPtrLo ; CPU:$C796 PRG:4796 85 00
|
|
ldy #$02 ; CPU:$C798 PRG:4798 A0 02
|
|
sty Zp03 ; CPU:$C79A PRG:479A 84 03
|
|
lda (ScreenPtrLo),y ; CPU:$C79C PRG:479C B1 0A
|
|
sta PpuAddrHigh ; CPU:$C79E PRG:479E 85 05
|
|
dey ; CPU:$C7A0 PRG:47A0 88
|
|
lda (ScreenPtrLo),y ; CPU:$C7A1 PRG:47A1 B1 0A
|
|
sta PpuAddrLow ; CPU:$C7A3 PRG:47A3 85 04
|
|
jmp Sub_C7EA ; CPU:$C7A5 PRG:47A5 4C EA C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C7A8
|
|
; Global: The routine writes $03F8, reads $03F8.
|
|
; Local: Executes 14 instructions: loads Y from $03F8; branches on equal to
|
|
; NmiHandler_Loop53; decrements Y; stores Y to $03F8; compares Y with
|
|
; $F8; branches on carry set to NmiHandler_Loop54; and 8 more
|
|
; instructions.
|
|
; Parameters: Reads $03F8 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $03F8 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $03F8,
|
|
; $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C7A8:
|
|
ldy $03F8 ; CPU:$C7A8 PRG:47A8 AC F8 03
|
|
beq NmiHandler_Loop53 ; CPU:$C7AB PRG:47AB F0 19
|
|
dey ; CPU:$C7AD PRG:47AD 88
|
|
sty $03F8 ; CPU:$C7AE PRG:47AE 8C F8 03
|
|
cpy #$F8 ; CPU:$C7B1 PRG:47B1 C0 F8
|
|
bcs NmiHandler_Loop54 ; CPU:$C7B3 PRG:47B3 B0 12
|
|
cpy #$F0 ; CPU:$C7B5 PRG:47B5 C0 F0
|
|
bcs NmiHandler_Loop55 ; CPU:$C7B7 PRG:47B7 B0 12
|
|
cpy #$E8 ; CPU:$C7B9 PRG:47B9 C0 E8
|
|
bcs NmiHandler_Loop56 ; CPU:$C7BB PRG:47BB B0 12
|
|
cpy #$E0 ; CPU:$C7BD PRG:47BD C0 E0
|
|
bcs NmiHandler_Loop57 ; CPU:$C7BF PRG:47BF B0 12
|
|
lda #$00 ; CPU:$C7C1 PRG:47C1 A9 00
|
|
sta $03F8 ; CPU:$C7C3 PRG:47C3 8D F8 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop53
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop53:
|
|
rts ; CPU:$C7C6 PRG:47C6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop54
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $E1; branches on negative to
|
|
; NmiHandler_Loop58.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop54:
|
|
lda #$E1 ; CPU:$C7C7 PRG:47C7 A9 E1
|
|
bmi NmiHandler_Loop58 ; CPU:$C7C9 PRG:47C9 30 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop55
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $E5; branches on negative to
|
|
; NmiHandler_Loop58.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop55:
|
|
lda #$E5 ; CPU:$C7CB PRG:47CB A9 E5
|
|
bmi NmiHandler_Loop58 ; CPU:$C7CD PRG:47CD 30 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop56
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $E9; branches on negative to
|
|
; NmiHandler_Loop58.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop56:
|
|
lda #$E9 ; CPU:$C7CF PRG:47CF A9 E9
|
|
bmi NmiHandler_Loop58 ; CPU:$C7D1 PRG:47D1 30 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop57
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads A with $ED.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop57:
|
|
lda #$ED ; CPU:$C7D3 PRG:47D3 A9 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop58
|
|
; Global: The routine reads $03F9 and $03FA.
|
|
; Local: Executes 10 instructions: stores A to StarFieldPtrLo; clears the
|
|
; carry flag; adds $02 to A; stores A to StarFieldPtrHi; loads A with
|
|
; $00; stores A to Zp03; and 4 more instructions.
|
|
; Parameters: Reads $03F9 and $03FA from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop58:
|
|
sta StarFieldPtrLo ; CPU:$C7D5 PRG:47D5 85 00
|
|
clc ; CPU:$C7D7 PRG:47D7 18
|
|
adc #$02 ; CPU:$C7D8 PRG:47D8 69 02
|
|
sta StarFieldPtrHi ; CPU:$C7DA PRG:47DA 85 01
|
|
lda #$00 ; CPU:$C7DC PRG:47DC A9 00
|
|
sta Zp03 ; CPU:$C7DE PRG:47DE 85 03
|
|
lda $03F9 ; CPU:$C7E0 PRG:47E0 AD F9 03
|
|
sta PpuAddrLow ; CPU:$C7E3 PRG:47E3 85 04
|
|
lda $03FA ; CPU:$C7E5 PRG:47E5 AD FA 03
|
|
sta PpuAddrHigh ; CPU:$C7E8 PRG:47E8 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C7EA
|
|
; Global: The routine calls NmiHandler_Loop59 and Sub_C85D.
|
|
; Local: Executes 55 instructions: loads A from PpuAddrLow; sets the carry
|
|
; flag; subtracts $08 from A; stores A to PpuAddrLow; loads A from
|
|
; PpuAddrHigh; sets the carry flag; and 49 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp1C, Zp1D, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C7EA:
|
|
lda PpuAddrLow ; CPU:$C7EA PRG:47EA A5 04
|
|
sec ; CPU:$C7EC PRG:47EC 38
|
|
sbc #$08 ; CPU:$C7ED PRG:47ED E9 08
|
|
sta PpuAddrLow ; CPU:$C7EF PRG:47EF 85 04
|
|
lda PpuAddrHigh ; CPU:$C7F1 PRG:47F1 A5 05
|
|
sec ; CPU:$C7F3 PRG:47F3 38
|
|
sbc #$08 ; CPU:$C7F4 PRG:47F4 E9 08
|
|
sta PpuAddrHigh ; CPU:$C7F6 PRG:47F6 85 05
|
|
sta Zp1D ; CPU:$C7F8 PRG:47F8 85 1D
|
|
lda Zp03 ; CPU:$C7FA PRG:47FA A5 03
|
|
sta Zp02 ; CPU:$C7FC PRG:47FC 85 02
|
|
lda StarFieldPtrLo ; CPU:$C7FE PRG:47FE A5 00
|
|
sta Zp1C ; CPU:$C800 PRG:4800 85 1C
|
|
clc ; CPU:$C802 PRG:4802 18
|
|
adc #$02 ; CPU:$C803 PRG:4803 69 02
|
|
sta StarFieldPtrHi ; CPU:$C805 PRG:4805 85 01
|
|
jsr NmiHandler_Loop59 ; CPU:$C807 PRG:4807 20 65 C8
|
|
lda PpuAddrLow ; CPU:$C80A PRG:480A A5 04
|
|
clc ; CPU:$C80C PRG:480C 18
|
|
adc #$10 ; CPU:$C80D PRG:480D 69 10
|
|
sta PpuAddrLow ; CPU:$C80F PRG:480F 85 04
|
|
lda Zp1D ; CPU:$C811 PRG:4811 A5 1D
|
|
sta PpuAddrHigh ; CPU:$C813 PRG:4813 85 05
|
|
lda Zp03 ; CPU:$C815 PRG:4815 A5 03
|
|
ora #$80 ; CPU:$C817 PRG:4817 09 80
|
|
sta Zp02 ; CPU:$C819 PRG:4819 85 02
|
|
lda Zp1C ; CPU:$C81B PRG:481B A5 1C
|
|
sta StarFieldPtrLo ; CPU:$C81D PRG:481D 85 00
|
|
jsr NmiHandler_Loop59 ; CPU:$C81F PRG:481F 20 65 C8
|
|
lda Zp1D ; CPU:$C822 PRG:4822 A5 1D
|
|
clc ; CPU:$C824 PRG:4824 18
|
|
adc #$10 ; CPU:$C825 PRG:4825 69 10
|
|
sta PpuAddrHigh ; CPU:$C827 PRG:4827 85 05
|
|
sta Zp1D ; CPU:$C829 PRG:4829 85 1D
|
|
lda Zp03 ; CPU:$C82B PRG:482B A5 03
|
|
ora #$C0 ; CPU:$C82D PRG:482D 09 C0
|
|
sta Zp02 ; CPU:$C82F PRG:482F 85 02
|
|
lda Zp1C ; CPU:$C831 PRG:4831 A5 1C
|
|
sta StarFieldPtrLo ; CPU:$C833 PRG:4833 85 00
|
|
jsr Sub_C85D ; CPU:$C835 PRG:4835 20 5D C8
|
|
lda PpuAddrLow ; CPU:$C838 PRG:4838 A5 04
|
|
sec ; CPU:$C83A PRG:483A 38
|
|
sbc #$10 ; CPU:$C83B PRG:483B E9 10
|
|
sta PpuAddrLow ; CPU:$C83D PRG:483D 85 04
|
|
lda Zp1D ; CPU:$C83F PRG:483F A5 1D
|
|
sta PpuAddrHigh ; CPU:$C841 PRG:4841 85 05
|
|
lda Zp03 ; CPU:$C843 PRG:4843 A5 03
|
|
ora #$40 ; CPU:$C845 PRG:4845 09 40
|
|
sta Zp02 ; CPU:$C847 PRG:4847 85 02
|
|
lda Zp1C ; CPU:$C849 PRG:4849 A5 1C
|
|
sta StarFieldPtrLo ; CPU:$C84B PRG:484B 85 00
|
|
clc ; CPU:$C84D PRG:484D 18
|
|
adc #$02 ; CPU:$C84E PRG:484E 69 02
|
|
sta StarFieldPtrHi ; CPU:$C850 PRG:4850 85 01
|
|
jmp Sub_C85D ; CPU:$C852 PRG:4852 4C 5D C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C855
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A from StarFieldCount; branches on
|
|
; equal to NmiHandler_Loop59; ANDs A with $02; branches on equal to
|
|
; NmiHandler_Loop60.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C855:
|
|
lda StarFieldCount ; CPU:$C855 PRG:4855 A5 06
|
|
beq NmiHandler_Loop59 ; CPU:$C857 PRG:4857 F0 0C
|
|
and #$02 ; CPU:$C859 PRG:4859 29 02
|
|
beq NmiHandler_Loop60 ; CPU:$C85B PRG:485B F0 19
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C85D
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads Y from StarFieldPtrHi; loads A from
|
|
; StarFieldPtrLo; stores A to StarFieldPtrHi; stores Y to
|
|
; StarFieldPtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C85D:
|
|
ldy StarFieldPtrHi ; CPU:$C85D PRG:485D A4 01
|
|
lda StarFieldPtrLo ; CPU:$C85F PRG:485F A5 00
|
|
sta StarFieldPtrHi ; CPU:$C861 PRG:4861 85 01
|
|
sty StarFieldPtrLo ; CPU:$C863 PRG:4863 84 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop59
|
|
; Global: The routine calls Sub_C886.
|
|
; Local: Executes 8 instructions: calls Sub_C886; loads A from StarFieldPtrHi;
|
|
; stores A to StarFieldPtrLo; loads A from PpuAddrHigh; clears the
|
|
; carry flag; adds $08 to A; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop59:
|
|
jsr Sub_C886 ; CPU:$C865 PRG:4865 20 86 C8
|
|
lda StarFieldPtrHi ; CPU:$C868 PRG:4868 A5 01
|
|
sta StarFieldPtrLo ; CPU:$C86A PRG:486A 85 00
|
|
lda PpuAddrHigh ; CPU:$C86C PRG:486C A5 05
|
|
clc ; CPU:$C86E PRG:486E 18
|
|
adc #$08 ; CPU:$C86F PRG:486F 69 08
|
|
sta PpuAddrHigh ; CPU:$C871 PRG:4871 85 05
|
|
jmp Sub_C886 ; CPU:$C873 PRG:4873 4C 86 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop60
|
|
; Global: The routine calls Sub_C886.
|
|
; Local: Executes 8 instructions: calls Sub_C886; loads A from Zp02; EORs A
|
|
; with $40; stores A to Zp02; loads A from PpuAddrHigh; clears the
|
|
; carry flag; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp02, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop60:
|
|
jsr Sub_C886 ; CPU:$C876 PRG:4876 20 86 C8
|
|
lda Zp02 ; CPU:$C879 PRG:4879 A5 02
|
|
eor #$40 ; CPU:$C87B PRG:487B 49 40
|
|
sta Zp02 ; CPU:$C87D PRG:487D 85 02
|
|
lda PpuAddrHigh ; CPU:$C87F PRG:487F A5 05
|
|
clc ; CPU:$C881 PRG:4881 18
|
|
adc #$07 ; CPU:$C882 PRG:4882 69 07
|
|
sta PpuAddrHigh ; CPU:$C884 PRG:4884 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C886
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 16 instructions: loads A from PpuAddrHigh; compares A with
|
|
; $C1; branches on carry set to NmiHandler_Loop61; loads A from
|
|
; PpuAddrLow; stores A to $0700,x; increments X; and 10 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, $0700.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C886:
|
|
lda PpuAddrHigh ; CPU:$C886 PRG:4886 A5 05
|
|
cmp #$C1 ; CPU:$C888 PRG:4888 C9 C1
|
|
bcs NmiHandler_Loop61 ; CPU:$C88A PRG:488A B0 1A
|
|
lda PpuAddrLow ; CPU:$C88C PRG:488C A5 04
|
|
sta $0700,x ; CPU:$C88E PRG:488E 9D 00 07
|
|
inx ; CPU:$C891 PRG:4891 E8
|
|
lda StarFieldPtrLo ; CPU:$C892 PRG:4892 A5 00
|
|
sta $0700,x ; CPU:$C894 PRG:4894 9D 00 07
|
|
inx ; CPU:$C897 PRG:4897 E8
|
|
lda Zp02 ; CPU:$C898 PRG:4898 A5 02
|
|
sta $0700,x ; CPU:$C89A PRG:489A 9D 00 07
|
|
inx ; CPU:$C89D PRG:489D E8
|
|
lda PpuAddrHigh ; CPU:$C89E PRG:489E A5 05
|
|
sta $0700,x ; CPU:$C8A0 PRG:48A0 9D 00 07
|
|
inx ; CPU:$C8A3 PRG:48A3 E8
|
|
beq NmiHandler_Loop62 ; CPU:$C8A4 PRG:48A4 F0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop61
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop61:
|
|
rts ; CPU:$C8A6 PRG:48A6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop62
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads X from Zp0E; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; X, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop62:
|
|
ldx Zp0E ; CPU:$C8A7 PRG:48A7 A6 0E
|
|
txs ; CPU:$C8A9 PRG:48A9 9A
|
|
rts ; CPU:$C8AA PRG:48AA 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C8AB
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X from Zp62; branches on not equal to
|
|
; NmiHandler_Loop63.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C8AB:
|
|
ldx Zp62 ; CPU:$C8AB PRG:48AB A6 62
|
|
bne NmiHandler_Loop63 ; CPU:$C8AD PRG:48AD D0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero18
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero18:
|
|
rts ; CPU:$C8AF PRG:48AF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop63
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 12 instructions: returns with RTS; loads A from
|
|
; StarFieldPtrLo; shifts a left; shifts a left; adds StarFieldPtrLo
|
|
; to A; adds $04 to A; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop63:
|
|
lda StarFieldPtrLo ; CPU:$C8B0 PRG:48B0 A5 00
|
|
asl a ; CPU:$C8B2 PRG:48B2 0A
|
|
asl a ; CPU:$C8B3 PRG:48B3 0A
|
|
adc StarFieldPtrLo ; CPU:$C8B4 PRG:48B4 65 00
|
|
adc #$04 ; CPU:$C8B6 PRG:48B6 69 04
|
|
tay ; CPU:$C8B8 PRG:48B8 A8
|
|
ldx Zp61 ; CPU:$C8B9 PRG:48B9 A6 61
|
|
dex ; CPU:$C8BB PRG:48BB CA
|
|
bne NmiHandler_Loop64 ; CPU:$C8BC PRG:48BC D0 04
|
|
ldx #$E0 ; CPU:$C8BE PRG:48BE A2 E0
|
|
bmi NmiHandler_Loop65 ; CPU:$C8C0 PRG:48C0 30 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop64
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: returns with RTS; loads X with $E8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop64:
|
|
ldx #$E8 ; CPU:$C8C2 PRG:48C2 A2 E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop65
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: returns with RTS; stores X to Zp02; clears
|
|
; the carry flag; loads A with $05; stores A to StarFieldPtrHi.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop65:
|
|
stx Zp02 ; CPU:$C8C4 PRG:48C4 86 02
|
|
clc ; CPU:$C8C6 PRG:48C6 18
|
|
lda #$05 ; CPU:$C8C7 PRG:48C7 A9 05
|
|
sta StarFieldPtrHi ; CPU:$C8C9 PRG:48C9 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero19
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: returns with RTS; loads A from $FA88,y;
|
|
; decrements Y; adds PpuAddrHigh,x to A; compares A with $0A;
|
|
; branches on carry clear to NmiHandler_Loop66; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero19:
|
|
lda $FA88,y ; CPU:$C8CB PRG:48CB B9 88 FA
|
|
dey ; CPU:$C8CE PRG:48CE 88
|
|
adc PpuAddrHigh,x ; CPU:$C8CF PRG:48CF 75 05
|
|
cmp #$0A ; CPU:$C8D1 PRG:48D1 C9 0A
|
|
bcc NmiHandler_Loop66 ; CPU:$C8D3 PRG:48D3 90 02
|
|
sbc #$0A ; CPU:$C8D5 PRG:48D5 E9 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop66
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 19 instructions: returns with RTS; loads A from $FA88,y;
|
|
; decrements Y; adds PpuAddrHigh,x to A; compares A with $0A;
|
|
; branches on carry clear to NmiHandler_Loop66; and 13 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop66:
|
|
sta PpuAddrHigh,x ; CPU:$C8D7 PRG:48D7 95 05
|
|
dex ; CPU:$C8D9 PRG:48D9 CA
|
|
dec StarFieldPtrHi ; CPU:$C8DA PRG:48DA C6 01
|
|
bne NmiHandler_OnNonzero19 ; CPU:$C8DC PRG:48DC D0 ED
|
|
lda PpuAddrHigh,x ; CPU:$C8DE PRG:48DE B5 05
|
|
adc #$00 ; CPU:$C8E0 PRG:48E0 69 00
|
|
sta PpuAddrHigh,x ; CPU:$C8E2 PRG:48E2 95 05
|
|
inc Zp63 ; CPU:$C8E4 PRG:48E4 E6 63
|
|
ldx Zp02 ; CPU:$C8E6 PRG:48E6 A6 02
|
|
ldy #$00 ; CPU:$C8E8 PRG:48E8 A0 00
|
|
lda #$06 ; CPU:$C8EA PRG:48EA A9 06
|
|
sta StarFieldPtrHi ; CPU:$C8EC PRG:48EC 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero20
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: returns with RTS; loads A from
|
|
; StarFieldPtrLo,x; compares A with $00F8,y; branches on carry clear
|
|
; to NmiHandler_Loop67; branches on not equal to NmiHandler_Loop68;
|
|
; increments Y; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero20:
|
|
lda StarFieldPtrLo,x ; CPU:$C8EE PRG:48EE B5 00
|
|
cmp a:$00F8,y ; CPU:$C8F0 PRG:48F0 D9 F8 00
|
|
bcc NmiHandler_Loop67 ; CPU:$C8F3 PRG:48F3 90 08
|
|
bne NmiHandler_Loop68 ; CPU:$C8F5 PRG:48F5 D0 0B
|
|
iny ; CPU:$C8F7 PRG:48F7 C8
|
|
inx ; CPU:$C8F8 PRG:48F8 E8
|
|
dec StarFieldPtrHi ; CPU:$C8F9 PRG:48F9 C6 01
|
|
bne NmiHandler_OnNonzero20 ; CPU:$C8FB PRG:48FB D0 F1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop67
|
|
; Global: The routine calls Sub_C90B.
|
|
; Local: Executes 1 instruction: calls Sub_C90B.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop67:
|
|
jmp Sub_C90B ; CPU:$C8FD PRG:48FD 4C 0B C9
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero21
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: returns with RTS; loads A from
|
|
; StarFieldPtrLo,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero21:
|
|
lda StarFieldPtrLo,x ; CPU:$C900 PRG:4900 B5 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop68
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: returns with RTS; loads A from
|
|
; StarFieldPtrLo,x; stores A to $00F8,y; increments Y; increments X;
|
|
; decrements StarFieldPtrHi; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop68:
|
|
sta a:$00F8,y ; CPU:$C902 PRG:4902 99 F8 00
|
|
iny ; CPU:$C905 PRG:4905 C8
|
|
inx ; CPU:$C906 PRG:4906 E8
|
|
dec StarFieldPtrHi ; CPU:$C907 PRG:4907 C6 01
|
|
bne NmiHandler_OnNonzero21 ; CPU:$C909 PRG:4909 D0 F5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C90B
|
|
; Global: The routine reads $0488 and $0489.
|
|
; Local: Executes 10 instructions: returns with RTS; loads X from Zp02; loads
|
|
; A from Zp02,x; compares A with $0488; branches on not equal to
|
|
; NmiHandler_OnNonzero18; loads X from $0489; and 4 more
|
|
; instructions.
|
|
; Parameters: Reads $0488 and $0489 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C90B:
|
|
ldx Zp02 ; CPU:$C90B PRG:490B A6 02
|
|
lda Zp02,x ; CPU:$C90D PRG:490D B5 02
|
|
cmp $0488 ; CPU:$C90F PRG:490F CD 88 04
|
|
bne NmiHandler_OnNonzero18 ; CPU:$C912 PRG:4912 D0 9B
|
|
ldx $0489 ; CPU:$C914 PRG:4914 AE 89 04
|
|
bne NmiHandler_Loop69 ; CPU:$C917 PRG:4917 D0 07
|
|
inc $0489 ; CPU:$C919 PRG:4919 EE 89 04
|
|
lda #$07 ; CPU:$C91C PRG:491C A9 07
|
|
bpl NmiHandler_Loop70 ; CPU:$C91E PRG:491E 10 09
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop69
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: clears the carry flag; adds $07 to A;
|
|
; compares A with $0A; branches on carry clear to NmiHandler_Loop70;
|
|
; subtracts $0A from A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop69:
|
|
clc ; CPU:$C920 PRG:4920 18
|
|
adc #$07 ; CPU:$C921 PRG:4921 69 07
|
|
cmp #$0A ; CPU:$C923 PRG:4923 C9 0A
|
|
bcc NmiHandler_Loop70 ; CPU:$C925 PRG:4925 90 02
|
|
sbc #$0A ; CPU:$C927 PRG:4927 E9 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop70
|
|
; Global: Queues the records that draw the stage screen and the enemies' starting positions.
|
|
; Local: Executes 5 instructions: stores A to $0488; loads A with $01; stores
|
|
; A to $0581; stores A to $0582; calls Sub_CBA8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0488, $0581 and $0582 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop70:
|
|
sta $0488 ; CPU:$C929 PRG:4929 8D 88 04
|
|
lda #$01 ; CPU:$C92C PRG:492C A9 01
|
|
sta $0581 ; CPU:$C92E PRG:492E 8D 81 05
|
|
sta $0582 ; CPU:$C931 PRG:4931 8D 82 05
|
|
jmp Sub_CBA8 ; CPU:$C934 PRG:4934 4C A8 CB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetupStageScreen
|
|
; Global: Queues the record that draws the stage number.
|
|
; Local: Executes 14 instructions: loads A with $E5; stores A to
|
|
; StarFieldPtrLo; loads A with $FA; stores A to StarFieldPtrHi; loads
|
|
; A with $02; stores A to StarFieldCount; and 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetupStageScreen:
|
|
lda #$E5 ; CPU:$C937 PRG:4937 A9 E5
|
|
sta StarFieldPtrLo ; CPU:$C939 PRG:4939 85 00
|
|
lda #$FA ; CPU:$C93B PRG:493B A9 FA
|
|
sta StarFieldPtrHi ; CPU:$C93D PRG:493D 85 01
|
|
lda #$02 ; CPU:$C93F PRG:493F A9 02
|
|
sta StarFieldCount ; CPU:$C941 PRG:4941 85 06
|
|
jsr AdvanceVramWriteQueue ; CPU:$C943 PRG:4943 20 91 C1
|
|
jsr QueueStageRecord ; CPU:$C946 PRG:4946 20 57 C9
|
|
jsr NmiHandler_Loop80 ; CPU:$C949 PRG:4949 20 1D CA
|
|
jsr NmiHandler_Loop78 ; CPU:$C94C PRG:494C 20 01 CA
|
|
ldx ZpDE ; CPU:$C94F PRG:494F A6 DE
|
|
dex ; CPU:$C951 PRG:4951 CA
|
|
beq NmiHandler_Loop75 ; CPU:$C952 PRG:4952 F0 6E
|
|
jmp NmiHandler_Loop79 ; CPU:$C954 PRG:4954 4C 0F CA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueStageRecord
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A with $02; loads X from ZpDE;
|
|
; decrements X; branches on not equal to NmiHandler_Loop71; loads A
|
|
; with $01.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueStageRecord:
|
|
lda #$02 ; CPU:$C957 PRG:4957 A9 02
|
|
ldx ZpDE ; CPU:$C959 PRG:4959 A6 DE
|
|
dex ; CPU:$C95B PRG:495B CA
|
|
bne NmiHandler_Loop71 ; CPU:$C95C PRG:495C D0 02
|
|
lda #$01 ; CPU:$C95E PRG:495E A9 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop71
|
|
; Global: The routine calls AdvanceVramWriteQueue.
|
|
; Local: Executes 6 instructions: stores A to StarFieldCount; loads A with
|
|
; $F4; stores A to StarFieldPtrLo; loads A with $FA; stores A to
|
|
; StarFieldPtrHi; calls AdvanceVramWriteQueue.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop71:
|
|
sta StarFieldCount ; CPU:$C960 PRG:4960 85 06
|
|
lda #$F4 ; CPU:$C962 PRG:4962 A9 F4
|
|
sta StarFieldPtrLo ; CPU:$C964 PRG:4964 85 00
|
|
lda #$FA ; CPU:$C966 PRG:4966 A9 FA
|
|
sta StarFieldPtrHi ; CPU:$C968 PRG:4968 85 01
|
|
jmp AdvanceVramWriteQueue ; CPU:$C96A PRG:496A 4C 91 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear2
|
|
; Global: The routine calls QueueVramWritePointer and Sub_C997.
|
|
; Local: Executes 16 instructions: ANDs A with $03; branches on not equal to
|
|
; NmiHandler_Loop75; loads X from ZpDE; decrements X; branches on
|
|
; equal to NmiHandler_Loop73; decrements X; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear2:
|
|
and #$03 ; CPU:$C96D PRG:496D 29 03
|
|
bne NmiHandler_Loop75 ; CPU:$C96F PRG:496F D0 51
|
|
ldx ZpDE ; CPU:$C971 PRG:4971 A6 DE
|
|
dex ; CPU:$C973 PRG:4973 CA
|
|
beq NmiHandler_Loop73 ; CPU:$C974 PRG:4974 F0 1D
|
|
dex ; CPU:$C976 PRG:4976 CA
|
|
bne NmiHandler_Loop75 ; CPU:$C977 PRG:4977 D0 49
|
|
ldx Zp61 ; CPU:$C979 PRG:4979 A6 61
|
|
dex ; CPU:$C97B PRG:497B CA
|
|
beq NmiHandler_Loop72 ; CPU:$C97C PRG:497C F0 0E
|
|
ldx #$F4 ; CPU:$C97E PRG:497E A2 F4
|
|
lda #$FA ; CPU:$C980 PRG:4980 A9 FA
|
|
jsr QueueVramWritePointer ; CPU:$C982 PRG:4982 20 17 C1
|
|
ldx #$FA ; CPU:$C985 PRG:4985 A2 FA
|
|
ldy #$FA ; CPU:$C987 PRG:4987 A0 FA
|
|
jmp Sub_C997 ; CPU:$C989 PRG:4989 4C 97 C9
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop72
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 3 instructions: loads X with $FA; loads A with $FA; calls
|
|
; QueueVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop72:
|
|
ldx #$FA ; CPU:$C98C PRG:498C A2 FA
|
|
lda #$FA ; CPU:$C98E PRG:498E A9 FA
|
|
jsr QueueVramWritePointer ; CPU:$C990 PRG:4990 20 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop73
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X with $F4; loads Y with $FA.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop73:
|
|
ldx #$F4 ; CPU:$C993 PRG:4993 A2 F4
|
|
ldy #$FA ; CPU:$C995 PRG:4995 A0 FA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C997
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 5 instructions: loads A from Zp48; ANDs A with $10; branches
|
|
; on equal to NmiHandler_Loop74; copies Y into A; calls QueueVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C997:
|
|
lda Zp48 ; CPU:$C997 PRG:4997 A5 48
|
|
and #$10 ; CPU:$C999 PRG:4999 29 10
|
|
beq NmiHandler_Loop74 ; CPU:$C99B PRG:499B F0 04
|
|
tya ; CPU:$C99D PRG:499D 98
|
|
jmp QueueVramWritePointer ; CPU:$C99E PRG:499E 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop74
|
|
; Global: The routine calls ParseVramWriteRecord.
|
|
; Local: Executes 2 instructions: copies Y into A; calls ParseVramWriteRecord.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop74:
|
|
tya ; CPU:$C9A1 PRG:49A1 98
|
|
jmp ParseVramWriteRecord ; CPU:$C9A2 PRG:49A2 4C 2D C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_C9A5
|
|
; Global: Updates the enemy formation: it moves the enemies along their flight paths and redraws them.
|
|
; Local: Executes 32 instructions: ANDs A with $03; branches on not equal to
|
|
; NmiHandler_Loop75; loads X from ZpDE; decrements X; branches on
|
|
; equal to NmiHandler_Loop73; decrements X; and 26 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_C9A5:
|
|
lda Zp48 ; CPU:$C9A5 PRG:49A5 A5 48
|
|
ror a ; CPU:$C9A7 PRG:49A7 6A
|
|
bcc NmiHandler_Loop80 ; CPU:$C9A8 PRG:49A8 90 73
|
|
bcs NmiHandler_Loop76 ; CPU:$C9AA PRG:49AA B0 17
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: UpdateEnemyFormation
|
|
; Global: The routine calls QueueVramWritePointer, Sub_C997 and ParseVramWriteRecord.
|
|
; Local: Executes 40 instructions: ANDs A with $03; branches on not equal to
|
|
; NmiHandler_Loop75; loads X from ZpDE; decrements X; branches on
|
|
; equal to NmiHandler_Loop73; decrements X; and 34 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
UpdateEnemyFormation:
|
|
lda Zp62 ; CPU:$C9AC PRG:49AC A5 62
|
|
beq NmiHandler_Loop75 ; CPU:$C9AE PRG:49AE F0 12
|
|
lda Zp48 ; CPU:$C9B0 PRG:49B0 A5 48
|
|
ror a ; CPU:$C9B2 PRG:49B2 6A
|
|
bcc NmiHandler_Loop75 ; CPU:$C9B3 PRG:49B3 90 0D
|
|
ror a ; CPU:$C9B5 PRG:49B5 6A
|
|
bcc NmiHandler_OnCarryClear2 ; CPU:$C9B6 PRG:49B6 90 B5
|
|
lda Zp48 ; CPU:$C9B8 PRG:49B8 A5 48
|
|
and #$04 ; CPU:$C9BA PRG:49BA 29 04
|
|
bne NmiHandler_Loop80 ; CPU:$C9BC PRG:49BC D0 5F
|
|
ldy Zp63 ; CPU:$C9BE PRG:49BE A4 63
|
|
bne NmiHandler_Loop76 ; CPU:$C9C0 PRG:49C0 D0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop75
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop75:
|
|
rts ; CPU:$C9C2 PRG:49C2 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop76
|
|
; Global: Queues the attract screen's row of PPU writes.
|
|
; Local: Executes 7 instructions: returns with RTS; loads A with $00; stores A
|
|
; to Zp63; loads X from Zp61; decrements X; branches on equal to
|
|
; NmiHandler_Loop78; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop76:
|
|
lda #$00 ; CPU:$C9C3 PRG:49C3 A9 00
|
|
sta Zp63 ; CPU:$C9C5 PRG:49C5 85 63
|
|
ldx Zp61 ; CPU:$C9C7 PRG:49C7 A6 61
|
|
dex ; CPU:$C9C9 PRG:49C9 CA
|
|
beq NmiHandler_Loop78 ; CPU:$C9CA PRG:49CA F0 35
|
|
bne NmiHandler_Loop79 ; CPU:$C9CC PRG:49CC D0 41
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: QueueAttractScreenRow
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 10 instructions: returns with RTS; loads A with $CE; stores
|
|
; A to StarFieldPtrLo; loads A with $FA; stores A to StarFieldPtrHi;
|
|
; loads Y with $03; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
QueueAttractScreenRow:
|
|
lda #$CE ; CPU:$C9CE PRG:49CE A9 CE
|
|
sta StarFieldPtrLo ; CPU:$C9D0 PRG:49D0 85 00
|
|
lda #$FA ; CPU:$C9D2 PRG:49D2 A9 FA
|
|
sta StarFieldPtrHi ; CPU:$C9D4 PRG:49D4 85 01
|
|
ldy #$03 ; CPU:$C9D6 PRG:49D6 A0 03
|
|
ldx ZpDE ; CPU:$C9D8 PRG:49D8 A6 DE
|
|
dex ; CPU:$C9DA PRG:49DA CA
|
|
bne NmiHandler_Loop77 ; CPU:$C9DB PRG:49DB D0 01
|
|
dey ; CPU:$C9DD PRG:49DD 88
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop77
|
|
; Global: The routine calls AdvanceVramWriteQueue, Sub_CA25, Sub_CA09 and Sub_CA17.
|
|
; Local: Executes 17 instructions: returns with RTS; stores Y to
|
|
; StarFieldCount; calls AdvanceVramWriteQueue; loads A with $28; stores A to
|
|
; PpuAddrHigh; loads A with $4B; and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop77:
|
|
sty StarFieldCount ; CPU:$C9DE PRG:49DE 84 06
|
|
jsr AdvanceVramWriteQueue ; CPU:$C9E0 PRG:49E0 20 91 C1
|
|
lda #$28 ; CPU:$C9E3 PRG:49E3 A9 28
|
|
sta PpuAddrHigh ; CPU:$C9E5 PRG:49E5 85 05
|
|
lda #$4B ; CPU:$C9E7 PRG:49E7 A9 4B
|
|
sta PpuAddrLow ; CPU:$C9E9 PRG:49E9 85 04
|
|
jsr Sub_CA25 ; CPU:$C9EB PRG:49EB 20 25 CA
|
|
lda #$42 ; CPU:$C9EE PRG:49EE A9 42
|
|
sta PpuAddrLow ; CPU:$C9F0 PRG:49F0 85 04
|
|
jsr Sub_CA09 ; CPU:$C9F2 PRG:49F2 20 09 CA
|
|
ldx ZpDE ; CPU:$C9F5 PRG:49F5 A6 DE
|
|
dex ; CPU:$C9F7 PRG:49F7 CA
|
|
beq NmiHandler_Loop75 ; CPU:$C9F8 PRG:49F8 F0 C8
|
|
lda #$54 ; CPU:$C9FA PRG:49FA A9 54
|
|
sta PpuAddrLow ; CPU:$C9FC PRG:49FC 85 04
|
|
jmp Sub_CA17 ; CPU:$C9FE PRG:49FE 4C 17 CA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop78
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $18; stores A to PpuAddrLow;
|
|
; loads A with $21; stores A to PpuAddrHigh.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop78:
|
|
lda #$18 ; CPU:$CA01 PRG:4A01 A9 18
|
|
sta PpuAddrLow ; CPU:$CA03 PRG:4A03 85 04
|
|
lda #$21 ; CPU:$CA05 PRG:4A05 A9 21
|
|
sta PpuAddrHigh ; CPU:$CA07 PRG:4A07 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CA09
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $E0; stores A to
|
|
; StarFieldPtrLo; branches on negative to NmiHandler_Loop81.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CA09:
|
|
lda #$E0 ; CPU:$CA09 PRG:4A09 A9 E0
|
|
sta StarFieldPtrLo ; CPU:$CA0B PRG:4A0B 85 00
|
|
bmi NmiHandler_Loop81 ; CPU:$CA0D PRG:4A0D 30 1A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop79
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $98; stores A to PpuAddrLow;
|
|
; loads A with $21; stores A to PpuAddrHigh.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop79:
|
|
lda #$98 ; CPU:$CA0F PRG:4A0F A9 98
|
|
sta PpuAddrLow ; CPU:$CA11 PRG:4A11 85 04
|
|
lda #$21 ; CPU:$CA13 PRG:4A13 A9 21
|
|
sta PpuAddrHigh ; CPU:$CA15 PRG:4A15 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CA17
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $E8; stores A to
|
|
; StarFieldPtrLo; branches on negative to NmiHandler_Loop81.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CA17:
|
|
lda #$E8 ; CPU:$CA17 PRG:4A17 A9 E8
|
|
sta StarFieldPtrLo ; CPU:$CA19 PRG:4A19 85 00
|
|
bmi NmiHandler_Loop81 ; CPU:$CA1B PRG:4A1B 30 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop80
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $98; stores A to PpuAddrLow;
|
|
; loads A with $20; stores A to PpuAddrHigh.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop80:
|
|
lda #$98 ; CPU:$CA1D PRG:4A1D A9 98
|
|
sta PpuAddrLow ; CPU:$CA1F PRG:4A1F 85 04
|
|
lda #$20 ; CPU:$CA21 PRG:4A21 A9 20
|
|
sta PpuAddrHigh ; CPU:$CA23 PRG:4A23 85 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CA25
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $F8; stores A to
|
|
; StarFieldPtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CA25:
|
|
lda #$F8 ; CPU:$CA25 PRG:4A25 A9 F8
|
|
sta StarFieldPtrLo ; CPU:$CA27 PRG:4A27 85 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop81
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A with $00; stores A to
|
|
; StarFieldPtrHi; loads A with $06; stores A to Zp02; loads Y with
|
|
; $00; loads A from ((StarFieldPtrLo),y).
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop81:
|
|
lda #$00 ; CPU:$CA29 PRG:4A29 A9 00
|
|
sta StarFieldPtrHi ; CPU:$CA2B PRG:4A2B 85 01
|
|
lda #$06 ; CPU:$CA2D PRG:4A2D A9 06
|
|
sta Zp02 ; CPU:$CA2F PRG:4A2F 85 02
|
|
ldy #$00 ; CPU:$CA31 PRG:4A31 A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$CA33 PRG:4A33 B1 00
|
|
.byte $D0, $03 ; CPU:$CA35 PRG:4A35 D0 03
|
|
lda #$04 ; CPU:$CA37 PRG:4A37 A9 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCCA39
|
|
; Global: The routine calls QueuePpuWriteRecordAlt2, reads $00A9.
|
|
; Local: Executes 9 instructions: tests the bits of $00A9; stores A to Zp03;
|
|
; increments StarFieldPtrLo; calls QueuePpuWriteRecordAlt2; loads Y with $00;
|
|
; decrements StarFieldPtrLo; and 3 more instructions.
|
|
; Parameters: Reads $00A9 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCCA39:
|
|
bit a:$00A9 ; CPU:$CA39 PRG:4A39 2C A9 00
|
|
sta Zp03 ; CPU:$CA3C PRG:4A3C 85 03
|
|
inc StarFieldPtrLo ; CPU:$CA3E PRG:4A3E E6 00
|
|
jsr QueuePpuWriteRecordAlt2 ; CPU:$CA40 PRG:4A40 20 77 C1
|
|
ldy #$00 ; CPU:$CA43 PRG:4A43 A0 00
|
|
dec StarFieldPtrLo ; CPU:$CA45 PRG:4A45 C6 00
|
|
lda (StarFieldPtrLo),y ; CPU:$CA47 PRG:4A47 B1 00
|
|
bne NmiHandler_Loop83 ; CPU:$CA49 PRG:4A49 D0 01
|
|
rts ; CPU:$CA4B PRG:4A4B 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop83
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: pushes A; loads A with $06; stores A to
|
|
; Zp02; clears the carry flag; loads A with $20; adds PpuAddrLow to
|
|
; A; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop83:
|
|
pha ; CPU:$CA4C PRG:4A4C 48
|
|
lda #$06 ; CPU:$CA4D PRG:4A4D A9 06
|
|
sta Zp02 ; CPU:$CA4F PRG:4A4F 85 02
|
|
clc ; CPU:$CA51 PRG:4A51 18
|
|
lda #$20 ; CPU:$CA52 PRG:4A52 A9 20
|
|
adc PpuAddrLow ; CPU:$CA54 PRG:4A54 65 04
|
|
sta PpuAddrLow ; CPU:$CA56 PRG:4A56 85 04
|
|
bcc NmiHandler_Loop84 ; CPU:$CA58 PRG:4A58 90 02
|
|
inc PpuAddrHigh ; CPU:$CA5A PRG:4A5A E6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop84
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 10 instructions: loads A with $20; stores A to
|
|
; StarFieldPtrLo; loads A with $00; stores A to StarFieldPtrHi; pulls
|
|
; A; compares A with $07; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop84:
|
|
lda #$20 ; CPU:$CA5C PRG:4A5C A9 20
|
|
sta StarFieldPtrLo ; CPU:$CA5E PRG:4A5E 85 00
|
|
lda #$00 ; CPU:$CA60 PRG:4A60 A9 00
|
|
sta StarFieldPtrHi ; CPU:$CA62 PRG:4A62 85 01
|
|
pla ; CPU:$CA64 PRG:4A64 68
|
|
cmp #$07 ; CPU:$CA65 PRG:4A65 C9 07
|
|
bcs NmiHandler_Loop85 ; CPU:$CA67 PRG:4A67 B0 19
|
|
sta StarFieldCount ; CPU:$CA69 PRG:4A69 85 06
|
|
ldy #$05 ; CPU:$CA6B PRG:4A6B A0 05
|
|
lda #$24 ; CPU:$CA6D PRG:4A6D A9 24
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative10
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: stores A to ((StarFieldPtrLo),y); decrements
|
|
; Y; branches on non-negative to NmiHandler_OnNonnegative10; loads Y
|
|
; with $05; loads A with $2B.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative10:
|
|
sta (StarFieldPtrLo),y ; CPU:$CA6F PRG:4A6F 91 00
|
|
dey ; CPU:$CA71 PRG:4A71 88
|
|
bpl NmiHandler_OnNonnegative10 ; CPU:$CA72 PRG:4A72 10 FB
|
|
ldy #$05 ; CPU:$CA74 PRG:4A74 A0 05
|
|
lda #$2B ; CPU:$CA76 PRG:4A76 A9 2B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero22
|
|
; Global: The routine calls QueuePpuWriteRecordAlt.
|
|
; Local: Executes 5 instructions: stores A to ((StarFieldPtrLo),y); decrements
|
|
; Y; decrements StarFieldCount; branches on not equal to
|
|
; NmiHandler_OnNonzero22; calls QueuePpuWriteRecordAlt.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp4E, Zp4F, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero22:
|
|
sta (StarFieldPtrLo),y ; CPU:$CA78 PRG:4A78 91 00
|
|
dey ; CPU:$CA7A PRG:4A7A 88
|
|
dec StarFieldCount ; CPU:$CA7B PRG:4A7B C6 06
|
|
bne NmiHandler_OnNonzero22 ; CPU:$CA7D PRG:4A7D D0 F9
|
|
jmp QueuePpuWriteRecordAlt ; CPU:$CA7F PRG:4A7F 4C 5F C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop85
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: stores A to SpriteY; loads X with $04.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop85:
|
|
sta SpriteY ; CPU:$CA82 PRG:4A82 85 25
|
|
ldx #$04 ; CPU:$CA84 PRG:4A84 A2 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative11
|
|
; Global: The routine calls QueuePpuWriteRecordAlt.
|
|
; Local: Executes 5 instructions: loads A from $FB00,x; stores A to Zp20,x;
|
|
; decrements X; branches on non-negative to
|
|
; NmiHandler_OnNonnegative11; calls QueuePpuWriteRecordAlt.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative11:
|
|
lda $FB00,x ; CPU:$CA86 PRG:4A86 BD 00 FB
|
|
sta Zp20,x ; CPU:$CA89 PRG:4A89 95 20
|
|
dex ; CPU:$CA8B PRG:4A8B CA
|
|
bpl NmiHandler_OnNonnegative11 ; CPU:$CA8C PRG:4A8C 10 F8
|
|
jmp QueuePpuWriteRecordAlt ; CPU:$CA8E PRG:4A8E 4C 5F C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CA91
|
|
; Global: Clears the flag that says the player ship is on screen.
|
|
; Local: Executes 8 instructions: loads A with $B8; stores A to PpuAddrLow;
|
|
; loads A with $22; stores A to PpuAddrHigh; loads A with $06; stores
|
|
; A to Zp02; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CA91:
|
|
lda #$B8 ; CPU:$CA91 PRG:4A91 A9 B8
|
|
sta PpuAddrLow ; CPU:$CA93 PRG:4A93 85 04
|
|
lda #$22 ; CPU:$CA95 PRG:4A95 A9 22
|
|
sta PpuAddrHigh ; CPU:$CA97 PRG:4A97 85 05
|
|
lda #$06 ; CPU:$CA99 PRG:4A99 A9 06
|
|
sta Zp02 ; CPU:$CA9B PRG:4A9B 85 02
|
|
sta Zp03 ; CPU:$CA9D PRG:4A9D 85 03
|
|
jmp NmiHandler_OnNonzero7 ; CPU:$CA9F PRG:4A9F 4C 62 C2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetPlayerShip
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $FF; stores A to Zp64.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetPlayerShip:
|
|
lda #$FF ; CPU:$CAA2 PRG:4AA2 A9 FF
|
|
sta Zp64 ; CPU:$CAA4 PRG:4AA4 85 64
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero23
|
|
; Global: The routine calls Sub_CABB, writes $059A.
|
|
; Local: Executes 6 instructions: calls Sub_CABB; loads A from Zp64; branches
|
|
; on not equal to NmiHandler_OnNonzero23; loads A with $00; stores A
|
|
; to $059A; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059A changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero23:
|
|
jsr Sub_CABB ; CPU:$CAA6 PRG:4AA6 20 BB CA
|
|
lda Zp64 ; CPU:$CAA9 PRG:4AA9 A5 64
|
|
bne NmiHandler_OnNonzero23 ; CPU:$CAAB PRG:4AAB D0 F9
|
|
lda #$00 ; CPU:$CAAD PRG:4AAD A9 00
|
|
sta $059A ; CPU:$CAAF PRG:4AAF 8D 9A 05
|
|
rts ; CPU:$CAB2 PRG:4AB2 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CAB3
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A from Zp48; ANDs A with $07; copies A
|
|
; into X; decrements X; branches on not equal to NmiHandler_Loop86.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CAB3:
|
|
lda Zp48 ; CPU:$CAB3 PRG:4AB3 A5 48
|
|
and #$07 ; CPU:$CAB5 PRG:4AB5 29 07
|
|
tax ; CPU:$CAB7 PRG:4AB7 AA
|
|
dex ; CPU:$CAB8 PRG:4AB8 CA
|
|
bne NmiHandler_Loop86 ; CPU:$CAB9 PRG:4AB9 D0 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CABB
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X from Zp64; branches on not equal to
|
|
; NmiHandler_Loop87.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CABB:
|
|
ldx Zp64 ; CPU:$CABB PRG:4ABB A6 64
|
|
bne NmiHandler_Loop87 ; CPU:$CABD PRG:4ABD D0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop86
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop86:
|
|
rts ; CPU:$CABF PRG:4ABF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop87
|
|
; Global: The routine calls Sub_CA91, reads $0483.
|
|
; Local: Executes 9 instructions: increments X; branches on not equal to
|
|
; NmiHandler_Loop88; loads X from $0483; stores X to Zp65; loads X
|
|
; with $00; stores X to Zp66; and 3 more instructions.
|
|
; Parameters: Reads $0483 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop87:
|
|
inx ; CPU:$CAC0 PRG:4AC0 E8
|
|
bne NmiHandler_Loop88 ; CPU:$CAC1 PRG:4AC1 D0 33
|
|
ldx $0483 ; CPU:$CAC3 PRG:4AC3 AE 83 04
|
|
stx Zp65 ; CPU:$CAC6 PRG:4AC6 86 65
|
|
ldx #$00 ; CPU:$CAC8 PRG:4AC8 A2 00
|
|
stx Zp66 ; CPU:$CACA PRG:4ACA 86 66
|
|
inx ; CPU:$CACC PRG:4ACC E8
|
|
stx Zp64 ; CPU:$CACD PRG:4ACD 86 64
|
|
jmp Sub_CA91 ; CPU:$CACF PRG:4ACF 4C 91 CA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarrySet
|
|
; Global: The routine calls QueueVramWritePointer, SetVramRecordFlags and NmiHandler_Loop89, writes
|
|
; $059A.
|
|
; Local: Executes 16 instructions: loads X with $1D; loads A with $FB; calls
|
|
; QueueVramWritePointer; loads A with $DB; stores A to PpuAddrLow; loads A with
|
|
; $22; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $059A changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarrySet:
|
|
ldx #$1D ; CPU:$CAD2 PRG:4AD2 A2 1D
|
|
lda #$FB ; CPU:$CAD4 PRG:4AD4 A9 FB
|
|
jsr QueueVramWritePointer ; CPU:$CAD6 PRG:4AD6 20 17 C1
|
|
lda #$DB ; CPU:$CAD9 PRG:4AD9 A9 DB
|
|
sta PpuAddrLow ; CPU:$CADB PRG:4ADB 85 04
|
|
lda #$22 ; CPU:$CADD PRG:4ADD A9 22
|
|
sta PpuAddrHigh ; CPU:$CADF PRG:4ADF 85 05
|
|
lda #$00 ; CPU:$CAE1 PRG:4AE1 A9 00
|
|
sta Zp03 ; CPU:$CAE3 PRG:4AE3 85 03
|
|
ldy #$03 ; CPU:$CAE5 PRG:4AE5 A0 03
|
|
ldx #$80 ; CPU:$CAE7 PRG:4AE7 A2 80
|
|
lda #$04 ; CPU:$CAE9 PRG:4AE9 A9 04
|
|
jsr SetVramRecordFlags ; CPU:$CAEB PRG:4AEB 20 74 C1
|
|
lda #$01 ; CPU:$CAEE PRG:4AEE A9 01
|
|
sta $059A ; CPU:$CAF0 PRG:4AF0 8D 9A 05
|
|
jmp NmiHandler_Loop89 ; CPU:$CAF3 PRG:4AF3 4C 0E CB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop88
|
|
; Global: The routine calls QueueVramWritePointer, SetVramRecordFlags and NmiHandler_Loop89, writes
|
|
; $059A, reads $0483.
|
|
; Local: Executes 22 instructions: loads X with $1D; loads A with $FB; calls
|
|
; QueueVramWritePointer; loads A with $DB; stores A to PpuAddrLow; loads A with
|
|
; $22; and 16 more instructions.
|
|
; Parameters: Reads $0483 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059A changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop88:
|
|
ldx $0483 ; CPU:$CAF6 PRG:4AF6 AE 83 04
|
|
cpx #$C8 ; CPU:$CAF9 PRG:4AF9 E0 C8
|
|
bcs NmiHandler_OnCarrySet ; CPU:$CAFB PRG:4AFB B0 D5
|
|
lda Zp65 ; CPU:$CAFD PRG:4AFD A5 65
|
|
beq NmiHandler_Loop89 ; CPU:$CAFF PRG:4AFF F0 0D
|
|
ldx #$00 ; CPU:$CB01 PRG:4B01 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative12
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: compares A with $FB05,x; branches on carry
|
|
; set to NmiHandler_Loop90; increments X; increments X; increments X;
|
|
; increments X; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative12:
|
|
cmp $FB05,x ; CPU:$CB03 PRG:4B03 DD 05 FB
|
|
bcs NmiHandler_Loop90 ; CPU:$CB06 PRG:4B06 B0 0B
|
|
inx ; CPU:$CB08 PRG:4B08 E8
|
|
inx ; CPU:$CB09 PRG:4B09 E8
|
|
inx ; CPU:$CB0A PRG:4B0A E8
|
|
inx ; CPU:$CB0B PRG:4B0B E8
|
|
bpl NmiHandler_OnNonnegative12 ; CPU:$CB0C PRG:4B0C 10 F5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop89
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $00; stores A to Zp64; returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp64.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop89:
|
|
lda #$00 ; CPU:$CB0E PRG:4B0E A9 00
|
|
sta Zp64 ; CPU:$CB10 PRG:4B10 85 64
|
|
rts ; CPU:$CB12 PRG:4B12 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop90
|
|
; Global: The routine calls NmiHandler_Loop89.
|
|
; Local: Executes 5 instructions: stores X to StarFieldCount; subtracts
|
|
; $FB05,x from A; stores A to Zp65; branches on not equal to
|
|
; NmiHandler_Loop91; calls NmiHandler_Loop89.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop90:
|
|
stx StarFieldCount ; CPU:$CB13 PRG:4B13 86 06
|
|
sbc $FB05,x ; CPU:$CB15 PRG:4B15 FD 05 FB
|
|
sta Zp65 ; CPU:$CB18 PRG:4B18 85 65
|
|
bne NmiHandler_Loop91 ; CPU:$CB1A PRG:4B1A D0 03
|
|
jsr NmiHandler_Loop89 ; CPU:$CB1C PRG:4B1C 20 0E CB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop91
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 14 instructions: loads A from $FB06,x; stores A to Zp02;
|
|
; clears the carry flag; adds Zp66 to A; pushes A; ANDs A with $1F;
|
|
; and 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop91:
|
|
lda $FB06,x ; CPU:$CB1F PRG:4B1F BD 06 FB
|
|
sta Zp02 ; CPU:$CB22 PRG:4B22 85 02
|
|
clc ; CPU:$CB24 PRG:4B24 18
|
|
adc Zp66 ; CPU:$CB25 PRG:4B25 65 66
|
|
pha ; CPU:$CB27 PRG:4B27 48
|
|
and #$1F ; CPU:$CB28 PRG:4B28 29 1F
|
|
cmp #$07 ; CPU:$CB2A PRG:4B2A C9 07
|
|
pla ; CPU:$CB2C PRG:4B2C 68
|
|
bcc NmiHandler_Loop92 ; CPU:$CB2D PRG:4B2D 90 09
|
|
adc #$40 ; CPU:$CB2F PRG:4B2F 69 40
|
|
and #$E0 ; CPU:$CB31 PRG:4B31 29 E0
|
|
sta Zp66 ; CPU:$CB33 PRG:4B33 85 66
|
|
clc ; CPU:$CB35 PRG:4B35 18
|
|
adc Zp02 ; CPU:$CB36 PRG:4B36 65 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop92
|
|
; Global: The routine calls NmiHandler_Loop93.
|
|
; Local: Executes 16 instructions: loads X from Zp66; stores A to Zp66; copies
|
|
; X into A; clears the carry flag; adds $B8 to A; stores A to
|
|
; PpuAddrLow; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop92:
|
|
ldx Zp66 ; CPU:$CB38 PRG:4B38 A6 66
|
|
sta Zp66 ; CPU:$CB3A PRG:4B3A 85 66
|
|
txa ; CPU:$CB3C PRG:4B3C 8A
|
|
clc ; CPU:$CB3D PRG:4B3D 18
|
|
adc #$B8 ; CPU:$CB3E PRG:4B3E 69 B8
|
|
sta PpuAddrLow ; CPU:$CB40 PRG:4B40 85 04
|
|
lda #$22 ; CPU:$CB42 PRG:4B42 A9 22
|
|
adc #$00 ; CPU:$CB44 PRG:4B44 69 00
|
|
sta PpuAddrHigh ; CPU:$CB46 PRG:4B46 85 05
|
|
jsr NmiHandler_Loop93 ; CPU:$CB48 PRG:4B48 20 56 CB
|
|
clc ; CPU:$CB4B PRG:4B4B 18
|
|
lda #$20 ; CPU:$CB4C PRG:4B4C A9 20
|
|
adc PpuAddrLow ; CPU:$CB4E PRG:4B4E 65 04
|
|
sta PpuAddrLow ; CPU:$CB50 PRG:4B50 85 04
|
|
bcc NmiHandler_Loop93 ; CPU:$CB52 PRG:4B52 90 02
|
|
inc PpuAddrHigh ; CPU:$CB54 PRG:4B54 E6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop93
|
|
; Global: Draws the game's counter panel and the number of lives still to be shown.
|
|
; Local: Executes 10 instructions: increments StarFieldCount; loads X from
|
|
; StarFieldCount; loads Y from $FB06,x; stores Y to Zp20; increments
|
|
; Y; stores Y to Zp21; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059A changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop93:
|
|
inc StarFieldCount ; CPU:$CB56 PRG:4B56 E6 06
|
|
ldx StarFieldCount ; CPU:$CB58 PRG:4B58 A6 06
|
|
ldy $FB06,x ; CPU:$CB5A PRG:4B5A BC 06 FB
|
|
sty Zp20 ; CPU:$CB5D PRG:4B5D 84 20
|
|
iny ; CPU:$CB5F PRG:4B5F C8
|
|
sty Zp21 ; CPU:$CB60 PRG:4B60 84 21
|
|
jsr Sub_C156 ; CPU:$CB62 PRG:4B62 20 56 C1
|
|
lda #$01 ; CPU:$CB65 PRG:4B65 A9 01
|
|
sta $059A ; CPU:$CB67 PRG:4B67 8D 9A 05
|
|
rts ; CPU:$CB6A PRG:4B6A 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetupHudCounters
|
|
; Global: The routine calls DrawHudCounterRow, reads $0487.
|
|
; Local: Executes 6 instructions: calls DrawHudCounterRow; loads A from $0487; branches
|
|
; on equal to NmiHandler_Loop95; compares A with $05; branches on
|
|
; carry clear to NmiHandler_Loop94; loads A with $05.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetupHudCounters:
|
|
jsr DrawHudCounterRow ; CPU:$CB6B PRG:4B6B 20 20 CC
|
|
lda $0487 ; CPU:$CB6E PRG:4B6E AD 87 04
|
|
beq NmiHandler_Loop95 ; CPU:$CB71 PRG:4B71 F0 16
|
|
cmp #$05 ; CPU:$CB73 PRG:4B73 C9 05
|
|
bcc NmiHandler_Loop94 ; CPU:$CB75 PRG:4B75 90 02
|
|
lda #$05 ; CPU:$CB77 PRG:4B77 A9 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop94
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores A to StarFieldCount.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop94:
|
|
sta StarFieldCount ; CPU:$CB79 PRG:4B79 85 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero24
|
|
; Global: The routine calls NmiHandler_Loop100, reads $0487.
|
|
; Local: Executes 6 instructions: calls NmiHandler_Loop100; decrements
|
|
; StarFieldCount; branches on not equal to NmiHandler_OnNonzero24;
|
|
; loads A from $0487; compares A with $06; branches on carry set to
|
|
; NmiHandler_Loop98.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero24:
|
|
jsr NmiHandler_Loop100 ; CPU:$CB7B PRG:4B7B 20 E6 CB
|
|
dec StarFieldCount ; CPU:$CB7E PRG:4B7E C6 06
|
|
bne NmiHandler_OnNonzero24 ; CPU:$CB80 PRG:4B80 D0 F9
|
|
lda $0487 ; CPU:$CB82 PRG:4B82 AD 87 04
|
|
cmp #$06 ; CPU:$CB85 PRG:4B85 C9 06
|
|
bcs NmiHandler_Loop98 ; CPU:$CB87 PRG:4B87 B0 41
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop95
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop95:
|
|
rts ; CPU:$CB89 PRG:4B89 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CB8A
|
|
; Global: The routine calls Sub_C3B8, writes $0487, reads $0487.
|
|
; Local: Executes 14 instructions: loads A with $84; stores A to
|
|
; StarFieldPtrLo; loads A with $04; stores A to StarFieldPtrHi; loads
|
|
; A with $02; stores A to Zp02; and 8 more instructions.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0487 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CB8A:
|
|
lda #$84 ; CPU:$CB8A PRG:4B8A A9 84
|
|
sta StarFieldPtrLo ; CPU:$CB8C PRG:4B8C 85 00
|
|
lda #$04 ; CPU:$CB8E PRG:4B8E A9 04
|
|
sta StarFieldPtrHi ; CPU:$CB90 PRG:4B90 85 01
|
|
lda #$02 ; CPU:$CB92 PRG:4B92 A9 02
|
|
sta Zp02 ; CPU:$CB94 PRG:4B94 85 02
|
|
jsr Sub_C3B8 ; CPU:$CB96 PRG:4B96 20 B8 C3
|
|
ldx $0487 ; CPU:$CB99 PRG:4B99 AE 87 04
|
|
stx StarFieldCount ; CPU:$CB9C PRG:4B9C 86 06
|
|
dex ; CPU:$CB9E PRG:4B9E CA
|
|
stx $0487 ; CPU:$CB9F PRG:4B9F 8E 87 04
|
|
cpx #$06 ; CPU:$CBA2 PRG:4BA2 E0 06
|
|
bcs NmiHandler_Loop98 ; CPU:$CBA4 PRG:4BA4 B0 24
|
|
bcc NmiHandler_Loop99 ; CPU:$CBA6 PRG:4BA6 90 36
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CBA8
|
|
; Global: The routine reads $0487.
|
|
; Local: Executes 4 instructions: increments $0487; branches on not equal to
|
|
; NmiHandler_Loop96; decrements $0487; branches on not equal to
|
|
; NmiHandler_Loop97.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CBA8:
|
|
inc $0487 ; CPU:$CBA8 PRG:4BA8 EE 87 04
|
|
bne NmiHandler_Loop96 ; CPU:$CBAB PRG:4BAB D0 05
|
|
dec $0487 ; CPU:$CBAD PRG:4BAD CE 87 04
|
|
bne NmiHandler_Loop97 ; CPU:$CBB0 PRG:4BB0 D0 0F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop96
|
|
; Global: The routine calls Sub_C3A1.
|
|
; Local: Executes 7 instructions: loads A with $84; stores A to
|
|
; StarFieldPtrLo; loads A with $04; stores A to StarFieldPtrHi; loads
|
|
; A with $02; stores A to Zp02; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop96:
|
|
lda #$84 ; CPU:$CBB2 PRG:4BB2 A9 84
|
|
sta StarFieldPtrLo ; CPU:$CBB4 PRG:4BB4 85 00
|
|
lda #$04 ; CPU:$CBB6 PRG:4BB6 A9 04
|
|
sta StarFieldPtrHi ; CPU:$CBB8 PRG:4BB8 85 01
|
|
lda #$02 ; CPU:$CBBA PRG:4BBA A9 02
|
|
sta Zp02 ; CPU:$CBBC PRG:4BBC 85 02
|
|
jsr Sub_C3A1 ; CPU:$CBBE PRG:4BBE 20 A1 C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop97
|
|
; Global: The routine reads $0487.
|
|
; Local: Executes 4 instructions: loads X from $0487; stores X to
|
|
; StarFieldCount; compares X with $06; branches on carry clear to
|
|
; NmiHandler_Loop100.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop97:
|
|
ldx $0487 ; CPU:$CBC1 PRG:4BC1 AE 87 04
|
|
stx StarFieldCount ; CPU:$CBC4 PRG:4BC4 86 06
|
|
cpx #$06 ; CPU:$CBC6 PRG:4BC6 E0 06
|
|
bcc NmiHandler_Loop100 ; CPU:$CBC8 PRG:4BC8 90 1C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop98
|
|
; Global: The routine calls SetVramRecordFlags.
|
|
; Local: Executes 10 instructions: loads A with $7C; stores A to PpuAddrLow;
|
|
; loads A with $22; stores A to PpuAddrHigh; loads Y with $01; stores
|
|
; Y to Zp03; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop98:
|
|
lda #$7C ; CPU:$CBCA PRG:4BCA A9 7C
|
|
sta PpuAddrLow ; CPU:$CBCC PRG:4BCC 85 04
|
|
lda #$22 ; CPU:$CBCE PRG:4BCE A9 22
|
|
sta PpuAddrHigh ; CPU:$CBD0 PRG:4BD0 85 05
|
|
ldy #$01 ; CPU:$CBD2 PRG:4BD2 A0 01
|
|
sty Zp03 ; CPU:$CBD4 PRG:4BD4 84 03
|
|
iny ; CPU:$CBD6 PRG:4BD6 C8
|
|
ldx #$84 ; CPU:$CBD7 PRG:4BD7 A2 84
|
|
lda #$04 ; CPU:$CBD9 PRG:4BD9 A9 04
|
|
jmp SetVramRecordFlags ; CPU:$CBDB PRG:4BDB 4C 74 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop99
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads X with $24; stores X to Zp20; stores X
|
|
; to Zp21; branches on non-negative to NmiHandler_Loop101.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop99:
|
|
ldx #$24 ; CPU:$CBDE PRG:4BDE A2 24
|
|
stx Zp20 ; CPU:$CBE0 PRG:4BE0 86 20
|
|
stx Zp21 ; CPU:$CBE2 PRG:4BE2 86 21
|
|
bpl NmiHandler_Loop101 ; CPU:$CBE4 PRG:4BE4 10 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop100
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads X with $4A; stores X to Zp20;
|
|
; increments X; stores X to Zp21.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop100:
|
|
ldx #$4A ; CPU:$CBE6 PRG:4BE6 A2 4A
|
|
stx Zp20 ; CPU:$CBE8 PRG:4BE8 86 20
|
|
inx ; CPU:$CBEA PRG:4BEA E8
|
|
stx Zp21 ; CPU:$CBEB PRG:4BEB 86 21
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop101
|
|
; Global: The routine calls Sub_C156.
|
|
; Local: Executes 18 instructions: loads A with $02; stores A to Zp02; loads X
|
|
; from StarFieldCount; decrements X; loads A from $CC32,x; clears the
|
|
; carry flag; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop101:
|
|
lda #$02 ; CPU:$CBED PRG:4BED A9 02
|
|
sta Zp02 ; CPU:$CBEF PRG:4BEF 85 02
|
|
ldx StarFieldCount ; CPU:$CBF1 PRG:4BF1 A6 06
|
|
dex ; CPU:$CBF3 PRG:4BF3 CA
|
|
lda $CC32,x ; CPU:$CBF4 PRG:4BF4 BD 32 CC
|
|
clc ; CPU:$CBF7 PRG:4BF7 18
|
|
adc #$F8 ; CPU:$CBF8 PRG:4BF8 69 F8
|
|
sta PpuAddrLow ; CPU:$CBFA PRG:4BFA 85 04
|
|
lda #$21 ; CPU:$CBFC PRG:4BFC A9 21
|
|
adc #$00 ; CPU:$CBFE PRG:4BFE 69 00
|
|
sta PpuAddrHigh ; CPU:$CC00 PRG:4C00 85 05
|
|
jsr Sub_C156 ; CPU:$CC02 PRG:4C02 20 56 C1
|
|
lda #$20 ; CPU:$CC05 PRG:4C05 A9 20
|
|
clc ; CPU:$CC07 PRG:4C07 18
|
|
adc PpuAddrLow ; CPU:$CC08 PRG:4C08 65 04
|
|
sta PpuAddrLow ; CPU:$CC0A PRG:4C0A 85 04
|
|
bcc NmiHandler_Loop102 ; CPU:$CC0C PRG:4C0C 90 02
|
|
inc PpuAddrHigh ; CPU:$CC0E PRG:4C0E E6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop102
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads X from Zp20; compares X with $24;
|
|
; branches on equal to NmiHandler_Loop103; loads X with $4C; stores X
|
|
; to Zp20; increments X; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop102:
|
|
ldx Zp20 ; CPU:$CC10 PRG:4C10 A6 20
|
|
cpx #$24 ; CPU:$CC12 PRG:4C12 E0 24
|
|
beq NmiHandler_Loop103 ; CPU:$CC14 PRG:4C14 F0 07
|
|
ldx #$4C ; CPU:$CC16 PRG:4C16 A2 4C
|
|
stx Zp20 ; CPU:$CC18 PRG:4C18 86 20
|
|
inx ; CPU:$CC1A PRG:4C1A E8
|
|
stx Zp21 ; CPU:$CC1B PRG:4C1B 86 21
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop103
|
|
; Global: Draws one row of the two-digit counter panel.
|
|
; Local: Executes 1 instruction: calls Sub_C156.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop103:
|
|
jmp Sub_C156 ; CPU:$CC1D PRG:4C1D 4C 56 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DrawHudCounterRow
|
|
; Global: The routine calls NmiHandler_OnNonzero7.
|
|
; Local: Executes 9 instructions: loads A with $F8; stores A to PpuAddrLow;
|
|
; loads A with $21; stores A to PpuAddrHigh; loads X with $06; stores
|
|
; X to Zp02; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DrawHudCounterRow:
|
|
lda #$F8 ; CPU:$CC20 PRG:4C20 A9 F8
|
|
sta PpuAddrLow ; CPU:$CC22 PRG:4C22 85 04
|
|
lda #$21 ; CPU:$CC24 PRG:4C24 A9 21
|
|
sta PpuAddrHigh ; CPU:$CC26 PRG:4C26 85 05
|
|
ldx #$06 ; CPU:$CC28 PRG:4C28 A2 06
|
|
stx Zp02 ; CPU:$CC2A PRG:4C2A 86 02
|
|
dex ; CPU:$CC2C PRG:4C2C CA
|
|
stx Zp03 ; CPU:$CC2D PRG:4C2D 86 03
|
|
jmp NmiHandler_OnNonzero7 ; CPU:$CC2F PRG:4C2F 4C 62 C2
|
|
; ---- data $CC32-$CC37 (6 bytes) ----
|
|
; referenced by `lda $CC32,x` at $CBF4 (operand $CC32 falls inside this region)
|
|
HudCounterPositionTable:
|
|
.byte $00, $02, $04, $60, $62, $64 ; CPU:$CC32 PRG:4C32 00 02 04 60 62 64
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CC38
|
|
; Global: The routine calls QueueVramWritePointer, writes $0471, reads $058D and $045C.
|
|
; Local: Executes 18 instructions: loads X from Zp48; decrements X; copies X
|
|
; into A; ANDs A with $03; branches on not equal to
|
|
; NmiHandler_Loop104; loads X from Zp54; and 12 more instructions.
|
|
; Parameters: Reads $058D and $045C from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0471 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CC38:
|
|
ldx Zp48 ; CPU:$CC38 PRG:4C38 A6 48
|
|
dex ; CPU:$CC3A PRG:4C3A CA
|
|
txa ; CPU:$CC3B PRG:4C3B 8A
|
|
and #$03 ; CPU:$CC3C PRG:4C3C 29 03
|
|
bne NmiHandler_Loop104 ; CPU:$CC3E PRG:4C3E D0 1E
|
|
ldx Zp54 ; CPU:$CC40 PRG:4C40 A6 54
|
|
bne NmiHandler_Loop105 ; CPU:$CC42 PRG:4C42 D0 1B
|
|
lda Zp5D ; CPU:$CC44 PRG:4C44 A5 5D
|
|
beq NmiHandler_Loop104 ; CPU:$CC46 PRG:4C46 F0 16
|
|
lda $058D ; CPU:$CC48 PRG:4C48 AD 8D 05
|
|
beq NmiHandler_Loop104 ; CPU:$CC4B PRG:4C4B F0 11
|
|
lda #$00 ; CPU:$CC4D PRG:4C4D A9 00
|
|
sta Zp5D ; CPU:$CC4F PRG:4C4F 85 5D
|
|
lda $045C ; CPU:$CC51 PRG:4C51 AD 5C 04
|
|
sta $0471 ; CPU:$CC54 PRG:4C54 8D 71 04
|
|
ldx #$60 ; CPU:$CC57 PRG:4C57 A2 60
|
|
lda #$F9 ; CPU:$CC59 PRG:4C59 A9 F9
|
|
jsr QueueVramWritePointer ; CPU:$CC5B PRG:4C5B 20 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop104
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop104:
|
|
rts ; CPU:$CC5E PRG:4C5E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop105
|
|
; Global: The routine calls CallHandlerThroughPointer, writes $D0CC, reads $CC8D.
|
|
; Local: Executes 7 instructions: loads X from Zp54; decrements X; branches on
|
|
; negative to NmiHandler_Loop106; copies X into A; calls CallHandlerThroughPointer;
|
|
; stores A to $D0CC; and 1 more instruction.
|
|
; Parameters: Reads $CC8D from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $D0CC changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop105:
|
|
ldx Zp54 ; CPU:$CC5F PRG:4C5F A6 54
|
|
dex ; CPU:$CC61 PRG:4C61 CA
|
|
bmi NmiHandler_Loop106 ; CPU:$CC62 PRG:4C62 30 0C
|
|
txa ; CPU:$CC64 PRG:4C64 8A
|
|
jsr CallHandlerThroughPointer ; CPU:$CC65 PRG:4C65 20 01 C3
|
|
sta $D0CC ; CPU:$CC68 PRG:4C68 8D CC D0
|
|
cpy $CC8D ; CPU:$CC6B PRG:4C6B CC 8D CC
|
|
.byte $B3, $CC ; CPU:$CC6E PRG:4C6E B3 CC -- lax (ZpCC),y (undocumented; ca65 cannot encode) ; CPU:$CC6E PRG:4C6E B3 CC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop106
|
|
; Global: The routine calls Sub_CCF0, QueuePpuWriteRecordAlt and NmiHandler_Loop109, writes
|
|
; $059B, reads $045D.
|
|
; Local: Executes 33 instructions: loads A with $00; stores A to Zp55; stores
|
|
; A to Zp56; stores A to Zp59; loads A with $03; stores A to Zp54;
|
|
; and 27 more instructions.
|
|
; Parameters: Reads $045D from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059B changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop106:
|
|
lda #$00 ; CPU:$CC70 PRG:4C70 A9 00
|
|
sta Zp55 ; CPU:$CC72 PRG:4C72 85 55
|
|
sta Zp56 ; CPU:$CC74 PRG:4C74 85 56
|
|
sta Zp59 ; CPU:$CC76 PRG:4C76 85 59
|
|
lda #$03 ; CPU:$CC78 PRG:4C78 A9 03
|
|
sta Zp54 ; CPU:$CC7A PRG:4C7A 85 54
|
|
lda Zp58 ; CPU:$CC7C PRG:4C7C A5 58
|
|
sec ; CPU:$CC7E PRG:4C7E 38
|
|
sbc #$14 ; CPU:$CC7F PRG:4C7F E9 14
|
|
lsr a ; CPU:$CC81 PRG:4C81 4A
|
|
lsr a ; CPU:$CC82 PRG:4C82 4A
|
|
lsr a ; CPU:$CC83 PRG:4C83 4A
|
|
sta Zp57 ; CPU:$CC84 PRG:4C84 85 57
|
|
lda #$01 ; CPU:$CC86 PRG:4C86 A9 01
|
|
sta $059B ; CPU:$CC88 PRG:4C88 8D 9B 05
|
|
bne NmiHandler_Loop109 ; CPU:$CC8B PRG:4C8B D0 4D
|
|
inc Zp55 ; CPU:$CC8D PRG:4C8D E6 55
|
|
lda Zp55 ; CPU:$CC8F PRG:4C8F A5 55
|
|
cmp $045D ; CPU:$CC91 PRG:4C91 CD 5D 04
|
|
bcc NmiHandler_Loop109 ; CPU:$CC94 PRG:4C94 90 44
|
|
lda #$00 ; CPU:$CC96 PRG:4C96 A9 00
|
|
sta Zp55 ; CPU:$CC98 PRG:4C98 85 55
|
|
lda Zp54 ; CPU:$CC9A PRG:4C9A A5 54
|
|
and #$02 ; CPU:$CC9C PRG:4C9C 29 02
|
|
beq NmiHandler_Loop107 ; CPU:$CC9E PRG:4C9E F0 13
|
|
jsr Sub_CCF0 ; CPU:$CCA0 PRG:4CA0 20 F0 CC
|
|
jsr QueuePpuWriteRecordAlt ; CPU:$CCA3 PRG:4CA3 20 5F C1
|
|
inc Zp56 ; CPU:$CCA6 PRG:4CA6 E6 56
|
|
lda Zp56 ; CPU:$CCA8 PRG:4CA8 A5 56
|
|
cmp #$07 ; CPU:$CCAA PRG:4CAA C9 07
|
|
bcc NmiHandler_Loop109 ; CPU:$CCAC PRG:4CAC 90 2C
|
|
dec Zp54 ; CPU:$CCAE PRG:4CAE C6 54
|
|
jmp NmiHandler_Loop109 ; CPU:$CCB0 PRG:4CB0 4C DA CC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop107
|
|
; Global: The routine calls Sub_CCF0, QueuePpuWriteRecord and NmiHandler_Loop109.
|
|
; Local: Executes 5 instructions: decrements Zp56; branches on negative to
|
|
; NmiHandler_Loop108; calls Sub_CCF0; calls QueuePpuWriteRecord; calls
|
|
; NmiHandler_Loop109.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop107:
|
|
dec Zp56 ; CPU:$CCB3 PRG:4CB3 C6 56
|
|
bmi NmiHandler_Loop108 ; CPU:$CCB5 PRG:4CB5 30 09
|
|
jsr Sub_CCF0 ; CPU:$CCB7 PRG:4CB7 20 F0 CC
|
|
jsr QueuePpuWriteRecord ; CPU:$CCBA PRG:4CBA 20 44 C1
|
|
jmp NmiHandler_Loop109 ; CPU:$CCBD PRG:4CBD 4C DA CC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop108
|
|
; Global: The routine calls Sub_ED70 and QueueVramWritePointer.
|
|
; Local: Executes 7 instructions: loads A with $00; stores A to Zp54; loads A
|
|
; with $1B; calls Sub_ED70; loads X with $25; loads A with $FB; and 1
|
|
; more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop108:
|
|
lda #$00 ; CPU:$CCC0 PRG:4CC0 A9 00
|
|
sta Zp54 ; CPU:$CCC2 PRG:4CC2 85 54
|
|
lda #$1B ; CPU:$CCC4 PRG:4CC4 A9 1B
|
|
jsr Sub_ED70 ; CPU:$CCC6 PRG:4CC6 20 70 ED
|
|
ldx #$25 ; CPU:$CCC9 PRG:4CC9 A2 25
|
|
lda #$FB ; CPU:$CCCB PRG:4CCB A9 FB
|
|
jmp QueueVramWritePointer ; CPU:$CCCD PRG:4CCD 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCCCD0
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: increments Zp55; loads A from Zp55; compares
|
|
; A with $1E; branches on carry clear to NmiHandler_Loop109;
|
|
; decrements Zp54.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCCCD0:
|
|
inc Zp55 ; CPU:$CCD0 PRG:4CD0 E6 55
|
|
lda Zp55 ; CPU:$CCD2 PRG:4CD2 A5 55
|
|
cmp #$1E ; CPU:$CCD4 PRG:4CD4 C9 1E
|
|
bcc NmiHandler_Loop109 ; CPU:$CCD6 PRG:4CD6 90 02
|
|
dec Zp54 ; CPU:$CCD8 PRG:4CD8 C6 54
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop109
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A from Zp59; sets the carry flag;
|
|
; subtracts $06 from A; branches on non-negative to
|
|
; NmiHandler_Loop110; loads A with $0C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, Zp59, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop109:
|
|
lda Zp59 ; CPU:$CCDA PRG:4CDA A5 59
|
|
sec ; CPU:$CCDC PRG:4CDC 38
|
|
sbc #$06 ; CPU:$CCDD PRG:4CDD E9 06
|
|
bpl NmiHandler_Loop110 ; CPU:$CCDF PRG:4CDF 10 02
|
|
lda #$0C ; CPU:$CCE1 PRG:4CE1 A9 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop110
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 7 instructions: stores A to Zp59; clears the carry flag;
|
|
; adds $25 to A; copies A into X; loads A with $00; adds $FB to A;
|
|
; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp4E, Zp4F, Zp59, $0100, PPUADDR,
|
|
; PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop110:
|
|
sta Zp59 ; CPU:$CCE3 PRG:4CE3 85 59
|
|
clc ; CPU:$CCE5 PRG:4CE5 18
|
|
adc #$25 ; CPU:$CCE6 PRG:4CE6 69 25
|
|
tax ; CPU:$CCE8 PRG:4CE8 AA
|
|
lda #$00 ; CPU:$CCE9 PRG:4CE9 A9 00
|
|
adc #$FB ; CPU:$CCEB PRG:4CEB 69 FB
|
|
jmp QueueVramWritePointer ; CPU:$CCED PRG:4CED 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CCF0
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 24 instructions: loads A from Zp56; shifts a left; shifts a
|
|
; left; shifts a left; adds $37 to A; stores A to StarFieldPtrLo; and
|
|
; 18 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CCF0:
|
|
lda Zp56 ; CPU:$CCF0 PRG:4CF0 A5 56
|
|
asl a ; CPU:$CCF2 PRG:4CF2 0A
|
|
asl a ; CPU:$CCF3 PRG:4CF3 0A
|
|
asl a ; CPU:$CCF4 PRG:4CF4 0A
|
|
adc #$37 ; CPU:$CCF5 PRG:4CF5 69 37
|
|
sta StarFieldPtrLo ; CPU:$CCF7 PRG:4CF7 85 00
|
|
lda #$FB ; CPU:$CCF9 PRG:4CF9 A9 FB
|
|
adc #$00 ; CPU:$CCFB PRG:4CFB 69 00
|
|
sta StarFieldPtrHi ; CPU:$CCFD PRG:4CFD 85 01
|
|
ldy #$00 ; CPU:$CCFF PRG:4CFF A0 00
|
|
lda Zp57 ; CPU:$CD01 PRG:4D01 A5 57
|
|
clc ; CPU:$CD03 PRG:4D03 18
|
|
adc (StarFieldPtrLo),y ; CPU:$CD04 PRG:4D04 71 00
|
|
sta PpuAddrLow ; CPU:$CD06 PRG:4D06 85 04
|
|
iny ; CPU:$CD08 PRG:4D08 C8
|
|
lda (StarFieldPtrLo),y ; CPU:$CD09 PRG:4D09 B1 00
|
|
adc #$00 ; CPU:$CD0B PRG:4D0B 69 00
|
|
sta PpuAddrHigh ; CPU:$CD0D PRG:4D0D 85 05
|
|
clc ; CPU:$CD0F PRG:4D0F 18
|
|
lda StarFieldPtrLo ; CPU:$CD10 PRG:4D10 A5 00
|
|
adc #$02 ; CPU:$CD12 PRG:4D12 69 02
|
|
sta StarFieldPtrLo ; CPU:$CD14 PRG:4D14 85 00
|
|
bcc NmiHandler_Loop111 ; CPU:$CD16 PRG:4D16 90 02
|
|
inc StarFieldPtrHi ; CPU:$CD18 PRG:4D18 E6 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop111
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $06; stores A to Zp02; returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp02.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop111:
|
|
lda #$06 ; CPU:$CD1A PRG:4D1A A9 06
|
|
sta Zp02 ; CPU:$CD1C PRG:4D1C 85 02
|
|
rts ; CPU:$CD1E PRG:4D1E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CD1F
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A with $E0; stores A to
|
|
; StarFieldPtrLo; loads A with $00; stores A to StarFieldPtrHi; loads
|
|
; A with $00; loads Y with $17.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CD1F:
|
|
lda #$E0 ; CPU:$CD1F PRG:4D1F A9 E0
|
|
sta StarFieldPtrLo ; CPU:$CD21 PRG:4D21 85 00
|
|
lda #$00 ; CPU:$CD23 PRG:4D23 A9 00
|
|
sta StarFieldPtrHi ; CPU:$CD25 PRG:4D25 85 01
|
|
lda #$00 ; CPU:$CD27 PRG:4D27 A9 00
|
|
ldy #$17 ; CPU:$CD29 PRG:4D29 A0 17
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative13
|
|
; Global: Clears the two object buffers and the sprite counters.
|
|
; Local: Executes 3 instructions: stores A to ((StarFieldPtrLo),y); decrements
|
|
; Y; branches on non-negative to NmiHandler_OnNonnegative13.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative13:
|
|
sta (StarFieldPtrLo),y ; CPU:$CD2B PRG:4D2B 91 00
|
|
dey ; CPU:$CD2D PRG:4D2D 88
|
|
bpl NmiHandler_OnNonnegative13 ; CPU:$CD2E PRG:4D2E 10 FB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ClearObjectBuffers
|
|
; Global: The routine calls Sub_CD3A and SwapObjectBuffers.
|
|
; Local: Executes 4 instructions: loads A with $00; stores A to Zp54; calls
|
|
; Sub_CD3A; calls SwapObjectBuffers.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ClearObjectBuffers:
|
|
lda #$00 ; CPU:$CD30 PRG:4D30 A9 00
|
|
sta Zp54 ; CPU:$CD32 PRG:4D32 85 54
|
|
jsr Sub_CD3A ; CPU:$CD34 PRG:4D34 20 3A CD
|
|
jsr SwapObjectBuffers ; CPU:$CD37 PRG:4D37 20 CD C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CD3A
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X with $C0; loads A with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CD3A:
|
|
ldx #$C0 ; CPU:$CD3A PRG:4D3A A2 C0
|
|
lda #$00 ; CPU:$CD3C PRG:4D3C A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero25
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: decrements X; stores A to $0400,x; branches
|
|
; on not equal to NmiHandler_OnNonzero25; loads X with $10.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero25:
|
|
dex ; CPU:$CD3E PRG:4D3E CA
|
|
sta $0400,x ; CPU:$CD3F PRG:4D3F 9D 00 04
|
|
bne NmiHandler_OnNonzero25 ; CPU:$CD42 PRG:4D42 D0 FA
|
|
ldx #$10 ; CPU:$CD44 PRG:4D44 A2 10
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero26
|
|
; Global: Resets the stage's counters and the number of bonus flags the stage is worth.
|
|
; Local: Executes 14 instructions: decrements X; stores A to Zp70,x; branches
|
|
; on not equal to NmiHandler_OnNonzero26; loads A with $03; stores A
|
|
; to $0488; stores A to $0487; and 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0488, $0487 and $0485 changed.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero26:
|
|
dex ; CPU:$CD46 PRG:4D46 CA
|
|
sta Zp70,x ; CPU:$CD47 PRG:4D47 95 70
|
|
bne NmiHandler_OnNonzero26 ; CPU:$CD49 PRG:4D49 D0 FB
|
|
lda #$03 ; CPU:$CD4B PRG:4D4B A9 03
|
|
sta $0488 ; CPU:$CD4D PRG:4D4D 8D 88 04
|
|
sta $0487 ; CPU:$CD50 PRG:4D50 8D 87 04
|
|
sta $0485 ; CPU:$CD53 PRG:4D53 8D 85 04
|
|
lda #$FF ; CPU:$CD56 PRG:4D56 A9 FF
|
|
sta $0472 ; CPU:$CD58 PRG:4D58 8D 72 04
|
|
lda #$01 ; CPU:$CD5B PRG:4D5B A9 01
|
|
sta Zp7F ; CPU:$CD5D PRG:4D5D 85 7F
|
|
lda #$80 ; CPU:$CD5F PRG:4D5F A9 80
|
|
sta $0210 ; CPU:$CD61 PRG:4D61 8D 10 02
|
|
rts ; CPU:$CD64 PRG:4D64 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetStageState
|
|
; Global: The routine calls Sub_CD9C and AdvancePlayerSpawnCount, writes $0473, $0474, $048A,
|
|
; $048B and 1 more.
|
|
; Local: Executes 12 instructions: calls Sub_CD9C; loads A with $00; stores A
|
|
; to $0473; stores A to $0474; calls AdvancePlayerSpawnCount; loads A with $A5; and
|
|
; 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0473, $0474 and $048A changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetStageState:
|
|
jsr Sub_CD9C ; CPU:$CD65 PRG:4D65 20 9C CD
|
|
lda #$00 ; CPU:$CD68 PRG:4D68 A9 00
|
|
sta $0473 ; CPU:$CD6A PRG:4D6A 8D 73 04
|
|
sta $0474 ; CPU:$CD6D PRG:4D6D 8D 74 04
|
|
jsr AdvancePlayerSpawnCount ; CPU:$CD70 PRG:4D70 20 D7 E8
|
|
lda #$A5 ; CPU:$CD73 PRG:4D73 A9 A5
|
|
sta $048A ; CPU:$CD75 PRG:4D75 8D 8A 04
|
|
sta $048B ; CPU:$CD78 PRG:4D78 8D 8B 04
|
|
lda #$0F ; CPU:$CD7B PRG:4D7B A9 0F
|
|
sta $049F ; CPU:$CD7D PRG:4D7D 8D 9F 04
|
|
ldx #$04 ; CPU:$CD80 PRG:4D80 A2 04
|
|
lda #$00 ; CPU:$CD82 PRG:4D82 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative14
|
|
; Global: The routine calls QueueVramWritePointer and Sub_D81A.
|
|
; Local: Executes 8 instructions: stores A to $0496,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative14; loads X with $6F;
|
|
; loads A with $FB; calls QueueVramWritePointer; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative14:
|
|
sta $0496,x ; CPU:$CD84 PRG:4D84 9D 96 04
|
|
dex ; CPU:$CD87 PRG:4D87 CA
|
|
bpl NmiHandler_OnNonnegative14 ; CPU:$CD88 PRG:4D88 10 FA
|
|
ldx #$6F ; CPU:$CD8A PRG:4D8A A2 6F
|
|
lda #$FB ; CPU:$CD8C PRG:4D8C A9 FB
|
|
jsr QueueVramWritePointer ; CPU:$CD8E PRG:4D8E 20 17 C1
|
|
jsr Sub_D81A ; CPU:$CD91 PRG:4D91 20 1A D8
|
|
rts ; CPU:$CD94 PRG:4D94 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CD95
|
|
; Global: The routine calls Sub_CD9C and Sub_D7C7.
|
|
; Local: Executes 3 instructions: calls Sub_CD9C; calls Sub_D7C7; returns with
|
|
; RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CD95:
|
|
jsr Sub_CD9C ; CPU:$CD95 PRG:4D95 20 9C CD
|
|
jsr Sub_D7C7 ; CPU:$CD98 PRG:4D98 20 C7 D7
|
|
rts ; CPU:$CD9B PRG:4D9B 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CD9C
|
|
; Global: The routine calls Sub_C3A1, reads $0483.
|
|
; Local: Executes 11 instructions: loads A with $80; stores A to
|
|
; StarFieldPtrLo; loads A with $04; stores A to StarFieldPtrHi; loads
|
|
; A with $03; stores A to Zp02; and 5 more instructions.
|
|
; Parameters: Reads $0483 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, $0483.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CD9C:
|
|
lda #$80 ; CPU:$CD9C PRG:4D9C A9 80
|
|
sta StarFieldPtrLo ; CPU:$CD9E PRG:4D9E 85 00
|
|
lda #$04 ; CPU:$CDA0 PRG:4DA0 A9 04
|
|
sta StarFieldPtrHi ; CPU:$CDA2 PRG:4DA2 85 01
|
|
lda #$03 ; CPU:$CDA4 PRG:4DA4 A9 03
|
|
sta Zp02 ; CPU:$CDA6 PRG:4DA6 85 02
|
|
jsr Sub_C3A1 ; CPU:$CDA8 PRG:4DA8 20 A1 C3
|
|
ldx $0483 ; CPU:$CDAB PRG:4DAB AE 83 04
|
|
inx ; CPU:$CDAE PRG:4DAE E8
|
|
bne NmiHandler_Loop112 ; CPU:$CDAF PRG:4DAF D0 02
|
|
ldx #$FC ; CPU:$CDB1 PRG:4DB1 A2 FC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop112
|
|
; Global: Starts the attract mode: it clears the screen and runs the attract loop.
|
|
; Local: Executes 2 instructions: stores X to $0483; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0483 changed.
|
|
; Clobbers:
|
|
; no register, $0483.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop112:
|
|
stx $0483 ; CPU:$CDB3 PRG:4DB3 8E 83 04
|
|
rts ; CPU:$CDB6 PRG:4DB6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: StartAttractMode
|
|
; Global: The routine calls SetupAttractScreen and Sub_Loop.
|
|
; Local: Executes 5 instructions: loads X with $00; stores X to Zp43; stores X
|
|
; to Zp62; calls SetupAttractScreen; calls Sub_Loop.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
StartAttractMode:
|
|
ldx #$00 ; CPU:$CDB7 PRG:4DB7 A2 00
|
|
stx Zp43 ; CPU:$CDB9 PRG:4DB9 86 43
|
|
stx Zp62 ; CPU:$CDBB PRG:4DBB 86 62
|
|
jsr SetupAttractScreen ; CPU:$CDBD PRG:4DBD 20 00 BE
|
|
jsr Sub_Loop ; CPU:$CDC0 PRG:4DC0 20 52 BE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear3
|
|
; Global: The routine calls PrepareQueueStackExchange.
|
|
; Local: Executes 9 instructions: calls PrepareQueueStackExchange; loads A from Zp46; ANDs A
|
|
; with $30; branches on not equal to NmiHandler_OnNonzero27;
|
|
; increments Zp43; loads A from Zp43; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear3:
|
|
jsr PrepareQueueStackExchange ; CPU:$CDC3 PRG:4DC3 20 F1 C0
|
|
lda Zp46 ; CPU:$CDC6 PRG:4DC6 A5 46
|
|
and #$30 ; CPU:$CDC8 PRG:4DC8 29 30
|
|
bne NmiHandler_OnNonzero27 ; CPU:$CDCA PRG:4DCA D0 0A
|
|
inc Zp43 ; CPU:$CDCC PRG:4DCC E6 43
|
|
lda Zp43 ; CPU:$CDCE PRG:4DCE A5 43
|
|
cmp #$E0 ; CPU:$CDD0 PRG:4DD0 C9 E0
|
|
bcc NmiHandler_OnCarryClear3 ; CPU:$CDD2 PRG:4DD2 90 EF
|
|
bcs NmiHandler_Loop113 ; CPU:$CDD4 PRG:4DD4 B0 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero27
|
|
; Global: The routine calls SetupAttractScreen and Sub_Loop.
|
|
; Local: Executes 4 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero27:
|
|
lda #$E0 ; CPU:$CDD6 PRG:4DD6 A9 E0
|
|
sta Zp43 ; CPU:$CDD8 PRG:4DD8 85 43
|
|
jsr SetupAttractScreen ; CPU:$CDDA PRG:4DDA 20 00 BE
|
|
jsr Sub_Loop ; CPU:$CDDD PRG:4DDD 20 52 BE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop113
|
|
; Global: The routine calls SetupAttractScreen and Sub_Loop.
|
|
; Local: Executes 7 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and 1
|
|
; more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop113:
|
|
lda #$00 ; CPU:$CDE0 PRG:4DE0 A9 00
|
|
sta Zp48 ; CPU:$CDE2 PRG:4DE2 85 48
|
|
sta Zp49 ; CPU:$CDE4 PRG:4DE4 85 49
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear4
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange and QueueAttractScreenRecord.
|
|
; Local: Executes 19 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 13 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear4:
|
|
jsr PrepareQueueStackExchange ; CPU:$CDE6 PRG:4DE6 20 F1 C0
|
|
jsr QueueAttractScreenRecord ; CPU:$CDE9 PRG:4DE9 20 33 BE
|
|
lda Zp46 ; CPU:$CDEC PRG:4DEC A5 46
|
|
and #$20 ; CPU:$CDEE PRG:4DEE 29 20
|
|
beq NmiHandler_Loop114 ; CPU:$CDF0 PRG:4DF0 F0 0E
|
|
lda ZpDF ; CPU:$CDF2 PRG:4DF2 A5 DF
|
|
eor #$03 ; CPU:$CDF4 PRG:4DF4 49 03
|
|
sta ZpDF ; CPU:$CDF6 PRG:4DF6 85 DF
|
|
lda Zp49 ; CPU:$CDF8 PRG:4DF8 A5 49
|
|
cmp #$02 ; CPU:$CDFA PRG:4DFA C9 02
|
|
bcc NmiHandler_Loop114 ; CPU:$CDFC PRG:4DFC 90 02
|
|
dec Zp49 ; CPU:$CDFE PRG:4DFE C6 49
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop114
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange, QueueAttractScreenRecord and 4 more.
|
|
; Local: Executes 33 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 27 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop114:
|
|
jsr Sub_CE4F ; CPU:$CE00 PRG:4E00 20 4F CE
|
|
lda Zp46 ; CPU:$CE03 PRG:4E03 A5 46
|
|
and #$10 ; CPU:$CE05 PRG:4E05 29 10
|
|
bne NmiHandler_Loop118 ; CPU:$CE07 PRG:4E07 D0 66
|
|
lda Zp49 ; CPU:$CE09 PRG:4E09 A5 49
|
|
cmp #$03 ; CPU:$CE0B PRG:4E0B C9 03
|
|
bcc NmiHandler_OnCarryClear4 ; CPU:$CE0D PRG:4E0D 90 D7
|
|
lda #$78 ; CPU:$CE0F PRG:4E0F A9 78
|
|
sta ZpC8 ; CPU:$CE11 PRG:4E11 85 C8
|
|
lda #$01 ; CPU:$CE13 PRG:4E13 A9 01
|
|
sta Zp61 ; CPU:$CE15 PRG:4E15 85 61
|
|
jsr ClearObjectBuffers ; CPU:$CE17 PRG:4E17 20 30 CD
|
|
jsr ResetGameScreen ; CPU:$CE1A PRG:4E1A 20 9C D2
|
|
jsr ResetStageState ; CPU:$CE1D PRG:4E1D 20 65 CD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative15
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange, QueueAttractScreenRecord and 5 more.
|
|
; Local: Executes 34 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 28 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative15:
|
|
jsr ResetPlayerShipToStart ; CPU:$CE20 PRG:4E20 20 16 D0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero28
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange, QueueAttractScreenRecord and 7 more,
|
|
; reads $0494.
|
|
; Local: Executes 44 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 38 more instructions.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero28:
|
|
jsr PrepareQueueStackExchange ; CPU:$CE23 PRG:4E23 20 F1 C0
|
|
lda Zp46 ; CPU:$CE26 PRG:4E26 A5 46
|
|
and #$30 ; CPU:$CE28 PRG:4E28 29 30
|
|
bne NmiHandler_OnNonzero27 ; CPU:$CE2A PRG:4E2A D0 AA
|
|
jsr CallEnemyPathHandler ; CPU:$CE2C PRG:4E2C 20 74 D8
|
|
jsr UpdateAllGameObjects ; CPU:$CE2F PRG:4E2F 20 38 D2
|
|
ldx Zp7B ; CPU:$CE32 PRG:4E32 A6 7B
|
|
bne NmiHandler_Loop115 ; CPU:$CE34 PRG:4E34 D0 0C
|
|
lda $0494 ; CPU:$CE36 PRG:4E36 AD 94 04
|
|
bne NmiHandler_OnNonzero28 ; CPU:$CE39 PRG:4E39 D0 E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero3
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange, QueueAttractScreenRecord and 8 more,
|
|
; reads $0494.
|
|
; Local: Executes 47 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 41 more instructions.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero3:
|
|
dec ZpC8 ; CPU:$CE3B PRG:4E3B C6 C8
|
|
bne NmiHandler_OnNonzero28 ; CPU:$CE3D PRG:4E3D D0 E4
|
|
jmp StartAttractMode ; CPU:$CE3F PRG:4E3F 4C B7 CD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop115
|
|
; Global: The routine calls SetupAttractScreen, Sub_Loop, PrepareQueueStackExchange, QueueAttractScreenRecord and 8 more,
|
|
; reads $0494 and $0487.
|
|
; Local: Executes 54 instructions: loads A with $E0; stores A to Zp43; calls
|
|
; SetupAttractScreen; calls Sub_Loop; loads A with $00; stores A to Zp48; and
|
|
; 48 more instructions.
|
|
; Parameters: Reads $0494 and $0487 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop115:
|
|
lda Zp79 ; CPU:$CE42 PRG:4E42 A5 79
|
|
beq NmiHandler_OnZero3 ; CPU:$CE44 PRG:4E44 F0 F5
|
|
ldx $0487 ; CPU:$CE46 PRG:4E46 AE 87 04
|
|
dex ; CPU:$CE49 PRG:4E49 CA
|
|
dex ; CPU:$CE4A PRG:4E4A CA
|
|
bmi NmiHandler_OnZero3 ; CPU:$CE4B PRG:4E4B 30 EE
|
|
bpl NmiHandler_OnNonnegative15 ; CPU:$CE4D PRG:4E4D 10 D1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CE4F
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 9 instructions: loads X from ZpDF; decrements X; branches on
|
|
; not equal to NmiHandler_Loop116; loads X with $44; loads A with
|
|
; $F8; calls QueueVramWritePointer; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CE4F:
|
|
ldx ZpDF ; CPU:$CE4F PRG:4E4F A6 DF
|
|
dex ; CPU:$CE51 PRG:4E51 CA
|
|
bne NmiHandler_Loop116 ; CPU:$CE52 PRG:4E52 D0 0D
|
|
ldx #$44 ; CPU:$CE54 PRG:4E54 A2 44
|
|
lda #$F8 ; CPU:$CE56 PRG:4E56 A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$CE58 PRG:4E58 20 17 C1
|
|
ldx #$48 ; CPU:$CE5B PRG:4E5B A2 48
|
|
lda #$F8 ; CPU:$CE5D PRG:4E5D A9 F8
|
|
bne NmiHandler_Loop117 ; CPU:$CE5F PRG:4E5F D0 0B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop116
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 5 instructions: loads X with $48; loads A with $F8; calls
|
|
; QueueVramWritePointer; loads X with $44; loads A with $F8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop116:
|
|
ldx #$48 ; CPU:$CE61 PRG:4E61 A2 48
|
|
lda #$F8 ; CPU:$CE63 PRG:4E63 A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$CE65 PRG:4E65 20 17 C1
|
|
ldx #$44 ; CPU:$CE68 PRG:4E68 A2 44
|
|
lda #$F8 ; CPU:$CE6A PRG:4E6A A9 F8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop117
|
|
; Global: The routine calls ParseVramWriteRecord.
|
|
; Local: Executes 1 instruction: calls ParseVramWriteRecord.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop117:
|
|
jmp ParseVramWriteRecord ; CPU:$CE6C PRG:4E6C 4C 2D C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop118
|
|
; Global: The routine calls ClearSoundEffectState, Sub_CD1F and Sub_CE8B.
|
|
; Local: Executes 8 instructions: loads A from ZpDF; stores A to ZpDE; loads A
|
|
; with $01; stores A to Zp61; stores A to Zp62; calls ClearSoundEffectState; and 2
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop118:
|
|
lda ZpDF ; CPU:$CE6F PRG:4E6F A5 DF
|
|
sta ZpDE ; CPU:$CE71 PRG:4E71 85 DE
|
|
lda #$01 ; CPU:$CE73 PRG:4E73 A9 01
|
|
sta Zp61 ; CPU:$CE75 PRG:4E75 85 61
|
|
sta Zp62 ; CPU:$CE77 PRG:4E77 85 62
|
|
jsr ClearSoundEffectState ; CPU:$CE79 PRG:4E79 20 E4 EA
|
|
jsr Sub_CD1F ; CPU:$CE7C PRG:4E7C 20 1F CD
|
|
jmp Sub_CE8B ; CPU:$CE7F PRG:4E7F 4C 8B CE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero29
|
|
; Global: The routine calls PrepareQueueStackExchange, CallEnemyPathHandler and UpdateAllGameObjects.
|
|
; Local: Executes 3 instructions: calls PrepareQueueStackExchange; calls CallEnemyPathHandler; calls
|
|
; UpdateAllGameObjects.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero29:
|
|
jsr PrepareQueueStackExchange ; CPU:$CE82 PRG:4E82 20 F1 C0
|
|
jsr CallEnemyPathHandler ; CPU:$CE85 PRG:4E85 20 74 D8
|
|
jsr UpdateAllGameObjects ; CPU:$CE88 PRG:4E88 20 38 D2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CE8B
|
|
; Global: The routine calls PrepareQueueStackExchange, CallEnemyPathHandler, UpdateAllGameObjects and RestartStage.
|
|
; Local: Executes 6 instructions: calls PrepareQueueStackExchange; calls CallEnemyPathHandler; calls
|
|
; UpdateAllGameObjects; loads A from Zp7F; branches on equal to
|
|
; NmiHandler_Loop119; calls RestartStage.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CE8B:
|
|
lda Zp7F ; CPU:$CE8B PRG:4E8B A5 7F
|
|
beq NmiHandler_Loop119 ; CPU:$CE8D PRG:4E8D F0 03
|
|
jsr RestartStage ; CPU:$CE8F PRG:4E8F 20 A1 CE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop119
|
|
; Global: The routine calls PrepareQueueStackExchange, CallEnemyPathHandler, UpdateAllGameObjects, RestartStage and 1 more,
|
|
; reads $0494.
|
|
; Local: Executes 11 instructions: calls PrepareQueueStackExchange; calls CallEnemyPathHandler; calls
|
|
; UpdateAllGameObjects; loads A from Zp7F; branches on equal to
|
|
; NmiHandler_Loop119; calls RestartStage; and 5 more instructions.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop119:
|
|
ldx Zp7B ; CPU:$CE92 PRG:4E92 A6 7B
|
|
bne NmiHandler_Loop121 ; CPU:$CE94 PRG:4E94 D0 4A
|
|
lda $0494 ; CPU:$CE96 PRG:4E96 AD 94 04
|
|
bne NmiHandler_Loop120 ; CPU:$CE99 PRG:4E99 D0 03
|
|
jsr Sub_D033 ; CPU:$CE9B PRG:4E9B 20 33 D0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop120
|
|
; Global: Starts the stage again from the beginning.
|
|
; Local: Executes 1 instruction: calls NmiHandler_OnNonzero29.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop120:
|
|
jmp NmiHandler_OnNonzero29 ; CPU:$CE9E PRG:4E9E 4C 82 CE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: RestartStage
|
|
; Global: The routine calls ResetGameScreen, QueueVramWritePointer and Sub_D274, writes $0583,
|
|
; $0584, $0585 and $0471.
|
|
; Local: Executes 13 instructions: loads A with $00; stores A to Zp7F; calls
|
|
; ResetGameScreen; loads A with $01; stores A to $0583; stores A to $0584;
|
|
; and 7 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0583, $0584 and $0585 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
RestartStage:
|
|
lda #$00 ; CPU:$CEA1 PRG:4EA1 A9 00
|
|
sta Zp7F ; CPU:$CEA3 PRG:4EA3 85 7F
|
|
jsr ResetGameScreen ; CPU:$CEA5 PRG:4EA5 20 9C D2
|
|
lda #$01 ; CPU:$CEA8 PRG:4EA8 A9 01
|
|
sta $0583 ; CPU:$CEAA PRG:4EAA 8D 83 05
|
|
sta $0584 ; CPU:$CEAD PRG:4EAD 8D 84 05
|
|
sta $0585 ; CPU:$CEB0 PRG:4EB0 8D 85 05
|
|
lda #$00 ; CPU:$CEB3 PRG:4EB3 A9 00
|
|
sta $0471 ; CPU:$CEB5 PRG:4EB5 8D 71 04
|
|
ldx #$72 ; CPU:$CEB8 PRG:4EB8 A2 72
|
|
lda #$F8 ; CPU:$CEBA PRG:4EBA A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$CEBC PRG:4EBC 20 17 C1
|
|
jsr Sub_D274 ; CPU:$CEBF PRG:4EBF 20 74 D2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero30
|
|
; Global: The routine calls PrepareQueueStackExchange, ParseVramWriteRecord, SetHudCounterAddress, Sub_D033 and 2 more,
|
|
; reads $0583.
|
|
; Local: Executes 12 instructions: calls PrepareQueueStackExchange; loads A from $0583;
|
|
; branches on not equal to NmiHandler_OnNonzero30; loads X with $72;
|
|
; loads A with $F8; calls ParseVramWriteRecord; and 6 more instructions.
|
|
; Parameters: Reads $0583 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero30:
|
|
jsr PrepareQueueStackExchange ; CPU:$CEC2 PRG:4EC2 20 F1 C0
|
|
lda $0583 ; CPU:$CEC5 PRG:4EC5 AD 83 05
|
|
bne NmiHandler_OnNonzero30 ; CPU:$CEC8 PRG:4EC8 D0 F8
|
|
ldx #$72 ; CPU:$CECA PRG:4ECA A2 72
|
|
lda #$F8 ; CPU:$CECC PRG:4ECC A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$CECE PRG:4ECE 20 2D C1
|
|
jsr SetHudCounterAddress ; CPU:$CED1 PRG:4ED1 20 93 D2
|
|
jsr Sub_D033 ; CPU:$CED4 PRG:4ED4 20 33 D0
|
|
jsr Sub_CFFD ; CPU:$CED7 PRG:4ED7 20 FD CF
|
|
lda #$3C ; CPU:$CEDA PRG:4EDA A9 3C
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$CEDC PRG:4EDC 20 2A D2
|
|
rts ; CPU:$CEDF PRG:4EDF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop121
|
|
; Global: The routine calls PrepareQueueStackExchange, CallEnemyPathHandler, UpdateAllGameObjects, RestartStage and 2 more,
|
|
; reads $0494, $0477 and $0495.
|
|
; Local: Executes 25 instructions: calls PrepareQueueStackExchange; calls CallEnemyPathHandler; calls
|
|
; UpdateAllGameObjects; loads A from Zp7F; branches on equal to
|
|
; NmiHandler_Loop119; calls RestartStage; and 19 more instructions.
|
|
; Parameters: Reads $0494, $0477 and $0495 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop121:
|
|
lda $0477 ; CPU:$CEE0 PRG:4EE0 AD 77 04
|
|
ora $0495 ; CPU:$CEE3 PRG:4EE3 0D 95 04
|
|
ora Zp54 ; CPU:$CEE6 PRG:4EE6 05 54
|
|
bne NmiHandler_OnNonzero29 ; CPU:$CEE8 PRG:4EE8 D0 98
|
|
lda Zp7C ; CPU:$CEEA PRG:4EEA A5 7C
|
|
cmp #$02 ; CPU:$CEEC PRG:4EEC C9 02
|
|
beq NmiHandler_OnNonzero29 ; CPU:$CEEE PRG:4EEE F0 92
|
|
lda Zp79 ; CPU:$CEF0 PRG:4EF0 A5 79
|
|
beq NmiHandler_Loop122 ; CPU:$CEF2 PRG:4EF2 F0 08
|
|
cmp #$04 ; CPU:$CEF4 PRG:4EF4 C9 04
|
|
beq NmiHandler_Loop122 ; CPU:$CEF6 PRG:4EF6 F0 04
|
|
cmp #$07 ; CPU:$CEF8 PRG:4EF8 C9 07
|
|
bne NmiHandler_OnNonzero29 ; CPU:$CEFA PRG:4EFA D0 86
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop122
|
|
; Global: The routine calls NmiHandler_OnNonzero38, reads $0487.
|
|
; Local: Executes 7 instructions: loads A with $3C; calls
|
|
; NmiHandler_OnNonzero38; loads X from ZpDE; decrements X; branches
|
|
; on not equal to NmiHandler_Loop124; loads A from $0487; and 1 more
|
|
; instruction.
|
|
; Parameters: Reads $0487 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop122:
|
|
lda #$3C ; CPU:$CEFC PRG:4EFC A9 3C
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$CEFE PRG:4EFE 20 2A D2
|
|
ldx ZpDE ; CPU:$CF01 PRG:4F01 A6 DE
|
|
dex ; CPU:$CF03 PRG:4F03 CA
|
|
bne NmiHandler_Loop124 ; CPU:$CF04 PRG:4F04 D0 17
|
|
lda $0487 ; CPU:$CF06 PRG:4F06 AD 87 04
|
|
beq NmiHandler_Loop123 ; CPU:$CF09 PRG:4F09 F0 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero4
|
|
; Global: The routine calls Sub_CFFD.
|
|
; Local: Executes 1 instruction: calls Sub_CFFD.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero4:
|
|
jsr Sub_CFFD ; CPU:$CF0B PRG:4F0B 20 FD CF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero31
|
|
; Global: The routine calls NmiHandler_OnNonzero29.
|
|
; Local: Executes 1 instruction: calls NmiHandler_OnNonzero29.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero31:
|
|
jmp NmiHandler_OnNonzero29 ; CPU:$CF0E PRG:4F0E 4C 82 CE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop123
|
|
; Global: The routine calls StartStageSequence.
|
|
; Local: Executes 1 instruction: calls StartStageSequence.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop123:
|
|
jsr StartStageSequence ; CPU:$CF11 PRG:4F11 20 52 CF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero5
|
|
; Global: The routine calls TurnOffRendering, SetupOamGroupTable and DisablePpuRendering.
|
|
; Local: Executes 3 instructions: calls TurnOffRendering; calls SetupOamGroupTable; calls
|
|
; DisablePpuRendering.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero5:
|
|
jsr TurnOffRendering ; CPU:$CF14 PRG:4F14 20 8A C2
|
|
jsr SetupOamGroupTable ; CPU:$CF17 PRG:4F17 20 A0 C4
|
|
jmp DisablePpuRendering ; CPU:$CF1A PRG:4F1A 4C 02 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop124
|
|
; Global: The routine calls Sub_CFFD, NmiHandler_OnNonzero29, TurnOffRendering,
|
|
; SetupOamGroupTable and 2 more, reads $0487 and $0387.
|
|
; Local: Executes 10 instructions: calls Sub_CFFD; calls
|
|
; NmiHandler_OnNonzero29; calls TurnOffRendering; calls SetupOamGroupTable; calls
|
|
; DisablePpuRendering; loads A from $0487; and 4 more instructions.
|
|
; Parameters: Reads $0487 and $0387 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop124:
|
|
lda $0487 ; CPU:$CF1D PRG:4F1D AD 87 04
|
|
bne NmiHandler_Loop125 ; CPU:$CF20 PRG:4F20 D0 23
|
|
jsr StartStageSequence ; CPU:$CF22 PRG:4F22 20 52 CF
|
|
lda $0387 ; CPU:$CF25 PRG:4F25 AD 87 03
|
|
beq NmiHandler_OnZero5 ; CPU:$CF28 PRG:4F28 F0 EA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero32
|
|
; Global: The routine calls NmiHandler_OnNonzero29, SwapObjectBuffers, ResetGameScreen,
|
|
; Sub_D60E and 1 more, writes $049E.
|
|
; Local: Executes 12 instructions: calls NmiHandler_OnNonzero29; calls
|
|
; SwapObjectBuffers; loads A from Zp61; EORs A with $03; stores A to Zp61;
|
|
; loads A with $FF; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049E changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero32:
|
|
jsr SwapObjectBuffers ; CPU:$CF2A PRG:4F2A 20 CD C3
|
|
lda Zp61 ; CPU:$CF2D PRG:4F2D A5 61
|
|
eor #$03 ; CPU:$CF2F PRG:4F2F 49 03
|
|
sta Zp61 ; CPU:$CF31 PRG:4F31 85 61
|
|
lda #$FF ; CPU:$CF33 PRG:4F33 A9 FF
|
|
sta $049E ; CPU:$CF35 PRG:4F35 8D 9E 04
|
|
lda Zp7F ; CPU:$CF38 PRG:4F38 A5 7F
|
|
bne NmiHandler_OnNonzero31 ; CPU:$CF3A PRG:4F3A D0 D2
|
|
jsr ResetGameScreen ; CPU:$CF3C PRG:4F3C 20 9C D2
|
|
jsr Sub_D60E ; CPU:$CF3F PRG:4F3F 20 0E D6
|
|
jmp NmiHandler_OnZero4 ; CPU:$CF42 PRG:4F42 4C 0B CF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop125
|
|
; Global: Runs the stage-start sequence: it draws the score panel, sets up the enemies and turns rendering on.
|
|
; Local: Executes 20 instructions: calls Sub_CFFD; calls
|
|
; NmiHandler_OnNonzero29; calls SwapObjectBuffers; loads A from Zp61; EORs A
|
|
; with $03; stores A to Zp61; and 14 more instructions.
|
|
; Parameters: Reads $0387 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049E changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop125:
|
|
ldx Zp7B ; CPU:$CF45 PRG:4F45 A6 7B
|
|
dex ; CPU:$CF47 PRG:4F47 CA
|
|
dex ; CPU:$CF48 PRG:4F48 CA
|
|
beq NmiHandler_OnZero4 ; CPU:$CF49 PRG:4F49 F0 C0
|
|
lda $0387 ; CPU:$CF4B PRG:4F4B AD 87 03
|
|
beq NmiHandler_OnZero4 ; CPU:$CF4E PRG:4F4E F0 BB
|
|
bne NmiHandler_OnNonzero32 ; CPU:$CF50 PRG:4F50 D0 D8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: StartStageSequence
|
|
; Global: The routine calls PrepareQueueStackExchange, QueueVramWritePointer, Sub_D274,
|
|
; NmiHandler_OnNonzero38 and 8 more, writes $0471, $0596, $0597 and
|
|
; $0598, reads $045C.
|
|
; Local: Executes 62 instructions: calls PrepareQueueStackExchange; loads X with $56; loads A
|
|
; with $F8; calls QueueVramWritePointer; calls Sub_D274; loads A with $B4; and 56
|
|
; more instructions.
|
|
; Parameters: Reads $045C from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0471, $0596 and $0597 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
StartStageSequence:
|
|
jsr PrepareQueueStackExchange ; CPU:$CF52 PRG:4F52 20 F1 C0
|
|
ldx #$56 ; CPU:$CF55 PRG:4F55 A2 56
|
|
lda #$F8 ; CPU:$CF57 PRG:4F57 A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$CF59 PRG:4F59 20 17 C1
|
|
jsr Sub_D274 ; CPU:$CF5C PRG:4F5C 20 74 D2
|
|
lda #$B4 ; CPU:$CF5F PRG:4F5F A9 B4
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$CF61 PRG:4F61 20 2A D2
|
|
lda $045C ; CPU:$CF64 PRG:4F64 AD 5C 04
|
|
sta $0471 ; CPU:$CF67 PRG:4F67 8D 71 04
|
|
jsr SetupOamGroupTable ; CPU:$CF6A PRG:4F6A 20 A0 C4
|
|
jsr ResetGameScreen ; CPU:$CF6D PRG:4F6D 20 9C D2
|
|
jsr TurnOffRendering ; CPU:$CF70 PRG:4F70 20 8A C2
|
|
lda #$05 ; CPU:$CF73 PRG:4F73 A9 05
|
|
sta StarFieldCount ; CPU:$CF75 PRG:4F75 85 06
|
|
lda #$DE ; CPU:$CF77 PRG:4F77 A9 DE
|
|
sta StarFieldPtrLo ; CPU:$CF79 PRG:4F79 85 00
|
|
lda #$F8 ; CPU:$CF7B PRG:4F7B A9 F8
|
|
sta StarFieldPtrHi ; CPU:$CF7D PRG:4F7D 85 01
|
|
jsr AdvanceVramWriteQueue ; CPU:$CF7F PRG:4F7F 20 91 C1
|
|
lda #$AF ; CPU:$CF82 PRG:4F82 A9 AF
|
|
sta PpuAddrLow ; CPU:$CF84 PRG:4F84 85 04
|
|
lda #$21 ; CPU:$CF86 PRG:4F86 A9 21
|
|
sta PpuAddrHigh ; CPU:$CF88 PRG:4F88 85 05
|
|
ldy #$07 ; CPU:$CF8A PRG:4F8A A0 07
|
|
sty Zp03 ; CPU:$CF8C PRG:4F8C 84 03
|
|
iny ; CPU:$CF8E PRG:4F8E C8
|
|
ldx #$A0 ; CPU:$CF8F PRG:4F8F A2 A0
|
|
lda #$04 ; CPU:$CF91 PRG:4F91 A9 04
|
|
jsr SetVramRecordFlags ; CPU:$CF93 PRG:4F93 20 74 C1
|
|
lda #$0F ; CPU:$CF96 PRG:4F96 A9 0F
|
|
sta PpuAddrLow ; CPU:$CF98 PRG:4F98 85 04
|
|
lda #$22 ; CPU:$CF9A PRG:4F9A A9 22
|
|
sta PpuAddrHigh ; CPU:$CF9C PRG:4F9C 85 05
|
|
ldy #$07 ; CPU:$CF9E PRG:4F9E A0 07
|
|
sty Zp03 ; CPU:$CFA0 PRG:4FA0 84 03
|
|
iny ; CPU:$CFA2 PRG:4FA2 C8
|
|
ldx #$A8 ; CPU:$CFA3 PRG:4FA3 A2 A8
|
|
lda #$04 ; CPU:$CFA5 PRG:4FA5 A9 04
|
|
jsr SetVramRecordFlags ; CPU:$CFA7 PRG:4FA7 20 74 C1
|
|
jsr Sub_C345 ; CPU:$CFAA PRG:4FAA 20 45 C3
|
|
lda Zp23 ; CPU:$CFAD PRG:4FAD A5 23
|
|
sta Zp24 ; CPU:$CFAF PRG:4FAF 85 24
|
|
lda #$28 ; CPU:$CFB1 PRG:4FB1 A9 28
|
|
sta Zp23 ; CPU:$CFB3 PRG:4FB3 85 23
|
|
lda #$25 ; CPU:$CFB5 PRG:4FB5 A9 25
|
|
sta SpriteY ; CPU:$CFB7 PRG:4FB7 85 25
|
|
lda #$72 ; CPU:$CFB9 PRG:4FB9 A9 72
|
|
sta PpuAddrLow ; CPU:$CFBB PRG:4FBB 85 04
|
|
lda #$22 ; CPU:$CFBD PRG:4FBD A9 22
|
|
sta PpuAddrHigh ; CPU:$CFBF PRG:4FBF 85 05
|
|
lda #$02 ; CPU:$CFC1 PRG:4FC1 A9 02
|
|
sta Zp03 ; CPU:$CFC3 PRG:4FC3 85 03
|
|
ldy #$06 ; CPU:$CFC5 PRG:4FC5 A0 06
|
|
ldx #$20 ; CPU:$CFC7 PRG:4FC7 A2 20
|
|
lda #$00 ; CPU:$CFC9 PRG:4FC9 A9 00
|
|
jsr SetVramRecordFlags ; CPU:$CFCB PRG:4FCB 20 74 C1
|
|
jsr QueueStageRecord ; CPU:$CFCE PRG:4FCE 20 57 C9
|
|
jsr TurnOnRendering ; CPU:$CFD1 PRG:4FD1 20 AD C2
|
|
lda #$01 ; CPU:$CFD4 PRG:4FD4 A9 01
|
|
sta $0596 ; CPU:$CFD6 PRG:4FD6 8D 96 05
|
|
sta $0597 ; CPU:$CFD9 PRG:4FD9 8D 97 05
|
|
sta $0598 ; CPU:$CFDC PRG:4FDC 8D 98 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero33
|
|
; Global: The routine calls PrepareQueueStackExchange, reads $0596.
|
|
; Local: Executes 6 instructions: calls PrepareQueueStackExchange; loads A from Zp46; ORs A
|
|
; with Zp47; branches on not equal to NmiHandler_Loop126; loads A
|
|
; from $0596; branches on not equal to NmiHandler_OnNonzero33.
|
|
; Parameters: Reads $0596 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero33:
|
|
jsr PrepareQueueStackExchange ; CPU:$CFDF PRG:4FDF 20 F1 C0
|
|
lda Zp46 ; CPU:$CFE2 PRG:4FE2 A5 46
|
|
ora Zp47 ; CPU:$CFE4 PRG:4FE4 05 47
|
|
bne NmiHandler_Loop126 ; CPU:$CFE6 PRG:4FE6 D0 05
|
|
lda $0596 ; CPU:$CFE8 PRG:4FE8 AD 96 05
|
|
bne NmiHandler_OnNonzero33 ; CPU:$CFEB PRG:4FEB D0 F2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop126
|
|
; Global: The routine calls ClearSoundEffectState, ResetGameScreen, QueueVramWritePointer and TurnOnRendering.
|
|
; Local: Executes 6 instructions: calls ClearSoundEffectState; calls ResetGameScreen; loads X with
|
|
; $57; loads A with $F9; calls QueueVramWritePointer; calls TurnOnRendering.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop126:
|
|
jsr ClearSoundEffectState ; CPU:$CFED PRG:4FED 20 E4 EA
|
|
jsr ResetGameScreen ; CPU:$CFF0 PRG:4FF0 20 9C D2
|
|
ldx #$57 ; CPU:$CFF3 PRG:4FF3 A2 57
|
|
lda #$F9 ; CPU:$CFF5 PRG:4FF5 A9 F9
|
|
jsr QueueVramWritePointer ; CPU:$CFF7 PRG:4FF7 20 17 C1
|
|
jmp TurnOnRendering ; CPU:$CFFA PRG:4FFA 4C AD C2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_CFFD
|
|
; Global: Resets the player ship to the left of the playfield.
|
|
; Local: Executes 10 instructions: loads X with $6A; loads A with $F8; calls
|
|
; QueueVramWritePointer; calls Sub_D274; loads A with $78; calls
|
|
; NmiHandler_OnNonzero38; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_CFFD:
|
|
ldx #$6A ; CPU:$CFFD PRG:4FFD A2 6A
|
|
lda #$F8 ; CPU:$CFFF PRG:4FFF A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D001 PRG:5001 20 17 C1
|
|
jsr Sub_D274 ; CPU:$D004 PRG:5004 20 74 D2
|
|
lda #$78 ; CPU:$D007 PRG:5007 A9 78
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D009 PRG:5009 20 2A D2
|
|
ldx #$6A ; CPU:$D00C PRG:500C A2 6A
|
|
lda #$F8 ; CPU:$D00E PRG:500E A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D010 PRG:5010 20 2D C1
|
|
jsr SetHudCounterAddress ; CPU:$D013 PRG:5013 20 93 D2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetPlayerShipToStart
|
|
; Global: The routine calls Sub_CB8A and Sub_E1D2, writes $0200, $0203 and
|
|
; $0471, reads $045C.
|
|
; Local: Executes 12 instructions: calls Sub_CB8A; loads A with $00; stores A
|
|
; to $0200; loads A with $60; stores A to $0203; calls Sub_E1D2; and
|
|
; 6 more instructions.
|
|
; Parameters: Reads $045C from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0200, $0203 and $0471 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetPlayerShipToStart:
|
|
jsr Sub_CB8A ; CPU:$D016 PRG:5016 20 8A CB
|
|
lda #$00 ; CPU:$D019 PRG:5019 A9 00
|
|
sta $0200 ; CPU:$D01B PRG:501B 8D 00 02
|
|
lda #$60 ; CPU:$D01E PRG:501E A9 60
|
|
sta $0203 ; CPU:$D020 PRG:5020 8D 03 02
|
|
jsr Sub_E1D2 ; CPU:$D023 PRG:5023 20 D2 E1
|
|
lda $045C ; CPU:$D026 PRG:5026 AD 5C 04
|
|
sta $0471 ; CPU:$D029 PRG:5029 8D 71 04
|
|
lda #$00 ; CPU:$D02C PRG:502C A9 00
|
|
sta Zp7A ; CPU:$D02E PRG:502E 85 7A
|
|
sta Zp7B ; CPU:$D030 PRG:5030 85 7B
|
|
rts ; CPU:$D032 PRG:5032 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D033
|
|
; Global: The routine reads $0477.
|
|
; Local: Executes 9 instructions: loads A from $0477; branches on not equal to
|
|
; NmiHandler_Loop127; loads A from Zp79; compares A with $02;
|
|
; branches on carry clear to NmiHandler_Loop128; compares A with $07;
|
|
; and 3 more instructions.
|
|
; Parameters: Reads $0477 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D033:
|
|
lda $0477 ; CPU:$D033 PRG:5033 AD 77 04
|
|
bne NmiHandler_Loop127 ; CPU:$D036 PRG:5036 D0 0E
|
|
lda Zp79 ; CPU:$D038 PRG:5038 A5 79
|
|
cmp #$02 ; CPU:$D03A PRG:503A C9 02
|
|
bcc NmiHandler_Loop128 ; CPU:$D03C PRG:503C 90 09
|
|
cmp #$07 ; CPU:$D03E PRG:503E C9 07
|
|
bne NmiHandler_Loop127 ; CPU:$D040 PRG:5040 D0 04
|
|
lda Zp7C ; CPU:$D042 PRG:5042 A5 7C
|
|
bmi NmiHandler_Loop128 ; CPU:$D044 PRG:5044 30 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop127
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop127:
|
|
rts ; CPU:$D046 PRG:5046 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop128
|
|
; Global: The routine calls NmiHandler_OnNonzero38, PrepareQueueStackExchange, ResetStageState,
|
|
; QueueVramWritePointer and 1 more, reads $0483.
|
|
; Local: Executes 27 instructions: loads A with $3C; calls
|
|
; NmiHandler_OnNonzero38; calls PrepareQueueStackExchange; loads X from $0483;
|
|
; increments X; increments X; and 21 more instructions.
|
|
; Parameters: Reads $0483 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop128:
|
|
lda #$3C ; CPU:$D047 PRG:5047 A9 3C
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D049 PRG:5049 20 2A D2
|
|
jsr PrepareQueueStackExchange ; CPU:$D04C PRG:504C 20 F1 C0
|
|
ldx $0483 ; CPU:$D04F PRG:504F AE 83 04
|
|
inx ; CPU:$D052 PRG:5052 E8
|
|
inx ; CPU:$D053 PRG:5053 E8
|
|
txa ; CPU:$D054 PRG:5054 8A
|
|
and #$03 ; CPU:$D055 PRG:5055 29 03
|
|
beq NmiHandler_Loop129 ; CPU:$D057 PRG:5057 F0 40
|
|
jsr ResetStageState ; CPU:$D059 PRG:5059 20 65 CD
|
|
ldx #$62 ; CPU:$D05C PRG:505C A2 62
|
|
lda #$F8 ; CPU:$D05E PRG:505E A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D060 PRG:5060 20 17 C1
|
|
lda #$AD ; CPU:$D063 PRG:5063 A9 AD
|
|
sta PpuAddrLow ; CPU:$D065 PRG:5065 85 04
|
|
lda #$21 ; CPU:$D067 PRG:5067 A9 21
|
|
sta PpuAddrHigh ; CPU:$D069 PRG:5069 85 05
|
|
ldy #$02 ; CPU:$D06B PRG:506B A0 02
|
|
sty Zp03 ; CPU:$D06D PRG:506D 84 03
|
|
iny ; CPU:$D06F PRG:506F C8
|
|
ldx #$80 ; CPU:$D070 PRG:5070 A2 80
|
|
lda #$04 ; CPU:$D072 PRG:5072 A9 04
|
|
jsr SetVramRecordFlags ; CPU:$D074 PRG:5074 20 74 C1
|
|
lda #$FF ; CPU:$D077 PRG:5077 A9 FF
|
|
sta Zp64 ; CPU:$D079 PRG:5079 85 64
|
|
lda #$5A ; CPU:$D07B PRG:507B A9 5A
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D07D PRG:507D 20 2A D2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero34
|
|
; Global: The routine calls NmiHandler_OnNonzero38 and SetPpuWriteAddress, writes $0471,
|
|
; reads $045C.
|
|
; Local: Executes 11 instructions: loads A with $01; calls
|
|
; NmiHandler_OnNonzero38; loads A from Zp64; branches on not equal to
|
|
; NmiHandler_OnNonzero34; loads Y with $09; loads X with $A7; and 5
|
|
; more instructions.
|
|
; Parameters: Reads $045C from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0471 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero34:
|
|
lda #$01 ; CPU:$D080 PRG:5080 A9 01
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D082 PRG:5082 20 2A D2
|
|
lda Zp64 ; CPU:$D085 PRG:5085 A5 64
|
|
bne NmiHandler_OnNonzero34 ; CPU:$D087 PRG:5087 D0 F7
|
|
ldy #$09 ; CPU:$D089 PRG:5089 A0 09
|
|
ldx #$A7 ; CPU:$D08B PRG:508B A2 A7
|
|
lda #$21 ; CPU:$D08D PRG:508D A9 21
|
|
jsr SetPpuWriteAddress ; CPU:$D08F PRG:508F 20 3E C1
|
|
lda $045C ; CPU:$D092 PRG:5092 AD 5C 04
|
|
sta $0471 ; CPU:$D095 PRG:5095 8D 71 04
|
|
rts ; CPU:$D098 PRG:5098 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop129
|
|
; Global: The routine calls Sub_CD95, QueueVramWritePointer, ClearSoundEffectState and
|
|
; NmiHandler_OnNonzero38, writes $0587, $0588 and $0589.
|
|
; Local: Executes 15 instructions: calls Sub_CD95; loads X with $7A; loads A
|
|
; with $F8; calls QueueVramWritePointer; calls ClearSoundEffectState; loads A with $01; and 9
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0587, $0588 and $0589 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop129:
|
|
jsr Sub_CD95 ; CPU:$D099 PRG:5099 20 95 CD
|
|
ldx #$7A ; CPU:$D09C PRG:509C A2 7A
|
|
lda #$F8 ; CPU:$D09E PRG:509E A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D0A0 PRG:50A0 20 17 C1
|
|
jsr ClearSoundEffectState ; CPU:$D0A3 PRG:50A3 20 E4 EA
|
|
lda #$01 ; CPU:$D0A6 PRG:50A6 A9 01
|
|
sta $0587 ; CPU:$D0A8 PRG:50A8 8D 87 05
|
|
sta $0588 ; CPU:$D0AB PRG:50AB 8D 88 05
|
|
sta $0589 ; CPU:$D0AE PRG:50AE 8D 89 05
|
|
lda #$5A ; CPU:$D0B1 PRG:50B1 A9 5A
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D0B3 PRG:50B3 20 2A D2
|
|
lda #$FF ; CPU:$D0B6 PRG:50B6 A9 FF
|
|
sta Zp64 ; CPU:$D0B8 PRG:50B8 85 64
|
|
lda #$5A ; CPU:$D0BA PRG:50BA A9 5A
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D0BC PRG:50BC 20 2A D2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero35
|
|
; Global: The routine calls PrepareQueueStackExchange, UpdateAllGameObjects and ParseVramWriteRecord.
|
|
; Local: Executes 7 instructions: calls PrepareQueueStackExchange; calls UpdateAllGameObjects; loads A from
|
|
; Zp64; branches on not equal to NmiHandler_OnNonzero35; loads X with
|
|
; $7A; loads A with $F8; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero35:
|
|
jsr PrepareQueueStackExchange ; CPU:$D0BF PRG:50BF 20 F1 C0
|
|
jsr UpdateAllGameObjects ; CPU:$D0C2 PRG:50C2 20 38 D2
|
|
lda Zp64 ; CPU:$D0C5 PRG:50C5 A5 64
|
|
bne NmiHandler_OnNonzero35 ; CPU:$D0C7 PRG:50C7 D0 F6
|
|
ldx #$7A ; CPU:$D0C9 PRG:50C9 A2 7A
|
|
lda #$F8 ; CPU:$D0CB PRG:50CB A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D0CD PRG:50CD 20 2D C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero36
|
|
; Global: The routine calls PrepareQueueStackExchange, CallEnemyPathHandler, UpdateAllGameObjects,
|
|
; NmiHandler_OnNonzero38 and 1 more, writes $058A, $058B and $058C,
|
|
; reads $0494.
|
|
; Local: Executes 21 instructions: calls PrepareQueueStackExchange; calls CallEnemyPathHandler; calls
|
|
; UpdateAllGameObjects; loads A from $0494; branches on not equal to
|
|
; NmiHandler_OnNonzero36; loads A with $3C; and 15 more instructions.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $058A, $058B and $058C
|
|
; changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C, D and V flags, the OAM shadow and the RAM
|
|
; fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero36:
|
|
jsr PrepareQueueStackExchange ; CPU:$D0D0 PRG:50D0 20 F1 C0
|
|
jsr CallEnemyPathHandler ; CPU:$D0D3 PRG:50D3 20 74 D8
|
|
jsr UpdateAllGameObjects ; CPU:$D0D6 PRG:50D6 20 38 D2
|
|
lda $0494 ; CPU:$D0D9 PRG:50D9 AD 94 04
|
|
bne NmiHandler_OnNonzero36 ; CPU:$D0DC PRG:50DC D0 F2
|
|
lda #$3C ; CPU:$D0DE PRG:50DE A9 3C
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D0E0 PRG:50E0 20 2A D2
|
|
lda ZpC4 ; CPU:$D0E3 PRG:50E3 A5 C4
|
|
cmp #$28 ; CPU:$D0E5 PRG:50E5 C9 28
|
|
bne NmiHandler_Loop130 ; CPU:$D0E7 PRG:50E7 D0 1A
|
|
lda #$01 ; CPU:$D0E9 PRG:50E9 A9 01
|
|
sta ZpC6 ; CPU:$D0EB PRG:50EB 85 C6
|
|
lda #$50 ; CPU:$D0ED PRG:50ED A9 50
|
|
sta ZpC7 ; CPU:$D0EF PRG:50EF 85 C7
|
|
lda #$01 ; CPU:$D0F1 PRG:50F1 A9 01
|
|
sta $058A ; CPU:$D0F3 PRG:50F3 8D 8A 05
|
|
sta $058B ; CPU:$D0F6 PRG:50F6 8D 8B 05
|
|
sta $058C ; CPU:$D0F9 PRG:50F9 8D 8C 05
|
|
ldx #$24 ; CPU:$D0FC PRG:50FC A2 24
|
|
lda #$F9 ; CPU:$D0FE PRG:50FE A9 F9
|
|
jmp Sub_D117 ; CPU:$D100 PRG:5100 4C 17 D1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop130
|
|
; Global: The routine writes $0583 and $0586.
|
|
; Local: Executes 9 instructions: loads A with $00; stores A to ZpC6; loads A
|
|
; with $60; stores A to ZpC7; loads A with $01; stores A to $0583;
|
|
; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0583 and $0586 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop130:
|
|
lda #$00 ; CPU:$D103 PRG:5103 A9 00
|
|
sta ZpC6 ; CPU:$D105 PRG:5105 85 C6
|
|
lda #$60 ; CPU:$D107 PRG:5107 A9 60
|
|
sta ZpC7 ; CPU:$D109 PRG:5109 85 C7
|
|
lda #$01 ; CPU:$D10B PRG:510B A9 01
|
|
sta $0583 ; CPU:$D10D PRG:510D 8D 83 05
|
|
sta $0586 ; CPU:$D110 PRG:5110 8D 86 05
|
|
ldx #$35 ; CPU:$D113 PRG:5113 A2 35
|
|
lda #$F9 ; CPU:$D115 PRG:5115 A9 F9
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D117
|
|
; Global: The routine calls QueueVramWritePointer, NmiHandler_OnNonzero38 and SetVramRecordFlags.
|
|
; Local: Executes 19 instructions: calls QueueVramWritePointer; loads X with $9A; loads A
|
|
; with $F8; calls QueueVramWritePointer; loads A from ZpC7; calls
|
|
; NmiHandler_OnNonzero38; and 13 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D117:
|
|
jsr QueueVramWritePointer ; CPU:$D117 PRG:5117 20 17 C1
|
|
ldx #$9A ; CPU:$D11A PRG:511A A2 9A
|
|
lda #$F8 ; CPU:$D11C PRG:511C A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D11E PRG:511E 20 17 C1
|
|
lda ZpC7 ; CPU:$D121 PRG:5121 A5 C7
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D123 PRG:5123 20 2A D2
|
|
lda #$72 ; CPU:$D126 PRG:5126 A9 72
|
|
sta PpuAddrLow ; CPU:$D128 PRG:5128 85 04
|
|
lda #$21 ; CPU:$D12A PRG:512A A9 21
|
|
sta PpuAddrHigh ; CPU:$D12C PRG:512C 85 05
|
|
ldy #$01 ; CPU:$D12E PRG:512E A0 01
|
|
sty Zp03 ; CPU:$D130 PRG:5130 84 03
|
|
iny ; CPU:$D132 PRG:5132 C8
|
|
ldx #$C2 ; CPU:$D133 PRG:5133 A2 C2
|
|
lda #$00 ; CPU:$D135 PRG:5135 A9 00
|
|
jsr SetVramRecordFlags ; CPU:$D137 PRG:5137 20 74 C1
|
|
lda ZpC6 ; CPU:$D13A PRG:513A A5 C6
|
|
beq NmiHandler_Loop131 ; CPU:$D13C PRG:513C F0 3D
|
|
lda #$04 ; CPU:$D13E PRG:513E A9 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarrySet2
|
|
; Global: The routine calls Sub_D163, QueueVramWritePointer and Sub_D18B.
|
|
; Local: Executes 18 instructions: pushes A; calls Sub_D163; pulls A; sets the
|
|
; carry flag; subtracts $01 from A; branches on carry set to
|
|
; NmiHandler_OnCarrySet2; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarrySet2:
|
|
pha ; CPU:$D140 PRG:5140 48
|
|
jsr Sub_D163 ; CPU:$D141 PRG:5141 20 63 D1
|
|
pla ; CPU:$D144 PRG:5144 68
|
|
sec ; CPU:$D145 PRG:5145 38
|
|
sbc #$01 ; CPU:$D146 PRG:5146 E9 01
|
|
bcs NmiHandler_OnCarrySet2 ; CPU:$D148 PRG:5148 B0 F6
|
|
ldx #$B6 ; CPU:$D14A PRG:514A A2 B6
|
|
lda #$F8 ; CPU:$D14C PRG:514C A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D14E PRG:514E 20 17 C1
|
|
ldx #$01 ; CPU:$D151 PRG:5151 A2 01
|
|
stx ZpC1 ; CPU:$D153 PRG:5153 86 C1
|
|
dex ; CPU:$D155 PRG:5155 CA
|
|
stx ZpC2 ; CPU:$D156 PRG:5156 86 C2
|
|
lda #$64 ; CPU:$D158 PRG:5158 A9 64
|
|
sta ZpC4 ; CPU:$D15A PRG:515A 85 C4
|
|
lda #$78 ; CPU:$D15C PRG:515C A9 78
|
|
sta ZpC7 ; CPU:$D15E PRG:515E 85 C7
|
|
jmp Sub_D18B ; CPU:$D160 PRG:5160 4C 8B D1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D163
|
|
; Global: The routine calls NmiHandler_OnNonzero38, ParseVramWriteRecord and QueueVramWritePointer.
|
|
; Local: Executes 10 instructions: loads A with $0A; calls
|
|
; NmiHandler_OnNonzero38; loads X with $8E; loads A with $F8; calls
|
|
; ParseVramWriteRecord; loads A with $0A; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D163:
|
|
lda #$0A ; CPU:$D163 PRG:5163 A9 0A
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D165 PRG:5165 20 2A D2
|
|
ldx #$8E ; CPU:$D168 PRG:5168 A2 8E
|
|
lda #$F8 ; CPU:$D16A PRG:516A A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D16C PRG:516C 20 2D C1
|
|
lda #$0A ; CPU:$D16F PRG:516F A9 0A
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D171 PRG:5171 20 2A D2
|
|
ldx #$8E ; CPU:$D174 PRG:5174 A2 8E
|
|
lda #$F8 ; CPU:$D176 PRG:5176 A9 F8
|
|
jmp QueueVramWritePointer ; CPU:$D178 PRG:5178 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop131
|
|
; Global: The routine calls NmiHandler_OnNonzero38 and QueueVramWritePointer.
|
|
; Local: Executes 7 instructions: loads A from ZpC7; calls
|
|
; NmiHandler_OnNonzero38; loads X with $AE; loads A with $F8; calls
|
|
; QueueVramWritePointer; loads A with $D8; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop131:
|
|
lda ZpC7 ; CPU:$D17B PRG:517B A5 C7
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D17D PRG:517D 20 2A D2
|
|
ldx #$AE ; CPU:$D180 PRG:5180 A2 AE
|
|
lda #$F8 ; CPU:$D182 PRG:5182 A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D184 PRG:5184 20 17 C1
|
|
lda #$D8 ; CPU:$D187 PRG:5187 A9 D8
|
|
sta ZpC7 ; CPU:$D189 PRG:5189 85 C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D18B
|
|
; Global: The routine calls Sub_D210 and NmiHandler_OnNonzero38, writes $05A6.
|
|
; Local: Executes 8 instructions: calls Sub_D210; loads A from ZpC7; calls
|
|
; NmiHandler_OnNonzero38; loads A from ZpC4; branches on equal to
|
|
; NmiHandler_Loop132; loads A from ZpC6; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $05A6 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D18B:
|
|
jsr Sub_D210 ; CPU:$D18B PRG:518B 20 10 D2
|
|
lda ZpC7 ; CPU:$D18E PRG:518E A5 C7
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D190 PRG:5190 20 2A D2
|
|
lda ZpC4 ; CPU:$D193 PRG:5193 A5 C4
|
|
beq NmiHandler_Loop132 ; CPU:$D195 PRG:5195 F0 38
|
|
lda ZpC6 ; CPU:$D197 PRG:5197 A5 C6
|
|
eor #$01 ; CPU:$D199 PRG:5199 49 01
|
|
sta $05A6 ; CPU:$D19B PRG:519B 8D A6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero37
|
|
; Global: The routine calls PrepareQueueStackExchange, Sub_E1D2, UpdatePlayerShot, Sub_D25C and 5 more.
|
|
; Local: Executes 20 instructions: calls PrepareQueueStackExchange; calls Sub_E1D2; calls
|
|
; UpdatePlayerShot; calls Sub_D25C; loads A with $0A; stores A to
|
|
; StarFieldPtrLo; and 14 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero37:
|
|
jsr PrepareQueueStackExchange ; CPU:$D19E PRG:519E 20 F1 C0
|
|
jsr Sub_E1D2 ; CPU:$D1A1 PRG:51A1 20 D2 E1
|
|
jsr UpdatePlayerShot ; CPU:$D1A4 PRG:51A4 20 20 E0
|
|
jsr Sub_D25C ; CPU:$D1A7 PRG:51A7 20 5C D2
|
|
lda #$0A ; CPU:$D1AA PRG:51AA A9 0A
|
|
sta StarFieldPtrLo ; CPU:$D1AC PRG:51AC 85 00
|
|
jsr Sub_C8AB ; CPU:$D1AE PRG:51AE 20 AB C8
|
|
jsr Sub_C9A5 ; CPU:$D1B1 PRG:51B1 20 A5 C9
|
|
lda #$C1 ; CPU:$D1B4 PRG:51B4 A9 C1
|
|
sta StarFieldPtrLo ; CPU:$D1B6 PRG:51B6 85 00
|
|
lda #$00 ; CPU:$D1B8 PRG:51B8 A9 00
|
|
sta StarFieldPtrHi ; CPU:$D1BA PRG:51BA 85 01
|
|
lda #$03 ; CPU:$D1BC PRG:51BC A9 03
|
|
sta Zp02 ; CPU:$D1BE PRG:51BE 85 02
|
|
jsr Sub_C3B8 ; CPU:$D1C0 PRG:51C0 20 B8 C3
|
|
jsr Sub_D210 ; CPU:$D1C3 PRG:51C3 20 10 D2
|
|
dec ZpC4 ; CPU:$D1C6 PRG:51C6 C6 C4
|
|
bne NmiHandler_OnNonzero37 ; CPU:$D1C8 PRG:51C8 D0 D4
|
|
lda #$26 ; CPU:$D1CA PRG:51CA A9 26
|
|
jsr Sub_ED70 ; CPU:$D1CC PRG:51CC 20 70 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop132
|
|
; Global: The routine calls SetPpuWriteAddress, NmiHandler_OnNonzero38, ParseVramWriteRecord and
|
|
; QueueVramWritePointer.
|
|
; Local: Executes 28 instructions: loads Y with $02; loads X with $EA; loads A
|
|
; with $21; calls SetPpuWriteAddress; loads A with $B4; calls
|
|
; NmiHandler_OnNonzero38; and 22 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop132:
|
|
ldy #$02 ; CPU:$D1CF PRG:51CF A0 02
|
|
ldx #$EA ; CPU:$D1D1 PRG:51D1 A2 EA
|
|
lda #$21 ; CPU:$D1D3 PRG:51D3 A9 21
|
|
jsr SetPpuWriteAddress ; CPU:$D1D5 PRG:51D5 20 3E C1
|
|
lda #$B4 ; CPU:$D1D8 PRG:51D8 A9 B4
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D1DA PRG:51DA 20 2A D2
|
|
ldx #$8E ; CPU:$D1DD PRG:51DD A2 8E
|
|
lda #$F8 ; CPU:$D1DF PRG:51DF A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D1E1 PRG:51E1 20 2D C1
|
|
ldx #$AB ; CPU:$D1E4 PRG:51E4 A2 AB
|
|
lda #$F8 ; CPU:$D1E6 PRG:51E6 A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D1E8 PRG:51E8 20 2D C1
|
|
lda #$01 ; CPU:$D1EB PRG:51EB A9 01
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D1ED PRG:51ED 20 2A D2
|
|
ldx #$B6 ; CPU:$D1F0 PRG:51F0 A2 B6
|
|
lda #$F8 ; CPU:$D1F2 PRG:51F2 A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D1F4 PRG:51F4 20 2D C1
|
|
ldx #$DB ; CPU:$D1F7 PRG:51F7 A2 DB
|
|
lda #$F8 ; CPU:$D1F9 PRG:51F9 A9 F8
|
|
jsr ParseVramWriteRecord ; CPU:$D1FB PRG:51FB 20 2D C1
|
|
lda #$01 ; CPU:$D1FE PRG:51FE A9 01
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D200 PRG:5200 20 2A D2
|
|
ldx #$46 ; CPU:$D203 PRG:5203 A2 46
|
|
lda #$F9 ; CPU:$D205 PRG:5205 A9 F9
|
|
jsr QueueVramWritePointer ; CPU:$D207 PRG:5207 20 17 C1
|
|
lda #$3C ; CPU:$D20A PRG:520A A9 3C
|
|
jsr NmiHandler_OnNonzero38 ; CPU:$D20C PRG:520C 20 2A D2
|
|
rts ; CPU:$D20F PRG:520F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D210
|
|
; Global: The routine calls SetVramRecordFlags and QueueVramWritePointer.
|
|
; Local: Executes 12 instructions: loads A with $E7; stores A to PpuAddrLow;
|
|
; loads A with $21; stores A to PpuAddrHigh; loads Y with $03; stores
|
|
; Y to Zp03; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D210:
|
|
lda #$E7 ; CPU:$D210 PRG:5210 A9 E7
|
|
sta PpuAddrLow ; CPU:$D212 PRG:5212 85 04
|
|
lda #$21 ; CPU:$D214 PRG:5214 A9 21
|
|
sta PpuAddrHigh ; CPU:$D216 PRG:5216 85 05
|
|
ldy #$03 ; CPU:$D218 PRG:5218 A0 03
|
|
sty Zp03 ; CPU:$D21A PRG:521A 84 03
|
|
ldx #$C1 ; CPU:$D21C PRG:521C A2 C1
|
|
lda #$00 ; CPU:$D21E PRG:521E A9 00
|
|
jsr SetVramRecordFlags ; CPU:$D220 PRG:5220 20 74 C1
|
|
ldx #$D2 ; CPU:$D223 PRG:5223 A2 D2
|
|
lda #$F8 ; CPU:$D225 PRG:5225 A9 F8
|
|
jmp QueueVramWritePointer ; CPU:$D227 PRG:5227 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero38
|
|
; Global: The routine calls PrepareQueueStackExchange and UpdateAllGameObjects.
|
|
; Local: Executes 7 instructions: pushes A; calls PrepareQueueStackExchange; calls UpdateAllGameObjects;
|
|
; pulls A; sets the carry flag; subtracts $01 from A; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero38:
|
|
pha ; CPU:$D22A PRG:522A 48
|
|
jsr PrepareQueueStackExchange ; CPU:$D22B PRG:522B 20 F1 C0
|
|
jsr UpdateAllGameObjects ; CPU:$D22E PRG:522E 20 38 D2
|
|
pla ; CPU:$D231 PRG:5231 68
|
|
sec ; CPU:$D232 PRG:5232 38
|
|
sbc #$01 ; CPU:$D233 PRG:5233 E9 01
|
|
bne NmiHandler_OnNonzero38 ; CPU:$D235 PRG:5235 D0 F3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero6
|
|
; Global: Updates everything that moves: the player ship, the enemies, the shots and the explosions.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero6:
|
|
rts ; CPU:$D237 PRG:5237 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: UpdateAllGameObjects
|
|
; Global: The routine calls Sub_CAB3, Sub_DB35, Sub_E113, Sub_E1D2 and 8 more.
|
|
; Local: Executes 12 instructions: calls Sub_CAB3; calls Sub_DB35; calls
|
|
; Sub_E113; calls Sub_E1D2; calls UpdatePlayerShot; calls Sub_D2C9; and 6
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
UpdateAllGameObjects:
|
|
jsr Sub_CAB3 ; CPU:$D238 PRG:5238 20 B3 CA
|
|
jsr Sub_DB35 ; CPU:$D23B PRG:523B 20 35 DB
|
|
jsr Sub_E113 ; CPU:$D23E PRG:523E 20 13 E1
|
|
jsr Sub_E1D2 ; CPU:$D241 PRG:5241 20 D2 E1
|
|
jsr UpdatePlayerShot ; CPU:$D244 PRG:5244 20 20 E0
|
|
jsr Sub_D2C9 ; CPU:$D247 PRG:5247 20 C9 D2
|
|
jsr ResetPlayerSpriteBuffer ; CPU:$D24A PRG:524A 20 F5 E4
|
|
jsr Sub_E7B6 ; CPU:$D24D PRG:524D 20 B6 E7
|
|
jsr Sub_D56F ; CPU:$D250 PRG:5250 20 6F D5
|
|
jsr AdvancePlayerFrameCounter ; CPU:$D253 PRG:5253 20 39 E9
|
|
jsr UpdateEnemyFormation ; CPU:$D256 PRG:5256 20 AC C9
|
|
jsr Sub_CC38 ; CPU:$D259 PRG:5259 20 38 CC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D25C
|
|
; Global: The routine writes $0580, reads $0200.
|
|
; Local: Executes 10 instructions: loads A from Zp62; branches on equal to
|
|
; NmiHandler_Loop133; loads A from $0200; branches on negative to
|
|
; NmiHandler_Loop133; loads A from Zp46; ANDs A with $10; and 4 more
|
|
; instructions.
|
|
; Parameters: Reads $0200 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0580 changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp5B, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D25C:
|
|
lda a:Zp62 ; CPU:$D25C PRG:525C AD 62 00
|
|
beq NmiHandler_Loop133 ; CPU:$D25F PRG:525F F0 12
|
|
lda $0200 ; CPU:$D261 PRG:5261 AD 00 02
|
|
bmi NmiHandler_Loop133 ; CPU:$D264 PRG:5264 30 0D
|
|
lda Zp46 ; CPU:$D266 PRG:5266 A5 46
|
|
and #$10 ; CPU:$D268 PRG:5268 29 10
|
|
beq NmiHandler_Loop133 ; CPU:$D26A PRG:526A F0 07
|
|
lda #$01 ; CPU:$D26C PRG:526C A9 01
|
|
sta Zp5B ; CPU:$D26E PRG:526E 85 5B
|
|
sta $0580 ; CPU:$D270 PRG:5270 8D 80 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop133
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop133:
|
|
rts ; CPU:$D273 PRG:5273 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D274
|
|
; Global: Sets the PPU address the counter panel is drawn at.
|
|
; Local: Executes 16 instructions: returns with RTS; loads X from ZpDE;
|
|
; decrements X; branches on equal to NmiHandler_OnZero6; loads X with
|
|
; $4C; loads A with $F8; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D274:
|
|
ldx ZpDE ; CPU:$D274 PRG:5274 A6 DE
|
|
dex ; CPU:$D276 PRG:5276 CA
|
|
beq NmiHandler_OnZero6 ; CPU:$D277 PRG:5277 F0 BE
|
|
ldx #$4C ; CPU:$D279 PRG:5279 A2 4C
|
|
lda #$F8 ; CPU:$D27B PRG:527B A9 F8
|
|
jsr QueueVramWritePointer ; CPU:$D27D PRG:527D 20 17 C1
|
|
lda #$AF ; CPU:$D280 PRG:5280 A9 AF
|
|
sta PpuAddrLow ; CPU:$D282 PRG:5282 85 04
|
|
lda #$21 ; CPU:$D284 PRG:5284 A9 21
|
|
sta PpuAddrHigh ; CPU:$D286 PRG:5286 85 05
|
|
ldy #$01 ; CPU:$D288 PRG:5288 A0 01
|
|
sty Zp03 ; CPU:$D28A PRG:528A 84 03
|
|
ldx #$61 ; CPU:$D28C PRG:528C A2 61
|
|
lda #$00 ; CPU:$D28E PRG:528E A9 00
|
|
jmp SetVramRecordFlags ; CPU:$D290 PRG:5290 4C 74 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SetHudCounterAddress
|
|
; Global: Clears both nametables, sets up the formation and turns rendering on.
|
|
; Local: Executes 4 instructions: loads X with $A8; loads A with $21; loads Y
|
|
; with $08; calls SetPpuWriteAddress.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SetHudCounterAddress:
|
|
ldx #$A8 ; CPU:$D293 PRG:5293 A2 A8
|
|
lda #$21 ; CPU:$D295 PRG:5295 A9 21
|
|
ldy #$08 ; CPU:$D297 PRG:5297 A0 08
|
|
jmp SetPpuWriteAddress ; CPU:$D299 PRG:5299 4C 3E C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetGameScreen
|
|
; Global: The routine calls TurnOffRendering, FillNametableWithTile24, QueueScreenUpdateRecord, SetupStageScreen and 3 more,
|
|
; writes the PPUCTRL register.
|
|
; Local: Executes 19 instructions: calls TurnOffRendering; loads A with $C0; stores A
|
|
; to Zp50; loads X with $20; calls FillNametableWithTile24; calls QueueScreenUpdateRecord; and 13
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves the PPUCTRL register set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetGameScreen:
|
|
jsr TurnOffRendering ; CPU:$D29C PRG:529C 20 8A C2
|
|
lda #$C0 ; CPU:$D29F PRG:529F A9 C0
|
|
sta Zp50 ; CPU:$D2A1 PRG:52A1 85 50
|
|
ldx #$20 ; CPU:$D2A3 PRG:52A3 A2 20
|
|
jsr FillNametableWithTile24 ; CPU:$D2A5 PRG:52A5 20 42 C2
|
|
jsr QueueScreenUpdateRecord ; CPU:$D2A8 PRG:52A8 20 BC C2
|
|
jsr SetupStageScreen ; CPU:$D2AB PRG:52AB 20 37 C9
|
|
jsr SetupHudCounters ; CPU:$D2AE PRG:52AE 20 6B CB
|
|
jsr ResetPlayerShip ; CPU:$D2B1 PRG:52B1 20 A2 CA
|
|
lda #$F8 ; CPU:$D2B4 PRG:52B4 A9 F8
|
|
sta Zp42 ; CPU:$D2B6 PRG:52B6 85 42
|
|
lda #$E8 ; CPU:$D2B8 PRG:52B8 A9 E8
|
|
sta Zp43 ; CPU:$D2BA PRG:52BA 85 43
|
|
lda PpuCtrlShadow ; CPU:$D2BC PRG:52BC A5 40
|
|
ora #$02 ; CPU:$D2BE PRG:52BE 09 02
|
|
sta PpuCtrlShadow ; CPU:$D2C0 PRG:52C0 85 40
|
|
sta PPUCTRL ; CPU:$D2C2 PRG:52C2 8D 00 20
|
|
jsr TurnOnRendering ; CPU:$D2C5 PRG:52C5 20 AD C2
|
|
rts ; CPU:$D2C8 PRG:52C8 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D2C9
|
|
; Global: The routine reads $0494.
|
|
; Local: Executes 5 instructions: loads A from $0494; branches on equal to
|
|
; NmiHandler_Loop134; loads A from Zp48; rotates a right; branches on
|
|
; carry clear to NmiHandler_Loop135.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D2C9:
|
|
lda $0494 ; CPU:$D2C9 PRG:52C9 AD 94 04
|
|
beq NmiHandler_Loop134 ; CPU:$D2CC PRG:52CC F0 05
|
|
lda Zp48 ; CPU:$D2CE PRG:52CE A5 48
|
|
ror a ; CPU:$D2D0 PRG:52D0 6A
|
|
bcc NmiHandler_Loop135 ; CPU:$D2D1 PRG:52D1 90 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop134
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop134:
|
|
rts ; CPU:$D2D3 PRG:52D3 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop135
|
|
; Global: The routine writes $049E, reads $049F and $049E.
|
|
; Local: Executes 13 instructions: loads A from $049F; compares A with $0C;
|
|
; branches on carry set to NmiHandler_Loop140; increments $049E;
|
|
; loads A from $049E; ANDs A with $0F; and 7 more instructions.
|
|
; Parameters: Reads $049F and $049E from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049E changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop135:
|
|
lda $049F ; CPU:$D2D4 PRG:52D4 AD 9F 04
|
|
cmp #$0C ; CPU:$D2D7 PRG:52D7 C9 0C
|
|
bcs NmiHandler_Loop140 ; CPU:$D2D9 PRG:52D9 B0 42
|
|
inc $049E ; CPU:$D2DB PRG:52DB EE 9E 04
|
|
lda $049E ; CPU:$D2DE PRG:52DE AD 9E 04
|
|
and #$0F ; CPU:$D2E1 PRG:52E1 29 0F
|
|
sta $049E ; CPU:$D2E3 PRG:52E3 8D 9E 04
|
|
bne NmiHandler_Loop142 ; CPU:$D2E6 PRG:52E6 D0 6E
|
|
inc $049F ; CPU:$D2E8 PRG:52E8 EE 9F 04
|
|
lda $049F ; CPU:$D2EB PRG:52EB AD 9F 04
|
|
cmp #$0C ; CPU:$D2EE PRG:52EE C9 0C
|
|
bcc NmiHandler_Loop136 ; CPU:$D2F0 PRG:52F0 90 02
|
|
lda #$00 ; CPU:$D2F2 PRG:52F2 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop136
|
|
; Global: The routine calls NmiHandler_Loop142, writes $049F, $05A4 and $05A5,
|
|
; reads $0490.
|
|
; Local: Executes 6 instructions: stores A to $049F; loads A from $0490;
|
|
; branches on not equal to NmiHandler_Loop137; stores A to $05A4;
|
|
; stores A to $05A5; calls NmiHandler_Loop142.
|
|
; Parameters: Reads $0490 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049F, $05A4 and $05A5
|
|
; changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop136:
|
|
sta $049F ; CPU:$D2F4 PRG:52F4 8D 9F 04
|
|
lda $0490 ; CPU:$D2F7 PRG:52F7 AD 90 04
|
|
bne NmiHandler_Loop137 ; CPU:$D2FA PRG:52FA D0 09
|
|
sta $05A4 ; CPU:$D2FC PRG:52FC 8D A4 05
|
|
sta $05A5 ; CPU:$D2FF PRG:52FF 8D A5 05
|
|
jmp NmiHandler_Loop142 ; CPU:$D302 PRG:5302 4C 56 D3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop137
|
|
; Global: The routine writes $05A4, reads $049F.
|
|
; Local: Executes 8 instructions: loads A with $01; loads X from $049F;
|
|
; compares X with $07; branches on equal to NmiHandler_Loop138;
|
|
; compares X with $01; branches on not equal to NmiHandler_Loop139;
|
|
; and 2 more instructions.
|
|
; Parameters: Reads $049F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $05A4 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop137:
|
|
lda #$01 ; CPU:$D305 PRG:5305 A9 01
|
|
ldx $049F ; CPU:$D307 PRG:5307 AE 9F 04
|
|
cpx #$07 ; CPU:$D30A PRG:530A E0 07
|
|
beq NmiHandler_Loop138 ; CPU:$D30C PRG:530C F0 09
|
|
cpx #$01 ; CPU:$D30E PRG:530E E0 01
|
|
bne NmiHandler_Loop139 ; CPU:$D310 PRG:5310 D0 08
|
|
sta $05A4 ; CPU:$D312 PRG:5312 8D A4 05
|
|
beq NmiHandler_Loop139 ; CPU:$D315 PRG:5315 F0 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop138
|
|
; Global: The routine writes $05A5.
|
|
; Local: Executes 1 instruction: stores A to $05A5.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $05A5 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop138:
|
|
sta $05A5 ; CPU:$D317 PRG:5317 8D A5 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop139
|
|
; Global: The routine calls NmiHandler_Loop142.
|
|
; Local: Executes 1 instruction: calls NmiHandler_Loop142.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop139:
|
|
jmp NmiHandler_Loop142 ; CPU:$D31A PRG:531A 4C 56 D3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop140
|
|
; Global: The routine writes $049E, reads $049E and $049F.
|
|
; Local: Executes 11 instructions: increments $049E; loads A from $049E;
|
|
; compares A with $0C; branches on carry clear to NmiHandler_Loop142;
|
|
; loads A with $00; stores A to $049E; and 5 more instructions.
|
|
; Parameters: Reads $049E and $049F from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049E changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop140:
|
|
inc $049E ; CPU:$D31D PRG:531D EE 9E 04
|
|
lda $049E ; CPU:$D320 PRG:5320 AD 9E 04
|
|
cmp #$0C ; CPU:$D323 PRG:5323 C9 0C
|
|
bcc NmiHandler_Loop142 ; CPU:$D325 PRG:5325 90 2F
|
|
lda #$00 ; CPU:$D327 PRG:5327 A9 00
|
|
sta $049E ; CPU:$D329 PRG:5329 8D 9E 04
|
|
inc $049F ; CPU:$D32C PRG:532C EE 9F 04
|
|
lda $049F ; CPU:$D32F PRG:532F AD 9F 04
|
|
cmp #$1C ; CPU:$D332 PRG:5332 C9 1C
|
|
bcc NmiHandler_Loop141 ; CPU:$D334 PRG:5334 90 02
|
|
lda #$0C ; CPU:$D336 PRG:5336 A9 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop141
|
|
; Global: The routine calls NmiHandler_Loop184, writes $049F and $0496, reads
|
|
; $0464.
|
|
; Local: Executes 13 instructions: stores A to $049F; sets the carry flag;
|
|
; subtracts $01 from A; ANDs A with $07; branches on not equal to
|
|
; NmiHandler_Loop142; loads A from $0464; and 7 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $049F and $0496 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop141:
|
|
sta $049F ; CPU:$D338 PRG:5338 8D 9F 04
|
|
sec ; CPU:$D33B PRG:533B 38
|
|
sbc #$01 ; CPU:$D33C PRG:533C E9 01
|
|
and #$07 ; CPU:$D33E PRG:533E 29 07
|
|
bne NmiHandler_Loop142 ; CPU:$D340 PRG:5340 D0 14
|
|
lda $0464 ; CPU:$D342 PRG:5342 AD 64 04
|
|
cmp #$02 ; CPU:$D345 PRG:5345 C9 02
|
|
beq NmiHandler_Loop142 ; CPU:$D347 PRG:5347 F0 0D
|
|
lda #$02 ; CPU:$D349 PRG:5349 A9 02
|
|
sta $0496 ; CPU:$D34B PRG:534B 8D 96 04
|
|
jsr NmiHandler_Loop184 ; CPU:$D34E PRG:534E 20 6F D7
|
|
lda #$01 ; CPU:$D351 PRG:5351 A9 01
|
|
sta $049F ; CPU:$D353 PRG:5353 8D 9F 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop142
|
|
; Global: The routine reads $049E.
|
|
; Local: Executes 4 instructions: loads A from $049E; compares A with $05;
|
|
; branches on carry clear to NmiHandler_Loop143; returns with RTS.
|
|
; Parameters: Reads $049E from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop142:
|
|
lda $049E ; CPU:$D356 PRG:5356 AD 9E 04
|
|
cmp #$05 ; CPU:$D359 PRG:5359 C9 05
|
|
bcc NmiHandler_Loop143 ; CPU:$D35B PRG:535B 90 01
|
|
rts ; CPU:$D35D PRG:535D 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop143
|
|
; Global: The routine reads $049F.
|
|
; Local: Executes 19 instructions: shifts a left; shifts a left; shifts a
|
|
; left; shifts a left; stores A to StarFieldCount; adds $10 to A; and
|
|
; 13 more instructions.
|
|
; Parameters: Reads $049F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop143:
|
|
asl a ; CPU:$D35E PRG:535E 0A
|
|
asl a ; CPU:$D35F PRG:535F 0A
|
|
asl a ; CPU:$D360 PRG:5360 0A
|
|
asl a ; CPU:$D361 PRG:5361 0A
|
|
sta StarFieldCount ; CPU:$D362 PRG:5362 85 06
|
|
adc #$10 ; CPU:$D364 PRG:5364 69 10
|
|
asl a ; CPU:$D366 PRG:5366 0A
|
|
asl a ; CPU:$D367 PRG:5367 0A
|
|
sta PpuAddrLow ; CPU:$D368 PRG:5368 85 04
|
|
lda #$20 ; CPU:$D36A PRG:536A A9 20
|
|
adc #$00 ; CPU:$D36C PRG:536C 69 00
|
|
sta PpuAddrHigh ; CPU:$D36E PRG:536E 85 05
|
|
lda #$04 ; CPU:$D370 PRG:5370 A9 04
|
|
sta Zp07 ; CPU:$D372 PRG:5372 85 07
|
|
ldy #$0F ; CPU:$D374 PRG:5374 A0 0F
|
|
lda $049F ; CPU:$D376 PRG:5376 AD 9F 04
|
|
sta (StarFieldCount),y ; CPU:$D379 PRG:5379 91 06
|
|
ldx #$17 ; CPU:$D37B PRG:537B A2 17
|
|
lda #$24 ; CPU:$D37D PRG:537D A9 24
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative16
|
|
; Global: The routine calls Sub_D4AF, reads $049E.
|
|
; Local: Executes 6 instructions: stores A to Zp20,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative16; loads A from $049E;
|
|
; branches on equal to NmiHandler_Loop144; calls Sub_D4AF.
|
|
; Parameters: Reads $049E from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative16:
|
|
sta Zp20,x ; CPU:$D37F PRG:537F 95 20
|
|
dex ; CPU:$D381 PRG:5381 CA
|
|
bpl NmiHandler_OnNonnegative16 ; CPU:$D382 PRG:5382 10 FB
|
|
lda $049E ; CPU:$D384 PRG:5384 AD 9E 04
|
|
beq NmiHandler_Loop144 ; CPU:$D387 PRG:5387 F0 03
|
|
jmp Sub_D4AF ; CPU:$D389 PRG:5389 4C AF D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop144
|
|
; Global: The routine reads $049F.
|
|
; Local: Executes 12 instructions: loads X from $049F; compares X with $0C;
|
|
; branches on carry set to NmiHandler_Loop147; loads A with $48;
|
|
; stores A to PpuAddrLow; loads A with $08; and 6 more instructions.
|
|
; Parameters: Reads $049F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop144:
|
|
ldx $049F ; CPU:$D38C PRG:538C AE 9F 04
|
|
cpx #$0C ; CPU:$D38F PRG:538F E0 0C
|
|
bcs NmiHandler_Loop147 ; CPU:$D391 PRG:5391 B0 30
|
|
lda #$48 ; CPU:$D393 PRG:5393 A9 48
|
|
sta PpuAddrLow ; CPU:$D395 PRG:5395 85 04
|
|
lda #$08 ; CPU:$D397 PRG:5397 A9 08
|
|
sta Zp02 ; CPU:$D399 PRG:5399 85 02
|
|
lda $049F ; CPU:$D39B PRG:539B AD 9F 04
|
|
ror a ; CPU:$D39E PRG:539E 6A
|
|
lda #$70 ; CPU:$D39F PRG:539F A9 70
|
|
bcs NmiHandler_Loop145 ; CPU:$D3A1 PRG:53A1 B0 02
|
|
lda #$74 ; CPU:$D3A3 PRG:53A3 A9 74
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop145
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: stores A to Zp0C; loads X with $00; loads Y
|
|
; with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop145:
|
|
sta Zp0C ; CPU:$D3A5 PRG:53A5 85 0C
|
|
ldx #$00 ; CPU:$D3A7 PRG:53A7 A2 00
|
|
ldy #$00 ; CPU:$D3A9 PRG:53A9 A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear5
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from $0403,y; branches on equal to
|
|
; NmiHandler_Loop146; loads A from Zp0C; stores A to Zp20,x; clears
|
|
; the carry flag; adds $02 to A; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear5:
|
|
lda $0403,y ; CPU:$D3AB PRG:53AB B9 03 04
|
|
beq NmiHandler_Loop146 ; CPU:$D3AE PRG:53AE F0 09
|
|
lda Zp0C ; CPU:$D3B0 PRG:53B0 A5 0C
|
|
sta Zp20,x ; CPU:$D3B2 PRG:53B2 95 20
|
|
clc ; CPU:$D3B4 PRG:53B4 18
|
|
adc #$02 ; CPU:$D3B5 PRG:53B5 69 02
|
|
sta Zp21,x ; CPU:$D3B7 PRG:53B7 95 21
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop146
|
|
; Global: The routine calls WritePpuTileColumn.
|
|
; Local: Executes 13 instructions: loads A from $0403,y; branches on equal to
|
|
; NmiHandler_Loop146; loads A from Zp0C; stores A to Zp20,x; clears
|
|
; the carry flag; adds $02 to A; and 7 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop146:
|
|
inx ; CPU:$D3B9 PRG:53B9 E8
|
|
inx ; CPU:$D3BA PRG:53BA E8
|
|
iny ; CPU:$D3BB PRG:53BB C8
|
|
cpy #$04 ; CPU:$D3BC PRG:53BC C0 04
|
|
bcc NmiHandler_OnCarryClear5 ; CPU:$D3BE PRG:53BE 90 EB
|
|
jmp WritePpuTileColumn ; CPU:$D3C0 PRG:53C0 4C F8 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop147
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 16 instructions: loads A from $FB85,x; copies A into X;
|
|
; loads A from $FBA1,x; ANDs A with $07; clears the carry flag; adds
|
|
; $44 to A; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop147:
|
|
lda $FB85,x ; CPU:$D3C3 PRG:53C3 BD 85 FB
|
|
tax ; CPU:$D3C6 PRG:53C6 AA
|
|
lda $FBA1,x ; CPU:$D3C7 PRG:53C7 BD A1 FB
|
|
and #$07 ; CPU:$D3CA PRG:53CA 29 07
|
|
clc ; CPU:$D3CC PRG:53CC 18
|
|
adc #$44 ; CPU:$D3CD PRG:53CD 69 44
|
|
sta PpuAddrLow ; CPU:$D3CF PRG:53CF 85 04
|
|
lda #$0B ; CPU:$D3D1 PRG:53D1 A9 0B
|
|
sta Zp02 ; CPU:$D3D3 PRG:53D3 85 02
|
|
lda $FBA1,x ; CPU:$D3D5 PRG:53D5 BD A1 FB
|
|
and #$F8 ; CPU:$D3D8 PRG:53D8 29 F8
|
|
sta Zp0C ; CPU:$D3DA PRG:53DA 85 0C
|
|
lda #$00 ; CPU:$D3DC PRG:53DC A9 00
|
|
sta TilePtrLo ; CPU:$D3DE PRG:53DE 85 08
|
|
sta TilePtrHi ; CPU:$D3E0 PRG:53E0 85 09
|
|
ldx #$03 ; CPU:$D3E2 PRG:53E2 A2 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative17
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A from $0403,x; branches on equal to
|
|
; NmiHandler_Loop149; rotates a right; branches on carry clear to
|
|
; NmiHandler_Loop148; increments TilePtrLo; branches on non-negative
|
|
; to NmiHandler_Loop149.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative17:
|
|
lda $0403,x ; CPU:$D3E4 PRG:53E4 BD 03 04
|
|
beq NmiHandler_Loop149 ; CPU:$D3E7 PRG:53E7 F0 09
|
|
ror a ; CPU:$D3E9 PRG:53E9 6A
|
|
bcc NmiHandler_Loop148 ; CPU:$D3EA PRG:53EA 90 04
|
|
inc TilePtrLo ; CPU:$D3EC PRG:53EC E6 08
|
|
bpl NmiHandler_Loop149 ; CPU:$D3EE PRG:53EE 10 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop148
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from $0403,x; branches on equal to
|
|
; NmiHandler_Loop149; rotates a right; branches on carry clear to
|
|
; NmiHandler_Loop148; increments TilePtrLo; branches on non-negative
|
|
; to NmiHandler_Loop149; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop148:
|
|
inc TilePtrHi ; CPU:$D3F0 PRG:53F0 E6 09
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop149
|
|
; Global: The routine reads $0496.
|
|
; Local: Executes 13 instructions: loads A from $0403,x; branches on equal to
|
|
; NmiHandler_Loop149; rotates a right; branches on carry clear to
|
|
; NmiHandler_Loop148; increments TilePtrLo; branches on non-negative
|
|
; to NmiHandler_Loop149; and 7 more instructions.
|
|
; Parameters: Reads $0496 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop149:
|
|
dex ; CPU:$D3F2 PRG:53F2 CA
|
|
bpl NmiHandler_OnNonnegative17 ; CPU:$D3F3 PRG:53F3 10 EF
|
|
ldx $0496 ; CPU:$D3F5 PRG:53F5 AE 96 04
|
|
beq NmiHandler_Loop150 ; CPU:$D3F8 PRG:53F8 F0 04
|
|
lda #$01 ; CPU:$D3FA PRG:53FA A9 01
|
|
bpl NmiHandler_Loop152 ; CPU:$D3FC PRG:53FC 10 15
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop150
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A from TilePtrLo; compares A with $03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N, Z and C flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop150:
|
|
lda TilePtrLo ; CPU:$D3FE PRG:53FE A5 08
|
|
cmp #$03 ; CPU:$D400 PRG:5400 C9 03
|
|
.byte $90, $0D ; CPU:$D402 PRG:5402 90 0D
|
|
ldx #$78 ; CPU:$D404 PRG:5404 A2 78
|
|
lda #$FB ; CPU:$D406 PRG:5406 A9 FB
|
|
jsr QueueVramWritePointer ; CPU:$D408 PRG:5408 20 17 C1
|
|
lda #$01 ; CPU:$D40B PRG:540B A9 01
|
|
sta $0496 ; CPU:$D40D PRG:540D 8D 96 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCD410
|
|
; Global: The routine reads $02A9.
|
|
; Local: Executes 1 instruction: tests the bits of $02A9.
|
|
; Parameters: Reads $02A9 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCD410:
|
|
bit $02A9 ; CPU:$D410 PRG:5410 2C A9 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop152
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: stores A to ScreenPtrLo; loads X with $03;
|
|
; loads A with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop152:
|
|
sta ScreenPtrLo ; CPU:$D413 PRG:5413 85 0A
|
|
ldx #$03 ; CPU:$D415 PRG:5415 A2 03
|
|
lda #$00 ; CPU:$D417 PRG:5417 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative18
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: stores A to $0497,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative18; loads A from Zp0C;
|
|
; branches on equal to NmiHandler_Loop155; loads X with $02; and 1
|
|
; more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative18:
|
|
sta $0497,x ; CPU:$D419 PRG:5419 9D 97 04
|
|
dex ; CPU:$D41C PRG:541C CA
|
|
bpl NmiHandler_OnNonnegative18 ; CPU:$D41D PRG:541D 10 FA
|
|
lda Zp0C ; CPU:$D41F PRG:541F A5 0C
|
|
beq NmiHandler_Loop155 ; CPU:$D421 PRG:5421 F0 32
|
|
ldx #$02 ; CPU:$D423 PRG:5423 A2 02
|
|
ldy #$03 ; CPU:$D425 PRG:5425 A0 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero39
|
|
; Global: The routine calls NmiHandler_Loop154.
|
|
; Local: Executes 9 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop154; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop153; loads A with $70; stores A to Zp20,x;
|
|
; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero39:
|
|
lda $0400,y ; CPU:$D427 PRG:5427 B9 00 04
|
|
beq NmiHandler_Loop154 ; CPU:$D42A PRG:542A F0 1F
|
|
cmp ScreenPtrLo ; CPU:$D42C PRG:542C C5 0A
|
|
bne NmiHandler_Loop153 ; CPU:$D42E PRG:542E D0 0B
|
|
lda #$70 ; CPU:$D430 PRG:5430 A9 70
|
|
sta Zp20,x ; CPU:$D432 PRG:5432 95 20
|
|
lda #$72 ; CPU:$D434 PRG:5434 A9 72
|
|
sta Zp21,x ; CPU:$D436 PRG:5436 95 21
|
|
jmp NmiHandler_Loop154 ; CPU:$D438 PRG:5438 4C 4B D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop153
|
|
; Global: The routine calls NmiHandler_Loop154.
|
|
; Local: Executes 11 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop154; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop153; loads A with $70; stores A to Zp20,x;
|
|
; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop153:
|
|
stx ScreenPtrHi ; CPU:$D43B PRG:543B 86 0B
|
|
ldx #$FF ; CPU:$D43D PRG:543D A2 FF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero40
|
|
; Global: The routine calls NmiHandler_Loop154.
|
|
; Local: Executes 17 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop154; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop153; loads A with $70; stores A to Zp20,x;
|
|
; and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero40:
|
|
inx ; CPU:$D43F PRG:543F E8
|
|
lda $0497,x ; CPU:$D440 PRG:5440 BD 97 04
|
|
bne NmiHandler_OnNonzero40 ; CPU:$D443 PRG:5443 D0 FA
|
|
tya ; CPU:$D445 PRG:5445 98
|
|
sta $0497,x ; CPU:$D446 PRG:5446 9D 97 04
|
|
ldx ScreenPtrHi ; CPU:$D449 PRG:5449 A6 0B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop154
|
|
; Global: The routine calls NmiHandler_Loop154 and WritePpuTileColumn.
|
|
; Local: Executes 23 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop154; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop153; loads A with $70; stores A to Zp20,x;
|
|
; and 17 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop154:
|
|
inx ; CPU:$D44B PRG:544B E8
|
|
inx ; CPU:$D44C PRG:544C E8
|
|
iny ; CPU:$D44D PRG:544D C8
|
|
cpy #$07 ; CPU:$D44E PRG:544E C0 07
|
|
bne NmiHandler_OnNonzero39 ; CPU:$D450 PRG:5450 D0 D5
|
|
jmp WritePpuTileColumn ; CPU:$D452 PRG:5452 4C F8 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop155
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $00; stores A to Zp0C; loads X
|
|
; with $01; loads Y with $03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop155:
|
|
lda #$00 ; CPU:$D455 PRG:5455 A9 00
|
|
sta Zp0C ; CPU:$D457 PRG:5457 85 0C
|
|
ldx #$01 ; CPU:$D459 PRG:5459 A2 01
|
|
ldy #$03 ; CPU:$D45B PRG:545B A0 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero41
|
|
; Global: The routine calls Sub_D473.
|
|
; Local: Executes 9 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop158; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop157; loads A from Zp0C; compares A with
|
|
; ScreenPtrLo; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero41:
|
|
lda $0400,y ; CPU:$D45D PRG:545D B9 00 04
|
|
beq NmiHandler_Loop158 ; CPU:$D460 PRG:5460 F0 2A
|
|
cmp ScreenPtrLo ; CPU:$D462 PRG:5462 C5 0A
|
|
bne NmiHandler_Loop157 ; CPU:$D464 PRG:5464 D0 16
|
|
lda Zp0C ; CPU:$D466 PRG:5466 A5 0C
|
|
cmp ScreenPtrLo ; CPU:$D468 PRG:5468 C5 0A
|
|
bne NmiHandler_Loop156 ; CPU:$D46A PRG:546A D0 05
|
|
lda #$7E ; CPU:$D46C PRG:546C A9 7E
|
|
jmp Sub_D473 ; CPU:$D46E PRG:546E 4C 73 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop156
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads A with $7C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop156:
|
|
lda #$7C ; CPU:$D471 PRG:5471 A9 7C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D473
|
|
; Global: The routine calls NmiHandler_Loop159.
|
|
; Local: Executes 4 instructions: stores A to Zp20,x; loads A with $78; stores
|
|
; A to Zp21,x; calls NmiHandler_Loop159.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D473:
|
|
sta Zp20,x ; CPU:$D473 PRG:5473 95 20
|
|
lda #$78 ; CPU:$D475 PRG:5475 A9 78
|
|
sta Zp21,x ; CPU:$D477 PRG:5477 95 21
|
|
jmp NmiHandler_Loop159 ; CPU:$D479 PRG:5479 4C 96 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop157
|
|
; Global: The routine calls Sub_D473 and NmiHandler_Loop159.
|
|
; Local: Executes 16 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop158; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop157; loads A from Zp0C; compares A with
|
|
; ScreenPtrLo; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop157:
|
|
stx ScreenPtrHi ; CPU:$D47C PRG:547C 86 0B
|
|
ldx #$FF ; CPU:$D47E PRG:547E A2 FF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero42
|
|
; Global: The routine calls Sub_D473 and NmiHandler_Loop159.
|
|
; Local: Executes 22 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop158; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop157; loads A from Zp0C; compares A with
|
|
; ScreenPtrLo; and 16 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero42:
|
|
inx ; CPU:$D480 PRG:5480 E8
|
|
lda $0497,x ; CPU:$D481 PRG:5481 BD 97 04
|
|
bne NmiHandler_OnNonzero42 ; CPU:$D484 PRG:5484 D0 FA
|
|
tya ; CPU:$D486 PRG:5486 98
|
|
sta $0497,x ; CPU:$D487 PRG:5487 9D 97 04
|
|
ldx ScreenPtrHi ; CPU:$D48A PRG:548A A6 0B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop158
|
|
; Global: The routine calls Sub_D473 and NmiHandler_Loop159.
|
|
; Local: Executes 27 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop158; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop157; loads A from Zp0C; compares A with
|
|
; ScreenPtrLo; and 21 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop158:
|
|
lda Zp0C ; CPU:$D48C PRG:548C A5 0C
|
|
cmp ScreenPtrLo ; CPU:$D48E PRG:548E C5 0A
|
|
bne NmiHandler_Loop159 ; CPU:$D490 PRG:5490 D0 04
|
|
lda #$7A ; CPU:$D492 PRG:5492 A9 7A
|
|
sta Zp20,x ; CPU:$D494 PRG:5494 95 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop159
|
|
; Global: The routine calls Sub_D473 and NmiHandler_Loop159.
|
|
; Local: Executes 39 instructions: loads A from $0400,y; branches on equal to
|
|
; NmiHandler_Loop158; compares A with ScreenPtrLo; branches on not
|
|
; equal to NmiHandler_Loop157; loads A from Zp0C; compares A with
|
|
; ScreenPtrLo; and 33 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop159:
|
|
lda $0400,y ; CPU:$D496 PRG:5496 B9 00 04
|
|
sta Zp0C ; CPU:$D499 PRG:5499 85 0C
|
|
inx ; CPU:$D49B PRG:549B E8
|
|
inx ; CPU:$D49C PRG:549C E8
|
|
iny ; CPU:$D49D PRG:549D C8
|
|
cpy #$07 ; CPU:$D49E PRG:549E C0 07
|
|
bne NmiHandler_OnNonzero41 ; CPU:$D4A0 PRG:54A0 D0 BB
|
|
lda Zp0C ; CPU:$D4A2 PRG:54A2 A5 0C
|
|
cmp ScreenPtrLo ; CPU:$D4A4 PRG:54A4 C5 0A
|
|
bne NmiHandler_Loop160 ; CPU:$D4A6 PRG:54A6 D0 04
|
|
lda #$7A ; CPU:$D4A8 PRG:54A8 A9 7A
|
|
sta Zp20,x ; CPU:$D4AA PRG:54AA 95 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop160
|
|
; Global: The routine calls WritePpuTileColumn.
|
|
; Local: Executes 1 instruction: calls WritePpuTileColumn.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop160:
|
|
jmp WritePpuTileColumn ; CPU:$D4AC PRG:54AC 4C F8 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D4AF
|
|
; Global: The routine reads $049F and $049E.
|
|
; Local: Executes 8 instructions: loads A with $18; stores A to Zp02; loads X
|
|
; from $049F; loads Y with $80; loads A from $049E; compares A with
|
|
; $03; and 2 more instructions.
|
|
; Parameters: Reads $049F and $049E from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D4AF:
|
|
lda #$18 ; CPU:$D4AF PRG:54AF A9 18
|
|
sta Zp02 ; CPU:$D4B1 PRG:54B1 85 02
|
|
ldx $049F ; CPU:$D4B3 PRG:54B3 AE 9F 04
|
|
ldy #$80 ; CPU:$D4B6 PRG:54B6 A0 80
|
|
lda $049E ; CPU:$D4B8 PRG:54B8 AD 9E 04
|
|
cmp #$03 ; CPU:$D4BB PRG:54BB C9 03
|
|
bcc NmiHandler_Loop161 ; CPU:$D4BD PRG:54BD 90 02
|
|
ldy #$9C ; CPU:$D4BF PRG:54BF A0 9C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop161
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 10 instructions: loads A from $FB85,x; stores Y to Zp0C;
|
|
; clears the carry flag; adds $A1 to A; stores A to TilePtrLo; loads
|
|
; A with $FB; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop161:
|
|
lda $FB85,x ; CPU:$D4C1 PRG:54C1 BD 85 FB
|
|
sty Zp0C ; CPU:$D4C4 PRG:54C4 84 0C
|
|
clc ; CPU:$D4C6 PRG:54C6 18
|
|
adc #$A1 ; CPU:$D4C7 PRG:54C7 69 A1
|
|
sta TilePtrLo ; CPU:$D4C9 PRG:54C9 85 08
|
|
lda #$FB ; CPU:$D4CB PRG:54CB A9 FB
|
|
adc #$00 ; CPU:$D4CD PRG:54CD 69 00
|
|
sta TilePtrHi ; CPU:$D4CF PRG:54CF 85 09
|
|
ldy #$00 ; CPU:$D4D1 PRG:54D1 A0 00
|
|
sty ScreenPtrLo ; CPU:$D4D3 PRG:54D3 84 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear6
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 15 instructions: loads A from ((StarFieldCount),y); branches
|
|
; on equal to NmiHandler_Loop162; loads A from ((TilePtrLo),y); ANDs
|
|
; A with $07; clears the carry flag; adds ScreenPtrLo to A; and 9
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear6:
|
|
lda (StarFieldCount),y ; CPU:$D4D5 PRG:54D5 B1 06
|
|
beq NmiHandler_Loop162 ; CPU:$D4D7 PRG:54D7 F0 16
|
|
lda (TilePtrLo),y ; CPU:$D4D9 PRG:54D9 B1 08
|
|
and #$07 ; CPU:$D4DB PRG:54DB 29 07
|
|
clc ; CPU:$D4DD PRG:54DD 18
|
|
adc ScreenPtrLo ; CPU:$D4DE PRG:54DE 65 0A
|
|
tax ; CPU:$D4E0 PRG:54E0 AA
|
|
lda (TilePtrLo),y ; CPU:$D4E1 PRG:54E1 B1 08
|
|
and #$F8 ; CPU:$D4E3 PRG:54E3 29 F8
|
|
lsr a ; CPU:$D4E5 PRG:54E5 4A
|
|
adc Zp0C ; CPU:$D4E6 PRG:54E6 65 0C
|
|
sta Zp20,x ; CPU:$D4E8 PRG:54E8 95 20
|
|
adc #$02 ; CPU:$D4EA PRG:54EA 69 02
|
|
inx ; CPU:$D4EC PRG:54EC E8
|
|
sta Zp20,x ; CPU:$D4ED PRG:54ED 95 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop162
|
|
; Global: Writes one column of tiles to the PPU and steps the PPU address on.
|
|
; Local: Executes 20 instructions: loads A from ((StarFieldCount),y); branches
|
|
; on equal to NmiHandler_Loop162; loads A from ((TilePtrLo),y); ANDs
|
|
; A with $07; clears the carry flag; adds ScreenPtrLo to A; and 14
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop162:
|
|
inc ScreenPtrLo ; CPU:$D4EF PRG:54EF E6 0A
|
|
inc ScreenPtrLo ; CPU:$D4F1 PRG:54F1 E6 0A
|
|
iny ; CPU:$D4F3 PRG:54F3 C8
|
|
cpy #$0A ; CPU:$D4F4 PRG:54F4 C0 0A
|
|
bcc NmiHandler_OnCarryClear6 ; CPU:$D4F6 PRG:54F6 90 DD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: WritePpuTileColumn
|
|
; Global: The routine calls Sub_C156.
|
|
; Local: Executes 9 instructions: calls Sub_C156; loads X from Zp02;
|
|
; decrements X; clears the carry flag; loads A with $20; adds
|
|
; PpuAddrLow to A; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
WritePpuTileColumn:
|
|
jsr Sub_C156 ; CPU:$D4F8 PRG:54F8 20 56 C1
|
|
ldx Zp02 ; CPU:$D4FB PRG:54FB A6 02
|
|
dex ; CPU:$D4FD PRG:54FD CA
|
|
clc ; CPU:$D4FE PRG:54FE 18
|
|
lda #$20 ; CPU:$D4FF PRG:54FF A9 20
|
|
adc PpuAddrLow ; CPU:$D501 PRG:5501 65 04
|
|
sta PpuAddrLow ; CPU:$D503 PRG:5503 85 04
|
|
bcc NmiHandler_OnNonnegative19 ; CPU:$D505 PRG:5505 90 02
|
|
inc PpuAddrHigh ; CPU:$D507 PRG:5507 E6 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative19
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads Y from Zp20,x; compares Y with $24;
|
|
; branches on equal to NmiHandler_Loop163; increments Y; stores Y to
|
|
; Zp20,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative19:
|
|
ldy Zp20,x ; CPU:$D509 PRG:5509 B4 20
|
|
cpy #$24 ; CPU:$D50B PRG:550B C0 24
|
|
beq NmiHandler_Loop163 ; CPU:$D50D PRG:550D F0 03
|
|
iny ; CPU:$D50F PRG:550F C8
|
|
sty Zp20,x ; CPU:$D510 PRG:5510 94 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop163
|
|
; Global: Spawns an enemy ship: it clears the slot and stores the ship's sprite type.
|
|
; Local: Executes 8 instructions: loads Y from Zp20,x; compares Y with $24;
|
|
; branches on equal to NmiHandler_Loop163; increments Y; stores Y to
|
|
; Zp20,x; decrements X; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop163:
|
|
dex ; CPU:$D512 PRG:5512 CA
|
|
bpl NmiHandler_OnNonnegative19 ; CPU:$D513 PRG:5513 10 F4
|
|
jmp Sub_C156 ; CPU:$D515 PRG:5515 4C 56 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SpawnEnemyShip
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 13 instructions: copies A into X; ORs A with $80; stores A
|
|
; to Zp1E; loads A with $00; stores A to $0400,x; copies X into A;
|
|
; and 7 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp1E, Zp69, $03D0, $0400, $0490, $0491.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SpawnEnemyShip:
|
|
tax ; CPU:$D518 PRG:5518 AA
|
|
ora #$80 ; CPU:$D519 PRG:5519 09 80
|
|
sta Zp1E ; CPU:$D51B PRG:551B 85 1E
|
|
lda #$00 ; CPU:$D51D PRG:551D A9 00
|
|
sta $0400,x ; CPU:$D51F PRG:551F 9D 00 04
|
|
txa ; CPU:$D522 PRG:5522 8A
|
|
ldx #$00 ; CPU:$D523 PRG:5523 A2 00
|
|
cmp #$10 ; CPU:$D525 PRG:5525 C9 10
|
|
bcc NmiHandler_Loop164 ; CPU:$D527 PRG:5527 90 06
|
|
inx ; CPU:$D529 PRG:5529 E8
|
|
cmp #$30 ; CPU:$D52A PRG:552A C9 30
|
|
bcc NmiHandler_Loop164 ; CPU:$D52C PRG:552C 90 01
|
|
inx ; CPU:$D52E PRG:552E E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop164
|
|
; Global: Spawns an enemy ship of the second kind.
|
|
; Local: Executes 3 instructions: decrements $0491,x; decrements $0490; calls
|
|
; StoreEnemyShipSpriteType.
|
|
; Parameters: Reads $0490 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp69, $03D0, $0490, $0491.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop164:
|
|
dec $0491,x ; CPU:$D52F PRG:552F DE 91 04
|
|
dec $0490 ; CPU:$D532 PRG:5532 CE 90 04
|
|
jmp StoreEnemyShipSpriteType ; CPU:$D535 PRG:5535 4C 61 D5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SpawnEnemyShipAlt
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: stores A to Zp1E; loads Y with $01; compares
|
|
; A with $10; branches on carry set to NmiHandler_Loop165; compares A
|
|
; with $08; branches on carry clear to NmiHandler_Loop165; and 3 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp69, $03D0, $0400, $0490,
|
|
; $0491.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SpawnEnemyShipAlt:
|
|
sta Zp1E ; CPU:$D538 PRG:5538 85 1E
|
|
ldy #$01 ; CPU:$D53A PRG:553A A0 01
|
|
cmp #$10 ; CPU:$D53C PRG:553C C9 10
|
|
bcs NmiHandler_Loop165 ; CPU:$D53E PRG:553E B0 09
|
|
cmp #$08 ; CPU:$D540 PRG:5540 C9 08
|
|
bcc NmiHandler_Loop165 ; CPU:$D542 PRG:5542 90 05
|
|
sbc #$08 ; CPU:$D544 PRG:5544 E9 08
|
|
sta Zp1E ; CPU:$D546 PRG:5546 85 1E
|
|
iny ; CPU:$D548 PRG:5548 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop165
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: copies A into X; copies Y into A; stores A
|
|
; to $0400,x; copies X into A; loads X with $00; compares A with $10;
|
|
; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp69, $03D0, $0400, $0490, $0491.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop165:
|
|
tax ; CPU:$D549 PRG:5549 AA
|
|
tya ; CPU:$D54A PRG:554A 98
|
|
sta $0400,x ; CPU:$D54B PRG:554B 9D 00 04
|
|
txa ; CPU:$D54E PRG:554E 8A
|
|
ldx #$00 ; CPU:$D54F PRG:554F A2 00
|
|
cmp #$10 ; CPU:$D551 PRG:5551 C9 10
|
|
bcc NmiHandler_Loop166 ; CPU:$D553 PRG:5553 90 06
|
|
inx ; CPU:$D555 PRG:5555 E8
|
|
cmp #$30 ; CPU:$D556 PRG:5556 C9 30
|
|
bcc NmiHandler_Loop166 ; CPU:$D558 PRG:5558 90 01
|
|
inx ; CPU:$D55A PRG:555A E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop166
|
|
; Global: Stores the sprite type of an enemy ship in the sprite table.
|
|
; Local: Executes 2 instructions: increments $0491,x; increments $0490.
|
|
; Parameters: Reads $0490 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp69, $03D0, $0490, $0491.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop166:
|
|
inc $0491,x ; CPU:$D55B PRG:555B FE 91 04
|
|
inc $0490 ; CPU:$D55E PRG:555E EE 90 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: StoreEnemyShipSpriteType
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from Zp1E; loads X from Zp69; stores
|
|
; A to $03D0,x; increments X; copies X into A; ANDs A with $07; and 1
|
|
; more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp69, $03D0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
StoreEnemyShipSpriteType:
|
|
lda Zp1E ; CPU:$D561 PRG:5561 A5 1E
|
|
ldx Zp69 ; CPU:$D563 PRG:5563 A6 69
|
|
sta $03D0,x ; CPU:$D565 PRG:5565 9D D0 03
|
|
inx ; CPU:$D568 PRG:5568 E8
|
|
txa ; CPU:$D569 PRG:5569 8A
|
|
and #$07 ; CPU:$D56A PRG:556A 29 07
|
|
sta Zp69 ; CPU:$D56C PRG:556C 85 69
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero7
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero7:
|
|
rts ; CPU:$D56E PRG:556E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D56F
|
|
; Global: Draws the sprites of the enemy ship that is being moved.
|
|
; Local: Executes 4 instructions: returns with RTS; loads A with $02; stores A
|
|
; to Zp02; stores A to Zp0E.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D56F:
|
|
lda #$02 ; CPU:$D56F PRG:556F A9 02
|
|
sta Zp02 ; CPU:$D571 PRG:5571 85 02
|
|
sta Zp0E ; CPU:$D573 PRG:5573 85 0E
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DrawEnemyShipSprites
|
|
; Global: The routine calls Sub_D703.
|
|
; Local: Executes 12 instructions: returns with RTS; loads X from Zp68;
|
|
; compares X with Zp69; branches on equal to NmiHandler_OnZero7;
|
|
; loads A from $03D0,x; stores A to StarFieldCount; and 6 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DrawEnemyShipSprites:
|
|
ldx Zp68 ; CPU:$D575 PRG:5575 A6 68
|
|
cpx Zp69 ; CPU:$D577 PRG:5577 E4 69
|
|
beq NmiHandler_OnZero7 ; CPU:$D579 PRG:5579 F0 F3
|
|
lda $03D0,x ; CPU:$D57B PRG:557B BD D0 03
|
|
sta StarFieldCount ; CPU:$D57E PRG:557E 85 06
|
|
beq NmiHandler_Loop170 ; CPU:$D580 PRG:5580 F0 75
|
|
and #$7F ; CPU:$D582 PRG:5582 29 7F
|
|
sta Zp07 ; CPU:$D584 PRG:5584 85 07
|
|
cmp #$10 ; CPU:$D586 PRG:5586 C9 10
|
|
bcs NmiHandler_Loop167 ; CPU:$D588 PRG:5588 B0 03
|
|
jmp Sub_D703 ; CPU:$D58A PRG:558A 4C 03 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop167
|
|
; Global: The routine calls Sub_D5BE.
|
|
; Local: Executes 25 instructions: shifts a left; stores A to TilePtrLo; ANDs
|
|
; A with $E0; adds $20 to A; shifts a left; stores A to PpuAddrLow;
|
|
; and 19 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop167:
|
|
asl a ; CPU:$D58D PRG:558D 0A
|
|
sta TilePtrLo ; CPU:$D58E PRG:558E 85 08
|
|
and #$E0 ; CPU:$D590 PRG:5590 29 E0
|
|
adc #$20 ; CPU:$D592 PRG:5592 69 20
|
|
asl a ; CPU:$D594 PRG:5594 0A
|
|
sta PpuAddrLow ; CPU:$D595 PRG:5595 85 04
|
|
lda #$20 ; CPU:$D597 PRG:5597 A9 20
|
|
adc #$00 ; CPU:$D599 PRG:5599 69 00
|
|
sta PpuAddrHigh ; CPU:$D59B PRG:559B 85 05
|
|
lda TilePtrLo ; CPU:$D59D PRG:559D A5 08
|
|
and #$1F ; CPU:$D59F PRG:559F 29 1F
|
|
clc ; CPU:$D5A1 PRG:55A1 18
|
|
adc PpuAddrLow ; CPU:$D5A2 PRG:55A2 65 04
|
|
sta PpuAddrLow ; CPU:$D5A4 PRG:55A4 85 04
|
|
lda StarFieldCount ; CPU:$D5A6 PRG:55A6 A5 06
|
|
and #$70 ; CPU:$D5A8 PRG:55A8 29 70
|
|
ora #$0F ; CPU:$D5AA PRG:55AA 09 0F
|
|
tay ; CPU:$D5AC PRG:55AC A8
|
|
lda $0400,y ; CPU:$D5AD PRG:55AD B9 00 04
|
|
tay ; CPU:$D5B0 PRG:55B0 A8
|
|
ldx Zp07 ; CPU:$D5B1 PRG:55B1 A6 07
|
|
cpx #$30 ; CPU:$D5B3 PRG:55B3 E0 30
|
|
bcs NmiHandler_Loop168 ; CPU:$D5B5 PRG:55B5 B0 05
|
|
lda #$80 ; CPU:$D5B7 PRG:55B7 A9 80
|
|
jmp Sub_D5BE ; CPU:$D5B9 PRG:55B9 4C BE D5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop168
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads A with $9C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop168:
|
|
lda #$9C ; CPU:$D5BC PRG:55BC A9 9C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D5BE
|
|
; Global: The routine calls Sub_D736.
|
|
; Local: Executes 25 instructions: stores A to Zp0C; loads A from $FB85,y;
|
|
; stores A to TilePtrLo; loads A from StarFieldCount; ANDs A with
|
|
; $0F; clears the carry flag; and 19 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags, Zp0C, Zp0D, Zp20, Zp21.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D5BE:
|
|
sta Zp0C ; CPU:$D5BE PRG:55BE 85 0C
|
|
lda $FB85,y ; CPU:$D5C0 PRG:55C0 B9 85 FB
|
|
sta TilePtrLo ; CPU:$D5C3 PRG:55C3 85 08
|
|
lda StarFieldCount ; CPU:$D5C5 PRG:55C5 A5 06
|
|
and #$0F ; CPU:$D5C7 PRG:55C7 29 0F
|
|
clc ; CPU:$D5C9 PRG:55C9 18
|
|
adc TilePtrLo ; CPU:$D5CA PRG:55CA 65 08
|
|
tay ; CPU:$D5CC PRG:55CC A8
|
|
lda $FBA1,y ; CPU:$D5CD PRG:55CD B9 A1 FB
|
|
sta Zp0D ; CPU:$D5D0 PRG:55D0 85 0D
|
|
and #$07 ; CPU:$D5D2 PRG:55D2 29 07
|
|
clc ; CPU:$D5D4 PRG:55D4 18
|
|
adc PpuAddrLow ; CPU:$D5D5 PRG:55D5 65 04
|
|
sta PpuAddrLow ; CPU:$D5D7 PRG:55D7 85 04
|
|
lda StarFieldCount ; CPU:$D5D9 PRG:55D9 A5 06
|
|
bmi NmiHandler_Loop169 ; CPU:$D5DB PRG:55DB 30 11
|
|
lda Zp0D ; CPU:$D5DD PRG:55DD A5 0D
|
|
and #$F8 ; CPU:$D5DF PRG:55DF 29 F8
|
|
lsr a ; CPU:$D5E1 PRG:55E1 4A
|
|
adc Zp0C ; CPU:$D5E2 PRG:55E2 65 0C
|
|
sta Zp20 ; CPU:$D5E4 PRG:55E4 85 20
|
|
clc ; CPU:$D5E6 PRG:55E6 18
|
|
adc #$02 ; CPU:$D5E7 PRG:55E7 69 02
|
|
sta Zp21 ; CPU:$D5E9 PRG:55E9 85 21
|
|
jmp Sub_D736 ; CPU:$D5EB PRG:55EB 4C 36 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop169
|
|
; Global: The routine calls Sub_D736.
|
|
; Local: Executes 4 instructions: loads A with $24; stores A to Zp20; stores A
|
|
; to Zp21; calls Sub_D736.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop169:
|
|
lda #$24 ; CPU:$D5EE PRG:55EE A9 24
|
|
sta Zp20 ; CPU:$D5F0 PRG:55F0 85 20
|
|
sta Zp21 ; CPU:$D5F2 PRG:55F2 85 21
|
|
jmp Sub_D736 ; CPU:$D5F4 PRG:55F4 4C 36 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop170
|
|
; Global: The routine calls NmiHandler_OnNonzero43 and Sub_D739.
|
|
; Local: Executes 2 instructions: calls NmiHandler_OnNonzero43; calls
|
|
; Sub_D739.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop170:
|
|
jsr NmiHandler_OnNonzero43 ; CPU:$D5F7 PRG:55F7 20 FD D5
|
|
jmp Sub_D739 ; CPU:$D5FA PRG:55FA 4C 39 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero43
|
|
; Global: The routine calls SetVramRecordCount.
|
|
; Local: Executes 8 instructions: loads A with $C2; stores A to PpuAddrLow;
|
|
; loads A with $23; stores A to PpuAddrHigh; loads Y with $02; loads
|
|
; X with $8A; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero43:
|
|
lda #$C2 ; CPU:$D5FD PRG:55FD A9 C2
|
|
sta PpuAddrLow ; CPU:$D5FF PRG:55FF 85 04
|
|
lda #$23 ; CPU:$D601 PRG:5601 A9 23
|
|
sta PpuAddrHigh ; CPU:$D603 PRG:5603 85 05
|
|
ldy #$02 ; CPU:$D605 PRG:5605 A0 02
|
|
ldx #$8A ; CPU:$D607 PRG:5607 A2 8A
|
|
lda #$04 ; CPU:$D609 PRG:5609 A9 04
|
|
jmp SetVramRecordCount ; CPU:$D60B PRG:560B 4C 5C C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D60E
|
|
; Global: The routine calls SetVramRecordCount and QueueVramWritePointer, reads $0496.
|
|
; Local: Executes 15 instructions: loads A with $C2; stores A to PpuAddrLow;
|
|
; loads A with $23; stores A to PpuAddrHigh; loads Y with $02; loads
|
|
; X with $8A; and 9 more instructions.
|
|
; Parameters: Reads $0496 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D60E:
|
|
ldx $0496 ; CPU:$D60E PRG:560E AE 96 04
|
|
beq NmiHandler_Loop171 ; CPU:$D611 PRG:5611 F0 0A
|
|
dex ; CPU:$D613 PRG:5613 CA
|
|
bne NmiHandler_OnNonzero43 ; CPU:$D614 PRG:5614 D0 E7
|
|
ldx #$78 ; CPU:$D616 PRG:5616 A2 78
|
|
lda #$FB ; CPU:$D618 PRG:5618 A9 FB
|
|
jmp QueueVramWritePointer ; CPU:$D61A PRG:561A 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop171
|
|
; Global: The routine calls QueueVramWritePointer.
|
|
; Local: Executes 3 instructions: loads X with $6F; loads A with $FB; calls
|
|
; QueueVramWritePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp4E, Zp4F, $0100, PPUADDR, PPUDATA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop171:
|
|
ldx #$6F ; CPU:$D61D PRG:561D A2 6F
|
|
lda #$FB ; CPU:$D61F PRG:561F A9 FB
|
|
jmp QueueVramWritePointer ; CPU:$D621 PRG:5621 4C 17 C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero8
|
|
; Global: The routine calls Sub_D739.
|
|
; Local: Executes 3 instructions: loads A with $00; stores A to $0497,x; calls
|
|
; Sub_D739.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp0E, Zp68, $0497.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero8:
|
|
lda #$00 ; CPU:$D624 PRG:5624 A9 00
|
|
sta $0497,x ; CPU:$D626 PRG:5626 9D 97 04
|
|
jmp Sub_D739 ; CPU:$D629 PRG:5629 4C 39 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative3
|
|
; Global: The routine calls Sub_D739.
|
|
; Local: Executes 4 instructions: loads A with $00; stores A to $0497,x; calls
|
|
; Sub_D739; loads X with $03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative3:
|
|
ldx #$03 ; CPU:$D62C PRG:562C A2 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative20
|
|
; Global: The routine calls Sub_D739 and Sub_D736, reads $040F.
|
|
; Local: Executes 27 instructions: loads A with $00; stores A to $0497,x;
|
|
; calls Sub_D739; loads A from $0497,x; compares A with Zp07;
|
|
; branches on equal to NmiHandler_OnZero8; and 21 more instructions.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative20:
|
|
lda $0497,x ; CPU:$D62E PRG:562E BD 97 04
|
|
cmp Zp07 ; CPU:$D631 PRG:5631 C5 07
|
|
beq NmiHandler_OnZero8 ; CPU:$D633 PRG:5633 F0 EF
|
|
dex ; CPU:$D635 PRG:5635 CA
|
|
bpl NmiHandler_OnNonnegative20 ; CPU:$D636 PRG:5636 10 F6
|
|
ldx $040F ; CPU:$D638 PRG:5638 AE 0F 04
|
|
lda $FB85,x ; CPU:$D63B PRG:563B BD 85 FB
|
|
tax ; CPU:$D63E PRG:563E AA
|
|
lda $FBA1,x ; CPU:$D63F PRG:563F BD A1 FB
|
|
and #$07 ; CPU:$D642 PRG:5642 29 07
|
|
sta PpuAddrLow ; CPU:$D644 PRG:5644 85 04
|
|
lda Zp07 ; CPU:$D646 PRG:5646 A5 07
|
|
asl a ; CPU:$D648 PRG:5648 0A
|
|
adc PpuAddrLow ; CPU:$D649 PRG:5649 65 04
|
|
clc ; CPU:$D64B PRG:564B 18
|
|
adc #$40 ; CPU:$D64C PRG:564C 69 40
|
|
sta PpuAddrLow ; CPU:$D64E PRG:564E 85 04
|
|
lda $040F ; CPU:$D650 PRG:5650 AD 0F 04
|
|
ror a ; CPU:$D653 PRG:5653 6A
|
|
bcs NmiHandler_Loop172 ; CPU:$D654 PRG:5654 B0 09
|
|
lda #$24 ; CPU:$D656 PRG:5656 A9 24
|
|
sta Zp20 ; CPU:$D658 PRG:5658 85 20
|
|
sta Zp21 ; CPU:$D65A PRG:565A 85 21
|
|
jmp Sub_D736 ; CPU:$D65C PRG:565C 4C 36 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop172
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: decrements PpuAddrLow; loads X from Zp07;
|
|
; loads A from $03FF,x; loads Y with $24; compares A with TilePtrLo;
|
|
; branches on not equal to NmiHandler_Loop173; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop172:
|
|
dec PpuAddrLow ; CPU:$D65F PRG:565F C6 04
|
|
ldx Zp07 ; CPU:$D661 PRG:5661 A6 07
|
|
lda $03FF,x ; CPU:$D663 PRG:5663 BD FF 03
|
|
ldy #$24 ; CPU:$D666 PRG:5666 A0 24
|
|
cmp TilePtrLo ; CPU:$D668 PRG:5668 C5 08
|
|
bne NmiHandler_Loop173 ; CPU:$D66A PRG:566A D0 02
|
|
ldy #$7A ; CPU:$D66C PRG:566C A0 7A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop173
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: stores Y to Zp20; loads A with $24; stores A
|
|
; to Zp21; loads A from $0401,x; loads Y with $24; compares A with
|
|
; TilePtrLo; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop173:
|
|
sty Zp20 ; CPU:$D66E PRG:566E 84 20
|
|
lda #$24 ; CPU:$D670 PRG:5670 A9 24
|
|
sta Zp21 ; CPU:$D672 PRG:5672 85 21
|
|
lda $0401,x ; CPU:$D674 PRG:5674 BD 01 04
|
|
ldy #$24 ; CPU:$D677 PRG:5677 A0 24
|
|
cmp TilePtrLo ; CPU:$D679 PRG:5679 C5 08
|
|
bne NmiHandler_Loop174 ; CPU:$D67B PRG:567B D0 02
|
|
ldy #$7C ; CPU:$D67D PRG:567D A0 7C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop174
|
|
; Global: The routine calls Sub_D6E9.
|
|
; Local: Executes 2 instructions: stores Y to Zp22; calls Sub_D6E9.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop174:
|
|
sty Zp22 ; CPU:$D67F PRG:567F 84 22
|
|
jmp Sub_D6E9 ; CPU:$D681 PRG:5681 4C E9 D6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D684
|
|
; Global: The routine calls Sub_D739, Sub_D736 and Sub_D6E9, reads $040F and
|
|
; $0496.
|
|
; Local: Executes 78 instructions: loads A with $00; stores A to $0497,x;
|
|
; calls Sub_D739; loads X with $03; loads A from $0497,x; compares A
|
|
; with Zp07; and 72 more instructions.
|
|
; Parameters: Reads $040F and $0496 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D684:
|
|
lda #$20 ; CPU:$D684 PRG:5684 A9 20
|
|
sta PpuAddrHigh ; CPU:$D686 PRG:5686 85 05
|
|
ldx $0496 ; CPU:$D688 PRG:5688 AE 96 04
|
|
inx ; CPU:$D68B PRG:568B E8
|
|
txa ; CPU:$D68C PRG:568C 8A
|
|
eor #$03 ; CPU:$D68D PRG:568D 49 03
|
|
sta TilePtrLo ; CPU:$D68F PRG:568F 85 08
|
|
lda StarFieldCount ; CPU:$D691 PRG:5691 A5 06
|
|
bmi NmiHandler_OnNegative3 ; CPU:$D693 PRG:5693 30 97
|
|
ldx Zp07 ; CPU:$D695 PRG:5695 A6 07
|
|
lda $0400,x ; CPU:$D697 PRG:5697 BD 00 04
|
|
cmp TilePtrLo ; CPU:$D69A PRG:569A C5 08
|
|
bne NmiHandler_Loop178 ; CPU:$D69C PRG:569C D0 55
|
|
ldx $040F ; CPU:$D69E PRG:569E AE 0F 04
|
|
lda $FB85,x ; CPU:$D6A1 PRG:56A1 BD 85 FB
|
|
tax ; CPU:$D6A4 PRG:56A4 AA
|
|
lda $FBA1,x ; CPU:$D6A5 PRG:56A5 BD A1 FB
|
|
and #$07 ; CPU:$D6A8 PRG:56A8 29 07
|
|
sta PpuAddrLow ; CPU:$D6AA PRG:56AA 85 04
|
|
lda Zp07 ; CPU:$D6AC PRG:56AC A5 07
|
|
asl a ; CPU:$D6AE PRG:56AE 0A
|
|
adc PpuAddrLow ; CPU:$D6AF PRG:56AF 65 04
|
|
clc ; CPU:$D6B1 PRG:56B1 18
|
|
adc #$40 ; CPU:$D6B2 PRG:56B2 69 40
|
|
sta PpuAddrLow ; CPU:$D6B4 PRG:56B4 85 04
|
|
lda $040F ; CPU:$D6B6 PRG:56B6 AD 0F 04
|
|
ror a ; CPU:$D6B9 PRG:56B9 6A
|
|
bcs NmiHandler_Loop175 ; CPU:$D6BA PRG:56BA B0 0B
|
|
lda #$70 ; CPU:$D6BC PRG:56BC A9 70
|
|
sta Zp20 ; CPU:$D6BE PRG:56BE 85 20
|
|
lda #$72 ; CPU:$D6C0 PRG:56C0 A9 72
|
|
sta Zp21 ; CPU:$D6C2 PRG:56C2 85 21
|
|
jmp Sub_D736 ; CPU:$D6C4 PRG:56C4 4C 36 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop175
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: decrements PpuAddrLow; loads X from Zp07;
|
|
; loads A from $03FF,x; loads Y with $7C; compares A with TilePtrLo;
|
|
; branches on not equal to NmiHandler_Loop176; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop175:
|
|
dec PpuAddrLow ; CPU:$D6C7 PRG:56C7 C6 04
|
|
ldx Zp07 ; CPU:$D6C9 PRG:56C9 A6 07
|
|
lda $03FF,x ; CPU:$D6CB PRG:56CB BD FF 03
|
|
ldy #$7C ; CPU:$D6CE PRG:56CE A0 7C
|
|
cmp TilePtrLo ; CPU:$D6D0 PRG:56D0 C5 08
|
|
bne NmiHandler_Loop176 ; CPU:$D6D2 PRG:56D2 D0 02
|
|
ldy #$7E ; CPU:$D6D4 PRG:56D4 A0 7E
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop176
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: stores Y to Zp20; loads A with $78; stores A
|
|
; to Zp21; loads A from $0401,x; loads Y with $7A; compares A with
|
|
; TilePtrLo; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop176:
|
|
sty Zp20 ; CPU:$D6D6 PRG:56D6 84 20
|
|
lda #$78 ; CPU:$D6D8 PRG:56D8 A9 78
|
|
sta Zp21 ; CPU:$D6DA PRG:56DA 85 21
|
|
lda $0401,x ; CPU:$D6DC PRG:56DC BD 01 04
|
|
ldy #$7A ; CPU:$D6DF PRG:56DF A0 7A
|
|
cmp TilePtrLo ; CPU:$D6E1 PRG:56E1 C5 08
|
|
bne NmiHandler_Loop177 ; CPU:$D6E3 PRG:56E3 D0 02
|
|
ldy #$7E ; CPU:$D6E5 PRG:56E5 A0 7E
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop177
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores Y to Zp22.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop177:
|
|
sty Zp22 ; CPU:$D6E7 PRG:56E7 84 22
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D6E9
|
|
; Global: The routine calls WritePpuTileColumn and Sub_D739.
|
|
; Local: Executes 4 instructions: increments Zp02; calls WritePpuTileColumn; decrements
|
|
; Zp02; calls Sub_D739.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D6E9:
|
|
inc Zp02 ; CPU:$D6E9 PRG:56E9 E6 02
|
|
jsr WritePpuTileColumn ; CPU:$D6EB PRG:56EB 20 F8 D4
|
|
dec Zp02 ; CPU:$D6EE PRG:56EE C6 02
|
|
jmp Sub_D739 ; CPU:$D6F0 PRG:56F0 4C 39 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop178
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $04.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp0E, Zp68, $0497.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop178:
|
|
ldx #$04 ; CPU:$D6F3 PRG:56F3 A2 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero44
|
|
; Global: The routine calls Sub_D739.
|
|
; Local: Executes 6 instructions: decrements X; loads A from $0497,x; branches
|
|
; on not equal to NmiHandler_OnNonzero44; loads A from Zp07; stores A
|
|
; to $0497,x; calls Sub_D739.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp0E, Zp68, $0497.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero44:
|
|
dex ; CPU:$D6F5 PRG:56F5 CA
|
|
lda $0497,x ; CPU:$D6F6 PRG:56F6 BD 97 04
|
|
bne NmiHandler_OnNonzero44 ; CPU:$D6F9 PRG:56F9 D0 FA
|
|
lda Zp07 ; CPU:$D6FB PRG:56FB A5 07
|
|
sta $0497,x ; CPU:$D6FD PRG:56FD 9D 97 04
|
|
jmp Sub_D739 ; CPU:$D700 PRG:5700 4C 39 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D703
|
|
; Global: The routine calls Sub_D684, reads $040F.
|
|
; Local: Executes 4 instructions: loads X from $040F; compares X with $0C;
|
|
; branches on carry clear to NmiHandler_Loop179; calls Sub_D684.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D703:
|
|
ldx $040F ; CPU:$D703 PRG:5703 AE 0F 04
|
|
cpx #$0C ; CPU:$D706 PRG:5706 E0 0C
|
|
bcc NmiHandler_Loop179 ; CPU:$D708 PRG:5708 90 03
|
|
jmp Sub_D684 ; CPU:$D70A PRG:570A 4C 84 D6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop179
|
|
; Global: The routine calls Sub_D736.
|
|
; Local: Executes 13 instructions: copies A into X; shifts a left; adds $42 to
|
|
; A; stores A to PpuAddrLow; loads A with $20; adds $00 to A; and 7
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop179:
|
|
tax ; CPU:$D70D PRG:570D AA
|
|
asl a ; CPU:$D70E PRG:570E 0A
|
|
adc #$42 ; CPU:$D70F PRG:570F 69 42
|
|
sta PpuAddrLow ; CPU:$D711 PRG:5711 85 04
|
|
lda #$20 ; CPU:$D713 PRG:5713 A9 20
|
|
adc #$00 ; CPU:$D715 PRG:5715 69 00
|
|
sta PpuAddrHigh ; CPU:$D717 PRG:5717 85 05
|
|
lda StarFieldCount ; CPU:$D719 PRG:5719 A5 06
|
|
bpl NmiHandler_Loop180 ; CPU:$D71B PRG:571B 10 09
|
|
lda #$24 ; CPU:$D71D PRG:571D A9 24
|
|
sta Zp20 ; CPU:$D71F PRG:571F 85 20
|
|
sta Zp21 ; CPU:$D721 PRG:5721 85 21
|
|
jmp Sub_D736 ; CPU:$D723 PRG:5723 4C 36 D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop180
|
|
; Global: The routine reads $040F.
|
|
; Local: Executes 5 instructions: loads A from $040F; rotates a right; loads X
|
|
; with $70; branches on carry set to NmiHandler_Loop181; loads X with
|
|
; $74.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop180:
|
|
lda $040F ; CPU:$D726 PRG:5726 AD 0F 04
|
|
ror a ; CPU:$D729 PRG:5729 6A
|
|
ldx #$70 ; CPU:$D72A PRG:572A A2 70
|
|
bcs NmiHandler_Loop181 ; CPU:$D72C PRG:572C B0 02
|
|
ldx #$74 ; CPU:$D72E PRG:572E A2 74
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop181
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: stores X to Zp20; increments X; increments
|
|
; X; stores X to Zp21.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop181:
|
|
stx Zp20 ; CPU:$D730 PRG:5730 86 20
|
|
inx ; CPU:$D732 PRG:5732 E8
|
|
inx ; CPU:$D733 PRG:5733 E8
|
|
stx Zp21 ; CPU:$D734 PRG:5734 86 21
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D736
|
|
; Global: The routine calls WritePpuTileColumn.
|
|
; Local: Executes 1 instruction: calls WritePpuTileColumn.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D736:
|
|
jsr WritePpuTileColumn ; CPU:$D736 PRG:5736 20 F8 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D739
|
|
; Global: The routine calls DrawEnemyShipSprites.
|
|
; Local: Executes 8 instructions: loads X from Zp68; increments X; copies X
|
|
; into A; ANDs A with $07; stores A to Zp68; decrements Zp0E; and 2
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp0E, Zp68.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D739:
|
|
ldx Zp68 ; CPU:$D739 PRG:5739 A6 68
|
|
inx ; CPU:$D73B PRG:573B E8
|
|
txa ; CPU:$D73C PRG:573C 8A
|
|
and #$07 ; CPU:$D73D PRG:573D 29 07
|
|
sta Zp68 ; CPU:$D73F PRG:573F 85 68
|
|
dec Zp0E ; CPU:$D741 PRG:5741 C6 0E
|
|
beq NmiHandler_OnCarryClear7 ; CPU:$D743 PRG:5743 F0 03
|
|
jmp DrawEnemyShipSprites ; CPU:$D745 PRG:5745 4C 75 D5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear7
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear7:
|
|
rts ; CPU:$D748 PRG:5748 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D749
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: returns with RTS; stores A to Zp1F; sets the
|
|
; carry flag; subtracts $03 from A; branches on carry clear to
|
|
; NmiHandler_OnCarryClear7; rotates a right; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp1E, Zp1F, Zp69, $03D0, $048A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D749:
|
|
sta Zp1F ; CPU:$D749 PRG:5749 85 1F
|
|
sec ; CPU:$D74B PRG:574B 38
|
|
sbc #$03 ; CPU:$D74C PRG:574C E9 03
|
|
bcc NmiHandler_OnCarryClear7 ; CPU:$D74E PRG:574E 90 F8
|
|
ror a ; CPU:$D750 PRG:5750 6A
|
|
ldx #$CF ; CPU:$D751 PRG:5751 A2 CF
|
|
bcc NmiHandler_Loop182 ; CPU:$D753 PRG:5753 90 02
|
|
ldx #$3F ; CPU:$D755 PRG:5755 A2 3F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop182
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: stores X to Zp1E; rotates a right; loads X
|
|
; with $00; branches on carry clear to NmiHandler_Loop183; increments
|
|
; X.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp1E, Zp69, $03D0, $048A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop182:
|
|
stx Zp1E ; CPU:$D757 PRG:5757 86 1E
|
|
ror a ; CPU:$D759 PRG:5759 6A
|
|
ldx #$00 ; CPU:$D75A PRG:575A A2 00
|
|
bcc NmiHandler_Loop183 ; CPU:$D75C PRG:575C 90 01
|
|
inx ; CPU:$D75E PRG:575E E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop183
|
|
; Global: The routine reads $040F.
|
|
; Local: Executes 7 instructions: loads A from $048A,x; ANDs A with Zp1E;
|
|
; stores A to $048A,x; loads A from $040F; compares A with $0C;
|
|
; branches on carry clear to NmiHandler_Loop184; and 1 more
|
|
; instruction.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp1E, Zp69, $03D0, $048A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop183:
|
|
lda $048A,x ; CPU:$D75F PRG:575F BD 8A 04
|
|
and Zp1E ; CPU:$D762 PRG:5762 25 1E
|
|
sta $048A,x ; CPU:$D764 PRG:5764 9D 8A 04
|
|
lda $040F ; CPU:$D767 PRG:5767 AD 0F 04
|
|
cmp #$0C ; CPU:$D76A PRG:576A C9 0C
|
|
bcc NmiHandler_Loop184 ; CPU:$D76C PRG:576C 90 01
|
|
rts ; CPU:$D76E PRG:576E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop184
|
|
; Global: The routine calls StoreEnemyShipSpriteType.
|
|
; Local: Executes 3 instructions: loads A with $00; stores A to Zp1E; calls
|
|
; StoreEnemyShipSpriteType.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp1E, Zp69, $03D0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop184:
|
|
lda #$00 ; CPU:$D76F PRG:576F A9 00
|
|
sta Zp1E ; CPU:$D771 PRG:5771 85 1E
|
|
jmp StoreEnemyShipSpriteType ; CPU:$D773 PRG:5773 4C 61 D5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear8
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads X from Zp1F; compares X with $0C;
|
|
; branches on carry set to NmiHandler_Loop185; copies A into X; loads
|
|
; A from $FB7E,x; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear8:
|
|
ldx Zp1F ; CPU:$D776 PRG:5776 A6 1F
|
|
cpx #$0C ; CPU:$D778 PRG:5778 E0 0C
|
|
bcs NmiHandler_Loop185 ; CPU:$D77A PRG:577A B0 05
|
|
tax ; CPU:$D77C PRG:577C AA
|
|
lda $FB7E,x ; CPU:$D77D PRG:577D BD 7E FB
|
|
rts ; CPU:$D780 PRG:5780 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop185
|
|
; Global: Looks the tile id of an enemy ship up in the ship's own table.
|
|
; Local: Executes 7 instructions: clears the carry flag; adds Zp1E to A;
|
|
; copies A into X; loads A from $FC41,x; sets the carry flag;
|
|
; subtracts $01 from A; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop185:
|
|
clc ; CPU:$D781 PRG:5781 18
|
|
adc Zp1E ; CPU:$D782 PRG:5782 65 1E
|
|
tax ; CPU:$D784 PRG:5784 AA
|
|
lda $FC41,x ; CPU:$D785 PRG:5785 BD 41 FC
|
|
sec ; CPU:$D788 PRG:5788 38
|
|
sbc #$01 ; CPU:$D789 PRG:5789 E9 01
|
|
rts ; CPU:$D78B PRG:578B 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: GetEnemyShipTileId
|
|
; Global: Works out the Y coordinate an enemy ship is drawn at.
|
|
; Local: Executes 30 instructions: loads X from Zp1F; compares X with $0C;
|
|
; branches on carry set to NmiHandler_Loop185; copies A into X; loads
|
|
; A from $FB7E,x; returns with RTS; and 24 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
GetEnemyShipTileId:
|
|
pha ; CPU:$D78C PRG:578C 48
|
|
ora #$0F ; CPU:$D78D PRG:578D 09 0F
|
|
tax ; CPU:$D78F PRG:578F AA
|
|
lda $0400,x ; CPU:$D790 PRG:5790 BD 00 04
|
|
tax ; CPU:$D793 PRG:5793 AA
|
|
sta Zp1F ; CPU:$D794 PRG:5794 85 1F
|
|
lda $FB85,x ; CPU:$D796 PRG:5796 BD 85 FB
|
|
sta Zp1E ; CPU:$D799 PRG:5799 85 1E
|
|
pla ; CPU:$D79B PRG:579B 68
|
|
cmp #$10 ; CPU:$D79C PRG:579C C9 10
|
|
bcc NmiHandler_OnCarryClear8 ; CPU:$D79E PRG:579E 90 D6
|
|
and #$0F ; CPU:$D7A0 PRG:57A0 29 0F
|
|
clc ; CPU:$D7A2 PRG:57A2 18
|
|
adc Zp1E ; CPU:$D7A3 PRG:57A3 65 1E
|
|
tax ; CPU:$D7A5 PRG:57A5 AA
|
|
lda $FC41,x ; CPU:$D7A6 PRG:57A6 BD 41 FC
|
|
rts ; CPU:$D7A9 PRG:57A9 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ComputeEnemyShipY
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: ANDs A with $F0; clears the carry flag; adds
|
|
; $17 to A; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ComputeEnemyShipY:
|
|
and #$F0 ; CPU:$D7AA PRG:57AA 29 F0
|
|
clc ; CPU:$D7AC PRG:57AC 18
|
|
adc #$17 ; CPU:$D7AD PRG:57AD 69 17
|
|
rts ; CPU:$D7AF PRG:57AF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCD7B0
|
|
; Global: Works out the screen position of an enemy ship from its table entry.
|
|
; Local: Executes 5 instructions: calls GetEnemyShipTileId; stores A to Zp11; loads A
|
|
; with $17; stores A to Zp10; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp10, Zp11, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCD7B0:
|
|
jsr GetEnemyShipTileId ; CPU:$D7B0 PRG:57B0 20 8C D7
|
|
sta Zp11 ; CPU:$D7B3 PRG:57B3 85 11
|
|
lda #$17 ; CPU:$D7B5 PRG:57B5 A9 17
|
|
sta Zp10 ; CPU:$D7B7 PRG:57B7 85 10
|
|
rts ; CPU:$D7B9 PRG:57B9 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ComputeEnemyShipScreenPosition
|
|
; Global: The routine calls ComputeEnemyShipY and GetEnemyShipTileId.
|
|
; Local: Executes 7 instructions: pushes A; calls ComputeEnemyShipY; stores A to Zp10;
|
|
; pulls A; calls GetEnemyShipTileId; stores A to Zp11; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp10, Zp11, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ComputeEnemyShipScreenPosition:
|
|
pha ; CPU:$D7BA PRG:57BA 48
|
|
jsr ComputeEnemyShipY ; CPU:$D7BB PRG:57BB 20 AA D7
|
|
sta Zp10 ; CPU:$D7BE PRG:57BE 85 10
|
|
pla ; CPU:$D7C0 PRG:57C0 68
|
|
jsr GetEnemyShipTileId ; CPU:$D7C1 PRG:57C1 20 8C D7
|
|
sta Zp11 ; CPU:$D7C4 PRG:57C4 85 11
|
|
rts ; CPU:$D7C6 PRG:57C6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D7C7
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A from Zp78; stores A to Zp1C; copies
|
|
; A into X; increments X; branches on not equal to
|
|
; NmiHandler_Loop186; loads X with $F8.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D7C7:
|
|
lda Zp78 ; CPU:$D7C7 PRG:57C7 A5 78
|
|
sta Zp1C ; CPU:$D7C9 PRG:57C9 85 1C
|
|
tax ; CPU:$D7CB PRG:57CB AA
|
|
inx ; CPU:$D7CC PRG:57CC E8
|
|
bne NmiHandler_Loop186 ; CPU:$D7CD PRG:57CD D0 02
|
|
ldx #$F8 ; CPU:$D7CF PRG:57CF A2 F8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop186
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: stores X to Zp78; ANDs A with $07; copies A
|
|
; into Y; copies A into X; increments X; increments X; and 3 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop186:
|
|
stx Zp78 ; CPU:$D7D1 PRG:57D1 86 78
|
|
and #$07 ; CPU:$D7D3 PRG:57D3 29 07
|
|
tay ; CPU:$D7D5 PRG:57D5 A8
|
|
tax ; CPU:$D7D6 PRG:57D6 AA
|
|
inx ; CPU:$D7D7 PRG:57D7 E8
|
|
inx ; CPU:$D7D8 PRG:57D8 E8
|
|
inx ; CPU:$D7D9 PRG:57D9 E8
|
|
lda $FDC7,y ; CPU:$D7DA PRG:57DA B9 C7 FD
|
|
ldy #$09 ; CPU:$D7DD PRG:57DD A0 09
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative21
|
|
; Global: The routine writes $04B2, $0464, $0452 and $049C.
|
|
; Local: Executes 21 instructions: stores A to $04B0,y; decrements Y; branches
|
|
; on non-negative to NmiHandler_OnNonnegative21; loads A with $02;
|
|
; stores A to $04B2; loads A with $03; and 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $04B2, $0464 and $0452
|
|
; changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative21:
|
|
sta $04B0,y ; CPU:$D7DF PRG:57DF 99 B0 04
|
|
dey ; CPU:$D7E2 PRG:57E2 88
|
|
bpl NmiHandler_OnNonnegative21 ; CPU:$D7E3 PRG:57E3 10 FA
|
|
lda #$02 ; CPU:$D7E5 PRG:57E5 A9 02
|
|
sta $04B2 ; CPU:$D7E7 PRG:57E7 8D B2 04
|
|
lda #$03 ; CPU:$D7EA PRG:57EA A9 03
|
|
sta $0464 ; CPU:$D7EC PRG:57EC 8D 64 04
|
|
lda #$00 ; CPU:$D7EF PRG:57EF A9 00
|
|
sta $0452 ; CPU:$D7F1 PRG:57F1 8D 52 04
|
|
sta $049C ; CPU:$D7F4 PRG:57F4 8D 9C 04
|
|
sta ZpC1 ; CPU:$D7F7 PRG:57F7 85 C1
|
|
sta ZpC2 ; CPU:$D7F9 PRG:57F9 85 C2
|
|
sta ZpC3 ; CPU:$D7FB PRG:57FB 85 C3
|
|
sta ZpC4 ; CPU:$D7FD PRG:57FD 85 C4
|
|
lda #$08 ; CPU:$D7FF PRG:57FF A9 08
|
|
sta ZpC0 ; CPU:$D801 PRG:5801 85 C0
|
|
lda Zp1C ; CPU:$D803 PRG:5803 A5 1C
|
|
lsr a ; CPU:$D805 PRG:5805 4A
|
|
cmp #$03 ; CPU:$D806 PRG:5806 C9 03
|
|
bcc NmiHandler_Loop187 ; CPU:$D808 PRG:5808 90 02
|
|
lda #$03 ; CPU:$D80A PRG:580A A9 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop187
|
|
; Global: The routine calls InitEnemyPathTable, writes $0478.
|
|
; Local: Executes 4 instructions: copies A into Y; loads A from $D816,y;
|
|
; stores A to $0478; calls InitEnemyPathTable.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0478 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop187:
|
|
tay ; CPU:$D80C PRG:580C A8
|
|
lda $D816,y ; CPU:$D80D PRG:580D B9 16 D8
|
|
sta $0478 ; CPU:$D810 PRG:5810 8D 78 04
|
|
jmp InitEnemyPathTable ; CPU:$D813 PRG:5813 4C 42 D8
|
|
; ---- data $D816-$D819 (4 bytes) ----
|
|
; referenced by `lda $D816,y` at $D80D (operand $D816 falls inside this region)
|
|
StageFlagCountTable:
|
|
.byte $04, $03, $01, $00 ; CPU:$D816 PRG:5816 04 03 01 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D81A
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $09.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D81A:
|
|
ldx #$09 ; CPU:$D81A PRG:581A A2 09
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative22
|
|
; Global: Initialises the table the enemy ships' flight paths are read from.
|
|
; Local: Executes 16 instructions: loads A from $FDBD,x; stores A to $04B0,x;
|
|
; decrements X; branches on non-negative to
|
|
; NmiHandler_OnNonnegative22; loads A with $02; stores A to $0464;
|
|
; and 10 more instructions.
|
|
; Parameters: Reads $0452, $045B and $0450 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0464, $049C and $0478
|
|
; changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative22:
|
|
lda $FDBD,x ; CPU:$D81C PRG:581C BD BD FD
|
|
sta $04B0,x ; CPU:$D81F PRG:581F 9D B0 04
|
|
dex ; CPU:$D822 PRG:5822 CA
|
|
bpl NmiHandler_OnNonnegative22 ; CPU:$D823 PRG:5823 10 F7
|
|
lda #$02 ; CPU:$D825 PRG:5825 A9 02
|
|
sta $0464 ; CPU:$D827 PRG:5827 8D 64 04
|
|
lda $0452 ; CPU:$D82A PRG:582A AD 52 04
|
|
asl a ; CPU:$D82D PRG:582D 0A
|
|
asl a ; CPU:$D82E PRG:582E 0A
|
|
adc $0452 ; CPU:$D82F PRG:582F 6D 52 04
|
|
tax ; CPU:$D832 PRG:5832 AA
|
|
lda $FDA4,x ; CPU:$D833 PRG:5833 BD A4 FD
|
|
sta $049C ; CPU:$D836 PRG:5836 8D 9C 04
|
|
lda $045B ; CPU:$D839 PRG:5839 AD 5B 04
|
|
sta $0478 ; CPU:$D83C PRG:583C 8D 78 04
|
|
ldx $0450 ; CPU:$D83F PRG:583F AE 50 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: InitEnemyPathTable
|
|
; Global: The routine writes $0494 and $049B.
|
|
; Local: Executes 23 instructions: copies X into A; shifts a left; copies A
|
|
; into X; loads A from $FE3D,x; stores A to Zp74; loads A from
|
|
; $FE3E,x; and 17 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0494 and $049B changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
InitEnemyPathTable:
|
|
txa ; CPU:$D842 PRG:5842 8A
|
|
asl a ; CPU:$D843 PRG:5843 0A
|
|
tax ; CPU:$D844 PRG:5844 AA
|
|
lda $FE3D,x ; CPU:$D845 PRG:5845 BD 3D FE
|
|
sta Zp74 ; CPU:$D848 PRG:5848 85 74
|
|
lda $FE3E,x ; CPU:$D84A PRG:584A BD 3E FE
|
|
sta Zp75 ; CPU:$D84D PRG:584D 85 75
|
|
txa ; CPU:$D84F PRG:584F 8A
|
|
sta Zp1C ; CPU:$D850 PRG:5850 85 1C
|
|
asl a ; CPU:$D852 PRG:5852 0A
|
|
asl a ; CPU:$D853 PRG:5853 0A
|
|
adc Zp1C ; CPU:$D854 PRG:5854 65 1C
|
|
adc #$CF ; CPU:$D856 PRG:5856 69 CF
|
|
sta Zp76 ; CPU:$D858 PRG:5858 85 76
|
|
lda #$FD ; CPU:$D85A PRG:585A A9 FD
|
|
adc #$00 ; CPU:$D85C PRG:585C 69 00
|
|
sta Zp77 ; CPU:$D85E PRG:585E 85 77
|
|
lda #$28 ; CPU:$D860 PRG:5860 A9 28
|
|
sta $0494 ; CPU:$D862 PRG:5862 8D 94 04
|
|
lda #$00 ; CPU:$D865 PRG:5865 A9 00
|
|
sta Zp73 ; CPU:$D867 PRG:5867 85 73
|
|
sta $049B ; CPU:$D869 PRG:5869 8D 9B 04
|
|
ldx #$02 ; CPU:$D86C PRG:586C A2 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative23
|
|
; Global: Calls the flight path handler the enemy ship's state selects.
|
|
; Local: Executes 4 instructions: stores A to Zp70,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative23; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; X, the N and Z flags, Zp70.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative23:
|
|
sta Zp70,x ; CPU:$D86E PRG:586E 95 70
|
|
dex ; CPU:$D870 PRG:5870 CA
|
|
bpl NmiHandler_OnNonnegative23 ; CPU:$D871 PRG:5871 10 FB
|
|
rts ; CPU:$D873 PRG:5873 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: CallEnemyPathHandler
|
|
; Global: The routine calls CallHandlerThroughPointer, writes $8CD8, reads $0464.
|
|
; Local: Executes 6 instructions: loads A from $0464; calls CallHandlerThroughPointer; EORs A
|
|
; with ((ZpD9),y); rotates ZpD9 right; stores Y to $8CD8; clears the
|
|
; decimal flag.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $8CD8 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and D flags, Zp1E, Zp1F, ZpC0, ZpD9, $0464,
|
|
; $8CD8.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
CallEnemyPathHandler:
|
|
lda $0464 ; CPU:$D874 PRG:5874 AD 64 04
|
|
jsr CallHandlerThroughPointer ; CPU:$D877 PRG:5877 20 01 C3
|
|
eor (ZpD9),y ; CPU:$D87A PRG:587A 51 D9
|
|
ror ZpD9 ; CPU:$D87C PRG:587C 66 D9
|
|
sty $8CD8 ; CPU:$D87E PRG:587E 8C D8 8C
|
|
cld ; CPU:$D881 PRG:5881 D8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero9
|
|
; Global: The routine writes $0464.
|
|
; Local: Executes 5 instructions: loads A with $00; stores A to $0464; loads A
|
|
; with $03; stores A to ZpC0; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0464 changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, ZpC0, $0464.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero9:
|
|
lda #$00 ; CPU:$D882 PRG:5882 A9 00
|
|
sta $0464 ; CPU:$D884 PRG:5884 8D 64 04
|
|
lda #$03 ; CPU:$D887 PRG:5887 A9 03
|
|
sta ZpC0 ; CPU:$D889 PRG:5889 85 C0
|
|
rts ; CPU:$D88B PRG:588B 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D88C
|
|
; Global: The routine writes $0464.
|
|
; Local: Executes 8 instructions: loads A with $00; stores A to $0464; loads A
|
|
; with $03; stores A to ZpC0; returns with RTS; loads X from Zp70;
|
|
; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0464 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D88C:
|
|
ldx Zp70 ; CPU:$D88C PRG:588C A6 70
|
|
lda $FE8F,x ; CPU:$D88E PRG:588E BD 8F FE
|
|
bpl NmiHandler_Loop190 ; CPU:$D891 PRG:5891 10 45
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D893
|
|
; Global: The routine writes $0464, reads $0495.
|
|
; Local: Executes 8 instructions: loads A with $00; stores A to $0464; loads A
|
|
; with $03; stores A to ZpC0; returns with RTS; loads A from $0495;
|
|
; and 2 more instructions.
|
|
; Parameters: Reads $0495 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0464 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D893:
|
|
lda $0495 ; CPU:$D893 PRG:5893 AD 95 04
|
|
ora Zp7A ; CPU:$D896 PRG:5896 05 7A
|
|
beq NmiHandler_Loop188 ; CPU:$D898 PRG:5898 F0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero10
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero10:
|
|
rts ; CPU:$D89A PRG:589A 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop188
|
|
; Global: The routine writes $0464, reads $0464.
|
|
; Local: Executes 20 instructions: loads A with $00; stores A to $0464; loads
|
|
; A with $03; stores A to ZpC0; returns with RTS; returns with RTS;
|
|
; and 14 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0464 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop188:
|
|
lda Zp7C ; CPU:$D89B PRG:589B A5 7C
|
|
cmp #$02 ; CPU:$D89D PRG:589D C9 02
|
|
beq NmiHandler_OnZero10 ; CPU:$D89F PRG:589F F0 F9
|
|
dec Zp73 ; CPU:$D8A1 PRG:58A1 C6 73
|
|
bpl NmiHandler_OnZero10 ; CPU:$D8A3 PRG:58A3 10 F5
|
|
inc Zp70 ; CPU:$D8A5 PRG:58A5 E6 70
|
|
lda $FE8F,x ; CPU:$D8A7 PRG:58A7 BD 8F FE
|
|
cmp #$FF ; CPU:$D8AA PRG:58AA C9 FF
|
|
beq NmiHandler_OnZero9 ; CPU:$D8AC PRG:58AC F0 D4
|
|
ldx #$00 ; CPU:$D8AE PRG:58AE A2 00
|
|
lda $0464 ; CPU:$D8B0 PRG:58B0 AD 64 04
|
|
ror a ; CPU:$D8B3 PRG:58B3 6A
|
|
bcc NmiHandler_Loop189 ; CPU:$D8B4 PRG:58B4 90 02
|
|
ldx #$3C ; CPU:$D8B6 PRG:58B6 A2 3C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop189
|
|
; Global: The routine writes $049C, reads $0452.
|
|
; Local: Executes 16 instructions: stores X to Zp73; increments Zp71;
|
|
; increments Zp71; loads A from $0452; shifts a left; shifts a left;
|
|
; and 10 more instructions.
|
|
; Parameters: Reads $0452 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $049C changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop189:
|
|
stx Zp73 ; CPU:$D8B8 PRG:58B8 86 73
|
|
inc Zp71 ; CPU:$D8BA PRG:58BA E6 71
|
|
inc Zp71 ; CPU:$D8BC PRG:58BC E6 71
|
|
lda $0452 ; CPU:$D8BE PRG:58BE AD 52 04
|
|
asl a ; CPU:$D8C1 PRG:58C1 0A
|
|
asl a ; CPU:$D8C2 PRG:58C2 0A
|
|
adc $0452 ; CPU:$D8C3 PRG:58C3 6D 52 04
|
|
sta Zp1C ; CPU:$D8C6 PRG:58C6 85 1C
|
|
lda Zp71 ; CPU:$D8C8 PRG:58C8 A5 71
|
|
lsr a ; CPU:$D8CA PRG:58CA 4A
|
|
adc Zp1C ; CPU:$D8CB PRG:58CB 65 1C
|
|
tax ; CPU:$D8CD PRG:58CD AA
|
|
lda $FDA4,x ; CPU:$D8CE PRG:58CE BD A4 FD
|
|
sta $049C ; CPU:$D8D1 PRG:58D1 8D 9C 04
|
|
lda #$08 ; CPU:$D8D4 PRG:58D4 A9 08
|
|
sta ZpC0 ; CPU:$D8D6 PRG:58D6 85 C0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop190
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads Y from Zp71; loads A from Zp72;
|
|
; compares A with ((Zp74),y); branches on carry set to
|
|
; NmiHandler_Loop191; increments Zp72; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop190:
|
|
ldy Zp71 ; CPU:$D8D8 PRG:58D8 A4 71
|
|
lda Zp72 ; CPU:$D8DA PRG:58DA A5 72
|
|
cmp (Zp74),y ; CPU:$D8DC PRG:58DC D1 74
|
|
bcs NmiHandler_Loop191 ; CPU:$D8DE PRG:58DE B0 03
|
|
inc Zp72 ; CPU:$D8E0 PRG:58E0 E6 72
|
|
rts ; CPU:$D8E2 PRG:58E2 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop191
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $00; stores A to Zp72.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop191:
|
|
lda #$00 ; CPU:$D8E3 PRG:58E3 A9 00
|
|
sta Zp72 ; CPU:$D8E5 PRG:58E5 85 72
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative24
|
|
; Global: The routine calls ClearPlayerSpriteBuffer, Sub_D93F, NmiHandler_Loop210 and
|
|
; NmiHandler_Loop194, reads $0464.
|
|
; Local: Executes 20 instructions: calls ClearPlayerSpriteBuffer; loads X from Zp70; loads A
|
|
; from $FE8F,x; stores A to SpriteIndex; branches on equal to
|
|
; NmiHandler_OnZero11; compares A with $01; and 14 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative24:
|
|
jsr ClearPlayerSpriteBuffer ; CPU:$D8E7 PRG:58E7 20 D8 DA
|
|
ldx Zp70 ; CPU:$D8EA PRG:58EA A6 70
|
|
lda $FE8F,x ; CPU:$D8EC PRG:58EC BD 8F FE
|
|
sta SpriteIndex ; CPU:$D8EF PRG:58EF 85 2B
|
|
beq NmiHandler_OnZero11 ; CPU:$D8F1 PRG:58F1 F0 20
|
|
cmp #$01 ; CPU:$D8F3 PRG:58F3 C9 01
|
|
bne NmiHandler_Loop193 ; CPU:$D8F5 PRG:58F5 D0 31
|
|
lda Zp7C ; CPU:$D8F7 PRG:58F7 A5 7C
|
|
bpl NmiHandler_Loop194 ; CPU:$D8F9 PRG:58F9 10 3F
|
|
lda $0464 ; CPU:$D8FB PRG:58FB AD 64 04
|
|
ror a ; CPU:$D8FE PRG:58FE 6A
|
|
bcs NmiHandler_Loop194 ; CPU:$D8FF PRG:58FF B0 39
|
|
jsr Sub_D93F ; CPU:$D901 PRG:5901 20 3F D9
|
|
ldx #$01 ; CPU:$D904 PRG:5904 A2 01
|
|
stx Zp20 ; CPU:$D906 PRG:5906 86 20
|
|
inx ; CPU:$D908 PRG:5908 E8
|
|
stx Zp7C ; CPU:$D909 PRG:5909 86 7C
|
|
ldy #$10 ; CPU:$D90B PRG:590B A0 10
|
|
jsr NmiHandler_Loop210 ; CPU:$D90D PRG:590D 20 21 DB
|
|
jmp NmiHandler_Loop194 ; CPU:$D910 PRG:5910 4C 3A D9
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero11
|
|
; Global: The routine calls ClearPlayerSpriteBuffer, Sub_D93F, NmiHandler_Loop210,
|
|
; NmiHandler_Loop194 and 1 more, reads $0464 and $049C.
|
|
; Local: Executes 28 instructions: calls ClearPlayerSpriteBuffer; loads X from Zp70; loads A
|
|
; from $FE8F,x; stores A to SpriteIndex; branches on equal to
|
|
; NmiHandler_OnZero11; compares A with $01; and 22 more instructions.
|
|
; Parameters: Reads $0464 and $049C from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero11:
|
|
lda $049C ; CPU:$D913 PRG:5913 AD 9C 04
|
|
bne NmiHandler_Loop192 ; CPU:$D916 PRG:5916 D0 0D
|
|
inx ; CPU:$D918 PRG:5918 E8
|
|
inc Zp70 ; CPU:$D919 PRG:5919 E6 70
|
|
lda $FE8F,x ; CPU:$D91B PRG:591B BD 8F FE
|
|
beq NmiHandler_OnZero11 ; CPU:$D91E PRG:591E F0 F3
|
|
bpl NmiHandler_OnNonnegative24 ; CPU:$D920 PRG:5920 10 C5
|
|
jmp Sub_D893 ; CPU:$D922 PRG:5922 4C 93 D8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop192
|
|
; Global: The routine reads $049C.
|
|
; Local: Executes 1 instruction: decrements $049C.
|
|
; Parameters: Reads $049C from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop192:
|
|
dec $049C ; CPU:$D925 PRG:5925 CE 9C 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop193
|
|
; Global: The routine calls Sub_D93F and Sub_DB10, reads $0453.
|
|
; Local: Executes 8 instructions: calls Sub_D93F; stores A to Zp20; copies Y
|
|
; into A; EORs A with $01; stores A to Zp71; loads A from $0453; and
|
|
; 2 more instructions.
|
|
; Parameters: Reads $0453 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop193:
|
|
jsr Sub_D93F ; CPU:$D928 PRG:5928 20 3F D9
|
|
sta Zp20 ; CPU:$D92B PRG:592B 85 20
|
|
tya ; CPU:$D92D PRG:592D 98
|
|
eor #$01 ; CPU:$D92E PRG:592E 49 01
|
|
sta Zp71 ; CPU:$D930 PRG:5930 85 71
|
|
lda $0453 ; CPU:$D932 PRG:5932 AD 53 04
|
|
sta Zp2C ; CPU:$D935 PRG:5935 85 2C
|
|
jsr Sub_DB10 ; CPU:$D937 PRG:5937 20 10 DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop194
|
|
; Global: The routine calls Sub_D88C.
|
|
; Local: Executes 2 instructions: increments Zp70; calls Sub_D88C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; no register, the N and Z flags, Zp70.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop194:
|
|
inc Zp70 ; CPU:$D93A PRG:593A E6 70
|
|
jmp Sub_D88C ; CPU:$D93C PRG:593C 4C 8C D8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_D93F
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads Y from Zp71; loads A from ((Zp76),y);
|
|
; ANDs A with $80; stores A to Zp27; loads A from ((Zp76),y); ANDs A
|
|
; with $7F; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp27.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_D93F:
|
|
ldy Zp71 ; CPU:$D93F PRG:593F A4 71
|
|
lda (Zp76),y ; CPU:$D941 PRG:5941 B1 76
|
|
and #$80 ; CPU:$D943 PRG:5943 29 80
|
|
sta Zp27 ; CPU:$D945 PRG:5945 85 27
|
|
lda (Zp76),y ; CPU:$D947 PRG:5947 B1 76
|
|
and #$7F ; CPU:$D949 PRG:5949 29 7F
|
|
sta SpriteY ; CPU:$D94B PRG:594B 85 25
|
|
lda $04B0,y ; CPU:$D94D PRG:594D B9 B0 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarrySet3
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarrySet3:
|
|
rts ; CPU:$D950 PRG:5950 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCD951
|
|
; Global: The routine writes $0464, reads $0459, $0494, $0495 and $0476.
|
|
; Local: Executes 9 instructions: returns with RTS; loads A from $0459;
|
|
; compares A with $0494; branches on carry clear to
|
|
; NmiHandler_Loop195; loads A with $01; stores A to $0464; and 3 more
|
|
; instructions.
|
|
; Parameters: Reads $0459, $0494, $0495 and $0476 from the zero page and RAM;
|
|
; the values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0464 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCD951:
|
|
lda $0459 ; CPU:$D951 PRG:5951 AD 59 04
|
|
cmp $0494 ; CPU:$D954 PRG:5954 CD 94 04
|
|
bcc NmiHandler_Loop195 ; CPU:$D957 PRG:5957 90 0D
|
|
lda #$01 ; CPU:$D959 PRG:5959 A9 01
|
|
sta $0464 ; CPU:$D95B PRG:595B 8D 64 04
|
|
lda $0495 ; CPU:$D95E PRG:595E AD 95 04
|
|
cmp $0476 ; CPU:$D961 PRG:5961 CD 76 04
|
|
bcs NmiHandler_OnCarrySet3 ; CPU:$D964 PRG:5964 B0 EA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop195
|
|
; Global: The routine calls ClearPlayerSpriteBuffer, reads $0495, $045A and $0494.
|
|
; Local: Executes 15 instructions: returns with RTS; loads A from $0495;
|
|
; compares A with $08; branches on carry set to
|
|
; NmiHandler_OnCarrySet3; loads A from Zp7A; branches on not equal to
|
|
; NmiHandler_OnCarrySet3; and 9 more instructions.
|
|
; Parameters: Reads $0495, $045A and $0494 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop195:
|
|
lda $0495 ; CPU:$D966 PRG:5966 AD 95 04
|
|
cmp #$08 ; CPU:$D969 PRG:5969 C9 08
|
|
bcs NmiHandler_OnCarrySet3 ; CPU:$D96B PRG:596B B0 E3
|
|
lda Zp7A ; CPU:$D96D PRG:596D A5 7A
|
|
bne NmiHandler_OnCarrySet3 ; CPU:$D96F PRG:596F D0 DF
|
|
jsr ClearPlayerSpriteBuffer ; CPU:$D971 PRG:5971 20 D8 DA
|
|
lda $045A ; CPU:$D974 PRG:5974 AD 5A 04
|
|
beq NmiHandler_Loop197 ; CPU:$D977 PRG:5977 F0 57
|
|
lda $0494 ; CPU:$D979 PRG:5979 AD 94 04
|
|
sec ; CPU:$D97C PRG:597C 38
|
|
sbc #$05 ; CPU:$D97D PRG:597D E9 05
|
|
cmp #$06 ; CPU:$D97F PRG:597F C9 06
|
|
bcs NmiHandler_Loop197 ; CPU:$D981 PRG:5981 B0 4D
|
|
ldx #$00 ; CPU:$D983 PRG:5983 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear9
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from $FED5,x; copies A into Y; loads
|
|
; A from $0400,y; branches on not equal to NmiHandler_Loop196;
|
|
; increments X; compares X with $24; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear9:
|
|
lda $FED5,x ; CPU:$D985 PRG:5985 BD D5 FE
|
|
tay ; CPU:$D988 PRG:5988 A8
|
|
lda $0400,y ; CPU:$D989 PRG:5989 B9 00 04
|
|
bne NmiHandler_Loop196 ; CPU:$D98C PRG:598C D0 07
|
|
inx ; CPU:$D98E PRG:598E E8
|
|
cpx #$24 ; CPU:$D98F PRG:598F E0 24
|
|
bcc NmiHandler_OnCarryClear9 ; CPU:$D991 PRG:5991 90 F2
|
|
bcs NmiHandler_Loop197 ; CPU:$D993 PRG:5993 B0 3B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop196
|
|
; Global: The routine calls Sub_DAE2 and NmiHandler_Loop210, writes $05A0,
|
|
; $045A and $0599, reads $045A.
|
|
; Local: Executes 23 instructions: stores Y to SpriteIndex; loads X from
|
|
; $045A; loads A from $D9C9,x; stores A to Zp20; stores A to
|
|
; SpriteAttr; loads A from $D9CC,x; and 17 more instructions.
|
|
; Parameters: Reads $045A from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $05A0, $045A and $0599 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop196:
|
|
sty SpriteIndex ; CPU:$D995 PRG:5995 84 2B
|
|
ldx $045A ; CPU:$D997 PRG:5997 AE 5A 04
|
|
lda $D9C9,x ; CPU:$D99A PRG:599A BD C9 D9
|
|
sta Zp20 ; CPU:$D99D PRG:599D 85 20
|
|
sta SpriteAttr ; CPU:$D99F PRG:599F 85 2D
|
|
lda $D9CC,x ; CPU:$D9A1 PRG:59A1 BD CC D9
|
|
sta SpriteY ; CPU:$D9A4 PRG:59A4 85 25
|
|
jsr Sub_DAE2 ; CPU:$D9A6 PRG:59A6 20 E2 DA
|
|
ldy #$00 ; CPU:$D9A9 PRG:59A9 A0 00
|
|
sty $05A0 ; CPU:$D9AB PRG:59AB 8C A0 05
|
|
sty $045A ; CPU:$D9AE PRG:59AE 8C 5A 04
|
|
sty SpriteIndex ; CPU:$D9B1 PRG:59B1 84 2B
|
|
iny ; CPU:$D9B3 PRG:59B3 C8
|
|
sty $0599 ; CPU:$D9B4 PRG:59B4 8C 99 05
|
|
inc SpriteY ; CPU:$D9B7 PRG:59B7 E6 25
|
|
lda Zp20 ; CPU:$D9B9 PRG:59B9 A5 20
|
|
ora #$80 ; CPU:$D9BB PRG:59BB 09 80
|
|
sta Zp20 ; CPU:$D9BD PRG:59BD 85 20
|
|
ldy #$C0 ; CPU:$D9BF PRG:59BF A0 C0
|
|
jsr NmiHandler_Loop210 ; CPU:$D9C1 PRG:59C1 20 21 DB
|
|
ldy #$D0 ; CPU:$D9C4 PRG:59C4 A0 D0
|
|
jsr NmiHandler_Loop210 ; CPU:$D9C6 PRG:59C6 20 21 DB
|
|
rts ; CPU:$D9C9 PRG:59C9 60
|
|
; ---- data $D9CA-$D9CF (6 bytes) ----
|
|
; referenced by `lda $D9CC,x` at $D9A1 (operand $D9CC falls inside this region)
|
|
EnemySpritePositionTable:
|
|
.byte $07, $08, $06, $29, $2B, $2D ; CPU:$D9CA PRG:59CA 07 08 06 29 2B 2D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop197
|
|
; Global: The routine reads $0473, $046A and $0467.
|
|
; Local: Executes 7 instructions: loads A from $0473; branches on not equal to
|
|
; NmiHandler_Loop198; increments $046A; loads A from $046A; compares
|
|
; A with $0467; branches on carry clear to NmiHandler_Loop198; and 1
|
|
; more instruction.
|
|
; Parameters: Reads $0473, $046A and $0467 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop197:
|
|
lda $0473 ; CPU:$D9D0 PRG:59D0 AD 73 04
|
|
bne NmiHandler_Loop198 ; CPU:$D9D3 PRG:59D3 D0 1B
|
|
inc $046A ; CPU:$D9D5 PRG:59D5 EE 6A 04
|
|
lda $046A ; CPU:$D9D8 PRG:59D8 AD 6A 04
|
|
cmp $0467 ; CPU:$D9DB PRG:59DB CD 67 04
|
|
bcc NmiHandler_Loop198 ; CPU:$D9DE PRG:59DE 90 10
|
|
ldx #$00 ; CPU:$D9E0 PRG:59E0 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear10
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from $FED1,x; copies A into Y; loads
|
|
; A from $0400,y; branches on not equal to NmiHandler_Loop199;
|
|
; increments X; compares X with $04; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear10:
|
|
lda $FED1,x ; CPU:$D9E2 PRG:59E2 BD D1 FE
|
|
tay ; CPU:$D9E5 PRG:59E5 A8
|
|
lda $0400,y ; CPU:$D9E6 PRG:59E6 B9 00 04
|
|
bne NmiHandler_Loop199 ; CPU:$D9E9 PRG:59E9 D0 08
|
|
inx ; CPU:$D9EB PRG:59EB E8
|
|
cpx #$04 ; CPU:$D9EC PRG:59EC E0 04
|
|
bcc NmiHandler_OnCarryClear10 ; CPU:$D9EE PRG:59EE 90 F2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop198
|
|
; Global: The routine calls Sub_DA73.
|
|
; Local: Executes 1 instruction: calls Sub_DA73.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop198:
|
|
jmp Sub_DA73 ; CPU:$D9F0 PRG:59F0 4C 73 DA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop199
|
|
; Global: The routine calls Sub_C317, NmiHandler_Loop209 and Sub_DA6D, reads
|
|
; $049B.
|
|
; Local: Executes 18 instructions: stores Y to SpriteIndex; EORs A with $FF;
|
|
; sets the carry flag; adds $04 to A; stores A to Zp20; calls
|
|
; Sub_C317; and 12 more instructions.
|
|
; Parameters: Reads $049B from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop199:
|
|
sty SpriteIndex ; CPU:$D9F3 PRG:59F3 84 2B
|
|
eor #$FF ; CPU:$D9F5 PRG:59F5 49 FF
|
|
sec ; CPU:$D9F7 PRG:59F7 38
|
|
adc #$04 ; CPU:$D9F8 PRG:59F8 69 04
|
|
sta Zp20 ; CPU:$D9FA PRG:59FA 85 20
|
|
jsr Sub_C317 ; CPU:$D9FC PRG:59FC 20 17 C3
|
|
and #$80 ; CPU:$D9FF PRG:59FF 29 80
|
|
sta Zp27 ; CPU:$DA01 PRG:5A01 85 27
|
|
lda Zp79 ; CPU:$DA03 PRG:5A03 A5 79
|
|
bne NmiHandler_Loop200 ; CPU:$DA05 PRG:5A05 D0 13
|
|
lda $049B ; CPU:$DA07 PRG:5A07 AD 9B 04
|
|
inc $049B ; CPU:$DA0A PRG:5A0A EE 9B 04
|
|
ror a ; CPU:$DA0D PRG:5A0D 6A
|
|
bcc NmiHandler_Loop200 ; CPU:$DA0E PRG:5A0E 90 0A
|
|
lda #$21 ; CPU:$DA10 PRG:5A10 A9 21
|
|
sta SpriteY ; CPU:$DA12 PRG:5A12 85 25
|
|
jsr NmiHandler_Loop209 ; CPU:$DA14 PRG:5A14 20 F9 DA
|
|
jmp Sub_DA6D ; CPU:$DA17 PRG:5A17 4C 6D DA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop200
|
|
; Global: The routine calls Sub_DAF4.
|
|
; Local: Executes 14 instructions: loads A with $20; stores A to SpriteY;
|
|
; calls Sub_DAF4; stores Y to Zp1C; loads A from SpriteIndex; clears
|
|
; the carry flag; and 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop200:
|
|
lda #$20 ; CPU:$DA1A PRG:5A1A A9 20
|
|
sta SpriteY ; CPU:$DA1C PRG:5A1C 85 25
|
|
jsr Sub_DAF4 ; CPU:$DA1E PRG:5A1E 20 F4 DA
|
|
sty Zp1C ; CPU:$DA21 PRG:5A21 84 1C
|
|
lda SpriteIndex ; CPU:$DA23 PRG:5A23 A5 2B
|
|
clc ; CPU:$DA25 PRG:5A25 18
|
|
adc #$0F ; CPU:$DA26 PRG:5A26 69 0F
|
|
sta Zp1D ; CPU:$DA28 PRG:5A28 85 1D
|
|
lda Zp27 ; CPU:$DA2A PRG:5A2A A5 27
|
|
sta Zp1A ; CPU:$DA2C PRG:5A2C 85 1A
|
|
lda #$00 ; CPU:$DA2E PRG:5A2E A9 00
|
|
sta Zp18 ; CPU:$DA30 PRG:5A30 85 18
|
|
lda #$03 ; CPU:$DA32 PRG:5A32 A9 03
|
|
sta Zp1B ; CPU:$DA34 PRG:5A34 85 1B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero45
|
|
; Global: The routine calls ClearPlayerSpriteBuffer and Sub_DAF4.
|
|
; Local: Executes 18 instructions: loads X from Zp1D; loads A from $0400,x;
|
|
; branches on equal to NmiHandler_Loop201; calls ClearPlayerSpriteBuffer; loads A
|
|
; from Zp1D; stores A to SpriteIndex; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero45:
|
|
ldx Zp1D ; CPU:$DA36 PRG:5A36 A6 1D
|
|
lda $0400,x ; CPU:$DA38 PRG:5A38 BD 00 04
|
|
beq NmiHandler_Loop201 ; CPU:$DA3B PRG:5A3B F0 20
|
|
jsr ClearPlayerSpriteBuffer ; CPU:$DA3D PRG:5A3D 20 D8 DA
|
|
lda Zp1D ; CPU:$DA40 PRG:5A40 A5 1D
|
|
sta SpriteIndex ; CPU:$DA42 PRG:5A42 85 2B
|
|
lda Zp1A ; CPU:$DA44 PRG:5A44 A5 1A
|
|
sta Zp27 ; CPU:$DA46 PRG:5A46 85 27
|
|
lda #$04 ; CPU:$DA48 PRG:5A48 A9 04
|
|
sta Zp20 ; CPU:$DA4A PRG:5A4A 85 20
|
|
sta SpriteAttr ; CPU:$DA4C PRG:5A4C 85 2D
|
|
lda #$27 ; CPU:$DA4E PRG:5A4E A9 27
|
|
sta SpriteY ; CPU:$DA50 PRG:5A50 85 25
|
|
jsr Sub_DAF4 ; CPU:$DA52 PRG:5A52 20 F4 DA
|
|
inc Zp18 ; CPU:$DA55 PRG:5A55 E6 18
|
|
lda Zp18 ; CPU:$DA57 PRG:5A57 A5 18
|
|
cmp #$02 ; CPU:$DA59 PRG:5A59 C9 02
|
|
bcs NmiHandler_Loop202 ; CPU:$DA5B PRG:5A5B B0 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop201
|
|
; Global: The routine calls ClearPlayerSpriteBuffer and Sub_DAF4.
|
|
; Local: Executes 21 instructions: loads X from Zp1D; loads A from $0400,x;
|
|
; branches on equal to NmiHandler_Loop201; calls ClearPlayerSpriteBuffer; loads A
|
|
; from Zp1D; stores A to SpriteIndex; and 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop201:
|
|
inc Zp1D ; CPU:$DA5D PRG:5A5D E6 1D
|
|
dec Zp1B ; CPU:$DA5F PRG:5A5F C6 1B
|
|
bne NmiHandler_OnNonzero45 ; CPU:$DA61 PRG:5A61 D0 D3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop202
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads X from Zp1C; decrements X; decrements
|
|
; X; decrements X; loads A from Zp18; stores A to $0200,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, the OAM shadow, $046A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop202:
|
|
ldx Zp1C ; CPU:$DA63 PRG:5A63 A6 1C
|
|
dex ; CPU:$DA65 PRG:5A65 CA
|
|
dex ; CPU:$DA66 PRG:5A66 CA
|
|
dex ; CPU:$DA67 PRG:5A67 CA
|
|
lda Zp18 ; CPU:$DA68 PRG:5A68 A5 18
|
|
sta $0200,x ; CPU:$DA6A PRG:5A6A 9D 00 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DA6D
|
|
; Global: The routine writes $046A.
|
|
; Local: Executes 3 instructions: loads A with $00; stores A to $046A; returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $046A changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, $046A.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DA6D:
|
|
lda #$00 ; CPU:$DA6D PRG:5A6D A9 00
|
|
sta $046A ; CPU:$DA6F PRG:5A6F 8D 6A 04
|
|
rts ; CPU:$DA72 PRG:5A72 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DA73
|
|
; Global: The routine reads $0468 and $0465.
|
|
; Local: Executes 8 instructions: loads A from Zp48; rotates a right; branches
|
|
; on carry clear to NmiHandler_Loop205; increments $0468; loads A
|
|
; from $0468; compares A with $0465; and 2 more instructions.
|
|
; Parameters: Reads $0468 and $0465 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DA73:
|
|
lda Zp48 ; CPU:$DA73 PRG:5A73 A5 48
|
|
ror a ; CPU:$DA75 PRG:5A75 6A
|
|
bcc NmiHandler_Loop205 ; CPU:$DA76 PRG:5A76 90 30
|
|
inc $0468 ; CPU:$DA78 PRG:5A78 EE 68 04
|
|
lda $0468 ; CPU:$DA7B PRG:5A7B AD 68 04
|
|
cmp $0465 ; CPU:$DA7E PRG:5A7E CD 65 04
|
|
bcs NmiHandler_Loop203 ; CPU:$DA81 PRG:5A81 B0 01
|
|
rts ; CPU:$DA83 PRG:5A83 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop203
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop203:
|
|
ldx #$00 ; CPU:$DA84 PRG:5A84 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear11
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from $FEE9,x; copies A into Y; loads
|
|
; A from $0400,y; branches on not equal to NmiHandler_Loop204;
|
|
; increments X; compares X with $10; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear11:
|
|
lda $FEE9,x ; CPU:$DA86 PRG:5A86 BD E9 FE
|
|
tay ; CPU:$DA89 PRG:5A89 A8
|
|
lda $0400,y ; CPU:$DA8A PRG:5A8A B9 00 04
|
|
bne NmiHandler_Loop204 ; CPU:$DA8D PRG:5A8D D0 06
|
|
inx ; CPU:$DA8F PRG:5A8F E8
|
|
cpx #$10 ; CPU:$DA90 PRG:5A90 E0 10
|
|
bcc NmiHandler_OnCarryClear11 ; CPU:$DA92 PRG:5A92 90 F2
|
|
rts ; CPU:$DA94 PRG:5A94 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop204
|
|
; Global: The routine calls Sub_DAE2, writes $0468.
|
|
; Local: Executes 9 instructions: stores Y to SpriteIndex; loads A with $04;
|
|
; stores A to Zp20; loads A with $1E; stores A to SpriteY; calls
|
|
; Sub_DAE2; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0468 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop204:
|
|
sty SpriteIndex ; CPU:$DA95 PRG:5A95 84 2B
|
|
lda #$04 ; CPU:$DA97 PRG:5A97 A9 04
|
|
sta Zp20 ; CPU:$DA99 PRG:5A99 85 20
|
|
lda #$1E ; CPU:$DA9B PRG:5A9B A9 1E
|
|
sta SpriteY ; CPU:$DA9D PRG:5A9D 85 25
|
|
jsr Sub_DAE2 ; CPU:$DA9F PRG:5A9F 20 E2 DA
|
|
lda #$00 ; CPU:$DAA2 PRG:5AA2 A9 00
|
|
sta $0468 ; CPU:$DAA4 PRG:5AA4 8D 68 04
|
|
rts ; CPU:$DAA7 PRG:5AA7 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop205
|
|
; Global: The routine reads $0469 and $0466.
|
|
; Local: Executes 5 instructions: increments $0469; loads A from $0469;
|
|
; compares A with $0466; branches on carry set to NmiHandler_Loop206;
|
|
; returns with RTS.
|
|
; Parameters: Reads $0469 and $0466 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop205:
|
|
inc $0469 ; CPU:$DAA8 PRG:5AA8 EE 69 04
|
|
lda $0469 ; CPU:$DAAB PRG:5AAB AD 69 04
|
|
cmp $0466 ; CPU:$DAAE PRG:5AAE CD 66 04
|
|
bcs NmiHandler_Loop206 ; CPU:$DAB1 PRG:5AB1 B0 01
|
|
rts ; CPU:$DAB3 PRG:5AB3 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop206
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop206:
|
|
ldx #$00 ; CPU:$DAB4 PRG:5AB4 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear12
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from $FED5,x; copies A into Y; loads
|
|
; A from $0400,y; branches on not equal to NmiHandler_Loop207;
|
|
; increments X; compares X with $14; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear12:
|
|
lda $FED5,x ; CPU:$DAB6 PRG:5AB6 BD D5 FE
|
|
tay ; CPU:$DAB9 PRG:5AB9 A8
|
|
lda $0400,y ; CPU:$DABA PRG:5ABA B9 00 04
|
|
bne NmiHandler_Loop207 ; CPU:$DABD PRG:5ABD D0 06
|
|
inx ; CPU:$DABF PRG:5ABF E8
|
|
cpx #$14 ; CPU:$DAC0 PRG:5AC0 E0 14
|
|
bcc NmiHandler_OnCarryClear12 ; CPU:$DAC2 PRG:5AC2 90 F2
|
|
rts ; CPU:$DAC4 PRG:5AC4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop207
|
|
; Global: Clears the sixteen bytes of the player ship's sprite buffer.
|
|
; Local: Executes 9 instructions: stores Y to SpriteIndex; loads A with $05;
|
|
; stores A to Zp20; loads A with $1A; stores A to SpriteY; calls
|
|
; Sub_DAE2; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0469 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop207:
|
|
sty SpriteIndex ; CPU:$DAC5 PRG:5AC5 84 2B
|
|
lda #$05 ; CPU:$DAC7 PRG:5AC7 A9 05
|
|
sta Zp20 ; CPU:$DAC9 PRG:5AC9 85 20
|
|
lda #$1A ; CPU:$DACB PRG:5ACB A9 1A
|
|
sta SpriteY ; CPU:$DACD PRG:5ACD 85 25
|
|
jsr Sub_DAE2 ; CPU:$DACF PRG:5ACF 20 E2 DA
|
|
lda #$00 ; CPU:$DAD2 PRG:5AD2 A9 00
|
|
sta $0469 ; CPU:$DAD4 PRG:5AD4 8D 69 04
|
|
rts ; CPU:$DAD7 PRG:5AD7 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ClearPlayerSpriteBuffer
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X with $0F; loads A with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp20.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ClearPlayerSpriteBuffer:
|
|
ldx #$0F ; CPU:$DAD8 PRG:5AD8 A2 0F
|
|
lda #$00 ; CPU:$DADA PRG:5ADA A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative25
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: stores A to Zp20,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative25; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; X, the N and Z flags, Zp20.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative25:
|
|
sta Zp20,x ; CPU:$DADC PRG:5ADC 95 20
|
|
dex ; CPU:$DADE PRG:5ADE CA
|
|
bpl NmiHandler_OnNonnegative25 ; CPU:$DADF PRG:5ADF 10 FB
|
|
rts ; CPU:$DAE1 PRG:5AE1 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DAE2
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A from SpriteIndex; ANDs A with $0F;
|
|
; compares A with $05; branches on carry set to NmiHandler_Loop208;
|
|
; loads A with $80; stores A to Zp27.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DAE2:
|
|
lda SpriteIndex ; CPU:$DAE2 PRG:5AE2 A5 2B
|
|
and #$0F ; CPU:$DAE4 PRG:5AE4 29 0F
|
|
cmp #$05 ; CPU:$DAE6 PRG:5AE6 C9 05
|
|
bcs NmiHandler_Loop208 ; CPU:$DAE8 PRG:5AE8 B0 04
|
|
lda #$80 ; CPU:$DAEA PRG:5AEA A9 80
|
|
sta Zp27 ; CPU:$DAEC PRG:5AEC 85 27
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop208
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A from Zp20; compares A with $06;
|
|
; branches on carry set to NmiHandler_Loop209.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop208:
|
|
lda Zp20 ; CPU:$DAEE PRG:5AEE A5 20
|
|
cmp #$06 ; CPU:$DAF0 PRG:5AF0 C9 06
|
|
bcs NmiHandler_Loop209 ; CPU:$DAF2 PRG:5AF2 B0 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DAF4
|
|
; Global: The routine reads $0470.
|
|
; Local: Executes 2 instructions: loads A from $0470; stores A to Zp2C.
|
|
; Parameters: Reads $0470 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DAF4:
|
|
lda $0470 ; CPU:$DAF4 PRG:5AF4 AD 70 04
|
|
sta Zp2C ; CPU:$DAF7 PRG:5AF7 85 2C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop209
|
|
; Global: The routine calls SpawnEnemyShip and ComputeEnemyShipScreenPosition, writes $05A0.
|
|
; Local: Executes 10 instructions: loads A from SpriteIndex; calls SpawnEnemyShip;
|
|
; loads A from SpriteIndex; calls ComputeEnemyShipScreenPosition; loads A from Zp10; stores
|
|
; A to Zp22; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $05A0 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop209:
|
|
lda SpriteIndex ; CPU:$DAF9 PRG:5AF9 A5 2B
|
|
jsr SpawnEnemyShip ; CPU:$DAFB PRG:5AFB 20 18 D5
|
|
lda SpriteIndex ; CPU:$DAFE PRG:5AFE A5 2B
|
|
jsr ComputeEnemyShipScreenPosition ; CPU:$DB00 PRG:5B00 20 BA D7
|
|
lda Zp10 ; CPU:$DB03 PRG:5B03 A5 10
|
|
sta Zp22 ; CPU:$DB05 PRG:5B05 85 22
|
|
lda Zp11 ; CPU:$DB07 PRG:5B07 A5 11
|
|
sta Zp23 ; CPU:$DB09 PRG:5B09 85 23
|
|
lda #$01 ; CPU:$DB0B PRG:5B0B A9 01
|
|
sta $05A0 ; CPU:$DB0D PRG:5B0D 8D A0 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DB10
|
|
; Global: The routine reads $0495.
|
|
; Local: Executes 2 instructions: increments $0495; loads Y with $20.
|
|
; Parameters: Reads $0495 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp29, Zp2A, the OAM shadow, $0495.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DB10:
|
|
inc $0495 ; CPU:$DB10 PRG:5B10 EE 95 04
|
|
ldy #$20 ; CPU:$DB13 PRG:5B13 A0 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero46
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from $0200,y; branches on negative
|
|
; to NmiHandler_Loop210; copies Y into A; clears the carry flag; adds
|
|
; $10 to A; copies A into Y; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp29, Zp2A, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero46:
|
|
lda $0200,y ; CPU:$DB15 PRG:5B15 B9 00 02
|
|
bmi NmiHandler_Loop210 ; CPU:$DB18 PRG:5B18 30 07
|
|
tya ; CPU:$DB1A PRG:5B1A 98
|
|
clc ; CPU:$DB1B PRG:5B1B 18
|
|
adc #$10 ; CPU:$DB1C PRG:5B1C 69 10
|
|
tay ; CPU:$DB1E PRG:5B1E A8
|
|
bne NmiHandler_OnNonzero46 ; CPU:$DB1F PRG:5B1F D0 F4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop210
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $08; stores A to Zp29; stores A
|
|
; to Zp2A; loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp29, Zp2A, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop210:
|
|
lda #$08 ; CPU:$DB21 PRG:5B21 A9 08
|
|
sta Zp29 ; CPU:$DB23 PRG:5B23 85 29
|
|
sta Zp2A ; CPU:$DB25 PRG:5B25 85 2A
|
|
ldx #$00 ; CPU:$DB27 PRG:5B27 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero47
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A from Zp20,x; stores A to $0200,y;
|
|
; increments Y; increments X; compares X with $10; branches on not
|
|
; equal to NmiHandler_OnNonzero47; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero47:
|
|
lda Zp20,x ; CPU:$DB29 PRG:5B29 B5 20
|
|
sta $0200,y ; CPU:$DB2B PRG:5B2B 99 00 02
|
|
iny ; CPU:$DB2E PRG:5B2E C8
|
|
inx ; CPU:$DB2F PRG:5B2F E8
|
|
cpx #$10 ; CPU:$DB30 PRG:5B30 E0 10
|
|
bne NmiHandler_OnNonzero47 ; CPU:$DB32 PRG:5B32 D0 F5
|
|
rts ; CPU:$DB34 PRG:5B34 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DB35
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads A with $02; stores A to
|
|
; StarFieldPtrHi; loads X with $20; loads A from Zp7C; compares A
|
|
; with $02; branches on not equal to NmiHandler_Loop211; and 1 more
|
|
; instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DB35:
|
|
lda #$02 ; CPU:$DB35 PRG:5B35 A9 02
|
|
sta StarFieldPtrHi ; CPU:$DB37 PRG:5B37 85 01
|
|
ldx #$20 ; CPU:$DB39 PRG:5B39 A2 20
|
|
lda Zp7C ; CPU:$DB3B PRG:5B3B A5 7C
|
|
cmp #$02 ; CPU:$DB3D PRG:5B3D C9 02
|
|
bne NmiHandler_Loop211 ; CPU:$DB3F PRG:5B3F D0 02
|
|
ldx #$10 ; CPU:$DB41 PRG:5B41 A2 10
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop211
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores X to StarFieldPtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop211:
|
|
stx StarFieldPtrLo ; CPU:$DB43 PRG:5B43 86 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear13
|
|
; Global: The routine calls Sub_DB5A.
|
|
; Local: Executes 4 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on negative to NmiHandler_Loop212;
|
|
; calls Sub_DB5A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear13:
|
|
ldy #$00 ; CPU:$DB45 PRG:5B45 A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$DB47 PRG:5B47 B1 00
|
|
bmi NmiHandler_Loop212 ; CPU:$DB49 PRG:5B49 30 03
|
|
jsr Sub_DB5A ; CPU:$DB4B PRG:5B4B 20 5A DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop212
|
|
; Global: The routine calls Sub_DB5A.
|
|
; Local: Executes 11 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on negative to NmiHandler_Loop212;
|
|
; calls Sub_DB5A; loads A from StarFieldPtrLo; clears the carry flag;
|
|
; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop212:
|
|
lda StarFieldPtrLo ; CPU:$DB4E PRG:5B4E A5 00
|
|
clc ; CPU:$DB50 PRG:5B50 18
|
|
adc #$10 ; CPU:$DB51 PRG:5B51 69 10
|
|
sta StarFieldPtrLo ; CPU:$DB53 PRG:5B53 85 00
|
|
cmp #$E0 ; CPU:$DB55 PRG:5B55 C9 E0
|
|
bcc NmiHandler_OnCarryClear13 ; CPU:$DB57 PRG:5B57 90 EC
|
|
rts ; CPU:$DB59 PRG:5B59 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DB5A
|
|
; Global: The routine calls GetEnemyPathTableEntry.
|
|
; Local: Executes 1 instruction: calls GetEnemyPathTableEntry.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp02, Zp03, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DB5A:
|
|
jsr GetEnemyPathTableEntry ; CPU:$DB5A PRG:5B5A 20 E0 DF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DB5D
|
|
; Global: The routine calls CallHandlerThroughPointer.
|
|
; Local: Executes 4 instructions: loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $7F; calls CallHandlerThroughPointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DB5D:
|
|
ldy #$07 ; CPU:$DB5D PRG:5B5D A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DB5F PRG:5B5F B1 00
|
|
and #$7F ; CPU:$DB61 PRG:5B61 29 7F
|
|
jsr CallHandlerThroughPointer ; CPU:$DB63 PRG:5B63 20 01 C3
|
|
.byte $80, $DB ; CPU:$DB66 PRG:5B66 80 DB -- nop #$DB (undocumented; ca65 cannot encode) ; CPU:$DB66 PRG:5B66 80 DB
|
|
cmp (ZpDE,x) ; CPU:$DB68 PRG:5B68 C1 DE
|
|
cld ; CPU:$DB6A PRG:5B6A D8
|
|
cmp $DF84,x ; CPU:$DB6B PRG:5B6B DD 84 DF
|
|
.byte $6F, $DF, $97 ; CPU:$DB6E PRG:5B6E 6F DF 97 -- rra $97DF (undocumented; ca65 cannot encode) ; CPU:$DB6E PRG:5B6E 6F DF 97
|
|
.byte $DF, $BC, $DF ; CPU:$DB71 PRG:5B71 DF BC DF -- dcp $DFBC,x (undocumented; ca65 cannot encode) ; CPU:$DB71 PRG:5B71 DF BC DF
|
|
stx ZpDE ; CPU:$DB74 PRG:5B74 86 DE
|
|
lda ZpDE,x ; CPU:$DB76 PRG:5B76 B5 DE
|
|
stx $C2DF ; CPU:$DB78 PRG:5B78 8E DF C2
|
|
.byte $DF, $97, $DD ; CPU:$DB7B PRG:5B7B DF 97 DD -- dcp $DD97,x (undocumented; ca65 cannot encode) ; CPU:$DB7B PRG:5B7B DF 97 DD
|
|
lda ZpDE,x ; CPU:$DB7E PRG:5B7E B5 DE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDB80
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 10 instructions: loads Y with $08; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $E0; copies A into X; loads Y
|
|
; with $04; loads A from ((StarFieldPtrLo),y); and 4 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDB80:
|
|
ldy #$08 ; CPU:$DB80 PRG:5B80 A0 08
|
|
lda (StarFieldPtrLo),y ; CPU:$DB82 PRG:5B82 B1 00
|
|
and #$E0 ; CPU:$DB84 PRG:5B84 29 E0
|
|
tax ; CPU:$DB86 PRG:5B86 AA
|
|
ldy #$04 ; CPU:$DB87 PRG:5B87 A0 04
|
|
lda (StarFieldPtrLo),y ; CPU:$DB89 PRG:5B89 B1 00
|
|
sec ; CPU:$DB8B PRG:5B8B 38
|
|
sbc $FF59,x ; CPU:$DB8C PRG:5B8C FD 59 FF
|
|
sta (StarFieldPtrLo),y ; CPU:$DB8F PRG:5B8F 91 00
|
|
bmi NmiHandler_Loop214 ; CPU:$DB91 PRG:5B91 30 4C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DB93
|
|
; Global: The routine calls DivideTileIndexBy16.
|
|
; Local: Executes 39 instructions: loads Y with $08; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $E0; branches on equal to
|
|
; NmiHandler_Loop213; stores A to PpuAddrLow; loads Y with $01; and
|
|
; 33 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DB93:
|
|
ldy #$08 ; CPU:$DB93 PRG:5B93 A0 08
|
|
lda (StarFieldPtrLo),y ; CPU:$DB95 PRG:5B95 B1 00
|
|
and #$E0 ; CPU:$DB97 PRG:5B97 29 E0
|
|
beq NmiHandler_Loop213 ; CPU:$DB99 PRG:5B99 F0 43
|
|
sta PpuAddrLow ; CPU:$DB9B PRG:5B9B 85 04
|
|
ldy #$01 ; CPU:$DB9D PRG:5B9D A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DB9F PRG:5B9F B1 00
|
|
and #$1F ; CPU:$DBA1 PRG:5BA1 29 1F
|
|
clc ; CPU:$DBA3 PRG:5BA3 18
|
|
adc PpuAddrLow ; CPU:$DBA4 PRG:5BA4 65 04
|
|
tax ; CPU:$DBA6 PRG:5BA6 AA
|
|
lda $FF3A,x ; CPU:$DBA7 PRG:5BA7 BD 3A FF
|
|
ldy #$09 ; CPU:$DBAA PRG:5BAA A0 09
|
|
adc (StarFieldPtrLo),y ; CPU:$DBAC PRG:5BAC 71 00
|
|
sta PpuAddrLow ; CPU:$DBAE PRG:5BAE 85 04
|
|
and #$0F ; CPU:$DBB0 PRG:5BB0 29 0F
|
|
sta (StarFieldPtrLo),y ; CPU:$DBB2 PRG:5BB2 91 00
|
|
lda PpuAddrLow ; CPU:$DBB4 PRG:5BB4 A5 04
|
|
jsr DivideTileIndexBy16 ; CPU:$DBB6 PRG:5BB6 20 FB C3
|
|
ldy #$02 ; CPU:$DBB9 PRG:5BB9 A0 02
|
|
clc ; CPU:$DBBB PRG:5BBB 18
|
|
adc (StarFieldPtrLo),y ; CPU:$DBBC PRG:5BBC 71 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DBBE PRG:5BBE 91 00
|
|
txa ; CPU:$DBC0 PRG:5BC0 8A
|
|
clc ; CPU:$DBC1 PRG:5BC1 18
|
|
adc #$06 ; CPU:$DBC2 PRG:5BC2 69 06
|
|
tax ; CPU:$DBC4 PRG:5BC4 AA
|
|
lda $FF3A,x ; CPU:$DBC5 PRG:5BC5 BD 3A FF
|
|
ldy #$0A ; CPU:$DBC8 PRG:5BC8 A0 0A
|
|
adc (StarFieldPtrLo),y ; CPU:$DBCA PRG:5BCA 71 00
|
|
sta PpuAddrLow ; CPU:$DBCC PRG:5BCC 85 04
|
|
and #$0F ; CPU:$DBCE PRG:5BCE 29 0F
|
|
sta (StarFieldPtrLo),y ; CPU:$DBD0 PRG:5BD0 91 00
|
|
lda PpuAddrLow ; CPU:$DBD2 PRG:5BD2 A5 04
|
|
jsr DivideTileIndexBy16 ; CPU:$DBD4 PRG:5BD4 20 FB C3
|
|
ldy #$03 ; CPU:$DBD7 PRG:5BD7 A0 03
|
|
clc ; CPU:$DBD9 PRG:5BD9 18
|
|
adc (StarFieldPtrLo),y ; CPU:$DBDA PRG:5BDA 71 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DBDC PRG:5BDC 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop213
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop213:
|
|
rts ; CPU:$DBDE PRG:5BDE 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop214
|
|
; Global: The routine calls DecrementEnemyPathIndex.
|
|
; Local: Executes 7 instructions: loads Y with $0F; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop215; sets
|
|
; the carry flag; subtracts $01 from A; stores A to
|
|
; ((StarFieldPtrLo),y); and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop214:
|
|
ldy #$0F ; CPU:$DBDF PRG:5BDF A0 0F
|
|
lda (StarFieldPtrLo),y ; CPU:$DBE1 PRG:5BE1 B1 00
|
|
beq NmiHandler_Loop215 ; CPU:$DBE3 PRG:5BE3 F0 08
|
|
sec ; CPU:$DBE5 PRG:5BE5 38
|
|
sbc #$01 ; CPU:$DBE6 PRG:5BE6 E9 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DBE8 PRG:5BE8 91 00
|
|
jsr DecrementEnemyPathIndex ; CPU:$DBEA PRG:5BEA 20 16 E0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop215
|
|
; Global: The routine calls AdvanceEnemyPathIndex.
|
|
; Local: Executes 6 instructions: calls AdvanceEnemyPathIndex; rotates a left; branches on
|
|
; carry set to NmiHandler_Loop216; rotates a left; branches on carry
|
|
; set to NmiHandler_Loop217; branches on carry clear to
|
|
; NmiHandler_Loop220.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop215:
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DBED PRG:5BED 20 F1 DF
|
|
rol a ; CPU:$DBF0 PRG:5BF0 2A
|
|
bcs NmiHandler_Loop216 ; CPU:$DBF1 PRG:5BF1 B0 05
|
|
rol a ; CPU:$DBF3 PRG:5BF3 2A
|
|
bcs NmiHandler_Loop217 ; CPU:$DBF4 PRG:5BF4 B0 19
|
|
bcc NmiHandler_Loop220 ; CPU:$DBF6 PRG:5BF6 90 2D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop216
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: rotates a left; branches on carry set to
|
|
; NmiHandler_Loop222; loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); rotates a left; branches on carry set to
|
|
; NmiHandler_Loop218.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop216:
|
|
rol a ; CPU:$DBF8 PRG:5BF8 2A
|
|
bcs NmiHandler_Loop222 ; CPU:$DBF9 PRG:5BF9 B0 42
|
|
ldy #$07 ; CPU:$DBFB PRG:5BFB A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DBFD PRG:5BFD B1 00
|
|
rol a ; CPU:$DBFF PRG:5BFF 2A
|
|
bcs NmiHandler_Loop218 ; CPU:$DC00 PRG:5C00 B0 14
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarrySet4
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads Y with $01; loads A from
|
|
; ((StarFieldPtrLo),y); sets the carry flag; subtracts $01 from A;
|
|
; branches on carry set to NmiHandler_Loop219; loads A with $17; and
|
|
; 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarrySet4:
|
|
ldy #$01 ; CPU:$DC02 PRG:5C02 A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DC04 PRG:5C04 B1 00
|
|
sec ; CPU:$DC06 PRG:5C06 38
|
|
sbc #$01 ; CPU:$DC07 PRG:5C07 E9 01
|
|
bcs NmiHandler_Loop219 ; CPU:$DC09 PRG:5C09 B0 18
|
|
lda #$17 ; CPU:$DC0B PRG:5C0B A9 17
|
|
bcc NmiHandler_Loop219 ; CPU:$DC0D PRG:5C0D 90 14
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop217
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads Y with $01; loads A from
|
|
; ((StarFieldPtrLo),y); sets the carry flag; subtracts $01 from A;
|
|
; branches on carry set to NmiHandler_Loop219; loads A with $17; and
|
|
; 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop217:
|
|
ldy #$07 ; CPU:$DC0F PRG:5C0F A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DC11 PRG:5C11 B1 00
|
|
rol a ; CPU:$DC13 PRG:5C13 2A
|
|
bcs NmiHandler_OnCarrySet4 ; CPU:$DC14 PRG:5C14 B0 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop218
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads Y with $01; loads A from
|
|
; ((StarFieldPtrLo),y); clears the carry flag; adds $01 to A;
|
|
; compares A with $18; branches on carry clear to NmiHandler_Loop219;
|
|
; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop218:
|
|
ldy #$01 ; CPU:$DC16 PRG:5C16 A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DC18 PRG:5C18 B1 00
|
|
clc ; CPU:$DC1A PRG:5C1A 18
|
|
adc #$01 ; CPU:$DC1B PRG:5C1B 69 01
|
|
cmp #$18 ; CPU:$DC1D PRG:5C1D C9 18
|
|
bcc NmiHandler_Loop219 ; CPU:$DC1F PRG:5C1F 90 02
|
|
lda #$00 ; CPU:$DC21 PRG:5C21 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop219
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores A to ((StarFieldPtrLo),y).
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop219:
|
|
sta (StarFieldPtrLo),y ; CPU:$DC23 PRG:5C23 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop220
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads A from Zp07; ANDs A with $3F; shifts
|
|
; a left; shifts a left; stores A to PpuAddrLow; loads Y with $04;
|
|
; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop220:
|
|
lda Zp07 ; CPU:$DC25 PRG:5C25 A5 07
|
|
and #$3F ; CPU:$DC27 PRG:5C27 29 3F
|
|
asl a ; CPU:$DC29 PRG:5C29 0A
|
|
asl a ; CPU:$DC2A PRG:5C2A 0A
|
|
sta PpuAddrLow ; CPU:$DC2B PRG:5C2B 85 04
|
|
ldy #$04 ; CPU:$DC2D PRG:5C2D A0 04
|
|
lda (StarFieldPtrLo),y ; CPU:$DC2F PRG:5C2F B1 00
|
|
clc ; CPU:$DC31 PRG:5C31 18
|
|
adc PpuAddrLow ; CPU:$DC32 PRG:5C32 65 04
|
|
bpl NmiHandler_Loop221 ; CPU:$DC34 PRG:5C34 10 02
|
|
lda #$00 ; CPU:$DC36 PRG:5C36 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop221
|
|
; Global: The routine calls Sub_DB93.
|
|
; Local: Executes 2 instructions: stores A to ((StarFieldPtrLo),y); calls
|
|
; Sub_DB93.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop221:
|
|
sta (StarFieldPtrLo),y ; CPU:$DC38 PRG:5C38 91 00
|
|
jmp Sub_DB93 ; CPU:$DC3A PRG:5C3A 4C 93 DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop222
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 7 instructions: rotates a left; branches on carry set to
|
|
; NmiHandler_Loop223; loads A from Zp07; ANDs A with $1F; loads Y
|
|
; with $0F; stores A to ((StarFieldPtrLo),y); and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop222:
|
|
rol a ; CPU:$DC3D PRG:5C3D 2A
|
|
bcs NmiHandler_Loop223 ; CPU:$DC3E PRG:5C3E B0 0B
|
|
lda Zp07 ; CPU:$DC40 PRG:5C40 A5 07
|
|
and #$1F ; CPU:$DC42 PRG:5C42 29 1F
|
|
ldy #$0F ; CPU:$DC44 PRG:5C44 A0 0F
|
|
sta (StarFieldPtrLo),y ; CPU:$DC46 PRG:5C46 91 00
|
|
jmp NmiHandler_Loop215 ; CPU:$DC48 PRG:5C48 4C ED DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop223
|
|
; Global: The routine calls CallHandlerThroughPointer, reads $86DC.
|
|
; Local: Executes 4 instructions: loads A from Zp07; ANDs A with $1F; calls
|
|
; CallHandlerThroughPointer; rotates $86DC right.
|
|
; Parameters: Reads $86DC from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop223:
|
|
lda Zp07 ; CPU:$DC4B PRG:5C4B A5 07
|
|
and #$1F ; CPU:$DC4D PRG:5C4D 29 1F
|
|
jsr CallHandlerThroughPointer ; CPU:$DC4F PRG:5C4F 20 01 C3
|
|
ror $86DC ; CPU:$DC52 PRG:5C52 6E DC 86
|
|
.byte $DC, $8F, $DC ; CPU:$DC55 PRG:5C55 DC 8F DC -- nop $DC8F,x (undocumented; ca65 cannot encode) ; CPU:$DC55 PRG:5C55 DC 8F DC
|
|
ldx ZpDC ; CPU:$DC58 PRG:5C58 A6 DC
|
|
.byte $AF, $DC, $BF ; CPU:$DC5A PRG:5C5A AF DC BF -- lax $BFDC (undocumented; ca65 cannot encode) ; CPU:$DC5A PRG:5C5A AF DC BF
|
|
.byte $DC, $58, $DD ; CPU:$DC5D PRG:5C5D DC 58 DD -- nop $DD58,x (undocumented; ca65 cannot encode) ; CPU:$DC5D PRG:5C5D DC 58 DD
|
|
.byte $CF, $DC, $49 ; CPU:$DC60 PRG:5C60 CF DC 49 -- dcp $49DC (undocumented; ca65 cannot encode) ; CPU:$DC60 PRG:5C60 CF DC 49
|
|
cmp $DCEE,x ; CPU:$DC63 PRG:5C63 DD EE DC
|
|
pla ; CPU:$DC66 PRG:5C66 68
|
|
cmp $DCDC,x ; CPU:$DC67 PRG:5C67 DD DC DC
|
|
.byte $7A ; CPU:$DC6A PRG:5C6A 7A -- nop (undocumented; ca65 cannot encode) ; CPU:$DC6A PRG:5C6A 7A
|
|
cmp $DD7E,x ; CPU:$DC6B PRG:5C6B DD 7E DD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDC6E
|
|
; Global: The routine calls AdvanceEnemyPathIndex.
|
|
; Local: Executes 4 instructions: calls AdvanceEnemyPathIndex; loads Y with $07; loads A
|
|
; from ((StarFieldPtrLo),y); rotates a left.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags, Zp07.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDC6E:
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DC6E PRG:5C6E 20 F1 DF
|
|
ldy #$07 ; CPU:$DC71 PRG:5C71 A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DC73 PRG:5C73 B1 00
|
|
rol a ; CPU:$DC75 PRG:5C75 2A
|
|
.byte $90, $06 ; CPU:$DC76 PRG:5C76 90 06
|
|
lda #$C0 ; CPU:$DC78 PRG:5C78 A9 C0
|
|
sec ; CPU:$DC7A PRG:5C7A 38
|
|
sbc Zp07 ; CPU:$DC7B PRG:5C7B E5 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDC7D
|
|
; Global: The routine calls AdvanceEnemyPathIndex, reads $07A5.
|
|
; Local: Executes 17 instructions: tests the bits of $07A5; loads Y with $03;
|
|
; stores A to ((StarFieldPtrLo),y); branches on non-negative to
|
|
; NmiHandler_Loop227; calls AdvanceEnemyPathIndex; loads Y with $02; and 11 more
|
|
; instructions.
|
|
; Parameters: Reads $07A5 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDC7D:
|
|
bit $07A5 ; CPU:$DC7D PRG:5C7D 2C A5 07
|
|
ldy #$03 ; CPU:$DC80 PRG:5C80 A0 03
|
|
sta (StarFieldPtrLo),y ; CPU:$DC82 PRG:5C82 91 00
|
|
bpl NmiHandler_Loop227 ; CPU:$DC84 PRG:5C84 10 36
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DC86 PRG:5C86 20 F1 DF
|
|
ldy #$02 ; CPU:$DC89 PRG:5C89 A0 02
|
|
sta (StarFieldPtrLo),y ; CPU:$DC8B PRG:5C8B 91 00
|
|
bpl NmiHandler_Loop227 ; CPU:$DC8D PRG:5C8D 10 2D
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DC8F PRG:5C8F 20 F1 DF
|
|
ldy #$07 ; CPU:$DC92 PRG:5C92 A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DC94 PRG:5C94 B1 00
|
|
rol a ; CPU:$DC96 PRG:5C96 2A
|
|
lda Zp07 ; CPU:$DC97 PRG:5C97 A5 07
|
|
bcc NmiHandler_Loop225 ; CPU:$DC99 PRG:5C99 90 05
|
|
eor #$FF ; CPU:$DC9B PRG:5C9B 49 FF
|
|
sec ; CPU:$DC9D PRG:5C9D 38
|
|
adc #$18 ; CPU:$DC9E PRG:5C9E 69 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop225
|
|
; Global: The routine calls AdvanceEnemyPathIndex.
|
|
; Local: Executes 13 instructions: loads Y with $01; stores A to
|
|
; ((StarFieldPtrLo),y); branches on non-negative to
|
|
; NmiHandler_Loop227; calls AdvanceEnemyPathIndex; loads Y with $08; stores A to
|
|
; ((StarFieldPtrLo),y); and 7 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop225:
|
|
ldy #$01 ; CPU:$DCA0 PRG:5CA0 A0 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DCA2 PRG:5CA2 91 00
|
|
bpl NmiHandler_Loop227 ; CPU:$DCA4 PRG:5CA4 10 16
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DCA6 PRG:5CA6 20 F1 DF
|
|
ldy #$08 ; CPU:$DCA9 PRG:5CA9 A0 08
|
|
sta (StarFieldPtrLo),y ; CPU:$DCAB PRG:5CAB 91 00
|
|
bpl NmiHandler_Loop227 ; CPU:$DCAD PRG:5CAD 10 0D
|
|
ldy #$08 ; CPU:$DCAF PRG:5CAF A0 08
|
|
lda (StarFieldPtrLo),y ; CPU:$DCB1 PRG:5CB1 B1 00
|
|
cmp #$A0 ; CPU:$DCB3 PRG:5CB3 C9 A0
|
|
beq NmiHandler_Loop226 ; CPU:$DCB5 PRG:5CB5 F0 03
|
|
clc ; CPU:$DCB7 PRG:5CB7 18
|
|
adc #$20 ; CPU:$DCB8 PRG:5CB8 69 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop226
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores A to ((StarFieldPtrLo),y).
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop226:
|
|
sta (StarFieldPtrLo),y ; CPU:$DCBA PRG:5CBA 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop227
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 1 instruction: calls NmiHandler_Loop215.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop227:
|
|
jmp NmiHandler_Loop215 ; CPU:$DCBC PRG:5CBC 4C ED DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDCBF
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads Y with $08; loads A from
|
|
; ((StarFieldPtrLo),y); compares A with $A0; branches on equal to
|
|
; NmiHandler_Loop228; sets the carry flag; subtracts $20 from A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDCBF:
|
|
ldy #$08 ; CPU:$DCBF PRG:5CBF A0 08
|
|
lda (StarFieldPtrLo),y ; CPU:$DCC1 PRG:5CC1 B1 00
|
|
cmp #$A0 ; CPU:$DCC3 PRG:5CC3 C9 A0
|
|
beq NmiHandler_Loop228 ; CPU:$DCC5 PRG:5CC5 F0 03
|
|
sec ; CPU:$DCC7 PRG:5CC7 38
|
|
sbc #$20 ; CPU:$DCC8 PRG:5CC8 E9 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop228
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores A to ((StarFieldPtrLo),y).
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop228:
|
|
sta (StarFieldPtrLo),y ; CPU:$DCCA PRG:5CCA 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero48
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 1 instruction: calls NmiHandler_Loop215.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero48:
|
|
jmp NmiHandler_Loop215 ; CPU:$DCCC PRG:5CCC 4C ED DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDCCF
|
|
; Global: The routine calls NmiHandler_Loop215, reads $0451.
|
|
; Local: Executes 7 instructions: calls NmiHandler_Loop215; loads A from
|
|
; $0451; branches on equal to NmiHandler_OnNonzero48; loads Y with
|
|
; $08; loads A with $A0; stores A to ((StarFieldPtrLo),y); and 1 more
|
|
; instruction.
|
|
; Parameters: Reads $0451 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDCCF:
|
|
lda $0451 ; CPU:$DCCF PRG:5CCF AD 51 04
|
|
beq NmiHandler_OnNonzero48 ; CPU:$DCD2 PRG:5CD2 F0 F8
|
|
ldy #$08 ; CPU:$DCD4 PRG:5CD4 A0 08
|
|
lda #$A0 ; CPU:$DCD6 PRG:5CD6 A9 A0
|
|
sta (StarFieldPtrLo),y ; CPU:$DCD8 PRG:5CD8 91 00
|
|
bne NmiHandler_OnNonzero48 ; CPU:$DCDA PRG:5CDA D0 F0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDCDC
|
|
; Global: The routine calls NmiHandler_Loop215, reads $0458.
|
|
; Local: Executes 7 instructions: calls NmiHandler_Loop215; loads Y from
|
|
; $0458; branches on equal to NmiHandler_OnNonzero48; loads A with
|
|
; $60; decrements Y; branches on not equal to NmiHandler_Loop229; and
|
|
; 1 more instruction.
|
|
; Parameters: Reads $0458 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDCDC:
|
|
ldy $0458 ; CPU:$DCDC PRG:5CDC AC 58 04
|
|
beq NmiHandler_OnNonzero48 ; CPU:$DCDF PRG:5CDF F0 EB
|
|
lda #$60 ; CPU:$DCE1 PRG:5CE1 A9 60
|
|
dey ; CPU:$DCE3 PRG:5CE3 88
|
|
bne NmiHandler_Loop229 ; CPU:$DCE4 PRG:5CE4 D0 02
|
|
lda #$40 ; CPU:$DCE6 PRG:5CE6 A9 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop229
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 4 instructions: calls NmiHandler_Loop215; loads Y with $08;
|
|
; stores A to ((StarFieldPtrLo),y); branches on not equal to
|
|
; NmiHandler_OnNonzero48.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop229:
|
|
ldy #$08 ; CPU:$DCE8 PRG:5CE8 A0 08
|
|
sta (StarFieldPtrLo),y ; CPU:$DCEA PRG:5CEA 91 00
|
|
bne NmiHandler_OnNonzero48 ; CPU:$DCEC PRG:5CEC D0 DE
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDCEE
|
|
; Global: The routine calls NmiHandler_Loop215, reads $0464.
|
|
; Local: Executes 5 instructions: calls NmiHandler_Loop215; loads A from Zp7A;
|
|
; branches on not equal to NmiHandler_Loop230; loads A from $0464;
|
|
; branches on not equal to NmiHandler_Loop232.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDCEE:
|
|
lda Zp7A ; CPU:$DCEE PRG:5CEE A5 7A
|
|
bne NmiHandler_Loop230 ; CPU:$DCF0 PRG:5CF0 D0 05
|
|
lda $0464 ; CPU:$DCF2 PRG:5CF2 AD 64 04
|
|
bne NmiHandler_Loop232 ; CPU:$DCF5 PRG:5CF5 D0 27
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop230
|
|
; Global: The routine calls GetEnemyShipTileId and NmiHandler_Loop234.
|
|
; Local: Executes 4 instructions: loads Y with $0B; loads A from
|
|
; ((StarFieldPtrLo),y); calls GetEnemyShipTileId; calls NmiHandler_Loop234.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop230:
|
|
ldy #$0B ; CPU:$DCF7 PRG:5CF7 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DCF9 PRG:5CF9 B1 00
|
|
jsr GetEnemyShipTileId ; CPU:$DCFB PRG:5CFB 20 8C D7
|
|
jmp NmiHandler_Loop234 ; CPU:$DCFE PRG:5CFE 4C 3E DD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero49
|
|
; Global: The routine calls NmiHandler_Loop215 and GetEnemyShipTileId.
|
|
; Local: Executes 12 instructions: calls NmiHandler_Loop215; loads Y with $0B;
|
|
; loads A from ((StarFieldPtrLo),y); calls GetEnemyShipTileId; stores A to
|
|
; PpuAddrLow; loads Y with $07; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero49:
|
|
ldy #$0B ; CPU:$DD01 PRG:5D01 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DD03 PRG:5D03 B1 00
|
|
jsr GetEnemyShipTileId ; CPU:$DD05 PRG:5D05 20 8C D7
|
|
sta PpuAddrLow ; CPU:$DD08 PRG:5D08 85 04
|
|
ldy #$07 ; CPU:$DD0A PRG:5D0A A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DD0C PRG:5D0C B1 00
|
|
bpl NmiHandler_Loop231 ; CPU:$DD0E PRG:5D0E 10 07
|
|
lda PpuAddrLow ; CPU:$DD10 PRG:5D10 A5 04
|
|
sec ; CPU:$DD12 PRG:5D12 38
|
|
sbc #$20 ; CPU:$DD13 PRG:5D13 E9 20
|
|
bne NmiHandler_Loop234 ; CPU:$DD15 PRG:5D15 D0 27
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop231
|
|
; Global: The routine calls NmiHandler_Loop215 and GetEnemyShipTileId.
|
|
; Local: Executes 16 instructions: calls NmiHandler_Loop215; loads Y with $0B;
|
|
; loads A from ((StarFieldPtrLo),y); calls GetEnemyShipTileId; stores A to
|
|
; PpuAddrLow; loads Y with $07; and 10 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop231:
|
|
lda PpuAddrLow ; CPU:$DD17 PRG:5D17 A5 04
|
|
clc ; CPU:$DD19 PRG:5D19 18
|
|
adc #$20 ; CPU:$DD1A PRG:5D1A 69 20
|
|
bne NmiHandler_Loop234 ; CPU:$DD1C PRG:5D1C D0 20
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop232
|
|
; Global: The routine calls NmiHandler_Loop215 and GetEnemyShipTileId, reads $0470.
|
|
; Local: Executes 27 instructions: calls NmiHandler_Loop215; loads Y with $0B;
|
|
; loads A from ((StarFieldPtrLo),y); calls GetEnemyShipTileId; stores A to
|
|
; PpuAddrLow; loads Y with $07; and 21 more instructions.
|
|
; Parameters: Reads $0470 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop232:
|
|
ldy #$0C ; CPU:$DD1E PRG:5D1E A0 0C
|
|
lda $0470 ; CPU:$DD20 PRG:5D20 AD 70 04
|
|
sta (StarFieldPtrLo),y ; CPU:$DD23 PRG:5D23 91 00
|
|
iny ; CPU:$DD25 PRG:5D25 C8
|
|
lda (StarFieldPtrLo),y ; CPU:$DD26 PRG:5D26 B1 00
|
|
bne NmiHandler_OnNonzero49 ; CPU:$DD28 PRG:5D28 D0 D7
|
|
ldy #$07 ; CPU:$DD2A PRG:5D2A A0 07
|
|
ldx #$70 ; CPU:$DD2C PRG:5D2C A2 70
|
|
lda (StarFieldPtrLo),y ; CPU:$DD2E PRG:5D2E B1 00
|
|
bpl NmiHandler_Loop233 ; CPU:$DD30 PRG:5D30 10 02
|
|
ldx #$10 ; CPU:$DD32 PRG:5D32 A2 10
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop233
|
|
; Global: The routine calls NmiHandler_Loop215 and Sub_C317.
|
|
; Local: Executes 6 instructions: calls NmiHandler_Loop215; stores X to
|
|
; PpuAddrLow; calls Sub_C317; ANDs A with $3F; clears the carry flag;
|
|
; adds PpuAddrLow to A.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp6E, Zp6F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop233:
|
|
stx PpuAddrLow ; CPU:$DD34 PRG:5D34 86 04
|
|
jsr Sub_C317 ; CPU:$DD36 PRG:5D36 20 17 C3
|
|
and #$3F ; CPU:$DD39 PRG:5D39 29 3F
|
|
clc ; CPU:$DD3B PRG:5D3B 18
|
|
adc PpuAddrLow ; CPU:$DD3C PRG:5D3C 65 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop234
|
|
; Global: The routine calls NmiHandler_Loop215, reads $0464.
|
|
; Local: Executes 11 instructions: calls NmiHandler_Loop215; loads Y with $03;
|
|
; stores A to ((StarFieldPtrLo),y); loads A with $00; decrements Y;
|
|
; stores A to ((StarFieldPtrLo),y); and 5 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop234:
|
|
ldy #$03 ; CPU:$DD3E PRG:5D3E A0 03
|
|
sta (StarFieldPtrLo),y ; CPU:$DD40 PRG:5D40 91 00
|
|
lda #$00 ; CPU:$DD42 PRG:5D42 A9 00
|
|
dey ; CPU:$DD44 PRG:5D44 88
|
|
sta (StarFieldPtrLo),y ; CPU:$DD45 PRG:5D45 91 00
|
|
bne NmiHandler_OnNonzero48 ; CPU:$DD47 PRG:5D47 D0 83
|
|
lda Zp7A ; CPU:$DD49 PRG:5D49 A5 7A
|
|
bne NmiHandler_Loop235 ; CPU:$DD4B PRG:5D4B D0 05
|
|
lda $0464 ; CPU:$DD4D PRG:5D4D AD 64 04
|
|
bne NmiHandler_OnNonzero50 ; CPU:$DD50 PRG:5D50 D0 25
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop235
|
|
; Global: The routine calls AdvanceEnemyPathIndex.
|
|
; Local: Executes 4 instructions: loads A with $01; stores A to Zp07; branches
|
|
; on not equal to NmiHandler_Loop236; calls AdvanceEnemyPathIndex.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop235:
|
|
lda #$01 ; CPU:$DD52 PRG:5D52 A9 01
|
|
sta Zp07 ; CPU:$DD54 PRG:5D54 85 07
|
|
bne NmiHandler_Loop236 ; CPU:$DD56 PRG:5D56 D0 03
|
|
jsr AdvanceEnemyPathIndex ; CPU:$DD58 PRG:5D58 20 F1 DF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop236
|
|
; Global: The routine calls Sub_DB5D.
|
|
; Local: Executes 6 instructions: loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $80; ORs A with Zp07; stores A to
|
|
; ((StarFieldPtrLo),y); calls Sub_DB5D.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop236:
|
|
ldy #$07 ; CPU:$DD5B PRG:5D5B A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DD5D PRG:5D5D B1 00
|
|
and #$80 ; CPU:$DD5F PRG:5D5F 29 80
|
|
ora Zp07 ; CPU:$DD61 PRG:5D61 05 07
|
|
sta (StarFieldPtrLo),y ; CPU:$DD63 PRG:5D63 91 00
|
|
jmp Sub_DB5D ; CPU:$DD65 PRG:5D65 4C 5D DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDD68
|
|
; Global: The routine calls ReadEnemyPathTableEntry and GetEnemyPathTableEntry.
|
|
; Local: Executes 7 instructions: calls ReadEnemyPathTableEntry; loads Y with $05; stores A
|
|
; to ((StarFieldPtrLo),y); increments Y; loads A with $00; stores A
|
|
; to ((StarFieldPtrLo),y); and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, Zp03, Zp07, Zp1E, Zp1F,
|
|
; $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDD68:
|
|
jsr ReadEnemyPathTableEntry ; CPU:$DD68 PRG:5D68 20 02 E0
|
|
ldy #$05 ; CPU:$DD6B PRG:5D6B A0 05
|
|
sta (StarFieldPtrLo),y ; CPU:$DD6D PRG:5D6D 91 00
|
|
iny ; CPU:$DD6F PRG:5D6F C8
|
|
lda #$00 ; CPU:$DD70 PRG:5D70 A9 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DD72 PRG:5D72 91 00
|
|
jsr GetEnemyPathTableEntry ; CPU:$DD74 PRG:5D74 20 E0 DF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero50
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 1 instruction: calls NmiHandler_Loop215.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero50:
|
|
jmp NmiHandler_Loop215 ; CPU:$DD77 PRG:5D77 4C ED DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDD7A
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 4 instructions: calls NmiHandler_Loop215; loads X with $C0;
|
|
; branches on not equal to NmiHandler_Loop237; loads X with $D0.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, the OAM shadow,
|
|
; $0495, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDD7A:
|
|
ldx #$C0 ; CPU:$DD7A PRG:5D7A A2 C0
|
|
bne NmiHandler_Loop237 ; CPU:$DD7C PRG:5D7C D0 02
|
|
ldx #$D0 ; CPU:$DD7E PRG:5D7E A2 D0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop237
|
|
; Global: The routine calls NmiHandler_Loop215.
|
|
; Local: Executes 4 instructions: calls NmiHandler_Loop215; loads A with $20;
|
|
; stores A to $0208,x; loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, the OAM shadow,
|
|
; $0495, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop237:
|
|
lda #$20 ; CPU:$DD80 PRG:5D80 A9 20
|
|
sta $0208,x ; CPU:$DD82 PRG:5D82 9D 08 02
|
|
ldy #$00 ; CPU:$DD85 PRG:5D85 A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero51
|
|
; Global: The routine calls NmiHandler_Loop215 and GetEnemyShipTileId, reads $0495.
|
|
; Local: Executes 32 instructions: calls NmiHandler_Loop215; loads A from
|
|
; ((StarFieldPtrLo),y); stores A to $0200,x; increments X; increments
|
|
; Y; compares Y with $04; and 26 more instructions.
|
|
; Parameters: Reads $0495 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, the OAM shadow,
|
|
; $0495, $86DC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero51:
|
|
lda (StarFieldPtrLo),y ; CPU:$DD87 PRG:5D87 B1 00
|
|
sta $0200,x ; CPU:$DD89 PRG:5D89 9D 00 02
|
|
inx ; CPU:$DD8C PRG:5D8C E8
|
|
iny ; CPU:$DD8D PRG:5D8D C8
|
|
cpy #$04 ; CPU:$DD8E PRG:5D8E C0 04
|
|
bne NmiHandler_OnNonzero51 ; CPU:$DD90 PRG:5D90 D0 F5
|
|
inc $0495 ; CPU:$DD92 PRG:5D92 EE 95 04
|
|
bne NmiHandler_OnNonzero50 ; CPU:$DD95 PRG:5D95 D0 E0
|
|
ldy #$0E ; CPU:$DD97 PRG:5D97 A0 0E
|
|
lda (StarFieldPtrLo),y ; CPU:$DD99 PRG:5D99 B1 00
|
|
clc ; CPU:$DD9B PRG:5D9B 18
|
|
adc #$01 ; CPU:$DD9C PRG:5D9C 69 01
|
|
cmp #$40 ; CPU:$DD9E PRG:5D9E C9 40
|
|
bcs NmiHandler_Loop238 ; CPU:$DDA0 PRG:5DA0 B0 20
|
|
sta (StarFieldPtrLo),y ; CPU:$DDA2 PRG:5DA2 91 00
|
|
and #$08 ; CPU:$DDA4 PRG:5DA4 29 08
|
|
sta PpuAddrLow ; CPU:$DDA6 PRG:5DA6 85 04
|
|
ldy #$0B ; CPU:$DDA8 PRG:5DA8 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DDAA PRG:5DAA B1 00
|
|
pha ; CPU:$DDAC PRG:5DAC 48
|
|
cmp #$30 ; CPU:$DDAD PRG:5DAD C9 30
|
|
lda #$00 ; CPU:$DDAF PRG:5DAF A9 00
|
|
adc #$04 ; CPU:$DDB1 PRG:5DB1 69 04
|
|
adc PpuAddrLow ; CPU:$DDB3 PRG:5DB3 65 04
|
|
ldy #$00 ; CPU:$DDB5 PRG:5DB5 A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DDB7 PRG:5DB7 91 00
|
|
pla ; CPU:$DDB9 PRG:5DB9 68
|
|
jsr GetEnemyShipTileId ; CPU:$DDBA PRG:5DBA 20 8C D7
|
|
ldy #$03 ; CPU:$DDBD PRG:5DBD A0 03
|
|
sta (StarFieldPtrLo),y ; CPU:$DDBF PRG:5DBF 91 00
|
|
rts ; CPU:$DDC1 PRG:5DC1 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop238
|
|
; Global: The routine calls NmiHandler_Loop266.
|
|
; Local: Executes 12 instructions: decrements Y; loads A from
|
|
; ((StarFieldPtrLo),y); pushes A; loads A with $00; stores A to
|
|
; ((StarFieldPtrLo),y); pulls A; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop238:
|
|
dey ; CPU:$DDC2 PRG:5DC2 88
|
|
lda (StarFieldPtrLo),y ; CPU:$DDC3 PRG:5DC3 B1 00
|
|
pha ; CPU:$DDC5 PRG:5DC5 48
|
|
lda #$00 ; CPU:$DDC6 PRG:5DC6 A9 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DDC8 PRG:5DC8 91 00
|
|
pla ; CPU:$DDCA PRG:5DCA 68
|
|
ldy #$00 ; CPU:$DDCB PRG:5DCB A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DDCD PRG:5DCD 91 00
|
|
lda #$20 ; CPU:$DDCF PRG:5DCF A9 20
|
|
ldy #$08 ; CPU:$DDD1 PRG:5DD1 A0 08
|
|
sta (StarFieldPtrLo),y ; CPU:$DDD3 PRG:5DD3 91 00
|
|
jmp NmiHandler_Loop266 ; CPU:$DDD5 PRG:5DD5 4C D1 DF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DDD8
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads Y with $07; loads A with $02; stores
|
|
; A to ((StarFieldPtrLo),y); loads A with $00; stores A to TilePtrLo;
|
|
; loads Y with $0B; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DDD8:
|
|
ldy #$07 ; CPU:$DDD8 PRG:5DD8 A0 07
|
|
lda #$02 ; CPU:$DDDA PRG:5DDA A9 02
|
|
sta (StarFieldPtrLo),y ; CPU:$DDDC PRG:5DDC 91 00
|
|
lda #$00 ; CPU:$DDDE PRG:5DDE A9 00
|
|
sta TilePtrLo ; CPU:$DDE0 PRG:5DE0 85 08
|
|
ldy #$0B ; CPU:$DDE2 PRG:5DE2 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DDE4 PRG:5DE4 B1 00
|
|
sta StarFieldCount ; CPU:$DDE6 PRG:5DE6 85 06
|
|
cmp #$01 ; CPU:$DDE8 PRG:5DE8 C9 01
|
|
bne NmiHandler_Loop239 ; CPU:$DDEA PRG:5DEA D0 02
|
|
lda Zp7D ; CPU:$DDEC PRG:5DEC A5 7D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop239
|
|
; Global: The routine calls GetEnemyShipTileId.
|
|
; Local: Executes 7 instructions: calls GetEnemyShipTileId; stores A to Zp07; loads Y
|
|
; with $03; loads A from ((StarFieldPtrLo),y); compares A with Zp07;
|
|
; branches on equal to NmiHandler_Loop241; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp1E, Zp1F, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop239:
|
|
jsr GetEnemyShipTileId ; CPU:$DDEE PRG:5DEE 20 8C D7
|
|
sta Zp07 ; CPU:$DDF1 PRG:5DF1 85 07
|
|
ldy #$03 ; CPU:$DDF3 PRG:5DF3 A0 03
|
|
lda (StarFieldPtrLo),y ; CPU:$DDF5 PRG:5DF5 B1 00
|
|
cmp Zp07 ; CPU:$DDF7 PRG:5DF7 C5 07
|
|
beq NmiHandler_Loop241 ; CPU:$DDF9 PRG:5DF9 F0 09
|
|
inc TilePtrLo ; CPU:$DDFB PRG:5DFB E6 08
|
|
.byte $B0, $03 ; CPU:$DDFD PRG:5DFD B0 03
|
|
adc #$01 ; CPU:$DDFF PRG:5DFF 69 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDE01
|
|
; Global: The routine reads $01E9.
|
|
; Local: Executes 1 instruction: tests the bits of $01E9.
|
|
; Parameters: Reads $01E9 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDE01:
|
|
bit $01E9 ; CPU:$DE01 PRG:5E01 2C E9 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop241
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: stores A to ((StarFieldPtrLo),y); loads A
|
|
; from StarFieldCount; compares A with $01; branches on not equal to
|
|
; NmiHandler_Loop242; loads A with $07; branches on non-negative to
|
|
; NmiHandler_Loop243.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop241:
|
|
sta (StarFieldPtrLo),y ; CPU:$DE04 PRG:5E04 91 00
|
|
lda StarFieldCount ; CPU:$DE06 PRG:5E06 A5 06
|
|
cmp #$01 ; CPU:$DE08 PRG:5E08 C9 01
|
|
bne NmiHandler_Loop242 ; CPU:$DE0A PRG:5E0A D0 04
|
|
lda #$07 ; CPU:$DE0C PRG:5E0C A9 07
|
|
bpl NmiHandler_Loop243 ; CPU:$DE0E PRG:5E0E 10 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop242
|
|
; Global: The routine calls ComputeEnemyShipY.
|
|
; Local: Executes 1 instruction: calls ComputeEnemyShipY.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop242:
|
|
jsr ComputeEnemyShipY ; CPU:$DE10 PRG:5E10 20 AA D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop243
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: stores A to Zp07; loads Y with $02; loads A
|
|
; from ((StarFieldPtrLo),y); compares A with Zp07; branches on equal
|
|
; to NmiHandler_Loop245; increments TilePtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp07, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop243:
|
|
sta Zp07 ; CPU:$DE13 PRG:5E13 85 07
|
|
ldy #$02 ; CPU:$DE15 PRG:5E15 A0 02
|
|
lda (StarFieldPtrLo),y ; CPU:$DE17 PRG:5E17 B1 00
|
|
cmp Zp07 ; CPU:$DE19 PRG:5E19 C5 07
|
|
beq NmiHandler_Loop245 ; CPU:$DE1B PRG:5E1B F0 09
|
|
inc TilePtrLo ; CPU:$DE1D PRG:5E1D E6 08
|
|
.byte $B0, $03 ; CPU:$DE1F PRG:5E1F B0 03
|
|
adc #$01 ; CPU:$DE21 PRG:5E21 69 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDE23
|
|
; Global: The routine reads $01E9.
|
|
; Local: Executes 1 instruction: tests the bits of $01E9.
|
|
; Parameters: Reads $01E9 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDE23:
|
|
bit $01E9 ; CPU:$DE23 PRG:5E23 2C E9 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop245
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: stores A to ((StarFieldPtrLo),y); loads A
|
|
; from Zp48; ANDs A with $03; branches on equal to
|
|
; NmiHandler_Loop246; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop245:
|
|
sta (StarFieldPtrLo),y ; CPU:$DE26 PRG:5E26 91 00
|
|
lda Zp48 ; CPU:$DE28 PRG:5E28 A5 48
|
|
and #$03 ; CPU:$DE2A PRG:5E2A 29 03
|
|
beq NmiHandler_Loop246 ; CPU:$DE2C PRG:5E2C F0 01
|
|
rts ; CPU:$DE2E PRG:5E2E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop246
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 12 instructions: loads Y with $01; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $1F; copies A into X; branches on
|
|
; equal to NmiHandler_Loop249; compares A with $0C; and 6 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop246:
|
|
ldy #$01 ; CPU:$DE2F PRG:5E2F A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DE31 PRG:5E31 B1 00
|
|
and #$1F ; CPU:$DE33 PRG:5E33 29 1F
|
|
tax ; CPU:$DE35 PRG:5E35 AA
|
|
beq NmiHandler_Loop249 ; CPU:$DE36 PRG:5E36 F0 18
|
|
cmp #$0C ; CPU:$DE38 PRG:5E38 C9 0C
|
|
bcc NmiHandler_Loop247 ; CPU:$DE3A PRG:5E3A 90 09
|
|
inx ; CPU:$DE3C PRG:5E3C E8
|
|
cpx #$18 ; CPU:$DE3D PRG:5E3D E0 18
|
|
bcc NmiHandler_Loop248 ; CPU:$DE3F PRG:5E3F 90 09
|
|
ldx #$00 ; CPU:$DE41 PRG:5E41 A2 00
|
|
bcs NmiHandler_Loop248 ; CPU:$DE43 PRG:5E43 B0 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop247
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: decrements X; branches on non-negative to
|
|
; NmiHandler_Loop248; loads X with $17.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop247:
|
|
dex ; CPU:$DE45 PRG:5E45 CA
|
|
bpl NmiHandler_Loop248 ; CPU:$DE46 PRG:5E46 10 02
|
|
ldx #$17 ; CPU:$DE48 PRG:5E48 A2 17
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop248
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: copies X into A; stores A to
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop249.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N, Z and C flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop248:
|
|
txa ; CPU:$DE4A PRG:5E4A 8A
|
|
sta (StarFieldPtrLo),y ; CPU:$DE4B PRG:5E4B 91 00
|
|
beq NmiHandler_Loop249 ; CPU:$DE4D PRG:5E4D F0 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero52
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero52:
|
|
rts ; CPU:$DE4F PRG:5E4F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop249
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: returns with RTS; loads A from TilePtrLo;
|
|
; branches on not equal to NmiHandler_OnNonzero52; loads Y with $00;
|
|
; loads A from ((StarFieldPtrLo),y); compares A with $01; and 2 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z and C flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop249:
|
|
lda TilePtrLo ; CPU:$DE50 PRG:5E50 A5 08
|
|
bne NmiHandler_OnNonzero52 ; CPU:$DE52 PRG:5E52 D0 FB
|
|
ldy #$00 ; CPU:$DE54 PRG:5E54 A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$DE56 PRG:5E56 B1 00
|
|
cmp #$01 ; CPU:$DE58 PRG:5E58 C9 01
|
|
beq NmiHandler_Loop251 ; CPU:$DE5A PRG:5E5A F0 11
|
|
cmp #$02 ; CPU:$DE5C PRG:5E5C C9 02
|
|
.byte $D0, $05 ; CPU:$DE5E PRG:5E5E D0 05
|
|
lda StarFieldCount ; CPU:$DE60 PRG:5E60 A5 06
|
|
ora #$08 ; CPU:$DE62 PRG:5E62 09 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDE64
|
|
; Global: The routine calls SpawnEnemyShipAlt and DecrementPlayerSpawnTimer, reads $06A5.
|
|
; Local: Executes 3 instructions: tests the bits of $06A5; calls SpawnEnemyShipAlt;
|
|
; calls DecrementPlayerSpawnTimer.
|
|
; Parameters: Reads $06A5 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDE64:
|
|
bit $06A5 ; CPU:$DE64 PRG:5E64 2C A5 06
|
|
jsr SpawnEnemyShipAlt ; CPU:$DE67 PRG:5E67 20 38 D5
|
|
jmp DecrementPlayerSpawnTimer ; CPU:$DE6A PRG:5E6A 4C 84 DF
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop251
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A with $01; stores A to Zp7C; loads A
|
|
; with $04; stores A to Zp79; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp79, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop251:
|
|
lda #$01 ; CPU:$DE6D PRG:5E6D A9 01
|
|
sta Zp7C ; CPU:$DE6F PRG:5E6F 85 7C
|
|
lda #$04 ; CPU:$DE71 PRG:5E71 A9 04
|
|
sta Zp79 ; CPU:$DE73 PRG:5E73 85 79
|
|
rts ; CPU:$DE75 PRG:5E75 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero12
|
|
; Global: The routine calls Sub_DB93 and ComputePlayerShipPosition.
|
|
; Local: Executes 21 instructions: loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $80; ORs A with $07; stores A to
|
|
; ((StarFieldPtrLo),y); loads Y with $08; and 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp10, Zp11, Zp12, Zp13, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero12:
|
|
ldy #$07 ; CPU:$DE76 PRG:5E76 A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DE78 PRG:5E78 B1 00
|
|
and #$80 ; CPU:$DE7A PRG:5E7A 29 80
|
|
ora #$07 ; CPU:$DE7C PRG:5E7C 09 07
|
|
sta (StarFieldPtrLo),y ; CPU:$DE7E PRG:5E7E 91 00
|
|
ldy #$08 ; CPU:$DE80 PRG:5E80 A0 08
|
|
lda #$60 ; CPU:$DE82 PRG:5E82 A9 60
|
|
sta (StarFieldPtrLo),y ; CPU:$DE84 PRG:5E84 91 00
|
|
jsr Sub_DB93 ; CPU:$DE86 PRG:5E86 20 93 DB
|
|
ldy #$02 ; CPU:$DE89 PRG:5E89 A0 02
|
|
lda (StarFieldPtrLo),y ; CPU:$DE8B PRG:5E8B B1 00
|
|
sta Zp12 ; CPU:$DE8D PRG:5E8D 85 12
|
|
iny ; CPU:$DE8F PRG:5E8F C8
|
|
lda (StarFieldPtrLo),y ; CPU:$DE90 PRG:5E90 B1 00
|
|
sta Zp13 ; CPU:$DE92 PRG:5E92 85 13
|
|
jsr ComputePlayerShipPosition ; CPU:$DE94 PRG:5E94 20 5F C4
|
|
ldy #$01 ; CPU:$DE97 PRG:5E97 A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DE99 PRG:5E99 B1 00
|
|
and #$1F ; CPU:$DE9B PRG:5E9B 29 1F
|
|
cmp Zp17 ; CPU:$DE9D PRG:5E9D C5 17
|
|
beq NmiHandler_Loop253 ; CPU:$DE9F PRG:5E9F F0 0A
|
|
.byte $B0, $03 ; CPU:$DEA1 PRG:5EA1 B0 03
|
|
adc #$01 ; CPU:$DEA3 PRG:5EA3 69 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDEA5
|
|
; Global: The routine reads $01E9.
|
|
; Local: Executes 3 instructions: tests the bits of $01E9; stores A to
|
|
; ((StarFieldPtrLo),y); returns with RTS.
|
|
; Parameters: Reads $01E9 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, the N, Z and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDEA5:
|
|
bit $01E9 ; CPU:$DEA5 PRG:5EA5 2C E9 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DEA8 PRG:5EA8 91 00
|
|
rts ; CPU:$DEAA PRG:5EAA 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop253
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); clears the carry flag; adds $01 to A; stores
|
|
; A to ((StarFieldPtrLo),y); returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop253:
|
|
ldy #$07 ; CPU:$DEAB PRG:5EAB A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DEAD PRG:5EAD B1 00
|
|
clc ; CPU:$DEAF PRG:5EAF 18
|
|
adc #$01 ; CPU:$DEB0 PRG:5EB0 69 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DEB2 PRG:5EB2 91 00
|
|
rts ; CPU:$DEB4 PRG:5EB4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDEB5
|
|
; Global: The routine calls Sub_DF6F, writes $0494, reads $0494.
|
|
; Local: Executes 6 instructions: loads A from $0494; pushes A; calls
|
|
; Sub_DF6F; pulls A; stores A to $0494; returns with RTS.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0494 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0494, $0495.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDEB5:
|
|
lda $0494 ; CPU:$DEB5 PRG:5EB5 AD 94 04
|
|
pha ; CPU:$DEB8 PRG:5EB8 48
|
|
jsr Sub_DF6F ; CPU:$DEB9 PRG:5EB9 20 6F DF
|
|
pla ; CPU:$DEBC PRG:5EBC 68
|
|
sta $0494 ; CPU:$DEBD PRG:5EBD 8D 94 04
|
|
rts ; CPU:$DEC0 PRG:5EC0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDEC1
|
|
; Global: The routine calls Sub_DB93 and ComputePlayerShipPosition.
|
|
; Local: Executes 41 instructions: loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $80; ORs A with $07; stores A to
|
|
; ((StarFieldPtrLo),y); loads Y with $08; and 35 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDEC1:
|
|
ldy #$0B ; CPU:$DEC1 PRG:5EC1 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DEC3 PRG:5EC3 B1 00
|
|
beq NmiHandler_OnZero12 ; CPU:$DEC5 PRG:5EC5 F0 AF
|
|
pha ; CPU:$DEC7 PRG:5EC7 48
|
|
ldy #$02 ; CPU:$DEC8 PRG:5EC8 A0 02
|
|
lda (StarFieldPtrLo),y ; CPU:$DECA PRG:5ECA B1 00
|
|
sta Zp12 ; CPU:$DECC PRG:5ECC 85 12
|
|
iny ; CPU:$DECE PRG:5ECE C8
|
|
lda (StarFieldPtrLo),y ; CPU:$DECF PRG:5ECF B1 00
|
|
sta Zp13 ; CPU:$DED1 PRG:5ED1 85 13
|
|
pla ; CPU:$DED3 PRG:5ED3 68
|
|
cmp #$01 ; CPU:$DED4 PRG:5ED4 C9 01
|
|
bne NmiHandler_Loop255 ; CPU:$DED6 PRG:5ED6 D0 19
|
|
ldy #$03 ; CPU:$DED8 PRG:5ED8 A0 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero53
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A from $0400,y; branches on not equal
|
|
; to NmiHandler_Loop254; increments Y; compares Y with $06; branches
|
|
; on not equal to NmiHandler_OnNonzero53.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero53:
|
|
lda $0400,y ; CPU:$DEDA PRG:5EDA B9 00 04
|
|
bne NmiHandler_Loop254 ; CPU:$DEDD PRG:5EDD D0 05
|
|
iny ; CPU:$DEDF PRG:5EDF C8
|
|
cpy #$06 ; CPU:$DEE0 PRG:5EE0 C0 06
|
|
bne NmiHandler_OnNonzero53 ; CPU:$DEE2 PRG:5EE2 D0 F6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop254
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: stores Y to Zp7D; loads A from $FB7E,y;
|
|
; stores A to Zp11; loads A with $07; stores A to Zp10; branches on
|
|
; non-negative to NmiHandler_Loop256.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop254:
|
|
sty Zp7D ; CPU:$DEE4 PRG:5EE4 84 7D
|
|
lda $FB7E,y ; CPU:$DEE6 PRG:5EE6 B9 7E FB
|
|
sta Zp11 ; CPU:$DEE9 PRG:5EE9 85 11
|
|
lda #$07 ; CPU:$DEEB PRG:5EEB A9 07
|
|
sta Zp10 ; CPU:$DEED PRG:5EED 85 10
|
|
bpl NmiHandler_Loop256 ; CPU:$DEEF PRG:5EEF 10 07
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop255
|
|
; Global: The routine calls ComputeEnemyShipScreenPosition.
|
|
; Local: Executes 3 instructions: loads Y with $0B; loads A from
|
|
; ((StarFieldPtrLo),y); calls ComputeEnemyShipScreenPosition.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop255:
|
|
ldy #$0B ; CPU:$DEF1 PRG:5EF1 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DEF3 PRG:5EF3 B1 00
|
|
jsr ComputeEnemyShipScreenPosition ; CPU:$DEF5 PRG:5EF5 20 BA D7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop256
|
|
; Global: The routine calls ComputeObjectDistance and Sub_DDD8.
|
|
; Local: Executes 8 instructions: calls ComputeObjectDistance; loads A from Zp14; clears
|
|
; the carry flag; adds Zp15 to A; branches on carry set to
|
|
; NmiHandler_Loop257; compares A with $08; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07, Zp17, Zp1E, Zp1F, Zp79,
|
|
; Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop256:
|
|
jsr ComputeObjectDistance ; CPU:$DEF8 PRG:5EF8 20 09 C4
|
|
lda Zp14 ; CPU:$DEFB PRG:5EFB A5 14
|
|
clc ; CPU:$DEFD PRG:5EFD 18
|
|
adc Zp15 ; CPU:$DEFE PRG:5EFE 65 15
|
|
bcs NmiHandler_Loop257 ; CPU:$DF00 PRG:5F00 B0 07
|
|
cmp #$08 ; CPU:$DF02 PRG:5F02 C9 08
|
|
bcs NmiHandler_Loop257 ; CPU:$DF04 PRG:5F04 B0 03
|
|
jmp Sub_DDD8 ; CPU:$DF06 PRG:5F06 4C D8 DD
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop257
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads X with $00; loads Y with $01; loads A
|
|
; from ((StarFieldPtrLo),y); stores A to Zp17; ANDs A with $1F; sets
|
|
; the carry flag; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop257:
|
|
ldx #$00 ; CPU:$DF09 PRG:5F09 A2 00
|
|
ldy #$01 ; CPU:$DF0B PRG:5F0B A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$DF0D PRG:5F0D B1 00
|
|
sta Zp17 ; CPU:$DF0F PRG:5F0F 85 17
|
|
and #$1F ; CPU:$DF11 PRG:5F11 29 1F
|
|
sec ; CPU:$DF13 PRG:5F13 38
|
|
sbc SpriteX ; CPU:$DF14 PRG:5F14 E5 16
|
|
bcs NmiHandler_Loop258 ; CPU:$DF16 PRG:5F16 B0 05
|
|
eor #$FF ; CPU:$DF18 PRG:5F18 49 FF
|
|
adc #$01 ; CPU:$DF1A PRG:5F1A 69 01
|
|
inx ; CPU:$DF1C PRG:5F1C E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop258
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: compares A with $0C; branches on carry clear
|
|
; to NmiHandler_Loop259; EORs A with $FF; adds $18 to A; increments
|
|
; X.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop258:
|
|
cmp #$0C ; CPU:$DF1D PRG:5F1D C9 0C
|
|
bcc NmiHandler_Loop259 ; CPU:$DF1F PRG:5F1F 90 05
|
|
eor #$FF ; CPU:$DF21 PRG:5F21 49 FF
|
|
adc #$18 ; CPU:$DF23 PRG:5F23 69 18
|
|
inx ; CPU:$DF25 PRG:5F25 E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop259
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 15 instructions: compares A with $01; branches on equal to
|
|
; NmiHandler_Loop262; loads A from Zp17; ANDs A with $1F; stores A to
|
|
; Zp17; branches on carry clear to NmiHandler_Loop263; and 9 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop259:
|
|
cmp #$01 ; CPU:$DF26 PRG:5F26 C9 01
|
|
beq NmiHandler_Loop262 ; CPU:$DF28 PRG:5F28 F0 27
|
|
lda Zp17 ; CPU:$DF2A PRG:5F2A A5 17
|
|
and #$1F ; CPU:$DF2C PRG:5F2C 29 1F
|
|
sta Zp17 ; CPU:$DF2E PRG:5F2E 85 17
|
|
bcc NmiHandler_Loop263 ; CPU:$DF30 PRG:5F30 90 36
|
|
txa ; CPU:$DF32 PRG:5F32 8A
|
|
ror a ; CPU:$DF33 PRG:5F33 6A
|
|
bcc NmiHandler_Loop260 ; CPU:$DF34 PRG:5F34 90 0C
|
|
inc Zp17 ; CPU:$DF36 PRG:5F36 E6 17
|
|
lda Zp17 ; CPU:$DF38 PRG:5F38 A5 17
|
|
cmp #$18 ; CPU:$DF3A PRG:5F3A C9 18
|
|
bcc NmiHandler_Loop261 ; CPU:$DF3C PRG:5F3C 90 0C
|
|
lda #$00 ; CPU:$DF3E PRG:5F3E A9 00
|
|
bcs NmiHandler_Loop261 ; CPU:$DF40 PRG:5F40 B0 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop260
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: decrements Zp17; loads A from Zp17; branches
|
|
; on non-negative to NmiHandler_Loop261; loads A with $17.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp17.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop260:
|
|
dec Zp17 ; CPU:$DF42 PRG:5F42 C6 17
|
|
lda Zp17 ; CPU:$DF44 PRG:5F44 A5 17
|
|
bpl NmiHandler_Loop261 ; CPU:$DF46 PRG:5F46 10 02
|
|
lda #$17 ; CPU:$DF48 PRG:5F48 A9 17
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop261
|
|
; Global: The routine calls Sub_DB93.
|
|
; Local: Executes 3 instructions: ANDs A with $1F; stores A to
|
|
; ((StarFieldPtrLo),y); calls Sub_DB93.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop261:
|
|
and #$1F ; CPU:$DF4A PRG:5F4A 29 1F
|
|
sta (StarFieldPtrLo),y ; CPU:$DF4C PRG:5F4C 91 00
|
|
jmp Sub_DB93 ; CPU:$DF4E PRG:5F4E 4C 93 DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop262
|
|
; Global: The routine calls Sub_DB93.
|
|
; Local: Executes 13 instructions: loads A from Zp17; branches on negative to
|
|
; NmiHandler_Loop263; loads A from SpriteX; stores A to
|
|
; ((StarFieldPtrLo),y); loads A from Zp17; pushes A; and 7 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop262:
|
|
lda Zp17 ; CPU:$DF51 PRG:5F51 A5 17
|
|
bmi NmiHandler_Loop263 ; CPU:$DF53 PRG:5F53 30 13
|
|
lda SpriteX ; CPU:$DF55 PRG:5F55 A5 16
|
|
sta (StarFieldPtrLo),y ; CPU:$DF57 PRG:5F57 91 00
|
|
lda Zp17 ; CPU:$DF59 PRG:5F59 A5 17
|
|
pha ; CPU:$DF5B PRG:5F5B 48
|
|
jsr Sub_DB93 ; CPU:$DF5C PRG:5F5C 20 93 DB
|
|
pla ; CPU:$DF5F PRG:5F5F 68
|
|
clc ; CPU:$DF60 PRG:5F60 18
|
|
adc #$20 ; CPU:$DF61 PRG:5F61 69 20
|
|
ldy #$01 ; CPU:$DF63 PRG:5F63 A0 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DF65 PRG:5F65 91 00
|
|
rts ; CPU:$DF67 PRG:5F67 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop263
|
|
; Global: The routine calls Sub_DB93.
|
|
; Local: Executes 3 instructions: loads A from SpriteX; stores A to
|
|
; ((StarFieldPtrLo),y); calls Sub_DB93.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop263:
|
|
lda SpriteX ; CPU:$DF68 PRG:5F68 A5 16
|
|
sta (StarFieldPtrLo),y ; CPU:$DF6A PRG:5F6A 91 00
|
|
jmp Sub_DB93 ; CPU:$DF6C PRG:5F6C 4C 93 DB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_DF6F
|
|
; Global: The routine calls Sub_DB93.
|
|
; Local: Executes 9 instructions: calls Sub_DB93; loads Y with $02; loads A
|
|
; from ((StarFieldPtrLo),y); compares A with $E8; branches on carry
|
|
; set to NmiHandler_Loop264; increments Y; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0494, $0495.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_DF6F:
|
|
jsr Sub_DB93 ; CPU:$DF6F PRG:5F6F 20 93 DB
|
|
ldy #$02 ; CPU:$DF72 PRG:5F72 A0 02
|
|
lda (StarFieldPtrLo),y ; CPU:$DF74 PRG:5F74 B1 00
|
|
cmp #$E8 ; CPU:$DF76 PRG:5F76 C9 E8
|
|
bcs NmiHandler_Loop264 ; CPU:$DF78 PRG:5F78 B0 07
|
|
iny ; CPU:$DF7A PRG:5F7A C8
|
|
lda (StarFieldPtrLo),y ; CPU:$DF7B PRG:5F7B B1 00
|
|
cmp #$C0 ; CPU:$DF7D PRG:5F7D C9 C0
|
|
bcc NmiHandler_Loop265 ; CPU:$DF7F PRG:5F7F 90 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop264
|
|
; Global: Counts the player ship's spawn timer down.
|
|
; Local: Executes 1 instruction: decrements $0494.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, $0494, $0495.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop264:
|
|
dec $0494 ; CPU:$DF81 PRG:5F81 CE 94 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DecrementPlayerSpawnTimer
|
|
; Global: The routine reads $0495.
|
|
; Local: Executes 4 instructions: decrements $0495; loads A with $80; loads Y
|
|
; with $00; stores A to ((StarFieldPtrLo),y).
|
|
; Parameters: Reads $0495 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, $0495.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DecrementPlayerSpawnTimer:
|
|
dec $0495 ; CPU:$DF84 PRG:5F84 CE 95 04
|
|
lda #$80 ; CPU:$DF87 PRG:5F87 A9 80
|
|
ldy #$00 ; CPU:$DF89 PRG:5F89 A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DF8B PRG:5F8B 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop265
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop265:
|
|
rts ; CPU:$DF8D PRG:5F8D 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDF8E
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A with $80; loads Y with $00; stores A
|
|
; to ((StarFieldPtrLo),y); stores A to Zp7C; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp7C.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDF8E:
|
|
lda #$80 ; CPU:$DF8E PRG:5F8E A9 80
|
|
ldy #$00 ; CPU:$DF90 PRG:5F90 A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DF92 PRG:5F92 91 00
|
|
sta Zp7C ; CPU:$DF94 PRG:5F94 85 7C
|
|
rts ; CPU:$DF96 PRG:5F96 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDF97
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 18 instructions: loads A from Zp54; ORs A with Zp79;
|
|
; branches on not equal to NmiHandler_Loop266; loads A with $FF;
|
|
; stores A to Zp54; loads Y with $03; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp54, Zp58, Zp7D, Zp7E.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDF97:
|
|
lda Zp54 ; CPU:$DF97 PRG:5F97 A5 54
|
|
ora Zp79 ; CPU:$DF99 PRG:5F99 05 79
|
|
bne NmiHandler_Loop266 ; CPU:$DF9B PRG:5F9B D0 34
|
|
lda #$FF ; CPU:$DF9D PRG:5F9D A9 FF
|
|
sta Zp54 ; CPU:$DF9F PRG:5F9F 85 54
|
|
ldy #$03 ; CPU:$DFA1 PRG:5FA1 A0 03
|
|
lda (StarFieldPtrLo),y ; CPU:$DFA3 PRG:5FA3 B1 00
|
|
sta Zp58 ; CPU:$DFA5 PRG:5FA5 85 58
|
|
ldy #$07 ; CPU:$DFA7 PRG:5FA7 A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DFA9 PRG:5FA9 B1 00
|
|
and #$80 ; CPU:$DFAB PRG:5FAB 29 80
|
|
ora #$06 ; CPU:$DFAD PRG:5FAD 09 06
|
|
sta (StarFieldPtrLo),y ; CPU:$DFAF PRG:5FAF 91 00
|
|
ldy #$0B ; CPU:$DFB1 PRG:5FB1 A0 0B
|
|
lda (StarFieldPtrLo),y ; CPU:$DFB3 PRG:5FB3 B1 00
|
|
sta Zp7D ; CPU:$DFB5 PRG:5FB5 85 7D
|
|
lda StarFieldPtrLo ; CPU:$DFB7 PRG:5FB7 A5 00
|
|
sta Zp7E ; CPU:$DFB9 PRG:5FB9 85 7E
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero54
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero54:
|
|
rts ; CPU:$DFBB PRG:5FBB 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCDFBC
|
|
; Global: The routine calls Sub_DB93, ReadEnemyPathTableEntry and IncrementEnemyPathIndex.
|
|
; Local: Executes 10 instructions: returns with RTS; loads A from Zp54;
|
|
; branches on equal to NmiHandler_Loop266; branches on not equal to
|
|
; NmiHandler_OnNonzero54; calls Sub_DB93; calls ReadEnemyPathTableEntry; and 4 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp07.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCDFBC:
|
|
lda Zp54 ; CPU:$DFBC PRG:5FBC A5 54
|
|
beq NmiHandler_Loop266 ; CPU:$DFBE PRG:5FBE F0 11
|
|
bne NmiHandler_OnNonzero54 ; CPU:$DFC0 PRG:5FC0 D0 F9
|
|
jsr Sub_DB93 ; CPU:$DFC2 PRG:5FC2 20 93 DB
|
|
jsr ReadEnemyPathTableEntry ; CPU:$DFC5 PRG:5FC5 20 02 E0
|
|
ldy #$02 ; CPU:$DFC8 PRG:5FC8 A0 02
|
|
cmp (StarFieldPtrLo),y ; CPU:$DFCA PRG:5FCA D1 00
|
|
bcs NmiHandler_Loop267 ; CPU:$DFCC PRG:5FCC B0 11
|
|
jsr IncrementEnemyPathIndex ; CPU:$DFCE PRG:5FCE 20 0C E0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop266
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 7 instructions: loads Y with $04; loads A with $00; stores A
|
|
; to ((StarFieldPtrLo),y); loads Y with $07; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $80; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop266:
|
|
ldy #$04 ; CPU:$DFD1 PRG:5FD1 A0 04
|
|
lda #$00 ; CPU:$DFD3 PRG:5FD3 A9 00
|
|
sta (StarFieldPtrLo),y ; CPU:$DFD5 PRG:5FD5 91 00
|
|
ldy #$07 ; CPU:$DFD7 PRG:5FD7 A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$DFD9 PRG:5FD9 B1 00
|
|
and #$80 ; CPU:$DFDB PRG:5FDB 29 80
|
|
sta (StarFieldPtrLo),y ; CPU:$DFDD PRG:5FDD 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop267
|
|
; Global: Reads the pointer of the enemy flight path the current state selects.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop267:
|
|
rts ; CPU:$DFDF PRG:5FDF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: GetEnemyPathTableEntry
|
|
; Global: Steps the index into the enemy flight path on by one and reads the entry.
|
|
; Local: Executes 9 instructions: loads Y with $05; loads A from
|
|
; ((StarFieldPtrLo),y); shifts a left; copies A into X; loads A from
|
|
; $FEF9,x; stores A to Zp02; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp02, Zp03.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
GetEnemyPathTableEntry:
|
|
ldy #$05 ; CPU:$DFE0 PRG:5FE0 A0 05
|
|
lda (StarFieldPtrLo),y ; CPU:$DFE2 PRG:5FE2 B1 00
|
|
asl a ; CPU:$DFE4 PRG:5FE4 0A
|
|
tax ; CPU:$DFE5 PRG:5FE5 AA
|
|
lda $FEF9,x ; CPU:$DFE6 PRG:5FE6 BD F9 FE
|
|
sta Zp02 ; CPU:$DFE9 PRG:5FE9 85 02
|
|
lda $FEFA,x ; CPU:$DFEB PRG:5FEB BD FA FE
|
|
sta Zp03 ; CPU:$DFEE PRG:5FEE 85 03
|
|
rts ; CPU:$DFF0 PRG:5FF0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvanceEnemyPathIndex
|
|
; Global: Reads the entry of the enemy flight path the current index points at.
|
|
; Local: Executes 11 instructions: loads Y with $06; loads A from
|
|
; ((StarFieldPtrLo),y); pushes A; clears the carry flag; adds $01 to
|
|
; A; stores A to ((StarFieldPtrLo),y); and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags, Zp07.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvanceEnemyPathIndex:
|
|
ldy #$06 ; CPU:$DFF1 PRG:5FF1 A0 06
|
|
lda (StarFieldPtrLo),y ; CPU:$DFF3 PRG:5FF3 B1 00
|
|
pha ; CPU:$DFF5 PRG:5FF5 48
|
|
clc ; CPU:$DFF6 PRG:5FF6 18
|
|
adc #$01 ; CPU:$DFF7 PRG:5FF7 69 01
|
|
sta (StarFieldPtrLo),y ; CPU:$DFF9 PRG:5FF9 91 00
|
|
pla ; CPU:$DFFB PRG:5FFB 68
|
|
tay ; CPU:$DFFC PRG:5FFC A8
|
|
lda (Zp02),y ; CPU:$DFFD PRG:5FFD B1 02
|
|
sta Zp07 ; CPU:$DFFF PRG:5FFF 85 07
|
|
rts ; CPU:$E001 PRG:6001 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ReadEnemyPathTableEntry
|
|
; Global: Steps the index into the enemy flight path on by one.
|
|
; Local: Executes 6 instructions: loads Y with $06; loads A from
|
|
; ((StarFieldPtrLo),y); copies A into Y; loads A from ((Zp02),y);
|
|
; stores A to Zp07; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, Zp07.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ReadEnemyPathTableEntry:
|
|
ldy #$06 ; CPU:$E002 PRG:6002 A0 06
|
|
lda (StarFieldPtrLo),y ; CPU:$E004 PRG:6004 B1 00
|
|
tay ; CPU:$E006 PRG:6006 A8
|
|
lda (Zp02),y ; CPU:$E007 PRG:6007 B1 02
|
|
sta Zp07 ; CPU:$E009 PRG:6009 85 07
|
|
rts ; CPU:$E00B PRG:600B 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: IncrementEnemyPathIndex
|
|
; Global: Steps the index into the enemy flight path back by one.
|
|
; Local: Executes 6 instructions: loads Y with $06; loads A from
|
|
; ((StarFieldPtrLo),y); clears the carry flag; adds $01 to A; stores
|
|
; A to ((StarFieldPtrLo),y); returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
IncrementEnemyPathIndex:
|
|
ldy #$06 ; CPU:$E00C PRG:600C A0 06
|
|
lda (StarFieldPtrLo),y ; CPU:$E00E PRG:600E B1 00
|
|
clc ; CPU:$E010 PRG:6010 18
|
|
adc #$01 ; CPU:$E011 PRG:6011 69 01
|
|
sta (StarFieldPtrLo),y ; CPU:$E013 PRG:6013 91 00
|
|
rts ; CPU:$E015 PRG:6015 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: DecrementEnemyPathIndex
|
|
; Global: Updates the player's shot: it moves it and checks what it hits.
|
|
; Local: Executes 6 instructions: loads Y with $06; loads A from
|
|
; ((StarFieldPtrLo),y); sets the carry flag; subtracts $01 from A;
|
|
; stores A to ((StarFieldPtrLo),y); returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
DecrementEnemyPathIndex:
|
|
ldy #$06 ; CPU:$E016 PRG:6016 A0 06
|
|
lda (StarFieldPtrLo),y ; CPU:$E018 PRG:6018 B1 00
|
|
sec ; CPU:$E01A PRG:601A 38
|
|
sbc #$01 ; CPU:$E01B PRG:601B E9 01
|
|
sta (StarFieldPtrLo),y ; CPU:$E01D PRG:601D 91 00
|
|
rts ; CPU:$E01F PRG:601F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: UpdatePlayerShot
|
|
; Global: The routine calls Sub_C317, reads $0200.
|
|
; Local: Executes 14 instructions: loads A from $0200; branches on negative to
|
|
; NmiHandler_Loop273; loads A from Zp79; compares A with $06;
|
|
; branches on equal to NmiHandler_Loop273; loads A from Zp62; and 8
|
|
; more instructions.
|
|
; Parameters: Reads $0200 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
UpdatePlayerShot:
|
|
lda $0200 ; CPU:$E020 PRG:6020 AD 00 02
|
|
bmi NmiHandler_Loop273 ; CPU:$E023 PRG:6023 30 73
|
|
lda Zp79 ; CPU:$E025 PRG:6025 A5 79
|
|
cmp #$06 ; CPU:$E027 PRG:6027 C9 06
|
|
beq NmiHandler_Loop273 ; CPU:$E029 PRG:6029 F0 6D
|
|
lda Zp62 ; CPU:$E02B PRG:602B A5 62
|
|
bne NmiHandler_Loop268 ; CPU:$E02D PRG:602D D0 0F
|
|
dec ZpC9 ; CPU:$E02F PRG:602F C6 C9
|
|
bpl NmiHandler_Loop273 ; CPU:$E031 PRG:6031 10 65
|
|
jsr Sub_C317 ; CPU:$E033 PRG:6033 20 17 C3
|
|
and #$1F ; CPU:$E036 PRG:6036 29 1F
|
|
adc #$10 ; CPU:$E038 PRG:6038 69 10
|
|
sta ZpC9 ; CPU:$E03A PRG:603A 85 C9
|
|
bne NmiHandler_Loop270 ; CPU:$E03C PRG:603C D0 1A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop268
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads X from Zp61; loads A from Zp45,x; ANDs
|
|
; A with $C0; branches on not equal to NmiHandler_Loop270; loads A
|
|
; from Zp43,x; ANDs A with $C0; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop268:
|
|
ldx Zp61 ; CPU:$E03E PRG:603E A6 61
|
|
lda Zp45,x ; CPU:$E040 PRG:6040 B5 45
|
|
and #$C0 ; CPU:$E042 PRG:6042 29 C0
|
|
bne NmiHandler_Loop270 ; CPU:$E044 PRG:6044 D0 12
|
|
lda Zp43,x ; CPU:$E046 PRG:6046 B5 43
|
|
and #$C0 ; CPU:$E048 PRG:6048 29 C0
|
|
bne NmiHandler_Loop269 ; CPU:$E04A PRG:604A D0 04
|
|
sta Zp60 ; CPU:$E04C PRG:604C 85 60
|
|
beq NmiHandler_Loop273 ; CPU:$E04E PRG:604E F0 48
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop269
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: increments Zp60; loads A from Zp60; compares
|
|
; A with $14; branches on carry clear to NmiHandler_Loop273.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop269:
|
|
inc Zp60 ; CPU:$E050 PRG:6050 E6 60
|
|
lda Zp60 ; CPU:$E052 PRG:6052 A5 60
|
|
cmp #$14 ; CPU:$E054 PRG:6054 C9 14
|
|
bcc NmiHandler_Loop273 ; CPU:$E056 PRG:6056 90 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop270
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A with $00; stores A to Zp60; loads X
|
|
; with $00; loads A from $02E0,x; branches on negative to
|
|
; NmiHandler_Loop271; loads X with $08; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop270:
|
|
lda #$00 ; CPU:$E058 PRG:6058 A9 00
|
|
sta Zp60 ; CPU:$E05A PRG:605A 85 60
|
|
ldx #$00 ; CPU:$E05C PRG:605C A2 00
|
|
lda $02E0,x ; CPU:$E05E PRG:605E BD E0 02
|
|
bmi NmiHandler_Loop271 ; CPU:$E061 PRG:6061 30 07
|
|
ldx #$08 ; CPU:$E063 PRG:6063 A2 08
|
|
lda $02E0,x ; CPU:$E065 PRG:6065 BD E0 02
|
|
bpl NmiHandler_Loop273 ; CPU:$E068 PRG:6068 10 2E
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop271
|
|
; Global: The routine reads $0201, $0202 and $0203.
|
|
; Local: Executes 15 instructions: loads A from $0201; ANDs A with $1F; stores
|
|
; A to $02E0,x; loads A from $0202; stores A to $02E1,x; loads A from
|
|
; $0203; and 9 more instructions.
|
|
; Parameters: Reads $0201, $0202 and $0203 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop271:
|
|
lda $0201 ; CPU:$E06A PRG:606A AD 01 02
|
|
and #$1F ; CPU:$E06D PRG:606D 29 1F
|
|
sta $02E0,x ; CPU:$E06F PRG:606F 9D E0 02
|
|
lda $0202 ; CPU:$E072 PRG:6072 AD 02 02
|
|
sta $02E1,x ; CPU:$E075 PRG:6075 9D E1 02
|
|
lda $0203 ; CPU:$E078 PRG:6078 AD 03 02
|
|
sta $02E2,x ; CPU:$E07B PRG:607B 9D E2 02
|
|
lda #$00 ; CPU:$E07E PRG:607E A9 00
|
|
sta $02E3,x ; CPU:$E080 PRG:6080 9D E3 02
|
|
sta $02E4,x ; CPU:$E083 PRG:6083 9D E4 02
|
|
ldy Zp79 ; CPU:$E086 PRG:6086 A4 79
|
|
dey ; CPU:$E088 PRG:6088 88
|
|
bne NmiHandler_Loop272 ; CPU:$E089 PRG:6089 D0 05
|
|
lda #$00 ; CPU:$E08B PRG:608B A9 00
|
|
sta $02F0,x ; CPU:$E08D PRG:608D 9D F0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop272
|
|
; Global: The routine calls Sub_C335, writes $05A2.
|
|
; Local: Executes 3 instructions: loads A with $01; stores A to $05A2; calls
|
|
; Sub_C335.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $05A2 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop272:
|
|
lda #$01 ; CPU:$E090 PRG:6090 A9 01
|
|
sta $05A2 ; CPU:$E092 PRG:6092 8D A2 05
|
|
jsr Sub_C335 ; CPU:$E095 PRG:6095 20 35 C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop273
|
|
; Global: The routine calls Sub_E09F.
|
|
; Local: Executes 3 instructions: loads X with $00; calls Sub_E09F; loads X
|
|
; with $08.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop273:
|
|
ldx #$00 ; CPU:$E098 PRG:6098 A2 00
|
|
jsr Sub_E09F ; CPU:$E09A PRG:609A 20 9F E0
|
|
ldx #$08 ; CPU:$E09D PRG:609D A2 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E09F
|
|
; Global: The routine calls MoveEnemyShipAlongPath.
|
|
; Local: Executes 14 instructions: loads A from $02E0,x; branches on negative
|
|
; to NmiHandler_Loop275; copies A into Y; calls MoveEnemyShipAlongPath; compares A
|
|
; with $F8; branches on carry set to NmiHandler_Loop274; and 8 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp02, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E09F:
|
|
lda $02E0,x ; CPU:$E09F PRG:609F BD E0 02
|
|
bmi NmiHandler_Loop275 ; CPU:$E0A2 PRG:60A2 30 1A
|
|
tay ; CPU:$E0A4 PRG:60A4 A8
|
|
jsr MoveEnemyShipAlongPath ; CPU:$E0A5 PRG:60A5 20 D9 E0
|
|
cmp #$F8 ; CPU:$E0A8 PRG:60A8 C9 F8
|
|
bcs NmiHandler_Loop274 ; CPU:$E0AA PRG:60AA B0 0D
|
|
tya ; CPU:$E0AC PRG:60AC 98
|
|
adc #$06 ; CPU:$E0AD PRG:60AD 69 06
|
|
tay ; CPU:$E0AF PRG:60AF A8
|
|
inx ; CPU:$E0B0 PRG:60B0 E8
|
|
jsr MoveEnemyShipAlongPath ; CPU:$E0B1 PRG:60B1 20 D9 E0
|
|
dex ; CPU:$E0B4 PRG:60B4 CA
|
|
cmp #$BC ; CPU:$E0B5 PRG:60B5 C9 BC
|
|
bcc NmiHandler_Loop275 ; CPU:$E0B7 PRG:60B7 90 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop274
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $80; stores A to $02E0,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop274:
|
|
lda #$80 ; CPU:$E0B9 PRG:60B9 A9 80
|
|
sta $02E0,x ; CPU:$E0BB PRG:60BB 9D E0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop275
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 10 instructions: loads A from $02F0,x; branches on negative
|
|
; to NmiHandler_Loop276; loads A from $02E0,x; stores A to $02F0,x;
|
|
; loads A from $02E1,x; stores A to $02F1,x; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop275:
|
|
lda $02F0,x ; CPU:$E0BE PRG:60BE BD F0 02
|
|
bmi NmiHandler_Loop276 ; CPU:$E0C1 PRG:60C1 30 15
|
|
lda $02E0,x ; CPU:$E0C3 PRG:60C3 BD E0 02
|
|
sta $02F0,x ; CPU:$E0C6 PRG:60C6 9D F0 02
|
|
lda $02E1,x ; CPU:$E0C9 PRG:60C9 BD E1 02
|
|
sta $02F1,x ; CPU:$E0CC PRG:60CC 9D F1 02
|
|
lda $02E2,x ; CPU:$E0CF PRG:60CF BD E2 02
|
|
clc ; CPU:$E0D2 PRG:60D2 18
|
|
adc #$0E ; CPU:$E0D3 PRG:60D3 69 0E
|
|
sta $02F2,x ; CPU:$E0D5 PRG:60D5 9D F2 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop276
|
|
; Global: Moves an enemy ship along its flight path by the step in the path table.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop276:
|
|
rts ; CPU:$E0D8 PRG:60D8 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: MoveEnemyShipAlongPath
|
|
; Global: The routine calls DivideTileIndexBy16.
|
|
; Local: Executes 11 instructions: loads A from $02E3,x; clears the carry
|
|
; flag; adds $E0F3,y to A; stores A to Zp02; ANDs A with $0F; stores
|
|
; A to $02E3,x; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, Zp02, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
MoveEnemyShipAlongPath:
|
|
lda $02E3,x ; CPU:$E0D9 PRG:60D9 BD E3 02
|
|
clc ; CPU:$E0DC PRG:60DC 18
|
|
adc $E0F3,y ; CPU:$E0DD PRG:60DD 79 F3 E0
|
|
sta Zp02 ; CPU:$E0E0 PRG:60E0 85 02
|
|
and #$0F ; CPU:$E0E2 PRG:60E2 29 0F
|
|
sta $02E3,x ; CPU:$E0E4 PRG:60E4 9D E3 02
|
|
lda Zp02 ; CPU:$E0E7 PRG:60E7 A5 02
|
|
jsr DivideTileIndexBy16 ; CPU:$E0E9 PRG:60E9 20 FB C3
|
|
adc $02E1,x ; CPU:$E0EC PRG:60EC 7D E1 02
|
|
sta $02E1,x ; CPU:$E0EF PRG:60EF 9D E1 02
|
|
rts ; CPU:$E0F2 PRG:60F2 60
|
|
; ---- data $E0F3-$E112 (32 bytes) ----
|
|
; referenced by `adc $E0F3,y` at $E0DD (operand $E0F3 falls inside this region)
|
|
EnemyPathDeltaTable:
|
|
.byte $B0, $B3, $BB, $C7, $D8, $EB, $00, $15, $28, $39, $45, $4D, $50, $4D, $45, $39 ; CPU:$E0F3 PRG:60F3 B0 B3 BB C7 D8 EB 00 15 28 39 45 4D
|
|
.byte $28, $15, $00, $EB, $D8, $C7, $BB, $B3, $B0, $B3, $BB, $C7, $D8, $EB, $00, $15 ; CPU:$E103 PRG:6103 28 15 00 EB D8 C7 BB B3 B0 B3 BB C7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E113
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A from Zp5F; branches on equal to
|
|
; NmiHandler_Loop277; decrements Zp5F; branches on not equal to
|
|
; NmiHandler_Loop280.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E113:
|
|
lda Zp5F ; CPU:$E113 PRG:6113 A5 5F
|
|
beq NmiHandler_Loop277 ; CPU:$E115 PRG:6115 F0 04
|
|
dec Zp5F ; CPU:$E117 PRG:6117 C6 5F
|
|
bne NmiHandler_Loop280 ; CPU:$E119 PRG:6119 D0 75
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop277
|
|
; Global: The routine calls Sub_C317, reads $0464 and $045E.
|
|
; Local: Executes 33 instructions: loads A from $0464; compares A with $03;
|
|
; branches on equal to NmiHandler_Loop280; loads A from Zp7A;
|
|
; branches on not equal to NmiHandler_Loop280; loads A from Zp48; and
|
|
; 27 more instructions.
|
|
; Parameters: Reads $0464 and $045E from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop277:
|
|
lda $0464 ; CPU:$E11B PRG:611B AD 64 04
|
|
cmp #$03 ; CPU:$E11E PRG:611E C9 03
|
|
beq NmiHandler_Loop280 ; CPU:$E120 PRG:6120 F0 6E
|
|
lda Zp7A ; CPU:$E122 PRG:6122 A5 7A
|
|
bne NmiHandler_Loop280 ; CPU:$E124 PRG:6124 D0 6A
|
|
lda Zp48 ; CPU:$E126 PRG:6126 A5 48
|
|
and $045E ; CPU:$E128 PRG:6128 2D 5E 04
|
|
bne NmiHandler_Loop278 ; CPU:$E12B PRG:612B D0 42
|
|
jsr Sub_C317 ; CPU:$E12D PRG:612D 20 17 C3
|
|
and #$70 ; CPU:$E130 PRG:6130 29 70
|
|
tay ; CPU:$E132 PRG:6132 A8
|
|
lda $0220,y ; CPU:$E133 PRG:6133 B9 20 02
|
|
bmi NmiHandler_Loop278 ; CPU:$E136 PRG:6136 30 37
|
|
lda $0227,y ; CPU:$E138 PRG:6138 B9 27 02
|
|
and #$7F ; CPU:$E13B PRG:613B 29 7F
|
|
bne NmiHandler_Loop278 ; CPU:$E13D PRG:613D D0 30
|
|
lda $0221,y ; CPU:$E13F PRG:613F B9 21 02
|
|
and #$1F ; CPU:$E142 PRG:6142 29 1F
|
|
sec ; CPU:$E144 PRG:6144 38
|
|
sbc #$06 ; CPU:$E145 PRG:6145 E9 06
|
|
cmp #$0D ; CPU:$E147 PRG:6147 C9 0D
|
|
bcs NmiHandler_Loop278 ; CPU:$E149 PRG:6149 B0 24
|
|
lda $0222,y ; CPU:$E14B PRG:614B B9 22 02
|
|
sec ; CPU:$E14E PRG:614E 38
|
|
sbc #$10 ; CPU:$E14F PRG:614F E9 10
|
|
cmp #$80 ; CPU:$E151 PRG:6151 C9 80
|
|
bcs NmiHandler_Loop278 ; CPU:$E153 PRG:6153 B0 1A
|
|
lda $022C,y ; CPU:$E155 PRG:6155 B9 2C 02
|
|
beq NmiHandler_Loop278 ; CPU:$E158 PRG:6158 F0 15
|
|
sec ; CPU:$E15A PRG:615A 38
|
|
sbc #$01 ; CPU:$E15B PRG:615B E9 01
|
|
sta $022C,y ; CPU:$E15D PRG:615D 99 2C 02
|
|
ldx #$00 ; CPU:$E160 PRG:6160 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear14
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from Zp90,x; branches on negative to
|
|
; NmiHandler_Loop279; copies X into A; clears the carry flag; adds
|
|
; $04 to A; copies A into X; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear14:
|
|
lda Zp90,x ; CPU:$E162 PRG:6162 B5 90
|
|
bmi NmiHandler_Loop279 ; CPU:$E164 PRG:6164 30 0C
|
|
txa ; CPU:$E166 PRG:6166 8A
|
|
clc ; CPU:$E167 PRG:6167 18
|
|
adc #$04 ; CPU:$E168 PRG:6168 69 04
|
|
tax ; CPU:$E16A PRG:616A AA
|
|
cmp #$20 ; CPU:$E16B PRG:616B C9 20
|
|
bcc NmiHandler_OnCarryClear14 ; CPU:$E16D PRG:616D 90 F3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop278
|
|
; Global: The routine calls NmiHandler_Loop280.
|
|
; Local: Executes 1 instruction: calls NmiHandler_Loop280.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop278:
|
|
jmp NmiHandler_Loop280 ; CPU:$E16F PRG:616F 4C 90 E1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop279
|
|
; Global: The routine calls ComputePlayerShipPosition, reads $0477.
|
|
; Local: Executes 13 instructions: stores X to StarFieldPtrLo; increments
|
|
; $0477; loads A from $0222,y; stores A to Zp12; stores A to Zp91,x;
|
|
; loads A from $0223,y; and 7 more instructions.
|
|
; Parameters: Reads $0477 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop279:
|
|
stx StarFieldPtrLo ; CPU:$E172 PRG:6172 86 00
|
|
inc $0477 ; CPU:$E174 PRG:6174 EE 77 04
|
|
lda $0222,y ; CPU:$E177 PRG:6177 B9 22 02
|
|
sta Zp12 ; CPU:$E17A PRG:617A 85 12
|
|
sta Zp91,x ; CPU:$E17C PRG:617C 95 91
|
|
lda $0223,y ; CPU:$E17E PRG:617E B9 23 02
|
|
sta Zp13 ; CPU:$E181 PRG:6181 85 13
|
|
sta Zp92,x ; CPU:$E183 PRG:6183 95 92
|
|
jsr ComputePlayerShipPosition ; CPU:$E185 PRG:6185 20 5F C4
|
|
ldx StarFieldPtrLo ; CPU:$E188 PRG:6188 A6 00
|
|
sta Zp90,x ; CPU:$E18A PRG:618A 95 90
|
|
lda #$00 ; CPU:$E18C PRG:618C A9 00
|
|
sta Zp93,x ; CPU:$E18E PRG:618E 95 93
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop280
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop280:
|
|
ldx #$00 ; CPU:$E190 PRG:6190 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear15
|
|
; Global: The routine calls DivideTileIndexBy16.
|
|
; Local: Executes 25 instructions: loads A from Zp90,x; branches on negative
|
|
; to NmiHandler_OnNegative4; copies A into Y; loads A from Zp48;
|
|
; rotates a right; loads A from Zp91,x; and 19 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear15:
|
|
lda Zp90,x ; CPU:$E192 PRG:6192 B5 90
|
|
bmi NmiHandler_OnNegative4 ; CPU:$E194 PRG:6194 30 29
|
|
tay ; CPU:$E196 PRG:6196 A8
|
|
lda Zp48 ; CPU:$E197 PRG:6197 A5 48
|
|
ror a ; CPU:$E199 PRG:6199 6A
|
|
lda Zp91,x ; CPU:$E19A PRG:619A B5 91
|
|
adc #$02 ; CPU:$E19C PRG:619C 69 02
|
|
sta Zp91,x ; CPU:$E19E PRG:619E 95 91
|
|
cmp #$E8 ; CPU:$E1A0 PRG:61A0 C9 E8
|
|
bcs NmiHandler_Loop281 ; CPU:$E1A2 PRG:61A2 B0 25
|
|
lda $FFA0,y ; CPU:$E1A4 PRG:61A4 B9 A0 FF
|
|
clc ; CPU:$E1A7 PRG:61A7 18
|
|
adc Zp93,x ; CPU:$E1A8 PRG:61A8 75 93
|
|
pha ; CPU:$E1AA PRG:61AA 48
|
|
and #$0F ; CPU:$E1AB PRG:61AB 29 0F
|
|
sta Zp93,x ; CPU:$E1AD PRG:61AD 95 93
|
|
pla ; CPU:$E1AF PRG:61AF 68
|
|
jsr DivideTileIndexBy16 ; CPU:$E1B0 PRG:61B0 20 FB C3
|
|
clc ; CPU:$E1B3 PRG:61B3 18
|
|
adc Zp92,x ; CPU:$E1B4 PRG:61B4 75 92
|
|
sta Zp92,x ; CPU:$E1B6 PRG:61B6 95 92
|
|
sec ; CPU:$E1B8 PRG:61B8 38
|
|
sbc #$04 ; CPU:$E1B9 PRG:61B9 E9 04
|
|
cmp #$B8 ; CPU:$E1BB PRG:61BB C9 B8
|
|
bcs NmiHandler_Loop281 ; CPU:$E1BD PRG:61BD B0 0A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative4
|
|
; Global: The routine calls DivideTileIndexBy16.
|
|
; Local: Executes 32 instructions: loads A from Zp90,x; branches on negative
|
|
; to NmiHandler_OnNegative4; copies A into Y; loads A from Zp48;
|
|
; rotates a right; loads A from Zp91,x; and 26 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative4:
|
|
txa ; CPU:$E1BF PRG:61BF 8A
|
|
clc ; CPU:$E1C0 PRG:61C0 18
|
|
adc #$04 ; CPU:$E1C1 PRG:61C1 69 04
|
|
tax ; CPU:$E1C3 PRG:61C3 AA
|
|
cmp #$20 ; CPU:$E1C4 PRG:61C4 C9 20
|
|
bcc NmiHandler_OnCarryClear15 ; CPU:$E1C6 PRG:61C6 90 CA
|
|
rts ; CPU:$E1C8 PRG:61C8 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop281
|
|
; Global: The routine calls DivideTileIndexBy16, reads $0477.
|
|
; Local: Executes 36 instructions: loads A from Zp90,x; branches on negative
|
|
; to NmiHandler_OnNegative4; copies A into Y; loads A from Zp48;
|
|
; rotates a right; loads A from Zp91,x; and 30 more instructions.
|
|
; Parameters: Reads $0477 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop281:
|
|
dec $0477 ; CPU:$E1C9 PRG:61C9 CE 77 04
|
|
lda #$FF ; CPU:$E1CC PRG:61CC A9 FF
|
|
sta Zp90,x ; CPU:$E1CE PRG:61CE 95 90
|
|
bmi NmiHandler_OnNegative4 ; CPU:$E1D0 PRG:61D0 30 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E1D2
|
|
; Global: The routine calls CallHandlerThroughPointer.
|
|
; Local: Executes 4 instructions: loads A from Zp79; calls CallHandlerThroughPointer; subtracts
|
|
; $E1 from A; EORs A with $CBE4,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E1D2:
|
|
lda Zp79 ; CPU:$E1D2 PRG:61D2 A5 79
|
|
jsr CallHandlerThroughPointer ; CPU:$E1D4 PRG:61D4 20 01 C3
|
|
sbc #$E1 ; CPU:$E1D7 PRG:61D7 E9 E1
|
|
eor $CBE4,x ; CPU:$E1D9 PRG:61D9 5D E4 CB
|
|
.byte $E2, $36 ; CPU:$E1DC PRG:61DC E2 36 -- nop #$36 (undocumented; ca65 cannot encode) ; CPU:$E1DC PRG:61DC E2 36
|
|
.byte $E3, $AC ; CPU:$E1DE PRG:61DE E3 AC -- isc (ZpAC,x) (undocumented; ca65 cannot encode) ; CPU:$E1DE PRG:61DE E3 AC
|
|
.byte $E3, $26 ; CPU:$E1E0 PRG:61E0 E3 26 -- isc (Zp26,x) (undocumented; ca65 cannot encode) ; CPU:$E1E0 PRG:61E0 E3 26
|
|
cpx Zp73 ; CPU:$E1E2 PRG:61E2 E4 73
|
|
cpx Zp23 ; CPU:$E1E4 PRG:61E4 E4 23
|
|
.byte $E2, $99 ; CPU:$E1E6 PRG:61E6 E2 99 -- nop #$99 (undocumented; ca65 cannot encode) ; CPU:$E1E6 PRG:61E6 E2 99
|
|
; ---- data $E1E8-$E1E8 (1 bytes) ----
|
|
UnreachedByte:
|
|
.byte $E2 ; CPU:$E1E8 PRG:61E8 E2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE1E9
|
|
; Global: The routine calls Sub_ED70, writes $05A1, $0204 and $0471, reads
|
|
; $0200, $0203 and $0202.
|
|
; Local: Executes 27 instructions: loads A from $0200; branches on negative to
|
|
; NmiHandler_Loop285; loads A from Zp54; compares A with $02;
|
|
; branches on not equal to NmiHandler_Loop282; loads A from Zp58; and
|
|
; 21 more instructions.
|
|
; Parameters: Reads $0200, $0203 and $0202 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $05A1, $0204 and $0471 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE1E9:
|
|
lda $0200 ; CPU:$E1E9 PRG:61E9 AD 00 02
|
|
bmi NmiHandler_Loop285 ; CPU:$E1EC PRG:61EC 30 7B
|
|
lda Zp54 ; CPU:$E1EE PRG:61EE A5 54
|
|
cmp #$02 ; CPU:$E1F0 PRG:61F0 C9 02
|
|
bne NmiHandler_Loop282 ; CPU:$E1F2 PRG:61F2 D0 2F
|
|
lda Zp58 ; CPU:$E1F4 PRG:61F4 A5 58
|
|
sec ; CPU:$E1F6 PRG:61F6 38
|
|
sbc #$24 ; CPU:$E1F7 PRG:61F7 E9 24
|
|
cmp $0203 ; CPU:$E1F9 PRG:61F9 CD 03 02
|
|
bcs NmiHandler_Loop282 ; CPU:$E1FC PRG:61FC B0 25
|
|
clc ; CPU:$E1FE PRG:61FE 18
|
|
adc #$48 ; CPU:$E1FF PRG:61FF 69 48
|
|
cmp $0203 ; CPU:$E201 PRG:6201 CD 03 02
|
|
bcc NmiHandler_Loop282 ; CPU:$E204 PRG:6204 90 1D
|
|
ldx #$02 ; CPU:$E206 PRG:6206 A2 02
|
|
stx Zp79 ; CPU:$E208 PRG:6208 86 79
|
|
dex ; CPU:$E20A PRG:620A CA
|
|
stx Zp7A ; CPU:$E20B PRG:620B 86 7A
|
|
stx $05A1 ; CPU:$E20D PRG:620D 8E A1 05
|
|
lda #$1B ; CPU:$E210 PRG:6210 A9 1B
|
|
jsr Sub_ED70 ; CPU:$E212 PRG:6212 20 70 ED
|
|
dec $0202 ; CPU:$E215 PRG:6215 CE 02 02
|
|
lda #$00 ; CPU:$E218 PRG:6218 A9 00
|
|
sta $0204 ; CPU:$E21A PRG:621A 8D 04 02
|
|
lda #$F0 ; CPU:$E21D PRG:621D A9 F0
|
|
sta $0471 ; CPU:$E21F PRG:621F 8D 71 04
|
|
rts ; CPU:$E222 PRG:6222 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop282
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $B8; stores A to TilePtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop282:
|
|
lda #$B8 ; CPU:$E223 PRG:6223 A9 B8
|
|
sta TilePtrLo ; CPU:$E225 PRG:6225 85 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E227
|
|
; Global: The routine calls Sub_C317, reads $0200.
|
|
; Local: Executes 15 instructions: loads A from $0200; branches on negative to
|
|
; NmiHandler_Loop285; loads A from Zp62; branches on not equal to
|
|
; NmiHandler_Loop284; decrements ZpCA; branches on non-negative to
|
|
; NmiHandler_Loop283; and 9 more instructions.
|
|
; Parameters: Reads $0200 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E227:
|
|
lda $0200 ; CPU:$E227 PRG:6227 AD 00 02
|
|
bmi NmiHandler_Loop285 ; CPU:$E22A PRG:622A 30 3D
|
|
lda Zp62 ; CPU:$E22C PRG:622C A5 62
|
|
bne NmiHandler_Loop284 ; CPU:$E22E PRG:622E D0 1D
|
|
dec ZpCA ; CPU:$E230 PRG:6230 C6 CA
|
|
bpl NmiHandler_Loop283 ; CPU:$E232 PRG:6232 10 11
|
|
jsr Sub_C317 ; CPU:$E234 PRG:6234 20 17 C3
|
|
and #$3F ; CPU:$E237 PRG:6237 29 3F
|
|
sta ZpCA ; CPU:$E239 PRG:6239 85 CA
|
|
lda #$00 ; CPU:$E23B PRG:623B A9 00
|
|
lsr ZpCA ; CPU:$E23D PRG:623D 46 CA
|
|
rol a ; CPU:$E23F PRG:623F 2A
|
|
lsr ZpCA ; CPU:$E240 PRG:6240 46 CA
|
|
rol a ; CPU:$E242 PRG:6242 2A
|
|
sta ZpCB ; CPU:$E243 PRG:6243 85 CB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop283
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A from Zp44; ANDs A with $FC; ORs A
|
|
; with ZpCB; stores A to Zp44.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp44, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop283:
|
|
lda Zp44 ; CPU:$E245 PRG:6245 A5 44
|
|
and #$FC ; CPU:$E247 PRG:6247 29 FC
|
|
ora ZpCB ; CPU:$E249 PRG:6249 05 CB
|
|
sta Zp44 ; CPU:$E24B PRG:624B 85 44
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop284
|
|
; Global: The routine writes $0200, $0201 and $0202.
|
|
; Local: Executes 15 instructions: loads A with $00; stores A to $0200; stores
|
|
; A to $0201; loads A with $C7; stores A to $0202; loads X from Zp61;
|
|
; and 9 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0200, $0201 and $0202
|
|
; changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop284:
|
|
lda #$00 ; CPU:$E24D PRG:624D A9 00
|
|
sta $0200 ; CPU:$E24F PRG:624F 8D 00 02
|
|
sta $0201 ; CPU:$E252 PRG:6252 8D 01 02
|
|
lda #$C7 ; CPU:$E255 PRG:6255 A9 C7
|
|
sta $0202 ; CPU:$E257 PRG:6257 8D 02 02
|
|
ldx Zp61 ; CPU:$E25A PRG:625A A6 61
|
|
dex ; CPU:$E25C PRG:625C CA
|
|
txa ; CPU:$E25D PRG:625D 8A
|
|
and #$01 ; CPU:$E25E PRG:625E 29 01
|
|
tax ; CPU:$E260 PRG:6260 AA
|
|
lda Zp44,x ; CPU:$E261 PRG:6261 B5 44
|
|
ror a ; CPU:$E263 PRG:6263 6A
|
|
bcs NmiHandler_Loop286 ; CPU:$E264 PRG:6264 B0 04
|
|
ror a ; CPU:$E266 PRG:6266 6A
|
|
bcs NmiHandler_Loop289 ; CPU:$E267 PRG:6267 B0 1A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop285
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop285:
|
|
rts ; CPU:$E269 PRG:6269 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop286
|
|
; Global: The routine reads $0204 and $0203.
|
|
; Local: Executes 10 instructions: returns with RTS; rotates a right; branches
|
|
; on carry set to NmiHandler_Loop285; increments $0204; loads A from
|
|
; $0204; rotates a right; and 4 more instructions.
|
|
; Parameters: Reads $0204 and $0203 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop286:
|
|
ror a ; CPU:$E26A PRG:626A 6A
|
|
bcs NmiHandler_Loop285 ; CPU:$E26B PRG:626B B0 FC
|
|
inc $0204 ; CPU:$E26D PRG:626D EE 04 02
|
|
lda $0204 ; CPU:$E270 PRG:6270 AD 04 02
|
|
ror a ; CPU:$E273 PRG:6273 6A
|
|
ldx $0203 ; CPU:$E274 PRG:6274 AE 03 02
|
|
inx ; CPU:$E277 PRG:6277 E8
|
|
bcc NmiHandler_Loop287 ; CPU:$E278 PRG:6278 90 01
|
|
inx ; CPU:$E27A PRG:627A E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop287
|
|
; Global: The routine writes $0203.
|
|
; Local: Executes 3 instructions: compares X with TilePtrLo; branches on carry
|
|
; set to NmiHandler_Loop288; stores X to $0203.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0203 changed.
|
|
; Clobbers:
|
|
; no register, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop287:
|
|
cpx TilePtrLo ; CPU:$E27B PRG:627B E4 08
|
|
bcs NmiHandler_Loop288 ; CPU:$E27D PRG:627D B0 03
|
|
stx $0203 ; CPU:$E27F PRG:627F 8E 03 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop288
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop288:
|
|
rts ; CPU:$E282 PRG:6282 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop289
|
|
; Global: The routine reads $0204 and $0203.
|
|
; Local: Executes 7 instructions: increments $0204; loads A from $0204;
|
|
; rotates a right; loads X from $0203; decrements X; branches on
|
|
; carry clear to NmiHandler_Loop290; and 1 more instruction.
|
|
; Parameters: Reads $0204 and $0203 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop289:
|
|
inc $0204 ; CPU:$E283 PRG:6283 EE 04 02
|
|
lda $0204 ; CPU:$E286 PRG:6286 AD 04 02
|
|
ror a ; CPU:$E289 PRG:6289 6A
|
|
ldx $0203 ; CPU:$E28A PRG:628A AE 03 02
|
|
dex ; CPU:$E28D PRG:628D CA
|
|
bcc NmiHandler_Loop290 ; CPU:$E28E PRG:628E 90 01
|
|
dex ; CPU:$E290 PRG:6290 CA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop290
|
|
; Global: The routine writes $0203.
|
|
; Local: Executes 3 instructions: compares X with $08; branches on carry clear
|
|
; to NmiHandler_OnNonzero55; stores X to $0203.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0203 changed.
|
|
; Clobbers:
|
|
; no register, the N, Z and C flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop290:
|
|
cpx #$08 ; CPU:$E291 PRG:6291 E0 08
|
|
bcc NmiHandler_OnNonzero55 ; CPU:$E293 PRG:6293 90 03
|
|
stx $0203 ; CPU:$E295 PRG:6295 8E 03 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero55
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero55:
|
|
rts ; CPU:$E298 PRG:6298 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE299
|
|
; Global: The routine calls AdvancePlayerShipAnimation, reads $0201.
|
|
; Local: Executes 4 instructions: returns with RTS; loads A from $0201;
|
|
; branches on equal to NmiHandler_Loop291; calls AdvancePlayerShipAnimation.
|
|
; Parameters: Reads $0201 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE299:
|
|
lda $0201 ; CPU:$E299 PRG:6299 AD 01 02
|
|
beq NmiHandler_Loop291 ; CPU:$E29C PRG:629C F0 03
|
|
jsr AdvancePlayerShipAnimation ; CPU:$E29E PRG:629E 20 D5 E4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop291
|
|
; Global: The routine writes $0202 and $0471, reads $0202, $0201 and $045C.
|
|
; Local: Executes 15 instructions: returns with RTS; increments $0202; loads A
|
|
; from $0202; compares A with $C7; branches on carry clear to
|
|
; NmiHandler_OnNonzero55; loads A with $C7; and 9 more instructions.
|
|
; Parameters: Reads $0202, $0201 and $045C from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0202 and $0471 changed.
|
|
; Clobbers:
|
|
; A, the N, Z and C flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop291:
|
|
inc $0202 ; CPU:$E2A1 PRG:62A1 EE 02 02
|
|
lda $0202 ; CPU:$E2A4 PRG:62A4 AD 02 02
|
|
cmp #$C7 ; CPU:$E2A7 PRG:62A7 C9 C7
|
|
bcc NmiHandler_OnNonzero55 ; CPU:$E2A9 PRG:62A9 90 ED
|
|
lda #$C7 ; CPU:$E2AB PRG:62AB A9 C7
|
|
sta $0202 ; CPU:$E2AD PRG:62AD 8D 02 02
|
|
lda $0201 ; CPU:$E2B0 PRG:62B0 AD 01 02
|
|
bne NmiHandler_OnNonzero55 ; CPU:$E2B3 PRG:62B3 D0 E3
|
|
lda $045C ; CPU:$E2B5 PRG:62B5 AD 5C 04
|
|
sta $0471 ; CPU:$E2B8 PRG:62B8 8D 71 04
|
|
lda #$00 ; CPU:$E2BB PRG:62BB A9 00
|
|
sta Zp79 ; CPU:$E2BD PRG:62BD 85 79
|
|
sta Zp7A ; CPU:$E2BF PRG:62BF 85 7A
|
|
rts ; CPU:$E2C1 PRG:62C1 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative5
|
|
; Global: The routine calls Sub_ED70.
|
|
; Local: Executes 4 instructions: loads A with $08; stores A to Zp79; loads A
|
|
; with $21; calls Sub_ED70.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, Zp79, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative5:
|
|
lda #$08 ; CPU:$E2C2 PRG:62C2 A9 08
|
|
sta Zp79 ; CPU:$E2C4 PRG:62C4 85 79
|
|
lda #$21 ; CPU:$E2C6 PRG:62C6 A9 21
|
|
jmp Sub_ED70 ; CPU:$E2C8 PRG:62C8 4C 70 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE2CB
|
|
; Global: The routine calls Sub_ED70, AdvancePlayerShipAnimation and NmiHandler_Loop293, reads
|
|
; $0203.
|
|
; Local: Executes 14 instructions: loads A with $08; stores A to Zp79; loads A
|
|
; with $21; calls Sub_ED70; calls AdvancePlayerShipAnimation; loads X from Zp7E; and 8
|
|
; more instructions.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, Zp54, Zp79, the OAM
|
|
; shadow, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE2CB:
|
|
jsr AdvancePlayerShipAnimation ; CPU:$E2CB PRG:62CB 20 D5 E4
|
|
ldx Zp7E ; CPU:$E2CE PRG:62CE A6 7E
|
|
lda $0200,x ; CPU:$E2D0 PRG:62D0 BD 00 02
|
|
bmi NmiHandler_OnNegative5 ; CPU:$E2D3 PRG:62D3 30 ED
|
|
lda $0203 ; CPU:$E2D5 PRG:62D5 AD 03 02
|
|
cmp Zp58 ; CPU:$E2D8 PRG:62D8 C5 58
|
|
beq NmiHandler_Loop293 ; CPU:$E2DA PRG:62DA F0 0B
|
|
bcc NmiHandler_Loop292 ; CPU:$E2DC PRG:62DC 90 06
|
|
dec $0203 ; CPU:$E2DE PRG:62DE CE 03 02
|
|
jmp NmiHandler_Loop293 ; CPU:$E2E1 PRG:62E1 4C E7 E2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop292
|
|
; Global: The routine reads $0203.
|
|
; Local: Executes 1 instruction: increments $0203.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, Zp54, Zp79, the OAM
|
|
; shadow, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop292:
|
|
inc $0203 ; CPU:$E2E4 PRG:62E4 EE 03 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop293
|
|
; Global: The routine reads $0202 and $0204.
|
|
; Local: Executes 10 instructions: loads A with $02; stores A to Zp54; loads A
|
|
; from $0202; compares A with $9B; branches on carry clear to
|
|
; NmiHandler_Loop294; increments $0204; and 4 more instructions.
|
|
; Parameters: Reads $0202 and $0204 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, Zp54, Zp79, the OAM
|
|
; shadow, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop293:
|
|
lda #$02 ; CPU:$E2E7 PRG:62E7 A9 02
|
|
sta Zp54 ; CPU:$E2E9 PRG:62E9 85 54
|
|
lda $0202 ; CPU:$E2EB PRG:62EB AD 02 02
|
|
cmp #$9B ; CPU:$E2EE PRG:62EE C9 9B
|
|
bcc NmiHandler_Loop294 ; CPU:$E2F0 PRG:62F0 90 0E
|
|
inc $0204 ; CPU:$E2F2 PRG:62F2 EE 04 02
|
|
lda $0204 ; CPU:$E2F5 PRG:62F5 AD 04 02
|
|
and #$03 ; CPU:$E2F8 PRG:62F8 29 03
|
|
beq NmiHandler_OnNonzero56 ; CPU:$E2FA PRG:62FA F0 03
|
|
dec $0202 ; CPU:$E2FC PRG:62FC CE 02 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero56
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero56:
|
|
rts ; CPU:$E2FF PRG:62FF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop294
|
|
; Global: The routine calls Sub_ED70, writes $0200, $0210, $0212, $0213 and 1
|
|
; more, reads $0201.
|
|
; Local: Executes 24 instructions: returns with RTS; loads A from $0201;
|
|
; branches on not equal to NmiHandler_OnNonzero56; increments Zp79;
|
|
; loads A with $80; stores A to $0200; and 18 more instructions.
|
|
; Parameters: Reads $0201 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0200, $0210 and $0212 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, Zp54, Zp79, the OAM
|
|
; shadow, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop294:
|
|
lda $0201 ; CPU:$E300 PRG:6300 AD 01 02
|
|
bne NmiHandler_OnNonzero56 ; CPU:$E303 PRG:6303 D0 FA
|
|
inc Zp79 ; CPU:$E305 PRG:6305 E6 79
|
|
lda #$80 ; CPU:$E307 PRG:6307 A9 80
|
|
sta $0200 ; CPU:$E309 PRG:6309 8D 00 02
|
|
lda #$01 ; CPU:$E30C PRG:630C A9 01
|
|
sta $0210 ; CPU:$E30E PRG:630E 8D 10 02
|
|
lda #$9B ; CPU:$E311 PRG:6311 A9 9B
|
|
sta $0212 ; CPU:$E313 PRG:6313 8D 12 02
|
|
lda Zp58 ; CPU:$E316 PRG:6316 A5 58
|
|
sta $0213 ; CPU:$E318 PRG:6318 8D 13 02
|
|
ldx Zp7E ; CPU:$E31B PRG:631B A6 7E
|
|
lda #$25 ; CPU:$E31D PRG:631D A9 25
|
|
sta $0205,x ; CPU:$E31F PRG:631F 9D 05 02
|
|
lda #$00 ; CPU:$E322 PRG:6322 A9 00
|
|
sta $0206,x ; CPU:$E324 PRG:6324 9D 06 02
|
|
lda #$04 ; CPU:$E327 PRG:6327 A9 04
|
|
sta Zp54 ; CPU:$E329 PRG:6329 85 54
|
|
lda #$21 ; CPU:$E32B PRG:632B A9 21
|
|
jsr Sub_ED70 ; CPU:$E32D PRG:632D 20 70 ED
|
|
lda #$3C ; CPU:$E330 PRG:6330 A9 3C
|
|
sta $020E ; CPU:$E332 PRG:6332 8D 0E 02
|
|
rts ; CPU:$E335 PRG:6335 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE336
|
|
; Global: The routine writes $0211, $0212, $0213, $058D and 2 more, reads
|
|
; $020E.
|
|
; Local: Executes 20 instructions: loads X from Zp7E; loads A from $0200,x;
|
|
; branches on negative to NmiHandler_Loop296; loads A with $00;
|
|
; stores A to $0211; loads A from $0202,x; and 14 more instructions.
|
|
; Parameters: Reads $020E from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0211, $0212 and $0213
|
|
; changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE336:
|
|
ldx Zp7E ; CPU:$E336 PRG:6336 A6 7E
|
|
lda $0200,x ; CPU:$E338 PRG:6338 BD 00 02
|
|
bmi NmiHandler_Loop296 ; CPU:$E33B PRG:633B 30 46
|
|
lda #$00 ; CPU:$E33D PRG:633D A9 00
|
|
sta $0211 ; CPU:$E33F PRG:633F 8D 11 02
|
|
lda $0202,x ; CPU:$E342 PRG:6342 BD 02 02
|
|
clc ; CPU:$E345 PRG:6345 18
|
|
adc #$10 ; CPU:$E346 PRG:6346 69 10
|
|
sta $0212 ; CPU:$E348 PRG:6348 8D 12 02
|
|
lda $0203,x ; CPU:$E34B PRG:634B BD 03 02
|
|
sta $0213 ; CPU:$E34E PRG:634E 8D 13 02
|
|
lda $020E ; CPU:$E351 PRG:6351 AD 0E 02
|
|
beq NmiHandler_Loop295 ; CPU:$E354 PRG:6354 F0 12
|
|
dec $020E ; CPU:$E356 PRG:6356 CE 0E 02
|
|
bne NmiHandler_Loop295 ; CPU:$E359 PRG:6359 D0 0D
|
|
lda #$01 ; CPU:$E35B PRG:635B A9 01
|
|
sta $058D ; CPU:$E35D PRG:635D 8D 8D 05
|
|
sta $058E ; CPU:$E360 PRG:6360 8D 8E 05
|
|
sta $058F ; CPU:$E363 PRG:6363 8D 8F 05
|
|
sta Zp5D ; CPU:$E366 PRG:6366 85 5D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop295
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop295:
|
|
rts ; CPU:$E368 PRG:6368 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarrySet5
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 3 instructions: loads A with $08; stores A to Zp79; loads X
|
|
; with $03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp79, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarrySet5:
|
|
lda #$08 ; CPU:$E369 PRG:6369 A9 08
|
|
sta Zp79 ; CPU:$E36B PRG:636B 85 79
|
|
ldx #$03 ; CPU:$E36D PRG:636D A2 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero57
|
|
; Global: The routine writes $0210 and $0200.
|
|
; Local: Executes 9 instructions: loads A from $0210,x; stores A to $0200,x;
|
|
; decrements X; branches on not equal to NmiHandler_OnNonzero57;
|
|
; loads A with $80; stores A to $0210; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0210 and $0200 changed.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero57:
|
|
lda $0210,x ; CPU:$E36F PRG:636F BD 10 02
|
|
sta $0200,x ; CPU:$E372 PRG:6372 9D 00 02
|
|
dex ; CPU:$E375 PRG:6375 CA
|
|
bne NmiHandler_OnNonzero57 ; CPU:$E376 PRG:6376 D0 F7
|
|
lda #$80 ; CPU:$E378 PRG:6378 A9 80
|
|
sta $0210 ; CPU:$E37A PRG:637A 8D 10 02
|
|
lda #$00 ; CPU:$E37D PRG:637D A9 00
|
|
sta $0200 ; CPU:$E37F PRG:637F 8D 00 02
|
|
rts ; CPU:$E382 PRG:6382 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop296
|
|
; Global: The routine writes $0210, $0200 and $0211, reads $0212.
|
|
; Local: Executes 22 instructions: loads A with $08; stores A to Zp79; loads X
|
|
; with $03; loads A from $0210,x; stores A to $0200,x; decrements X;
|
|
; and 16 more instructions.
|
|
; Parameters: Reads $0212 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0210, $0200 and $0211 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop296:
|
|
lda $0212 ; CPU:$E383 PRG:6383 AD 12 02
|
|
cmp #$80 ; CPU:$E386 PRG:6386 C9 80
|
|
bcs NmiHandler_OnCarrySet5 ; CPU:$E388 PRG:6388 B0 DF
|
|
lda #$00 ; CPU:$E38A PRG:638A A9 00
|
|
sta $0211 ; CPU:$E38C PRG:638C 8D 11 02
|
|
lda $0212 ; CPU:$E38F PRG:638F AD 12 02
|
|
cmp #$07 ; CPU:$E392 PRG:6392 C9 07
|
|
beq NmiHandler_Loop297 ; CPU:$E394 PRG:6394 F0 04
|
|
dec $0212 ; CPU:$E396 PRG:6396 CE 12 02
|
|
rts ; CPU:$E399 PRG:6399 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop297
|
|
; Global: The routine calls ParseVramWriteRecord.
|
|
; Local: Executes 9 instructions: loads A with $04; stores A to Zp79; loads X
|
|
; with $02; stores X to Zp7B; decrements X; stores X to Zp7C; and 3
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop297:
|
|
lda #$04 ; CPU:$E39A PRG:639A A9 04
|
|
sta Zp79 ; CPU:$E39C PRG:639C 85 79
|
|
ldx #$02 ; CPU:$E39E PRG:639E A2 02
|
|
stx Zp7B ; CPU:$E3A0 PRG:63A0 86 7B
|
|
dex ; CPU:$E3A2 PRG:63A2 CA
|
|
stx Zp7C ; CPU:$E3A3 PRG:63A3 86 7C
|
|
ldx #$60 ; CPU:$E3A5 PRG:63A5 A2 60
|
|
lda #$F9 ; CPU:$E3A7 PRG:63A7 A9 F9
|
|
jmp ParseVramWriteRecord ; CPU:$E3A9 PRG:63A9 4C 2D C1
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE3AC
|
|
; Global: The routine calls GetEnemyShipTileId and NmiHandler_Loop282, writes $0213,
|
|
; $0212 and $0211.
|
|
; Local: Executes 11 instructions: loads X from Zp7D; loads A from $0400,x;
|
|
; branches on equal to NmiHandler_Loop298; copies X into A; calls
|
|
; GetEnemyShipTileId; stores A to $0213; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0213, $0212 and $0211
|
|
; changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE3AC:
|
|
ldx Zp7D ; CPU:$E3AC PRG:63AC A6 7D
|
|
lda $0400,x ; CPU:$E3AE PRG:63AE BD 00 04
|
|
beq NmiHandler_Loop298 ; CPU:$E3B1 PRG:63B1 F0 14
|
|
txa ; CPU:$E3B3 PRG:63B3 8A
|
|
jsr GetEnemyShipTileId ; CPU:$E3B4 PRG:63B4 20 8C D7
|
|
sta $0213 ; CPU:$E3B7 PRG:63B7 8D 13 02
|
|
lda #$07 ; CPU:$E3BA PRG:63BA A9 07
|
|
sta $0212 ; CPU:$E3BC PRG:63BC 8D 12 02
|
|
lda #$00 ; CPU:$E3BF PRG:63BF A9 00
|
|
sta $0211 ; CPU:$E3C1 PRG:63C1 8D 11 02
|
|
jmp NmiHandler_Loop282 ; CPU:$E3C4 PRG:63C4 4C 23 E2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop298
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: copies X into A; loads X from Zp7E; compares
|
|
; A with $022B,x; branches on not equal to NmiHandler_Loop299; loads
|
|
; A from $0220,x; branches on non-negative to NmiHandler_Loop301.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop298:
|
|
txa ; CPU:$E3C7 PRG:63C7 8A
|
|
ldx Zp7E ; CPU:$E3C8 PRG:63C8 A6 7E
|
|
cmp $022B,x ; CPU:$E3CA PRG:63CA DD 2B 02
|
|
bne NmiHandler_Loop299 ; CPU:$E3CD PRG:63CD D0 05
|
|
lda $0220,x ; CPU:$E3CF PRG:63CF BD 20 02
|
|
bpl NmiHandler_Loop301 ; CPU:$E3D2 PRG:63D2 10 1A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop299
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop299:
|
|
ldx #$00 ; CPU:$E3D4 PRG:63D4 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear16
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A from Zp7D; compares A with $022B,x;
|
|
; branches on not equal to NmiHandler_Loop300; loads Y from $0220,x;
|
|
; branches on non-negative to NmiHandler_Loop301.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear16:
|
|
lda Zp7D ; CPU:$E3D6 PRG:63D6 A5 7D
|
|
cmp $022B,x ; CPU:$E3D8 PRG:63D8 DD 2B 02
|
|
bne NmiHandler_Loop300 ; CPU:$E3DB PRG:63DB D0 05
|
|
ldy $0220,x ; CPU:$E3DD PRG:63DD BC 20 02
|
|
bpl NmiHandler_Loop301 ; CPU:$E3E0 PRG:63E0 10 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop300
|
|
; Global: The routine calls Sub_E406.
|
|
; Local: Executes 12 instructions: loads A from Zp7D; compares A with $022B,x;
|
|
; branches on not equal to NmiHandler_Loop300; loads Y from $0220,x;
|
|
; branches on non-negative to NmiHandler_Loop301; copies X into A;
|
|
; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop300:
|
|
txa ; CPU:$E3E2 PRG:63E2 8A
|
|
clc ; CPU:$E3E3 PRG:63E3 18
|
|
adc #$10 ; CPU:$E3E4 PRG:63E4 69 10
|
|
tax ; CPU:$E3E6 PRG:63E6 AA
|
|
cmp #$C0 ; CPU:$E3E7 PRG:63E7 C9 C0
|
|
bcc NmiHandler_OnCarryClear16 ; CPU:$E3E9 PRG:63E9 90 EB
|
|
jmp Sub_E406 ; CPU:$E3EB PRG:63EB 4C 06 E4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop301
|
|
; Global: The routine calls NmiHandler_Loop282, writes $0211, $0212 and $0213.
|
|
; Local: Executes 9 instructions: loads A from $0221,x; stores A to $0211;
|
|
; loads A from $0222,x; sets the carry flag; subtracts $10 from A;
|
|
; stores A to $0212; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0211, $0212 and $0213 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop301:
|
|
lda $0221,x ; CPU:$E3EE PRG:63EE BD 21 02
|
|
sta $0211 ; CPU:$E3F1 PRG:63F1 8D 11 02
|
|
lda $0222,x ; CPU:$E3F4 PRG:63F4 BD 22 02
|
|
sec ; CPU:$E3F7 PRG:63F7 38
|
|
sbc #$10 ; CPU:$E3F8 PRG:63F8 E9 10
|
|
sta $0212 ; CPU:$E3FA PRG:63FA 8D 12 02
|
|
lda $0223,x ; CPU:$E3FD PRG:63FD BD 23 02
|
|
sta $0213 ; CPU:$E400 PRG:6400 8D 13 02
|
|
jmp NmiHandler_Loop282 ; CPU:$E403 PRG:6403 4C 23 E2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E406
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A with $07; stores A to Zp79; loads A
|
|
; with $02; stores A to Zp7C; loads X with $0B; loads A with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp6E, Zp6F, Zp79, Zp7C, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E406:
|
|
lda #$07 ; CPU:$E406 PRG:6406 A9 07
|
|
sta Zp79 ; CPU:$E408 PRG:6408 85 79
|
|
lda #$02 ; CPU:$E40A PRG:640A A9 02
|
|
sta Zp7C ; CPU:$E40C PRG:640C 85 7C
|
|
ldx #$0B ; CPU:$E40E PRG:640E A2 0B
|
|
lda #$00 ; CPU:$E410 PRG:6410 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative26
|
|
; Global: The routine calls Sub_C317, writes $0217 and $0215.
|
|
; Local: Executes 9 instructions: stores A to $0214,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative26; calls Sub_C317; ANDs
|
|
; A with $80; stores A to $0217; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0217 and $0215 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp6E, Zp6F, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative26:
|
|
sta $0214,x ; CPU:$E412 PRG:6412 9D 14 02
|
|
dex ; CPU:$E415 PRG:6415 CA
|
|
bpl NmiHandler_OnNonnegative26 ; CPU:$E416 PRG:6416 10 FA
|
|
jsr Sub_C317 ; CPU:$E418 PRG:6418 20 17 C3
|
|
and #$80 ; CPU:$E41B PRG:641B 29 80
|
|
sta $0217 ; CPU:$E41D PRG:641D 8D 17 02
|
|
lda #$26 ; CPU:$E420 PRG:6420 A9 26
|
|
sta $0215 ; CPU:$E422 PRG:6422 8D 15 02
|
|
rts ; CPU:$E425 PRG:6425 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE426
|
|
; Global: The routine reads $0590, $0591 and $0592.
|
|
; Local: Executes 7 instructions: loads A with $01; stores A to Zp7A; loads A
|
|
; from $0590; branches on not equal to NmiHandler_Loop302; increments
|
|
; $0590; increments $0591; and 1 more instruction.
|
|
; Parameters: Reads $0590, $0591 and $0592 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE426:
|
|
lda #$01 ; CPU:$E426 PRG:6426 A9 01
|
|
sta Zp7A ; CPU:$E428 PRG:6428 85 7A
|
|
lda $0590 ; CPU:$E42A PRG:642A AD 90 05
|
|
bne NmiHandler_Loop302 ; CPU:$E42D PRG:642D D0 09
|
|
inc $0590 ; CPU:$E42F PRG:642F EE 90 05
|
|
inc $0591 ; CPU:$E432 PRG:6432 EE 91 05
|
|
inc $0592 ; CPU:$E435 PRG:6435 EE 92 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop302
|
|
; Global: The routine writes $0210, reads $0205, $0495 and $0477.
|
|
; Local: Executes 10 instructions: loads A with $00; stores A to $0210; loads
|
|
; X from $0205; branches on not equal to NmiHandler_Loop303; loads A
|
|
; from $0495; branches on not equal to NmiHandler_Loop304; and 4 more
|
|
; instructions.
|
|
; Parameters: Reads $0205, $0495 and $0477 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0210 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop302:
|
|
lda #$00 ; CPU:$E438 PRG:6438 A9 00
|
|
sta $0210 ; CPU:$E43A PRG:643A 8D 10 02
|
|
ldx $0205 ; CPU:$E43D PRG:643D AE 05 02
|
|
bne NmiHandler_Loop303 ; CPU:$E440 PRG:6440 D0 0D
|
|
lda $0495 ; CPU:$E442 PRG:6442 AD 95 04
|
|
bne NmiHandler_Loop304 ; CPU:$E445 PRG:6445 D0 0B
|
|
lda $0477 ; CPU:$E447 PRG:6447 AD 77 04
|
|
bne NmiHandler_Loop304 ; CPU:$E44A PRG:644A D0 06
|
|
inc Zp79 ; CPU:$E44C PRG:644C E6 79
|
|
rts ; CPU:$E44E PRG:644E 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop303
|
|
; Global: The routine reads $0205.
|
|
; Local: Executes 1 instruction: decrements $0205.
|
|
; Parameters: Reads $0205 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop303:
|
|
dec $0205 ; CPU:$E44F PRG:644F CE 05 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop304
|
|
; Global: The routine calls AdvanceEnemyShipAnimation and NmiHandler_Loop282, writes $0210.
|
|
; Local: Executes 4 instructions: loads A with $00; stores A to $0210; calls
|
|
; AdvanceEnemyShipAnimation; calls NmiHandler_Loop282.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0210 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop304:
|
|
lda #$00 ; CPU:$E452 PRG:6452 A9 00
|
|
sta $0210 ; CPU:$E454 PRG:6454 8D 10 02
|
|
jsr AdvanceEnemyShipAnimation ; CPU:$E457 PRG:6457 20 E5 E4
|
|
jmp NmiHandler_Loop282 ; CPU:$E45A PRG:645A 4C 23 E2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE45D
|
|
; Global: The routine calls Sub_E227, writes $0212 and $0213, reads $0203.
|
|
; Local: Executes 10 instructions: loads A with $AA; stores A to TilePtrLo;
|
|
; calls Sub_E227; loads A with $C7; stores A to $0212; loads A from
|
|
; $0203; and 4 more instructions.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0212 and $0213 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp44, Zp6E, Zp6F, ZpCA, ZpCB, the OAM
|
|
; shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE45D:
|
|
lda #$AA ; CPU:$E45D PRG:645D A9 AA
|
|
sta TilePtrLo ; CPU:$E45F PRG:645F 85 08
|
|
jsr Sub_E227 ; CPU:$E461 PRG:6461 20 27 E2
|
|
lda #$C7 ; CPU:$E464 PRG:6464 A9 C7
|
|
sta $0212 ; CPU:$E466 PRG:6466 8D 12 02
|
|
lda $0203 ; CPU:$E469 PRG:6469 AD 03 02
|
|
clc ; CPU:$E46C PRG:646C 18
|
|
adc #$0E ; CPU:$E46D PRG:646D 69 0E
|
|
sta $0213 ; CPU:$E46F PRG:646F 8D 13 02
|
|
rts ; CPU:$E472 PRG:6472 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE473
|
|
; Global: The routine calls AdvanceEnemyShipAnimation, reads $0203.
|
|
; Local: Executes 6 instructions: loads A from $0203; compares A with $59;
|
|
; branches on equal to NmiHandler_Loop306; branches on carry set to
|
|
; NmiHandler_Loop305; increments $0203; calls AdvanceEnemyShipAnimation.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE473:
|
|
lda $0203 ; CPU:$E473 PRG:6473 AD 03 02
|
|
cmp #$59 ; CPU:$E476 PRG:6476 C9 59
|
|
beq NmiHandler_Loop306 ; CPU:$E478 PRG:6478 F0 0E
|
|
bcs NmiHandler_Loop305 ; CPU:$E47A PRG:647A B0 06
|
|
inc $0203 ; CPU:$E47C PRG:647C EE 03 02
|
|
jmp AdvanceEnemyShipAnimation ; CPU:$E47F PRG:647F 4C E5 E4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop305
|
|
; Global: The routine calls AdvanceEnemyShipAnimation, reads $0203.
|
|
; Local: Executes 2 instructions: decrements $0203; calls AdvanceEnemyShipAnimation.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop305:
|
|
dec $0203 ; CPU:$E482 PRG:6482 CE 03 02
|
|
jmp AdvanceEnemyShipAnimation ; CPU:$E485 PRG:6485 4C E5 E4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop306
|
|
; Global: The routine calls AdvanceEnemyShipAnimation, reads $0211.
|
|
; Local: Executes 3 instructions: loads A from $0211; branches on equal to
|
|
; NmiHandler_Loop307; calls AdvanceEnemyShipAnimation.
|
|
; Parameters: Reads $0211 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop306:
|
|
lda $0211 ; CPU:$E488 PRG:6488 AD 11 02
|
|
beq NmiHandler_Loop307 ; CPU:$E48B PRG:648B F0 03
|
|
jmp AdvanceEnemyShipAnimation ; CPU:$E48D PRG:648D 4C E5 E4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop307
|
|
; Global: The routine reads $0213.
|
|
; Local: Executes 6 instructions: loads A from $0213; compares A with $67;
|
|
; branches on equal to NmiHandler_Loop309; branches on carry set to
|
|
; NmiHandler_Loop308; increments $0213; returns with RTS.
|
|
; Parameters: Reads $0213 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop307:
|
|
lda $0213 ; CPU:$E490 PRG:6490 AD 13 02
|
|
cmp #$67 ; CPU:$E493 PRG:6493 C9 67
|
|
beq NmiHandler_Loop309 ; CPU:$E495 PRG:6495 F0 0A
|
|
bcs NmiHandler_Loop308 ; CPU:$E497 PRG:6497 B0 04
|
|
inc $0213 ; CPU:$E499 PRG:6499 EE 13 02
|
|
rts ; CPU:$E49C PRG:649C 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop308
|
|
; Global: The routine reads $0213.
|
|
; Local: Executes 2 instructions: decrements $0213; returns with RTS.
|
|
; Parameters: Reads $0213 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; no register, the N and Z flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop308:
|
|
dec $0213 ; CPU:$E49D PRG:649D CE 13 02
|
|
rts ; CPU:$E4A0 PRG:64A0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop309
|
|
; Global: The routine reads $0212.
|
|
; Local: Executes 5 instructions: loads A from $0212; compares A with $C7;
|
|
; branches on equal to NmiHandler_Loop310; increments $0212; returns
|
|
; with RTS.
|
|
; Parameters: Reads $0212 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop309:
|
|
lda $0212 ; CPU:$E4A1 PRG:64A1 AD 12 02
|
|
cmp #$C7 ; CPU:$E4A4 PRG:64A4 C9 C7
|
|
beq NmiHandler_Loop310 ; CPU:$E4A6 PRG:64A6 F0 04
|
|
inc $0212 ; CPU:$E4A8 PRG:64A8 EE 12 02
|
|
rts ; CPU:$E4AB PRG:64AB 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop310
|
|
; Global: The routine reads $0200.
|
|
; Local: Executes 7 instructions: loads A with $00; stores A to Zp7A; loads A
|
|
; from $0200; branches on negative to NmiHandler_Loop311; loads A
|
|
; with $01; stores A to Zp79; and 1 more instruction.
|
|
; Parameters: Reads $0200 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp79, Zp7A, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop310:
|
|
lda #$00 ; CPU:$E4AC PRG:64AC A9 00
|
|
sta Zp7A ; CPU:$E4AE PRG:64AE 85 7A
|
|
lda $0200 ; CPU:$E4B0 PRG:64B0 AD 00 02
|
|
bmi NmiHandler_Loop311 ; CPU:$E4B3 PRG:64B3 30 05
|
|
lda #$01 ; CPU:$E4B5 PRG:64B5 A9 01
|
|
sta Zp79 ; CPU:$E4B7 PRG:64B7 85 79
|
|
rts ; CPU:$E4B9 PRG:64B9 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop311
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $03.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp79, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop311:
|
|
ldx #$03 ; CPU:$E4BA PRG:64BA A2 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative27
|
|
; Global: Steps the player ship's animation frame on, wrapping after $18 frames.
|
|
; Local: Executes 11 instructions: loads A from $0210,x; stores A to $0200,x;
|
|
; decrements X; branches on non-negative to
|
|
; NmiHandler_OnNonnegative27; loads A with $80; stores A to $0210;
|
|
; and 5 more instructions.
|
|
; Parameters: Reads $045C from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0210 and $0471 changed.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp79, the OAM shadow, $0471.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative27:
|
|
lda $0210,x ; CPU:$E4BC PRG:64BC BD 10 02
|
|
sta $0200,x ; CPU:$E4BF PRG:64BF 9D 00 02
|
|
dex ; CPU:$E4C2 PRG:64C2 CA
|
|
bpl NmiHandler_OnNonnegative27 ; CPU:$E4C3 PRG:64C3 10 F7
|
|
lda #$80 ; CPU:$E4C5 PRG:64C5 A9 80
|
|
sta $0210 ; CPU:$E4C7 PRG:64C7 8D 10 02
|
|
lda #$00 ; CPU:$E4CA PRG:64CA A9 00
|
|
sta Zp79 ; CPU:$E4CC PRG:64CC 85 79
|
|
lda $045C ; CPU:$E4CE PRG:64CE AD 5C 04
|
|
sta $0471 ; CPU:$E4D1 PRG:64D1 8D 71 04
|
|
rts ; CPU:$E4D4 PRG:64D4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvancePlayerShipAnimation
|
|
; Global: The routine reads $0201.
|
|
; Local: Executes 6 instructions: loads A from $0201; clears the carry flag;
|
|
; adds $01 to A; compares A with $18; branches on not equal to
|
|
; NmiHandler_Loop312; loads A with $00.
|
|
; Parameters: Reads $0201 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvancePlayerShipAnimation:
|
|
lda $0201 ; CPU:$E4D5 PRG:64D5 AD 01 02
|
|
clc ; CPU:$E4D8 PRG:64D8 18
|
|
adc #$01 ; CPU:$E4D9 PRG:64D9 69 01
|
|
cmp #$18 ; CPU:$E4DB PRG:64DB C9 18
|
|
bne NmiHandler_Loop312 ; CPU:$E4DD PRG:64DD D0 02
|
|
lda #$00 ; CPU:$E4DF PRG:64DF A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop312
|
|
; Global: Steps an enemy ship's animation frame on, wrapping after $18 frames.
|
|
; Local: Executes 2 instructions: stores A to $0201; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0201 changed.
|
|
; Clobbers:
|
|
; no register, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop312:
|
|
sta $0201 ; CPU:$E4E1 PRG:64E1 8D 01 02
|
|
rts ; CPU:$E4E4 PRG:64E4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvanceEnemyShipAnimation
|
|
; Global: The routine reads $0211.
|
|
; Local: Executes 6 instructions: loads A from $0211; clears the carry flag;
|
|
; adds $01 to A; compares A with $18; branches on not equal to
|
|
; NmiHandler_Loop313; loads A with $00.
|
|
; Parameters: Reads $0211 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, the N, Z, C and V flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvanceEnemyShipAnimation:
|
|
lda $0211 ; CPU:$E4E5 PRG:64E5 AD 11 02
|
|
clc ; CPU:$E4E8 PRG:64E8 18
|
|
adc #$01 ; CPU:$E4E9 PRG:64E9 69 01
|
|
cmp #$18 ; CPU:$E4EB PRG:64EB C9 18
|
|
bne NmiHandler_Loop313 ; CPU:$E4ED PRG:64ED D0 02
|
|
lda #$00 ; CPU:$E4EF PRG:64EF A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop313
|
|
; Global: Points the sprite buffer at the player ship's own buffer.
|
|
; Local: Executes 2 instructions: stores A to $0211; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0211 changed.
|
|
; Clobbers:
|
|
; no register, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop313:
|
|
sta $0211 ; CPU:$E4F1 PRG:64F1 8D 11 02
|
|
rts ; CPU:$E4F4 PRG:64F4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetPlayerSpriteBuffer
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A with $E0; stores A to TilePtrLo;
|
|
; loads A with $02; stores A to TilePtrHi.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetPlayerSpriteBuffer:
|
|
lda #$E0 ; CPU:$E4F5 PRG:64F5 A9 E0
|
|
sta TilePtrLo ; CPU:$E4F7 PRG:64F7 85 08
|
|
lda #$02 ; CPU:$E4F9 PRG:64F9 A9 02
|
|
sta TilePtrHi ; CPU:$E4FB PRG:64FB 85 09
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNegative6
|
|
; Global: The routine calls Sub_E540.
|
|
; Local: Executes 18 instructions: loads Y with $00; loads A from
|
|
; ((TilePtrLo),y); branches on negative to NmiHandler_Loop314;
|
|
; increments Y; loads A from ((TilePtrLo),y); sets the carry flag;
|
|
; and 12 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNegative6:
|
|
ldy #$00 ; CPU:$E4FD PRG:64FD A0 00
|
|
lda (TilePtrLo),y ; CPU:$E4FF PRG:64FF B1 08
|
|
bmi NmiHandler_Loop314 ; CPU:$E501 PRG:6501 30 1B
|
|
iny ; CPU:$E503 PRG:6503 C8
|
|
lda (TilePtrLo),y ; CPU:$E504 PRG:6504 B1 08
|
|
sec ; CPU:$E506 PRG:6506 38
|
|
sbc #$05 ; CPU:$E507 PRG:6507 E9 05
|
|
sta Zp14 ; CPU:$E509 PRG:6509 85 14
|
|
lda #$0B ; CPU:$E50B PRG:650B A9 0B
|
|
sta Zp15 ; CPU:$E50D PRG:650D 85 15
|
|
iny ; CPU:$E50F PRG:650F C8
|
|
lda (TilePtrLo),y ; CPU:$E510 PRG:6510 B1 08
|
|
sec ; CPU:$E512 PRG:6512 38
|
|
sbc #$05 ; CPU:$E513 PRG:6513 E9 05
|
|
sta SpriteX ; CPU:$E515 PRG:6515 85 16
|
|
lda #$0B ; CPU:$E517 PRG:6517 A9 0B
|
|
sta Zp17 ; CPU:$E519 PRG:6519 85 17
|
|
jsr Sub_E540 ; CPU:$E51B PRG:651B 20 40 E5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop314
|
|
; Global: Merges the two sprite buffers into one.
|
|
; Local: Executes 29 instructions: loads Y with $00; loads A from
|
|
; ((TilePtrLo),y); branches on negative to NmiHandler_Loop314;
|
|
; increments Y; loads A from ((TilePtrLo),y); sets the carry flag;
|
|
; and 23 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop314:
|
|
lda TilePtrLo ; CPU:$E51E PRG:651E A5 08
|
|
clc ; CPU:$E520 PRG:6520 18
|
|
adc #$08 ; CPU:$E521 PRG:6521 69 08
|
|
sta TilePtrLo ; CPU:$E523 PRG:6523 85 08
|
|
bmi NmiHandler_OnNegative6 ; CPU:$E525 PRG:6525 30 D6
|
|
ldx Zp79 ; CPU:$E527 PRG:6527 A6 79
|
|
dex ; CPU:$E529 PRG:6529 CA
|
|
bne NmiHandler_Loop315 ; CPU:$E52A PRG:652A D0 13
|
|
ldx #$00 ; CPU:$E52C PRG:652C A2 00
|
|
jsr MergeSpriteBuffers ; CPU:$E52E PRG:652E 20 33 E5
|
|
ldx #$08 ; CPU:$E531 PRG:6531 A2 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: MergeSpriteBuffers
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: loads A from $02E0,x; ORs A with $02F0,x;
|
|
; stores A to $02E0,x; stores A to $02F0,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N and Z flags, the OAM shadow.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
MergeSpriteBuffers:
|
|
lda $02E0,x ; CPU:$E533 PRG:6533 BD E0 02
|
|
ora $02F0,x ; CPU:$E536 PRG:6536 1D F0 02
|
|
sta $02E0,x ; CPU:$E539 PRG:6539 9D E0 02
|
|
sta $02F0,x ; CPU:$E53C PRG:653C 9D F0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop315
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop315:
|
|
rts ; CPU:$E53F PRG:653F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E540
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads X with $10; loads A from Zp7C;
|
|
; branches on equal to NmiHandler_Loop316; branches on negative to
|
|
; NmiHandler_Loop316; loads X with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E540:
|
|
ldx #$10 ; CPU:$E540 PRG:6540 A2 10
|
|
lda Zp7C ; CPU:$E542 PRG:6542 A5 7C
|
|
beq NmiHandler_Loop316 ; CPU:$E544 PRG:6544 F0 04
|
|
bmi NmiHandler_Loop316 ; CPU:$E546 PRG:6546 30 02
|
|
ldx #$00 ; CPU:$E548 PRG:6548 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop316
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores X to Zp18.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop316:
|
|
stx Zp18 ; CPU:$E54A PRG:654A 86 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear17
|
|
; Global: The routine calls Sub_E606.
|
|
; Local: Executes 16 instructions: loads A from $0210,x; branches on negative
|
|
; to NmiHandler_Loop317; loads A from $0212,x; sets the carry flag;
|
|
; subtracts Zp14 from A; compares A with Zp15; and 10 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear17:
|
|
lda $0210,x ; CPU:$E54C PRG:654C BD 10 02
|
|
bmi NmiHandler_Loop317 ; CPU:$E54F PRG:654F 30 1D
|
|
lda $0212,x ; CPU:$E551 PRG:6551 BD 12 02
|
|
sec ; CPU:$E554 PRG:6554 38
|
|
sbc Zp14 ; CPU:$E555 PRG:6555 E5 14
|
|
cmp Zp15 ; CPU:$E557 PRG:6557 C5 15
|
|
bcs NmiHandler_Loop317 ; CPU:$E559 PRG:6559 B0 13
|
|
lda $0213,x ; CPU:$E55B PRG:655B BD 13 02
|
|
sec ; CPU:$E55E PRG:655E 38
|
|
sbc SpriteX ; CPU:$E55F PRG:655F E5 16
|
|
cmp Zp17 ; CPU:$E561 PRG:6561 C5 17
|
|
bcs NmiHandler_Loop317 ; CPU:$E563 PRG:6563 B0 09
|
|
jsr Sub_E606 ; CPU:$E565 PRG:6565 20 06 E6
|
|
lda #$80 ; CPU:$E568 PRG:6568 A9 80
|
|
ldy #$00 ; CPU:$E56A PRG:656A A0 00
|
|
sta (TilePtrLo),y ; CPU:$E56C PRG:656C 91 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop317
|
|
; Global: The routine calls Sub_E606.
|
|
; Local: Executes 28 instructions: loads A from $0210,x; branches on negative
|
|
; to NmiHandler_Loop317; loads A from $0212,x; sets the carry flag;
|
|
; subtracts Zp14 from A; compares A with Zp15; and 22 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop317:
|
|
lda Zp18 ; CPU:$E56E PRG:656E A5 18
|
|
clc ; CPU:$E570 PRG:6570 18
|
|
adc #$10 ; CPU:$E571 PRG:6571 69 10
|
|
sta Zp18 ; CPU:$E573 PRG:6573 85 18
|
|
tax ; CPU:$E575 PRG:6575 AA
|
|
cmp #$D0 ; CPU:$E576 PRG:6576 C9 D0
|
|
bcc NmiHandler_OnCarryClear17 ; CPU:$E578 PRG:6578 90 D2
|
|
dec SpriteX ; CPU:$E57A PRG:657A C6 16
|
|
inc Zp17 ; CPU:$E57C PRG:657C E6 17
|
|
inc Zp17 ; CPU:$E57E PRG:657E E6 17
|
|
ldx #$4F ; CPU:$E580 PRG:6580 A2 4F
|
|
stx Zp18 ; CPU:$E582 PRG:6582 86 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative28
|
|
; Global: The routine calls ComputeEnemyShipY.
|
|
; Local: Executes 13 instructions: loads A from Zp18; calls ComputeEnemyShipY; stores A
|
|
; to ScreenPtrLo; sets the carry flag; subtracts Zp14 from A;
|
|
; branches on carry clear to NmiHandler_Loop318; and 7 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative28:
|
|
lda Zp18 ; CPU:$E584 PRG:6584 A5 18
|
|
jsr ComputeEnemyShipY ; CPU:$E586 PRG:6586 20 AA D7
|
|
sta ScreenPtrLo ; CPU:$E589 PRG:6589 85 0A
|
|
sec ; CPU:$E58B PRG:658B 38
|
|
sbc Zp14 ; CPU:$E58C PRG:658C E5 14
|
|
bcc NmiHandler_Loop318 ; CPU:$E58E PRG:658E 90 0D
|
|
cmp Zp15 ; CPU:$E590 PRG:6590 C5 15
|
|
bcc NmiHandler_Loop319 ; CPU:$E592 PRG:6592 90 0A
|
|
lda Zp18 ; CPU:$E594 PRG:6594 A5 18
|
|
sec ; CPU:$E596 PRG:6596 38
|
|
sbc #$10 ; CPU:$E597 PRG:6597 E9 10
|
|
sta Zp18 ; CPU:$E599 PRG:6599 85 18
|
|
bpl NmiHandler_OnNonnegative28 ; CPU:$E59B PRG:659B 10 E7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop318
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop318:
|
|
rts ; CPU:$E59D PRG:659D 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop319
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads X from Zp18; compares X with $10;
|
|
; branches on carry clear to NmiHandler_Loop323; loads A from
|
|
; $0400,x; rotates a right; branches on carry clear to
|
|
; NmiHandler_Loop320; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop319:
|
|
ldx Zp18 ; CPU:$E59E PRG:659E A6 18
|
|
cpx #$10 ; CPU:$E5A0 PRG:65A0 E0 10
|
|
bcc NmiHandler_Loop323 ; CPU:$E5A2 PRG:65A2 90 3D
|
|
lda $0400,x ; CPU:$E5A4 PRG:65A4 BD 00 04
|
|
ror a ; CPU:$E5A7 PRG:65A7 6A
|
|
bcc NmiHandler_Loop320 ; CPU:$E5A8 PRG:65A8 90 06
|
|
inc SpriteX ; CPU:$E5AA PRG:65AA E6 16
|
|
dec Zp17 ; CPU:$E5AC PRG:65AC C6 17
|
|
dec Zp17 ; CPU:$E5AE PRG:65AE C6 17
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop320
|
|
; Global: The routine calls GetEnemyShipTileId.
|
|
; Local: Executes 5 instructions: copies X into A; ANDs A with $F0; stores A
|
|
; to Zp0C; calls GetEnemyShipTileId; stores X to Zp0D.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop320:
|
|
txa ; CPU:$E5B0 PRG:65B0 8A
|
|
and #$F0 ; CPU:$E5B1 PRG:65B1 29 F0
|
|
sta Zp0C ; CPU:$E5B3 PRG:65B3 85 0C
|
|
jsr GetEnemyShipTileId ; CPU:$E5B5 PRG:65B5 20 8C D7
|
|
stx Zp0D ; CPU:$E5B8 PRG:65B8 86 0D
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear18
|
|
; Global: The routine calls Sub_E74A.
|
|
; Local: Executes 12 instructions: loads X from Zp0D; loads A from $FC41,x;
|
|
; stores A to ScreenPtrHi; sets the carry flag; subtracts SpriteX
|
|
; from A; branches on carry clear to NmiHandler_Loop321; and 6 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear18:
|
|
ldx Zp0D ; CPU:$E5BA PRG:65BA A6 0D
|
|
lda $FC41,x ; CPU:$E5BC PRG:65BC BD 41 FC
|
|
sta ScreenPtrHi ; CPU:$E5BF PRG:65BF 85 0B
|
|
sec ; CPU:$E5C1 PRG:65C1 38
|
|
sbc SpriteX ; CPU:$E5C2 PRG:65C2 E5 16
|
|
bcc NmiHandler_Loop321 ; CPU:$E5C4 PRG:65C4 90 0E
|
|
cmp Zp17 ; CPU:$E5C6 PRG:65C6 C5 17
|
|
bcs NmiHandler_Loop322 ; CPU:$E5C8 PRG:65C8 B0 16
|
|
ldx Zp0C ; CPU:$E5CA PRG:65CA A6 0C
|
|
lda $0400,x ; CPU:$E5CC PRG:65CC BD 00 04
|
|
beq NmiHandler_Loop322 ; CPU:$E5CF PRG:65CF F0 0F
|
|
jmp Sub_E74A ; CPU:$E5D1 PRG:65D1 4C 4A E7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop321
|
|
; Global: The routine calls Sub_E74A.
|
|
; Local: Executes 18 instructions: loads X from Zp0D; loads A from $FC41,x;
|
|
; stores A to ScreenPtrHi; sets the carry flag; subtracts SpriteX
|
|
; from A; branches on carry clear to NmiHandler_Loop321; and 12 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop321:
|
|
inc Zp0C ; CPU:$E5D4 PRG:65D4 E6 0C
|
|
inc Zp0D ; CPU:$E5D6 PRG:65D6 E6 0D
|
|
lda Zp0C ; CPU:$E5D8 PRG:65D8 A5 0C
|
|
and #$0F ; CPU:$E5DA PRG:65DA 29 0F
|
|
cmp #$0A ; CPU:$E5DC PRG:65DC C9 0A
|
|
bcc NmiHandler_OnCarryClear18 ; CPU:$E5DE PRG:65DE 90 DA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop322
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop322:
|
|
rts ; CPU:$E5E0 PRG:65E0 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop323
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $03; stores A to Zp0C.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop323:
|
|
lda #$03 ; CPU:$E5E1 PRG:65E1 A9 03
|
|
sta Zp0C ; CPU:$E5E3 PRG:65E3 85 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear19
|
|
; Global: The routine calls GetEnemyShipTileId and Sub_E746.
|
|
; Local: Executes 12 instructions: loads A from Zp0C; calls GetEnemyShipTileId; loads X
|
|
; from Zp0C; stores A to ScreenPtrHi; sets the carry flag; subtracts
|
|
; SpriteX from A; and 6 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear19:
|
|
lda Zp0C ; CPU:$E5E5 PRG:65E5 A5 0C
|
|
jsr GetEnemyShipTileId ; CPU:$E5E7 PRG:65E7 20 8C D7
|
|
ldx Zp0C ; CPU:$E5EA PRG:65EA A6 0C
|
|
sta ScreenPtrHi ; CPU:$E5EC PRG:65EC 85 0B
|
|
sec ; CPU:$E5EE PRG:65EE 38
|
|
sbc SpriteX ; CPU:$E5EF PRG:65EF E5 16
|
|
bcc NmiHandler_Loop324 ; CPU:$E5F1 PRG:65F1 90 0C
|
|
cmp Zp17 ; CPU:$E5F3 PRG:65F3 C5 17
|
|
bcs NmiHandler_Loop325 ; CPU:$E5F5 PRG:65F5 B0 0E
|
|
lda $0400,x ; CPU:$E5F7 PRG:65F7 BD 00 04
|
|
beq NmiHandler_Loop325 ; CPU:$E5FA PRG:65FA F0 09
|
|
jmp Sub_E746 ; CPU:$E5FC PRG:65FC 4C 46 E7
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop324
|
|
; Global: The routine calls GetEnemyShipTileId and Sub_E746.
|
|
; Local: Executes 15 instructions: loads A from Zp0C; calls GetEnemyShipTileId; loads X
|
|
; from Zp0C; stores A to ScreenPtrHi; sets the carry flag; subtracts
|
|
; SpriteX from A; and 9 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop324:
|
|
inc Zp0C ; CPU:$E5FF PRG:65FF E6 0C
|
|
cpx #$07 ; CPU:$E601 PRG:6601 E0 07
|
|
bcc NmiHandler_OnCarryClear19 ; CPU:$E603 PRG:6603 90 E0
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop325
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop325:
|
|
rts ; CPU:$E605 PRG:6605 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E606
|
|
; Global: The routine calls Sub_C339.
|
|
; Local: Executes 1 instruction: calls Sub_C339.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E606:
|
|
jsr Sub_C339 ; CPU:$E606 PRG:6606 20 39 C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E609
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads X from Zp18; loads A from $0210,x;
|
|
; stores A to Zp0E; loads X from Zp0E; decrements X; compares X with
|
|
; $05; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp0E, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E609:
|
|
ldx Zp18 ; CPU:$E609 PRG:6609 A6 18
|
|
lda $0210,x ; CPU:$E60B PRG:660B BD 10 02
|
|
sta Zp0E ; CPU:$E60E PRG:660E 85 0E
|
|
ldx Zp0E ; CPU:$E610 PRG:6610 A6 0E
|
|
dex ; CPU:$E612 PRG:6612 CA
|
|
cpx #$05 ; CPU:$E613 PRG:6613 E0 05
|
|
bcc NmiHandler_Loop326 ; CPU:$E615 PRG:6615 90 02
|
|
ldx #$05 ; CPU:$E617 PRG:6617 A2 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop326
|
|
; Global: Interrupt handler - the CPU enters it from the vector table; it
|
|
; calls CallHandlerThroughPointer.
|
|
; Local: Executes 4 instructions: copies X into A; calls CallHandlerThroughPointer; ANDs A with
|
|
; $E6; returns from the interrupt with RTI.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns from the interrupt with RTI.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, Zp1E, Zp1F.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop326:
|
|
txa ; CPU:$E619 PRG:6619 8A
|
|
jsr CallHandlerThroughPointer ; CPU:$E61A PRG:661A 20 01 C3
|
|
and #$E6 ; CPU:$E61D PRG:661D 29 E6
|
|
rti ; CPU:$E61F PRG:661F 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE620
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: increments Zp51; increments Zp9B; increments
|
|
; ZpAD; increments ZpBF; increments ZpA2; ends in BRK.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Ends in BRK.
|
|
; Clobbers:
|
|
; no register, the N, Z and I flags, Zp51, Zp9B, ZpA2, ZpAD, ZpBF.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE620:
|
|
inc Zp51 ; CPU:$E620 PRG:6620 E6 51
|
|
inc Zp9B ; CPU:$E622 PRG:6622 E6 9B
|
|
inc ZpAD ; CPU:$E624 PRG:6624 E6 AD
|
|
inc ZpBF ; CPU:$E626 PRG:6626 E6 BF
|
|
inc ZpA2 ; CPU:$E628 PRG:6628 E6 A2
|
|
brk ; CPU:$E62A PRG:662A 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE62B
|
|
; Global: The routine calls Sub_E6F6, writes $0593, $0594 and $0595.
|
|
; Local: Executes 9 instructions: stores X to Zp79; stores X to Zp7C;
|
|
; increments X; stores X to $0593; stores X to $0594; stores X to
|
|
; $0595; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0593, $0594 and $0595 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE62B:
|
|
stx Zp79 ; CPU:$E62B PRG:662B 86 79
|
|
stx Zp7C ; CPU:$E62D PRG:662D 86 7C
|
|
inx ; CPU:$E62F PRG:662F E8
|
|
stx $0593 ; CPU:$E630 PRG:6630 8E 93 05
|
|
stx $0594 ; CPU:$E633 PRG:6633 8E 94 05
|
|
stx $0595 ; CPU:$E636 PRG:6636 8E 95 05
|
|
lda #$04 ; CPU:$E639 PRG:6639 A9 04
|
|
sta Zp0F ; CPU:$E63B PRG:663B 85 0F
|
|
jmp Sub_E6F6 ; CPU:$E63D PRG:663D 4C F6 E6
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE640
|
|
; Global: The routine calls Sub_D749, writes $059C.
|
|
; Local: Executes 7 instructions: loads X from Zp18; increments $0210,x; loads
|
|
; A from $021B,x; calls Sub_D749; loads A with $01; stores A to
|
|
; $059C; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059C changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE640:
|
|
ldx Zp18 ; CPU:$E640 PRG:6640 A6 18
|
|
inc $0210,x ; CPU:$E642 PRG:6642 FE 10 02
|
|
lda $021B,x ; CPU:$E645 PRG:6645 BD 1B 02
|
|
jsr Sub_D749 ; CPU:$E648 PRG:6648 20 49 D7
|
|
lda #$01 ; CPU:$E64B PRG:664B A9 01
|
|
sta $059C ; CPU:$E64D PRG:664D 8D 9C 05
|
|
rts ; CPU:$E650 PRG:6650 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE651
|
|
; Global: The routine writes $059D, reads $0464.
|
|
; Local: Executes 20 instructions: loads A with $01; stores A to $059D; loads
|
|
; A with $F0; stores A to Zp5F; loads X from Zp18; loads A from
|
|
; $021D,x; and 14 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059D changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE651:
|
|
lda #$01 ; CPU:$E651 PRG:6651 A9 01
|
|
sta $059D ; CPU:$E653 PRG:6653 8D 9D 05
|
|
lda #$F0 ; CPU:$E656 PRG:6656 A9 F0
|
|
sta Zp5F ; CPU:$E658 PRG:6658 85 5F
|
|
ldx Zp18 ; CPU:$E65A PRG:665A A6 18
|
|
lda $021D,x ; CPU:$E65C PRG:665C BD 1D 02
|
|
tax ; CPU:$E65F PRG:665F AA
|
|
lda $E698,x ; CPU:$E660 PRG:6660 BD 98 E6
|
|
sta Zp0F ; CPU:$E663 PRG:6663 85 0F
|
|
lda $0464 ; CPU:$E665 PRG:6665 AD 64 04
|
|
cmp #$03 ; CPU:$E668 PRG:6668 C9 03
|
|
beq NmiHandler_Loop328 ; CPU:$E66A PRG:666A F0 5C
|
|
ldx Zp18 ; CPU:$E66C PRG:666C A6 18
|
|
lda Zp54 ; CPU:$E66E PRG:666E A5 54
|
|
beq NmiHandler_Loop327 ; CPU:$E670 PRG:6670 F0 0B
|
|
lda $021B,x ; CPU:$E672 PRG:6672 BD 1B 02
|
|
cmp Zp7D ; CPU:$E675 PRG:6675 C5 7D
|
|
bne NmiHandler_Loop327 ; CPU:$E677 PRG:6677 D0 04
|
|
lda #$04 ; CPU:$E679 PRG:6679 A9 04
|
|
sta Zp54 ; CPU:$E67B PRG:667B 85 54
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop327
|
|
; Global: The routine writes $0205.
|
|
; Local: Executes 13 instructions: loads Y from Zp7C; decrements Y; branches
|
|
; on not equal to NmiHandler_Loop329; loads A from $021B,x; compares
|
|
; A with Zp7D; branches on not equal to NmiHandler_Loop329; and 7
|
|
; more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0205 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop327:
|
|
ldy Zp7C ; CPU:$E67D PRG:667D A4 7C
|
|
dey ; CPU:$E67F PRG:667F 88
|
|
bne NmiHandler_Loop329 ; CPU:$E680 PRG:6680 D0 67
|
|
lda $021B,x ; CPU:$E682 PRG:6682 BD 1B 02
|
|
cmp Zp7D ; CPU:$E685 PRG:6685 C5 7D
|
|
bne NmiHandler_Loop329 ; CPU:$E687 PRG:6687 D0 60
|
|
inc Zp79 ; CPU:$E689 PRG:6689 E6 79
|
|
lda #$78 ; CPU:$E68B PRG:668B A9 78
|
|
sta $0205 ; CPU:$E68D PRG:668D 8D 05 02
|
|
lda #$00 ; CPU:$E690 PRG:6690 A9 00
|
|
sta Zp7C ; CPU:$E692 PRG:6692 85 7C
|
|
sta Zp7B ; CPU:$E694 PRG:6694 85 7B
|
|
bpl NmiHandler_Loop329 ; CPU:$E696 PRG:6696 10 51
|
|
.byte $07, $05 ; CPU:$E698 PRG:6698 07 05 -- slo Zp05 (undocumented; ca65 cannot encode) ; CPU:$E698 PRG:6698 07 05
|
|
; ---- data $E69A-$E69A (1 bytes) ----
|
|
UnreachedByte2:
|
|
.byte $02 ; CPU:$E69A PRG:669A 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE69B
|
|
; Global: The routine writes $059E, reads $0464.
|
|
; Local: Executes 8 instructions: loads A with $08; stores A to Zp0F; loads A
|
|
; with $01; stores A to $059E; loads A from $0464; compares A with
|
|
; $03; and 2 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059E changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE69B:
|
|
lda #$08 ; CPU:$E69B PRG:669B A9 08
|
|
sta Zp0F ; CPU:$E69D PRG:669D 85 0F
|
|
lda #$01 ; CPU:$E69F PRG:669F A9 01
|
|
sta $059E ; CPU:$E6A1 PRG:66A1 8D 9E 05
|
|
lda $0464 ; CPU:$E6A4 PRG:66A4 AD 64 04
|
|
cmp #$03 ; CPU:$E6A7 PRG:66A7 C9 03
|
|
bne NmiHandler_Loop329 ; CPU:$E6A9 PRG:66A9 D0 3E
|
|
beq NmiHandler_Loop328 ; CPU:$E6AB PRG:66AB F0 1B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCE6AD
|
|
; Global: The routine writes $059F, reads $0464.
|
|
; Local: Executes 12 instructions: loads A with $0A; stores A to Zp0F; loads A
|
|
; with $01; stores A to $059F; loads A from $0464; compares A with
|
|
; $03; and 6 more instructions.
|
|
; Parameters: Reads $0464 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059F changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCE6AD:
|
|
lda #$0A ; CPU:$E6AD PRG:66AD A9 0A
|
|
sta Zp0F ; CPU:$E6AF PRG:66AF 85 0F
|
|
lda #$01 ; CPU:$E6B1 PRG:66B1 A9 01
|
|
sta $059F ; CPU:$E6B3 PRG:66B3 8D 9F 05
|
|
lda $0464 ; CPU:$E6B6 PRG:66B6 AD 64 04
|
|
cmp #$03 ; CPU:$E6B9 PRG:66B9 C9 03
|
|
bne NmiHandler_Loop329 ; CPU:$E6BB PRG:66BB D0 2C
|
|
beq NmiHandler_Loop328 ; CPU:$E6BD PRG:66BD F0 09
|
|
lda #$0A ; CPU:$E6BF PRG:66BF A9 0A
|
|
sta Zp0F ; CPU:$E6C1 PRG:66C1 85 0F
|
|
lda #$01 ; CPU:$E6C3 PRG:66C3 A9 01
|
|
sta $059F ; CPU:$E6C5 PRG:66C5 8D 9F 05
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop328
|
|
; Global: The routine calls Sub_C3A1 and Sub_C8AB, reads $0478.
|
|
; Local: Executes 15 instructions: loads A with $C1; stores A to
|
|
; StarFieldPtrLo; loads A with $00; stores A to StarFieldPtrHi; loads
|
|
; A with $03; stores A to Zp02; and 9 more instructions.
|
|
; Parameters: Reads $0478 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop328:
|
|
lda #$C1 ; CPU:$E6C8 PRG:66C8 A9 C1
|
|
sta StarFieldPtrLo ; CPU:$E6CA PRG:66CA 85 00
|
|
lda #$00 ; CPU:$E6CC PRG:66CC A9 00
|
|
sta StarFieldPtrHi ; CPU:$E6CE PRG:66CE 85 01
|
|
lda #$03 ; CPU:$E6D0 PRG:66D0 A9 03
|
|
sta Zp02 ; CPU:$E6D2 PRG:66D2 85 02
|
|
jsr Sub_C3A1 ; CPU:$E6D4 PRG:66D4 20 A1 C3
|
|
inc ZpC4 ; CPU:$E6D7 PRG:66D7 E6 C4
|
|
dec ZpC0 ; CPU:$E6D9 PRG:66D9 C6 C0
|
|
bne NmiHandler_Loop329 ; CPU:$E6DB PRG:66DB D0 0C
|
|
lda Zp0F ; CPU:$E6DD PRG:66DD A5 0F
|
|
sta StarFieldPtrLo ; CPU:$E6DF PRG:66DF 85 00
|
|
jsr Sub_C8AB ; CPU:$E6E1 PRG:66E1 20 AB C8
|
|
lda $0478 ; CPU:$E6E4 PRG:66E4 AD 78 04
|
|
sta Zp0F ; CPU:$E6E7 PRG:66E7 85 0F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop329
|
|
; Global: The routine reads $0494.
|
|
; Local: Executes 4 instructions: loads X from Zp18; loads A from $021B,x;
|
|
; branches on equal to NmiHandler_Loop330; decrements $0494.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop329:
|
|
ldx Zp18 ; CPU:$E6E9 PRG:66E9 A6 18
|
|
lda $021B,x ; CPU:$E6EB PRG:66EB BD 1B 02
|
|
beq NmiHandler_Loop330 ; CPU:$E6EE PRG:66EE F0 03
|
|
dec $0494 ; CPU:$E6F0 PRG:66F0 CE 94 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop330
|
|
; Global: The routine reads $0495.
|
|
; Local: Executes 1 instruction: decrements $0495.
|
|
; Parameters: Reads $0495 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop330:
|
|
dec $0495 ; CPU:$E6F3 PRG:66F3 CE 95 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E6F6
|
|
; Global: The routine calls Sub_E78E.
|
|
; Local: Executes 15 instructions: loads X from Zp18; loads A with $80; stores
|
|
; A to $0210,x; loads A from $0212,x; stores A to ScreenPtrLo; loads
|
|
; A from $0213,x; and 9 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E6F6:
|
|
ldx Zp18 ; CPU:$E6F6 PRG:66F6 A6 18
|
|
lda #$80 ; CPU:$E6F8 PRG:66F8 A9 80
|
|
sta $0210,x ; CPU:$E6FA PRG:66FA 9D 10 02
|
|
lda $0212,x ; CPU:$E6FD PRG:66FD BD 12 02
|
|
sta ScreenPtrLo ; CPU:$E700 PRG:6700 85 0A
|
|
lda $0213,x ; CPU:$E702 PRG:6702 BD 13 02
|
|
sta ScreenPtrHi ; CPU:$E705 PRG:6705 85 0B
|
|
jsr Sub_E78E ; CPU:$E707 PRG:6707 20 8E E7
|
|
lda Zp0F ; CPU:$E70A PRG:670A A5 0F
|
|
sta StarFieldPtrLo ; CPU:$E70C PRG:670C 85 00
|
|
lda #$08 ; CPU:$E70E PRG:670E A9 08
|
|
sec ; CPU:$E710 PRG:6710 38
|
|
sbc StarFieldPtrLo ; CPU:$E711 PRG:6711 E5 00
|
|
bcs NmiHandler_Loop331 ; CPU:$E713 PRG:6713 B0 02
|
|
lda #$00 ; CPU:$E715 PRG:6715 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop331
|
|
; Global: The routine calls Sub_C8AB.
|
|
; Local: Executes 3 instructions: stores A to $03DB,x; calls Sub_C8AB; returns
|
|
; with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop331:
|
|
sta $03DB,x ; CPU:$E717 PRG:6717 9D DB 03
|
|
jsr Sub_C8AB ; CPU:$E71A PRG:671A 20 AB C8
|
|
rts ; CPU:$E71D PRG:671D 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero13
|
|
; Global: The routine calls Sub_D749, SpawnEnemyShip and SpawnEnemyShipAlt, writes $059C,
|
|
; reads $040F.
|
|
; Local: Executes 16 instructions: loads A with $01; stores A to $059C; stores
|
|
; A to $0400,x; loads A with $80; loads Y with $00; stores A to
|
|
; ((TilePtrLo),y); and 10 more instructions.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059C changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero13:
|
|
lda #$01 ; CPU:$E71E PRG:671E A9 01
|
|
sta $059C ; CPU:$E720 PRG:6720 8D 9C 05
|
|
sta $0400,x ; CPU:$E723 PRG:6723 9D 00 04
|
|
lda #$80 ; CPU:$E726 PRG:6726 A9 80
|
|
ldy #$00 ; CPU:$E728 PRG:6728 A0 00
|
|
sta (TilePtrLo),y ; CPU:$E72A PRG:672A 91 08
|
|
txa ; CPU:$E72C PRG:672C 8A
|
|
sta Zp1A ; CPU:$E72D PRG:672D 85 1A
|
|
jsr Sub_D749 ; CPU:$E72F PRG:672F 20 49 D7
|
|
lda $040F ; CPU:$E732 PRG:6732 AD 0F 04
|
|
cmp #$0C ; CPU:$E735 PRG:6735 C9 0C
|
|
bcc NmiHandler_Loop332 ; CPU:$E737 PRG:6737 90 0A
|
|
lda Zp1A ; CPU:$E739 PRG:6739 A5 1A
|
|
jsr SpawnEnemyShip ; CPU:$E73B PRG:673B 20 18 D5
|
|
lda Zp1A ; CPU:$E73E PRG:673E A5 1A
|
|
jsr SpawnEnemyShipAlt ; CPU:$E740 PRG:6740 20 38 D5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop332
|
|
; Global: The routine calls Sub_C339.
|
|
; Local: Executes 1 instruction: calls Sub_C339.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp20, Zp28, Zp30, Zp37, Zp38.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop332:
|
|
jmp Sub_C339 ; CPU:$E743 PRG:6743 4C 39 C3
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E746
|
|
; Global: The routine calls Sub_D749, SpawnEnemyShip, SpawnEnemyShipAlt and Sub_C339, writes
|
|
; $059C, reads $040F.
|
|
; Local: Executes 19 instructions: loads A with $01; stores A to $059C; stores
|
|
; A to $0400,x; loads A with $80; loads Y with $00; stores A to
|
|
; ((TilePtrLo),y); and 13 more instructions.
|
|
; Parameters: Reads $040F from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $059C changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E746:
|
|
cmp #$02 ; CPU:$E746 PRG:6746 C9 02
|
|
beq NmiHandler_OnZero13 ; CPU:$E748 PRG:6748 F0 D4
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E74A
|
|
; Global: The routine calls SpawnEnemyShip, Sub_E78E, Sub_C8AB and Sub_C339, writes
|
|
; $059F, reads $0494.
|
|
; Local: Executes 29 instructions: decrements $0494; stores X to Zp0E; copies
|
|
; X into A; calls SpawnEnemyShip; loads Y with $00; loads A with $80; and
|
|
; 23 more instructions.
|
|
; Parameters: Reads $0494 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059F changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E74A:
|
|
dec $0494 ; CPU:$E74A PRG:674A CE 94 04
|
|
stx Zp0E ; CPU:$E74D PRG:674D 86 0E
|
|
txa ; CPU:$E74F PRG:674F 8A
|
|
jsr SpawnEnemyShip ; CPU:$E750 PRG:6750 20 18 D5
|
|
ldy #$00 ; CPU:$E753 PRG:6753 A0 00
|
|
lda #$80 ; CPU:$E755 PRG:6755 A9 80
|
|
sta (TilePtrLo),y ; CPU:$E757 PRG:6757 91 08
|
|
jsr Sub_E78E ; CPU:$E759 PRG:6759 20 8E E7
|
|
lda #$00 ; CPU:$E75C PRG:675C A9 00
|
|
sta $03DB,x ; CPU:$E75E PRG:675E 9D DB 03
|
|
jsr Sub_E78E ; CPU:$E761 PRG:6761 20 8E E7
|
|
lda ScreenPtrLo ; CPU:$E764 PRG:6764 A5 0A
|
|
lsr a ; CPU:$E766 PRG:6766 4A
|
|
lsr a ; CPU:$E767 PRG:6767 4A
|
|
lsr a ; CPU:$E768 PRG:6768 4A
|
|
lsr a ; CPU:$E769 PRG:6769 4A
|
|
tay ; CPU:$E76A PRG:676A A8
|
|
lda $E7B0,y ; CPU:$E76B PRG:676B B9 B0 E7
|
|
sta StarFieldPtrLo ; CPU:$E76E PRG:676E 85 00
|
|
jsr Sub_C8AB ; CPU:$E770 PRG:6770 20 AB C8
|
|
jsr Sub_C339 ; CPU:$E773 PRG:6773 20 39 C3
|
|
ldx #$01 ; CPU:$E776 PRG:6776 A2 01
|
|
lda Zp0E ; CPU:$E778 PRG:6778 A5 0E
|
|
cmp #$10 ; CPU:$E77A PRG:677A C9 10
|
|
bcc NmiHandler_Loop334 ; CPU:$E77C PRG:677C 90 0C
|
|
cmp #$30 ; CPU:$E77E PRG:677E C9 30
|
|
bcc NmiHandler_Loop333 ; CPU:$E780 PRG:6780 90 04
|
|
stx $059F ; CPU:$E782 PRG:6782 8E 9F 05
|
|
rts ; CPU:$E785 PRG:6785 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop333
|
|
; Global: The routine writes $059E.
|
|
; Local: Executes 2 instructions: stores X to $059E; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059E changed.
|
|
; Clobbers:
|
|
; no register, $059E.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop333:
|
|
stx $059E ; CPU:$E786 PRG:6786 8E 9E 05
|
|
rts ; CPU:$E789 PRG:6789 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop334
|
|
; Global: The routine writes $059D.
|
|
; Local: Executes 2 instructions: stores X to $059D; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $059D changed.
|
|
; Clobbers:
|
|
; no register, $059D.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop334:
|
|
stx $059D ; CPU:$E78A PRG:678A 8E 9D 05
|
|
rts ; CPU:$E78D PRG:678D 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E78E
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A from Zp5A; clears the carry flag;
|
|
; adds $04 to A; compares A with $20; branches on carry clear to
|
|
; NmiHandler_Loop335; loads A with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp5A, $03D8, $03D9, $03DA, $03DB.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E78E:
|
|
lda Zp5A ; CPU:$E78E PRG:678E A5 5A
|
|
clc ; CPU:$E790 PRG:6790 18
|
|
adc #$04 ; CPU:$E791 PRG:6791 69 04
|
|
cmp #$20 ; CPU:$E793 PRG:6793 C9 20
|
|
bcc NmiHandler_Loop335 ; CPU:$E795 PRG:6795 90 02
|
|
lda #$00 ; CPU:$E797 PRG:6797 A9 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop335
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: stores A to Zp5A; copies A into X; loads A
|
|
; with $FF; stores A to $03D8,x; loads A from ScreenPtrLo; stores A
|
|
; to $03D9,x; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N and Z flags, Zp5A, $03D8, $03D9, $03DA, $03DB.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop335:
|
|
sta Zp5A ; CPU:$E799 PRG:6799 85 5A
|
|
tax ; CPU:$E79B PRG:679B AA
|
|
lda #$FF ; CPU:$E79C PRG:679C A9 FF
|
|
sta $03D8,x ; CPU:$E79E PRG:679E 9D D8 03
|
|
lda ScreenPtrLo ; CPU:$E7A1 PRG:67A1 A5 0A
|
|
sta $03D9,x ; CPU:$E7A3 PRG:67A3 9D D9 03
|
|
lda ScreenPtrHi ; CPU:$E7A6 PRG:67A6 A5 0B
|
|
sta $03DA,x ; CPU:$E7A8 PRG:67A8 9D DA 03
|
|
lda #$00 ; CPU:$E7AB PRG:67AB A9 00
|
|
sta $03DB,x ; CPU:$E7AD PRG:67AD 9D DB 03
|
|
rts ; CPU:$E7B0 PRG:67B0 60
|
|
; ---- data $E7B1-$E7B5 (5 bytes) ----
|
|
UnreachedCode:
|
|
.byte $09, $0B, $0B, $0C, $0C ; CPU:$E7B1 PRG:67B1 09 0B 0B 0C 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E7B6
|
|
; Global: The routine reads $0200.
|
|
; Local: Executes 4 instructions: loads A from Zp5C; branches on not equal to
|
|
; NmiHandler_OnNonzero58; loads A from $0200; branches on
|
|
; non-negative to NmiHandler_Loop336.
|
|
; Parameters: Reads $0200 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E7B6:
|
|
lda Zp5C ; CPU:$E7B6 PRG:67B6 A5 5C
|
|
bne NmiHandler_OnNonzero58 ; CPU:$E7B8 PRG:67B8 D0 05
|
|
lda $0200 ; CPU:$E7BA PRG:67BA AD 00 02
|
|
bpl NmiHandler_Loop336 ; CPU:$E7BD PRG:67BD 10 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero58
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero58:
|
|
rts ; CPU:$E7BF PRG:67BF 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop336
|
|
; Global: The routine reads $0202.
|
|
; Local: Executes 12 instructions: returns with RTS; loads A from Zp79;
|
|
; compares A with $08; branches on carry set to
|
|
; NmiHandler_OnNonzero58; loads A from $0202; compares A with $C7;
|
|
; and 6 more instructions.
|
|
; Parameters: Reads $0202 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop336:
|
|
lda Zp79 ; CPU:$E7C0 PRG:67C0 A5 79
|
|
cmp #$08 ; CPU:$E7C2 PRG:67C2 C9 08
|
|
bcs NmiHandler_OnNonzero58 ; CPU:$E7C4 PRG:67C4 B0 F9
|
|
lda $0202 ; CPU:$E7C6 PRG:67C6 AD 02 02
|
|
cmp #$C7 ; CPU:$E7C9 PRG:67C9 C9 C7
|
|
bne NmiHandler_OnNonzero58 ; CPU:$E7CB PRG:67CB D0 F2
|
|
ldx #$0D ; CPU:$E7CD PRG:67CD A2 0D
|
|
ldy Zp79 ; CPU:$E7CF PRG:67CF A4 79
|
|
dey ; CPU:$E7D1 PRG:67D1 88
|
|
bne NmiHandler_Loop337 ; CPU:$E7D2 PRG:67D2 D0 02
|
|
ldx #$1B ; CPU:$E7D4 PRG:67D4 A2 1B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop337
|
|
; Global: The routine reads $0203.
|
|
; Local: Executes 11 instructions: stores X to ScreenPtrHi; loads A from
|
|
; $0203; stores A to Zp14; sets the carry flag; subtracts $06 from A;
|
|
; stores A to SpriteX; and 5 more instructions.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop337:
|
|
stx ScreenPtrHi ; CPU:$E7D6 PRG:67D6 86 0B
|
|
lda $0203 ; CPU:$E7D8 PRG:67D8 AD 03 02
|
|
sta Zp14 ; CPU:$E7DB PRG:67DB 85 14
|
|
sec ; CPU:$E7DD PRG:67DD 38
|
|
sbc #$06 ; CPU:$E7DE PRG:67DE E9 06
|
|
sta SpriteX ; CPU:$E7E0 PRG:67E0 85 16
|
|
clc ; CPU:$E7E2 PRG:67E2 18
|
|
adc ScreenPtrHi ; CPU:$E7E3 PRG:67E3 65 0B
|
|
sta Zp17 ; CPU:$E7E5 PRG:67E5 85 17
|
|
ldx #$00 ; CPU:$E7E7 PRG:67E7 A2 00
|
|
stx Zp18 ; CPU:$E7E9 PRG:67E9 86 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear20
|
|
; Global: The routine calls Sub_E86D.
|
|
; Local: Executes 17 instructions: loads X from Zp18; loads A from Zp90,x;
|
|
; branches on negative to NmiHandler_Loop338; loads A from Zp91,x;
|
|
; compares A with $C2; branches on carry clear to NmiHandler_Loop338;
|
|
; and 11 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear20:
|
|
ldx Zp18 ; CPU:$E7EB PRG:67EB A6 18
|
|
lda Zp90,x ; CPU:$E7ED PRG:67ED B5 90
|
|
bmi NmiHandler_Loop338 ; CPU:$E7EF PRG:67EF 30 1B
|
|
lda Zp91,x ; CPU:$E7F1 PRG:67F1 B5 91
|
|
cmp #$C2 ; CPU:$E7F3 PRG:67F3 C9 C2
|
|
bcc NmiHandler_Loop338 ; CPU:$E7F5 PRG:67F5 90 15
|
|
cmp #$CC ; CPU:$E7F7 PRG:67F7 C9 CC
|
|
bcs NmiHandler_Loop338 ; CPU:$E7F9 PRG:67F9 B0 11
|
|
lda Zp92,x ; CPU:$E7FB PRG:67FB B5 92
|
|
cmp Zp17 ; CPU:$E7FD PRG:67FD C5 17
|
|
bcs NmiHandler_Loop338 ; CPU:$E7FF PRG:67FF B0 0B
|
|
sec ; CPU:$E801 PRG:6801 38
|
|
sbc SpriteX ; CPU:$E802 PRG:6802 E5 16
|
|
bcc NmiHandler_Loop338 ; CPU:$E804 PRG:6804 90 06
|
|
clc ; CPU:$E806 PRG:6806 18
|
|
adc #$02 ; CPU:$E807 PRG:6807 69 02
|
|
jmp Sub_E86D ; CPU:$E809 PRG:6809 4C 6D E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop338
|
|
; Global: The routine calls Sub_E86D.
|
|
; Local: Executes 33 instructions: loads X from Zp18; loads A from Zp90,x;
|
|
; branches on negative to NmiHandler_Loop338; loads A from Zp91,x;
|
|
; compares A with $C2; branches on carry clear to NmiHandler_Loop338;
|
|
; and 27 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop338:
|
|
lda Zp18 ; CPU:$E80C PRG:680C A5 18
|
|
clc ; CPU:$E80E PRG:680E 18
|
|
adc #$04 ; CPU:$E80F PRG:680F 69 04
|
|
sta Zp18 ; CPU:$E811 PRG:6811 85 18
|
|
cmp #$20 ; CPU:$E813 PRG:6813 C9 20
|
|
bcc NmiHandler_OnCarryClear20 ; CPU:$E815 PRG:6815 90 D4
|
|
dec SpriteX ; CPU:$E817 PRG:6817 C6 16
|
|
dec SpriteX ; CPU:$E819 PRG:6819 C6 16
|
|
inc Zp17 ; CPU:$E81B PRG:681B E6 17
|
|
inc Zp17 ; CPU:$E81D PRG:681D E6 17
|
|
inc Zp17 ; CPU:$E81F PRG:681F E6 17
|
|
inc Zp17 ; CPU:$E821 PRG:6821 E6 17
|
|
ldx #$10 ; CPU:$E823 PRG:6823 A2 10
|
|
lda Zp7C ; CPU:$E825 PRG:6825 A5 7C
|
|
beq NmiHandler_Loop339 ; CPU:$E827 PRG:6827 F0 02
|
|
ldx #$00 ; CPU:$E829 PRG:6829 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop339
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: stores X to Zp18.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop339:
|
|
stx Zp18 ; CPU:$E82B PRG:682B 86 18
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear21
|
|
; Global: The routine calls Sub_E85A.
|
|
; Local: Executes 15 instructions: loads X from Zp18; loads A from $0210,x;
|
|
; branches on negative to NmiHandler_Loop340; loads A from $0212,x;
|
|
; compares A with $C4; branches on carry clear to NmiHandler_Loop340;
|
|
; and 9 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear21:
|
|
ldx Zp18 ; CPU:$E82D PRG:682D A6 18
|
|
lda $0210,x ; CPU:$E82F PRG:682F BD 10 02
|
|
bmi NmiHandler_Loop340 ; CPU:$E832 PRG:6832 30 1A
|
|
lda $0212,x ; CPU:$E834 PRG:6834 BD 12 02
|
|
cmp #$C4 ; CPU:$E837 PRG:6837 C9 C4
|
|
bcc NmiHandler_Loop340 ; CPU:$E839 PRG:6839 90 13
|
|
cmp #$CC ; CPU:$E83B PRG:683B C9 CC
|
|
bcs NmiHandler_Loop340 ; CPU:$E83D PRG:683D B0 0F
|
|
lda $0213,x ; CPU:$E83F PRG:683F BD 13 02
|
|
cmp Zp17 ; CPU:$E842 PRG:6842 C5 17
|
|
bcs NmiHandler_Loop340 ; CPU:$E844 PRG:6844 B0 08
|
|
sec ; CPU:$E846 PRG:6846 38
|
|
sbc SpriteX ; CPU:$E847 PRG:6847 E5 16
|
|
bcc NmiHandler_Loop340 ; CPU:$E849 PRG:6849 90 03
|
|
jmp Sub_E85A ; CPU:$E84B PRG:684B 4C 5A E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop340
|
|
; Global: The routine calls Sub_E85A.
|
|
; Local: Executes 22 instructions: loads X from Zp18; loads A from $0210,x;
|
|
; branches on negative to NmiHandler_Loop340; loads A from $0212,x;
|
|
; compares A with $C4; branches on carry clear to NmiHandler_Loop340;
|
|
; and 16 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the OAM shadow and the RAM fields
|
|
; it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop340:
|
|
lda Zp18 ; CPU:$E84E PRG:684E A5 18
|
|
clc ; CPU:$E850 PRG:6850 18
|
|
adc #$10 ; CPU:$E851 PRG:6851 69 10
|
|
sta Zp18 ; CPU:$E853 PRG:6853 85 18
|
|
cmp #$D0 ; CPU:$E855 PRG:6855 C9 D0
|
|
bcc NmiHandler_OnCarryClear21 ; CPU:$E857 PRG:6857 90 D4
|
|
rts ; CPU:$E859 PRG:6859 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E85A
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: pushes A; loads X from Zp18; loads A from
|
|
; $0210,x; compares A with $02; branches on not equal to
|
|
; NmiHandler_Loop341; increments $0210,x.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E85A:
|
|
pha ; CPU:$E85A PRG:685A 48
|
|
ldx Zp18 ; CPU:$E85B PRG:685B A6 18
|
|
lda $0210,x ; CPU:$E85D PRG:685D BD 10 02
|
|
cmp #$02 ; CPU:$E860 PRG:6860 C9 02
|
|
bne NmiHandler_Loop341 ; CPU:$E862 PRG:6862 D0 03
|
|
inc $0210,x ; CPU:$E864 PRG:6864 FE 10 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop341
|
|
; Global: The routine calls Sub_E609 and Sub_E877.
|
|
; Local: Executes 2 instructions: calls Sub_E609; calls Sub_E877.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop341:
|
|
jsr Sub_E609 ; CPU:$E867 PRG:6867 20 09 E6
|
|
jmp Sub_E877 ; CPU:$E86A PRG:686A 4C 77 E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E86D
|
|
; Global: The routine reads $0477.
|
|
; Local: Executes 5 instructions: pushes A; decrements $0477; loads X from
|
|
; Zp18; loads A with $FF; stores A to Zp90,x.
|
|
; Parameters: Reads $0477 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E86D:
|
|
pha ; CPU:$E86D PRG:686D 48
|
|
dec $0477 ; CPU:$E86E PRG:686E CE 77 04
|
|
ldx Zp18 ; CPU:$E871 PRG:6871 A6 18
|
|
lda #$FF ; CPU:$E873 PRG:6873 A9 FF
|
|
sta Zp90,x ; CPU:$E875 PRG:6875 95 90
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_E877
|
|
; Global: Puts the player ship back to its starting state and clears the ship's frame counters.
|
|
; Local: Executes 11 instructions: loads A with $01; stores A to $05A3; pulls
|
|
; A; loads X from Zp79; decrements X; branches on not equal to
|
|
; NmiHandler_Loop343; and 5 more instructions.
|
|
; Parameters: Reads $0213 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $05A3 and $0203 changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_E877:
|
|
lda #$01 ; CPU:$E877 PRG:6877 A9 01
|
|
sta $05A3 ; CPU:$E879 PRG:6879 8D A3 05
|
|
pla ; CPU:$E87C PRG:687C 68
|
|
ldx Zp79 ; CPU:$E87D PRG:687D A6 79
|
|
dex ; CPU:$E87F PRG:687F CA
|
|
bne NmiHandler_Loop343 ; CPU:$E880 PRG:6880 D0 29
|
|
cmp #$10 ; CPU:$E882 PRG:6882 C9 10
|
|
bcs NmiHandler_Loop342 ; CPU:$E884 PRG:6884 B0 1F
|
|
lda $0213 ; CPU:$E886 PRG:6886 AD 13 02
|
|
sta $0203 ; CPU:$E889 PRG:6889 8D 03 02
|
|
lda Zp14 ; CPU:$E88C PRG:688C A5 14
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetPlayerShipState
|
|
; Global: The routine writes $03FA, $03F9, $03F8 and $0210.
|
|
; Local: Executes 10 instructions: stores A to $03FA; loads A with $C7; stores
|
|
; A to $03F9; loads A with $FF; stores A to $03F8; loads A with $80;
|
|
; and 4 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $03FA, $03F9 and $03F8 changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp79, the OAM shadow, $03F8, $03F9, $03FA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetPlayerShipState:
|
|
sta $03FA ; CPU:$E88E PRG:688E 8D FA 03
|
|
lda #$C7 ; CPU:$E891 PRG:6891 A9 C7
|
|
sta $03F9 ; CPU:$E893 PRG:6893 8D F9 03
|
|
lda #$FF ; CPU:$E896 PRG:6896 A9 FF
|
|
sta $03F8 ; CPU:$E898 PRG:6898 8D F8 03
|
|
lda #$80 ; CPU:$E89B PRG:689B A9 80
|
|
sta $0210 ; CPU:$E89D PRG:689D 8D 10 02
|
|
lda #$00 ; CPU:$E8A0 PRG:68A0 A9 00
|
|
sta Zp79 ; CPU:$E8A2 PRG:68A2 85 79
|
|
rts ; CPU:$E8A4 PRG:68A4 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop342
|
|
; Global: The routine calls ResetPlayerShipState, reads $0213.
|
|
; Local: Executes 2 instructions: loads A from $0213; calls ResetPlayerShipState.
|
|
; Parameters: Reads $0213 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, the N and Z flags, Zp79, the OAM shadow, $03F8, $03F9, $03FA.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop342:
|
|
lda $0213 ; CPU:$E8A5 PRG:68A5 AD 13 02
|
|
jmp ResetPlayerShipState ; CPU:$E8A8 PRG:68A8 4C 8E E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop343
|
|
; Global: The routine writes $0200, $03F8, $03F9, $03FA and 1 more, reads
|
|
; $0203.
|
|
; Local: Executes 19 instructions: loads A with $80; stores A to $0200; loads
|
|
; A with $FF; stores A to $03F8; loads A with $C7; stores A to $03F9;
|
|
; and 13 more instructions.
|
|
; Parameters: Reads $0203 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0200, $03F8 and $03F9
|
|
; changed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, the OAM shadow and the RAM fields it
|
|
; writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop343:
|
|
lda #$80 ; CPU:$E8AB PRG:68AB A9 80
|
|
sta $0200 ; CPU:$E8AD PRG:68AD 8D 00 02
|
|
lda #$FF ; CPU:$E8B0 PRG:68B0 A9 FF
|
|
sta $03F8 ; CPU:$E8B2 PRG:68B2 8D F8 03
|
|
lda #$C7 ; CPU:$E8B5 PRG:68B5 A9 C7
|
|
sta $03F9 ; CPU:$E8B7 PRG:68B7 8D F9 03
|
|
lda $0203 ; CPU:$E8BA PRG:68BA AD 03 02
|
|
sta $03FA ; CPU:$E8BD PRG:68BD 8D FA 03
|
|
lda #$01 ; CPU:$E8C0 PRG:68C0 A9 01
|
|
sta Zp7A ; CPU:$E8C2 PRG:68C2 85 7A
|
|
lda Zp79 ; CPU:$E8C4 PRG:68C4 A5 79
|
|
cmp #$06 ; CPU:$E8C6 PRG:68C6 C9 06
|
|
beq NmiHandler_Loop344 ; CPU:$E8C8 PRG:68C8 F0 0C
|
|
cmp #$05 ; CPU:$E8CA PRG:68CA C9 05
|
|
beq NmiHandler_Loop344 ; CPU:$E8CC PRG:68CC F0 08
|
|
ldx #$00 ; CPU:$E8CE PRG:68CE A2 00
|
|
stx $0471 ; CPU:$E8D0 PRG:68D0 8E 71 04
|
|
inx ; CPU:$E8D3 PRG:68D3 E8
|
|
stx Zp7B ; CPU:$E8D4 PRG:68D4 86 7B
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop344
|
|
; Global: Counts the player ship's spawns on and works out the next spawn delay.
|
|
; Local: Executes 1 instruction: returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; nothing.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop344:
|
|
rts ; CPU:$E8D6 PRG:68D6 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvancePlayerSpawnCount
|
|
; Global: The routine reads $0472.
|
|
; Local: Executes 5 instructions: loads X from $0472; increments X; compares X
|
|
; with $14; branches on carry clear to NmiHandler_Loop345; loads X
|
|
; with $11.
|
|
; Parameters: Reads $0472 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvancePlayerSpawnCount:
|
|
ldx $0472 ; CPU:$E8D7 PRG:68D7 AE 72 04
|
|
inx ; CPU:$E8DA PRG:68DA E8
|
|
cpx #$14 ; CPU:$E8DB PRG:68DB E0 14
|
|
bcc NmiHandler_Loop345 ; CPU:$E8DD PRG:68DD 90 02
|
|
ldx #$11 ; CPU:$E8DF PRG:68DF A2 11
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop345
|
|
; Global: The routine writes $0472 and $0475.
|
|
; Local: Executes 10 instructions: stores X to $0472; copies X into A; shifts
|
|
; a left; stores A to $0475; shifts a left; shifts a left; and 4 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0472 and $0475 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop345:
|
|
stx $0472 ; CPU:$E8E1 PRG:68E1 8E 72 04
|
|
txa ; CPU:$E8E4 PRG:68E4 8A
|
|
asl a ; CPU:$E8E5 PRG:68E5 0A
|
|
sta $0475 ; CPU:$E8E6 PRG:68E6 8D 75 04
|
|
asl a ; CPU:$E8E9 PRG:68E9 0A
|
|
asl a ; CPU:$E8EA PRG:68EA 0A
|
|
tax ; CPU:$E8EB PRG:68EB AA
|
|
lda #$08 ; CPU:$E8EC PRG:68EC A9 08
|
|
sta Zp02 ; CPU:$E8EE PRG:68EE 85 02
|
|
ldy #$00 ; CPU:$E8F0 PRG:68F0 A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero59
|
|
; Global: Copies the sprite attributes and the tile ids of a ship into the sprite table.
|
|
; Local: Executes 20 instructions: calls CopySpriteAttributes; decrements Zp02; branches
|
|
; on not equal to NmiHandler_OnNonzero59; shifts $0456 left; shifts
|
|
; $0456 left; shifts $0457 left; and 14 more instructions.
|
|
; Parameters: Reads $0456, $0457, $0455, $0454 and 1 more from the zero page
|
|
; and RAM; the values it acts on are those fields' contents.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0455 and $0454 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero59:
|
|
jsr CopySpriteAttributes ; CPU:$E8F2 PRG:68F2 20 22 E9
|
|
dec Zp02 ; CPU:$E8F5 PRG:68F5 C6 02
|
|
bne NmiHandler_OnNonzero59 ; CPU:$E8F7 PRG:68F7 D0 F9
|
|
asl $0456 ; CPU:$E8F9 PRG:68F9 0E 56 04
|
|
asl $0456 ; CPU:$E8FC PRG:68FC 0E 56 04
|
|
asl $0457 ; CPU:$E8FF PRG:68FF 0E 57 04
|
|
asl $0457 ; CPU:$E902 PRG:6902 0E 57 04
|
|
lda $0455 ; CPU:$E905 PRG:6905 AD 55 04
|
|
asl a ; CPU:$E908 PRG:6908 0A
|
|
adc $0455 ; CPU:$E909 PRG:6909 6D 55 04
|
|
sta $0455 ; CPU:$E90C PRG:690C 8D 55 04
|
|
lda $0454 ; CPU:$E90F PRG:690F AD 54 04
|
|
asl a ; CPU:$E912 PRG:6912 0A
|
|
adc $0454 ; CPU:$E913 PRG:6913 6D 54 04
|
|
sta $0454 ; CPU:$E916 PRG:6916 8D 54 04
|
|
sec ; CPU:$E919 PRG:6919 38
|
|
rol $045E ; CPU:$E91A PRG:691A 2E 5E 04
|
|
sec ; CPU:$E91D PRG:691D 38
|
|
rol $045E ; CPU:$E91E PRG:691E 2E 5E 04
|
|
rts ; CPU:$E921 PRG:6921 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: CopySpriteAttributes
|
|
; Global: Counts the player ship's frame counter on and rolls it over after $3C frames.
|
|
; Local: Executes 16 instructions: loads A from $E9AA,x; increments X; pushes
|
|
; A; ANDs A with $0F; increments Y; stores A to $0450,y; and 10 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, $0450.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
CopySpriteAttributes:
|
|
lda $E9AA,x ; CPU:$E922 PRG:6922 BD AA E9
|
|
inx ; CPU:$E925 PRG:6925 E8
|
|
pha ; CPU:$E926 PRG:6926 48
|
|
and #$0F ; CPU:$E927 PRG:6927 29 0F
|
|
iny ; CPU:$E929 PRG:6929 C8
|
|
sta $0450,y ; CPU:$E92A PRG:692A 99 50 04
|
|
dey ; CPU:$E92D PRG:692D 88
|
|
pla ; CPU:$E92E PRG:692E 68
|
|
lsr a ; CPU:$E92F PRG:692F 4A
|
|
lsr a ; CPU:$E930 PRG:6930 4A
|
|
lsr a ; CPU:$E931 PRG:6931 4A
|
|
lsr a ; CPU:$E932 PRG:6932 4A
|
|
sta $0450,y ; CPU:$E933 PRG:6933 99 50 04
|
|
iny ; CPU:$E936 PRG:6936 C8
|
|
iny ; CPU:$E937 PRG:6937 C8
|
|
rts ; CPU:$E938 PRG:6938 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: AdvancePlayerFrameCounter
|
|
; Global: The routine reads $0473 and $0474.
|
|
; Local: Executes 7 instructions: increments $0473; loads X from $0473;
|
|
; compares X with $3C; branches on carry clear to NmiHandler_Loop347;
|
|
; increments $0474; branches on not equal to NmiHandler_Loop346; and
|
|
; 1 more instruction.
|
|
; Parameters: Reads $0473 and $0474 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
AdvancePlayerFrameCounter:
|
|
inc $0473 ; CPU:$E939 PRG:6939 EE 73 04
|
|
ldx $0473 ; CPU:$E93C PRG:693C AE 73 04
|
|
cpx #$3C ; CPU:$E93F PRG:693F E0 3C
|
|
bcc NmiHandler_Loop347 ; CPU:$E941 PRG:6941 90 0D
|
|
inc $0474 ; CPU:$E943 PRG:6943 EE 74 04
|
|
bne NmiHandler_Loop346 ; CPU:$E946 PRG:6946 D0 03
|
|
dec $0474 ; CPU:$E948 PRG:6948 CE 74 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop346
|
|
; Global: The routine writes $0473.
|
|
; Local: Executes 2 instructions: loads X with $00; stores X to $0473.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves $0473 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, $0465, $0466, $0467, $0470, $0473,
|
|
; $0476.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop346:
|
|
ldx #$00 ; CPU:$E94B PRG:694B A2 00
|
|
stx $0473 ; CPU:$E94D PRG:694D 8E 73 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop347
|
|
; Global: The routine reads $0454, $0455 and $0474.
|
|
; Local: Executes 11 instructions: loads X from $0454; loads Y from $0455;
|
|
; loads A from $0474; compares A with $30; branches on carry clear to
|
|
; NmiHandler_Loop348; increments X; and 5 more instructions.
|
|
; Parameters: Reads $0454, $0455 and $0474 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, $0465, $0466, $0467, $0470, $0476.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop347:
|
|
ldx $0454 ; CPU:$E950 PRG:6950 AE 54 04
|
|
ldy $0455 ; CPU:$E953 PRG:6953 AC 55 04
|
|
lda $0474 ; CPU:$E956 PRG:6956 AD 74 04
|
|
cmp #$30 ; CPU:$E959 PRG:6959 C9 30
|
|
bcc NmiHandler_Loop348 ; CPU:$E95B PRG:695B 90 08
|
|
inx ; CPU:$E95D PRG:695D E8
|
|
iny ; CPU:$E95E PRG:695E C8
|
|
cmp #$60 ; CPU:$E95F PRG:695F C9 60
|
|
bcc NmiHandler_Loop348 ; CPU:$E961 PRG:6961 90 02
|
|
inx ; CPU:$E963 PRG:6963 E8
|
|
iny ; CPU:$E964 PRG:6964 C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop348
|
|
; Global: The routine writes $0466 and $0465, reads $0474 and $0475.
|
|
; Local: Executes 9 instructions: loads A from $EA4A,x; stores A to $0466;
|
|
; loads A from $EA68,x; stores A to $0465; loads A from $0474; loads
|
|
; X from $0475; and 3 more instructions.
|
|
; Parameters: Reads $0474 and $0475 from the zero page and RAM; the values it
|
|
; acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0466 and $0465 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, $0465, $0466, $0467, $0470, $0476.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop348:
|
|
lda $EA4A,x ; CPU:$E965 PRG:6965 BD 4A EA
|
|
sta $0466 ; CPU:$E968 PRG:6968 8D 66 04
|
|
lda $EA68,x ; CPU:$E96B PRG:696B BD 68 EA
|
|
sta $0465 ; CPU:$E96E PRG:696E 8D 65 04
|
|
lda $0474 ; CPU:$E971 PRG:6971 AD 74 04
|
|
ldx $0475 ; CPU:$E974 PRG:6974 AE 75 04
|
|
cmp #$30 ; CPU:$E977 PRG:6977 C9 30
|
|
bcc NmiHandler_Loop349 ; CPU:$E979 PRG:6979 90 01
|
|
inx ; CPU:$E97B PRG:697B E8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop349
|
|
; Global: The routine writes $0476, reads $0457, $0456 and $0494.
|
|
; Local: Executes 17 instructions: loads A from $EA86,x; stores A to $0476;
|
|
; loads X from $0457; loads Y from $0456; loads A from $0494;
|
|
; compares A with $1E; and 11 more instructions.
|
|
; Parameters: Reads $0457, $0456 and $0494 from the zero page and RAM; the
|
|
; values it acts on are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target. Leaves $0476 changed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z and C flags, $0467, $0470, $0476.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop349:
|
|
lda $EA86,x ; CPU:$E97C PRG:697C BD 86 EA
|
|
sta $0476 ; CPU:$E97F PRG:697F 8D 76 04
|
|
ldx $0457 ; CPU:$E982 PRG:6982 AE 57 04
|
|
ldy $0456 ; CPU:$E985 PRG:6985 AC 56 04
|
|
lda $0494 ; CPU:$E988 PRG:6988 AD 94 04
|
|
cmp #$1E ; CPU:$E98B PRG:698B C9 1E
|
|
bcs NmiHandler_Loop350 ; CPU:$E98D PRG:698D B0 0E
|
|
inx ; CPU:$E98F PRG:698F E8
|
|
iny ; CPU:$E990 PRG:6990 C8
|
|
cmp #$14 ; CPU:$E991 PRG:6991 C9 14
|
|
bcs NmiHandler_Loop350 ; CPU:$E993 PRG:6993 B0 08
|
|
inx ; CPU:$E995 PRG:6995 E8
|
|
iny ; CPU:$E996 PRG:6996 C8
|
|
cmp #$0A ; CPU:$E997 PRG:6997 C9 0A
|
|
bcs NmiHandler_Loop350 ; CPU:$E999 PRG:6999 B0 02
|
|
inx ; CPU:$E99B PRG:699B E8
|
|
iny ; CPU:$E99C PRG:699C C8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop350
|
|
; Global: Switches the APU and the expansion port back to their power-on state.
|
|
; Local: Executes 5 instructions: loads A from $EAAE,x; stores A to $0470;
|
|
; loads A from $EACE,y; stores A to $0467; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed. Leaves $0470 and $0467 changed.
|
|
; Clobbers:
|
|
; A, the N and Z flags, $0467, $0470.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop350:
|
|
lda $EAAE,x ; CPU:$E99D PRG:699D BD AE EA
|
|
sta $0470 ; CPU:$E9A0 PRG:69A0 8D 70 04
|
|
lda $EACE,y ; CPU:$E9A3 PRG:69A3 B9 CE EA
|
|
sta $0467 ; CPU:$E9A6 PRG:69A6 8D 67 04
|
|
rts ; CPU:$E9A9 PRG:69A9 60
|
|
; ---- data $E9AA-$EAD9 (304 bytes) ----
|
|
; referenced by `lda $E9AA,x` at $E922 (operand $E9AA falls inside this region)
|
|
; referenced by `lda $EA4A,x` at $E965 (operand $EA4A falls inside this region)
|
|
; referenced by `lda $EA68,x` at $E96B (operand $EA68 falls inside this region)
|
|
; referenced by `lda $EA86,x` at $E97C (operand $EA86 falls inside this region)
|
|
; referenced by `lda $EAAE,x` at $E99D (operand $EAAE falls inside this region)
|
|
; referenced by `lda $EACE,y` at $E9A3 (operand $EACE falls inside this region)
|
|
SpriteAttributeTable:
|
|
.byte $00, $00, $00, $00, $06, $00, $44, $F0, $10, $01, $11, $00, $07, $00, $44, $F0 ; CPU:$E9AA PRG:69AA 00 00 00 00 06 00 44 F0 10 01 11 00
|
|
.byte $20, $11, $21, $11, $07, $14, $53, $70, $10, $11, $32, $11, $08, $14, $53, $70 ; CPU:$E9BA PRG:69BA 20 11 21 11 07 14 53 70 10 11 32 11
|
|
.byte $00, $11, $42, $12, $08, $14, $54, $70, $21, $12, $52, $22, $19, $21, $63, $70 ; CPU:$E9CA PRG:69CA 00 11 42 12 08 14 54 70 21 12 52 22
|
|
.byte $11, $22, $63, $22, $19, $21, $62, $70, $00, $00, $11, $01, $17, $21, $63, $F0 ; CPU:$E9DA PRG:69DA 11 22 63 22 19 21 62 70 00 00 11 01
|
|
.byte $21, $23, $64, $23, $17, $30, $72, $30, $11, $33, $76, $23, $18, $30, $72, $30 ; CPU:$E9EA PRG:69EA 21 23 64 23 17 30 72 30 11 33 76 23
|
|
.byte $01, $33, $76, $23, $18, $30, $72, $30, $21, $34, $87, $24, $29, $14, $82, $30 ; CPU:$E9FA PRG:69FA 01 33 76 23 18 30 72 30 21 34 87 24
|
|
.byte $11, $44, $87, $24, $29, $14, $82, $30, $01, $02, $22, $11, $27, $14, $83, $70 ; CPU:$EA0A PRG:6A0A 11 44 87 24 29 14 82 30 01 02 22 11
|
|
.byte $21, $34, $88, $25, $2A, $21, $81, $30, $11, $44, $88, $25, $2A, $21, $81, $30 ; CPU:$EA1A PRG:6A1A 21 34 88 25 2A 21 81 30 11 44 88 25
|
|
.byte $01, $44, $88, $25, $2C, $21, $81, $30, $21, $34, $98, $26, $2C, $30, $80, $10 ; CPU:$EA2A PRG:6A2A 01 44 88 25 2C 21 81 30 21 34 98 26
|
|
.byte $11, $44, $99, $26, $2C, $30, $80, $10, $01, $44, $99, $26, $2C, $30, $80, $10 ; CPU:$EA3A PRG:6A3A 11 44 99 26 2C 30 80 10 01 44 99 26
|
|
.byte $60, $50, $40, $50, $40, $30, $50, $30, $30, $40, $30, $20, $40, $20, $20, $30 ; CPU:$EA4A PRG:6A4A 60 50 40 50 40 30 50 30 30 40 30 20
|
|
.byte $30, $20, $30, $20, $10, $20, $20, $10, $20, $10, $10, $10, $10, $10, $90, $70 ; CPU:$EA5A PRG:6A5A 30 20 30 20 10 20 20 10 20 10 10 10
|
|
.byte $50, $80, $60, $40, $70, $50, $40, $60, $40, $30, $50, $30, $30, $40, $30, $30 ; CPU:$EA6A PRG:6A6A 50 80 60 40 70 50 40 60 40 30 50 30
|
|
.byte $40, $20, $20, $30, $30, $20, $30, $20, $20, $20, $20, $20, $02, $02, $02, $03 ; CPU:$EA7A PRG:6A7A 40 20 20 30 30 20 30 20 20 20 20 20
|
|
.byte $02, $03, $02, $03, $03, $03, $03, $03, $03, $04, $02, $03, $03, $04, $04, $04 ; CPU:$EA8A PRG:6A8A 02 03 02 03 03 03 03 03 03 04 02 03
|
|
.byte $04, $05, $04, $05, $04, $05, $02, $03, $04, $06, $05, $06, $05, $06, $05, $07 ; CPU:$EA9A PRG:6A9A 04 05 04 05 04 05 02 03 04 06 05 06
|
|
.byte $05, $07, $05, $07, $01, $01, $02, $02, $01, $02, $02, $02, $01, $02, $02, $03 ; CPU:$EAAA PRG:6AAA 05 07 05 07 01 01 02 02 01 02 02 02
|
|
.byte $02, $02, $02, $03, $02, $02, $03, $03, $02, $02, $03, $04, $02, $03, $03, $04 ; CPU:$EABA PRG:6ABA 02 02 02 03 02 02 03 03 02 02 03 04
|
|
.byte $03, $03, $03, $04, $07, $07, $06, $04, $06, $06, $05, $04, $05, $05, $04, $03 ; CPU:$EACA PRG:6ACA 03 03 03 04 07 07 06 04 06 06 05 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ResetApuAndExpansionPort
|
|
; Global: Clears the sound effect state in the work area at $05B0.
|
|
; Local: Executes 4 instructions: loads A with $0F; stores A to the APUSTATUS
|
|
; register; loads A with $C0; stores A to the JOY2 register.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own. Leaves the APUSTATUS and JOY2 registers set.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0580, APUSTATUS, JOY2.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ResetApuAndExpansionPort:
|
|
lda #$0F ; CPU:$EADA PRG:6ADA A9 0F
|
|
sta APUSTATUS ; CPU:$EADC PRG:6ADC 8D 15 40
|
|
lda #$C0 ; CPU:$EADF PRG:6ADF A9 C0
|
|
sta JOY2 ; CPU:$EAE1 PRG:6AE1 8D 17 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: ClearSoundEffectState
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 6 instructions: loads A with $B0; stores A to
|
|
; StarFieldPtrLo; loads A with $05; stores A to StarFieldPtrHi; loads
|
|
; X with $00; loads Y with $00.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
ClearSoundEffectState:
|
|
lda #$B0 ; CPU:$EAE4 PRG:6AE4 A9 B0
|
|
sta StarFieldPtrLo ; CPU:$EAE6 PRG:6AE6 85 00
|
|
lda #$05 ; CPU:$EAE8 PRG:6AE8 A9 05
|
|
sta StarFieldPtrHi ; CPU:$EAEA PRG:6AEA 85 01
|
|
ldx #$00 ; CPU:$EAEC PRG:6AEC A2 00
|
|
ldy #$00 ; CPU:$EAEE PRG:6AEE A0 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero60
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 9 instructions: loads A with $00; stores A to
|
|
; ((StarFieldPtrLo),y); stores A to $0580,x; clears the carry flag;
|
|
; loads A from StarFieldPtrLo; adds $08 to A; and 3 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero60:
|
|
lda #$00 ; CPU:$EAF0 PRG:6AF0 A9 00
|
|
sta (StarFieldPtrLo),y ; CPU:$EAF2 PRG:6AF2 91 00
|
|
sta $0580,x ; CPU:$EAF4 PRG:6AF4 9D 80 05
|
|
clc ; CPU:$EAF7 PRG:6AF7 18
|
|
lda StarFieldPtrLo ; CPU:$EAF8 PRG:6AF8 A5 00
|
|
adc #$08 ; CPU:$EAFA PRG:6AFA 69 08
|
|
sta StarFieldPtrLo ; CPU:$EAFC PRG:6AFC 85 00
|
|
bcc NmiHandler_Loop351 ; CPU:$EAFE PRG:6AFE 90 02
|
|
inc StarFieldPtrHi ; CPU:$EB00 PRG:6B00 E6 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop351
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 13 instructions: loads A with $00; stores A to
|
|
; ((StarFieldPtrLo),y); stores A to $0580,x; clears the carry flag;
|
|
; loads A from StarFieldPtrLo; adds $08 to A; and 7 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop351:
|
|
inx ; CPU:$EB02 PRG:6B02 E8
|
|
cpx #$27 ; CPU:$EB03 PRG:6B03 E0 27
|
|
bne NmiHandler_OnNonzero60 ; CPU:$EB05 PRG:6B05 D0 E9
|
|
rts ; CPU:$EB07 PRG:6B07 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_EB08
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads X with $27; loads A from Zp62;
|
|
; branches on equal to NmiHandler_Loop352; loads A from Zp5B;
|
|
; branches on equal to NmiHandler_Loop353.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_EB08:
|
|
ldx #$27 ; CPU:$EB08 PRG:6B08 A2 27
|
|
lda Zp62 ; CPU:$EB0A PRG:6B0A A5 62
|
|
beq NmiHandler_Loop352 ; CPU:$EB0C PRG:6B0C F0 04
|
|
lda Zp5B ; CPU:$EB0E PRG:6B0E A5 5B
|
|
beq NmiHandler_Loop353 ; CPU:$EB10 PRG:6B10 F0 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop352
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 1 instruction: loads X with $01.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop352:
|
|
ldx #$01 ; CPU:$EB12 PRG:6B12 A2 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop353
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: stores X to TilePtrLo; loads A with $00;
|
|
; stores A to ZpB0; stores A to ZpB1; stores A to ZpB2; stores A to
|
|
; ZpB3; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop353:
|
|
stx TilePtrLo ; CPU:$EB14 PRG:6B14 86 08
|
|
lda #$00 ; CPU:$EB16 PRG:6B16 A9 00
|
|
sta ZpB0 ; CPU:$EB18 PRG:6B18 85 B0
|
|
sta ZpB1 ; CPU:$EB1A PRG:6B1A 85 B1
|
|
sta ZpB2 ; CPU:$EB1C PRG:6B1C 85 B2
|
|
sta ZpB3 ; CPU:$EB1E PRG:6B1E 85 B3
|
|
stx PpuAddrLow ; CPU:$EB20 PRG:6B20 86 04
|
|
lda #$B0 ; CPU:$EB22 PRG:6B22 A9 B0
|
|
sta StarFieldPtrLo ; CPU:$EB24 PRG:6B24 85 00
|
|
lda #$05 ; CPU:$EB26 PRG:6B26 A9 05
|
|
sta StarFieldPtrHi ; CPU:$EB28 PRG:6B28 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero61
|
|
; Global: The routine calls NmiHandler_Loop355.
|
|
; Local: Executes 11 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop355;
|
|
; compares A with $05; branches on carry clear to NmiHandler_Loop354;
|
|
; sets the carry flag; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero61:
|
|
ldy #$00 ; CPU:$EB2A PRG:6B2A A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$EB2C PRG:6B2C B1 00
|
|
beq NmiHandler_Loop355 ; CPU:$EB2E PRG:6B2E F0 35
|
|
cmp #$05 ; CPU:$EB30 PRG:6B30 C9 05
|
|
bcc NmiHandler_Loop354 ; CPU:$EB32 PRG:6B32 90 0B
|
|
sec ; CPU:$EB34 PRG:6B34 38
|
|
sbc #$05 ; CPU:$EB35 PRG:6B35 E9 05
|
|
tax ; CPU:$EB37 PRG:6B37 AA
|
|
lda #$01 ; CPU:$EB38 PRG:6B38 A9 01
|
|
sta ZpB0,x ; CPU:$EB3A PRG:6B3A 95 B0
|
|
jmp NmiHandler_Loop355 ; CPU:$EB3C PRG:6B3C 4C 65 EB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop354
|
|
; Global: The routine calls NmiHandler_Loop355.
|
|
; Local: Executes 29 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop355;
|
|
; compares A with $05; branches on carry clear to NmiHandler_Loop354;
|
|
; sets the carry flag; and 23 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop354:
|
|
tax ; CPU:$EB3F PRG:6B3F AA
|
|
dex ; CPU:$EB40 PRG:6B40 CA
|
|
lda ZpB0,x ; CPU:$EB41 PRG:6B41 B5 B0
|
|
bne NmiHandler_Loop355 ; CPU:$EB43 PRG:6B43 D0 20
|
|
lda #$01 ; CPU:$EB45 PRG:6B45 A9 01
|
|
sta ZpB0,x ; CPU:$EB47 PRG:6B47 95 B0
|
|
txa ; CPU:$EB49 PRG:6B49 8A
|
|
tay ; CPU:$EB4A PRG:6B4A A8
|
|
clc ; CPU:$EB4B PRG:6B4B 18
|
|
adc #$05 ; CPU:$EB4C PRG:6B4C 69 05
|
|
ldy #$00 ; CPU:$EB4E PRG:6B4E A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$EB50 PRG:6B50 91 00
|
|
txa ; CPU:$EB52 PRG:6B52 8A
|
|
asl a ; CPU:$EB53 PRG:6B53 0A
|
|
asl a ; CPU:$EB54 PRG:6B54 0A
|
|
tax ; CPU:$EB55 PRG:6B55 AA
|
|
lda #$04 ; CPU:$EB56 PRG:6B56 A9 04
|
|
sta StarFieldCount ; CPU:$EB58 PRG:6B58 85 06
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero62
|
|
; Global: The routine calls NmiHandler_Loop355.
|
|
; Local: Executes 35 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop355;
|
|
; compares A with $05; branches on carry clear to NmiHandler_Loop354;
|
|
; sets the carry flag; and 29 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero62:
|
|
iny ; CPU:$EB5A PRG:6B5A C8
|
|
lda (StarFieldPtrLo),y ; CPU:$EB5B PRG:6B5B B1 00
|
|
sta APUPULSE1CTRL,x ; CPU:$EB5D PRG:6B5D 9D 00 40
|
|
inx ; CPU:$EB60 PRG:6B60 E8
|
|
dec StarFieldCount ; CPU:$EB61 PRG:6B61 C6 06
|
|
bne NmiHandler_OnNonzero62 ; CPU:$EB63 PRG:6B63 D0 F5
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop355
|
|
; Global: The routine calls NmiHandler_Loop355.
|
|
; Local: Executes 41 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop355;
|
|
; compares A with $05; branches on carry clear to NmiHandler_Loop354;
|
|
; sets the carry flag; and 35 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop355:
|
|
clc ; CPU:$EB65 PRG:6B65 18
|
|
lda StarFieldPtrLo ; CPU:$EB66 PRG:6B66 A5 00
|
|
adc #$08 ; CPU:$EB68 PRG:6B68 69 08
|
|
sta StarFieldPtrLo ; CPU:$EB6A PRG:6B6A 85 00
|
|
bcc NmiHandler_Loop356 ; CPU:$EB6C PRG:6B6C 90 02
|
|
inc StarFieldPtrHi ; CPU:$EB6E PRG:6B6E E6 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop356
|
|
; Global: The routine calls NmiHandler_Loop355.
|
|
; Local: Executes 44 instructions: loads Y with $00; loads A from
|
|
; ((StarFieldPtrLo),y); branches on equal to NmiHandler_Loop355;
|
|
; compares A with $05; branches on carry clear to NmiHandler_Loop354;
|
|
; sets the carry flag; and 38 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop356:
|
|
dec PpuAddrLow ; CPU:$EB70 PRG:6B70 C6 04
|
|
bne NmiHandler_OnNonzero61 ; CPU:$EB72 PRG:6B72 D0 B6
|
|
ldx #$00 ; CPU:$EB74 PRG:6B74 A2 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear22
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: stores X to Zp1E; loads A from ZpB0,x;
|
|
; branches on not equal to NmiHandler_Loop357; copies X into A;
|
|
; shifts a left; shifts a left; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear22:
|
|
stx Zp1E ; CPU:$EB76 PRG:6B76 86 1E
|
|
lda ZpB0,x ; CPU:$EB78 PRG:6B78 B5 B0
|
|
bne NmiHandler_Loop357 ; CPU:$EB7A PRG:6B7A D0 0C
|
|
txa ; CPU:$EB7C PRG:6B7C 8A
|
|
asl a ; CPU:$EB7D PRG:6B7D 0A
|
|
asl a ; CPU:$EB7E PRG:6B7E 0A
|
|
tax ; CPU:$EB7F PRG:6B7F AA
|
|
asl a ; CPU:$EB80 PRG:6B80 0A
|
|
and #$10 ; CPU:$EB81 PRG:6B81 29 10
|
|
eor #$10 ; CPU:$EB83 PRG:6B83 49 10
|
|
sta APUPULSE1CTRL,x ; CPU:$EB85 PRG:6B85 9D 00 40
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop357
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 21 instructions: stores X to Zp1E; loads A from ZpB0,x;
|
|
; branches on not equal to NmiHandler_Loop357; copies X into A;
|
|
; shifts a left; shifts a left; and 15 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop357:
|
|
ldx Zp1E ; CPU:$EB88 PRG:6B88 A6 1E
|
|
inx ; CPU:$EB8A PRG:6B8A E8
|
|
cpx #$04 ; CPU:$EB8B PRG:6B8B E0 04
|
|
bcc NmiHandler_OnCarryClear22 ; CPU:$EB8D PRG:6B8D 90 E7
|
|
ldy #$00 ; CPU:$EB8F PRG:6B8F A0 00
|
|
sty PpuAddrLow ; CPU:$EB91 PRG:6B91 84 04
|
|
lda #$B0 ; CPU:$EB93 PRG:6B93 A9 B0
|
|
sta StarFieldPtrLo ; CPU:$EB95 PRG:6B95 85 00
|
|
lda #$05 ; CPU:$EB97 PRG:6B97 A9 05
|
|
sta StarFieldPtrHi ; CPU:$EB99 PRG:6B99 85 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnCarryClear23
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads X from PpuAddrLow; loads Y from
|
|
; $0580,x; branches on equal to NmiHandler_Loop359; decrements Y;
|
|
; branches on not equal to NmiHandler_Loop358; loads A with $02; and
|
|
; 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnCarryClear23:
|
|
ldx PpuAddrLow ; CPU:$EB9B PRG:6B9B A6 04
|
|
ldy $0580,x ; CPU:$EB9D PRG:6B9D BC 80 05
|
|
beq NmiHandler_Loop359 ; CPU:$EBA0 PRG:6BA0 F0 15
|
|
dey ; CPU:$EBA2 PRG:6BA2 88
|
|
bne NmiHandler_Loop358 ; CPU:$EBA3 PRG:6BA3 D0 07
|
|
lda #$02 ; CPU:$EBA5 PRG:6BA5 A9 02
|
|
sta $0580,x ; CPU:$EBA7 PRG:6BA7 9D 80 05
|
|
bpl NmiHandler_Loop361 ; CPU:$EBAA PRG:6BAA 10 1F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop358
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 14 instructions: loads X from PpuAddrLow; loads Y from
|
|
; $0580,x; branches on equal to NmiHandler_Loop359; decrements Y;
|
|
; branches on not equal to NmiHandler_Loop358; loads A with $02; and
|
|
; 8 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop358:
|
|
ldy #$07 ; CPU:$EBAC PRG:6BAC A0 07
|
|
lda (StarFieldPtrLo),y ; CPU:$EBAE PRG:6BAE B1 00
|
|
sec ; CPU:$EBB0 PRG:6BB0 38
|
|
sbc #$01 ; CPU:$EBB1 PRG:6BB1 E9 01
|
|
sta (StarFieldPtrLo),y ; CPU:$EBB3 PRG:6BB3 91 00
|
|
beq NmiHandler_Loop362 ; CPU:$EBB5 PRG:6BB5 F0 4A
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop359
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 20 instructions: loads X from PpuAddrLow; loads Y from
|
|
; $0580,x; branches on equal to NmiHandler_Loop359; decrements Y;
|
|
; branches on not equal to NmiHandler_Loop358; loads A with $02; and
|
|
; 14 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop359:
|
|
clc ; CPU:$EBB7 PRG:6BB7 18
|
|
lda StarFieldPtrLo ; CPU:$EBB8 PRG:6BB8 A5 00
|
|
adc #$08 ; CPU:$EBBA PRG:6BBA 69 08
|
|
sta StarFieldPtrLo ; CPU:$EBBC PRG:6BBC 85 00
|
|
bcc NmiHandler_Loop360 ; CPU:$EBBE PRG:6BBE 90 02
|
|
inc StarFieldPtrHi ; CPU:$EBC0 PRG:6BC0 E6 01
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop360
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 25 instructions: loads X from PpuAddrLow; loads Y from
|
|
; $0580,x; branches on equal to NmiHandler_Loop359; decrements Y;
|
|
; branches on not equal to NmiHandler_Loop358; loads A with $02; and
|
|
; 19 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop360:
|
|
inc PpuAddrLow ; CPU:$EBC2 PRG:6BC2 E6 04
|
|
lda PpuAddrLow ; CPU:$EBC4 PRG:6BC4 A5 04
|
|
cmp TilePtrLo ; CPU:$EBC6 PRG:6BC6 C5 08
|
|
bcc NmiHandler_OnCarryClear23 ; CPU:$EBC8 PRG:6BC8 90 D1
|
|
rts ; CPU:$EBCA PRG:6BCA 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop361
|
|
; Global: The routine calls GetPathTablePointer and Sub_ED60.
|
|
; Local: Executes 24 instructions: loads A with $00; loads Y with $05; stores
|
|
; A to ((StarFieldPtrLo),y); calls GetPathTablePointer; calls Sub_ED60; loads Y
|
|
; with $00; and 18 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop361:
|
|
lda #$00 ; CPU:$EBCB PRG:6BCB A9 00
|
|
ldy #$05 ; CPU:$EBCD PRG:6BCD A0 05
|
|
sta (StarFieldPtrLo),y ; CPU:$EBCF PRG:6BCF 91 00
|
|
jsr GetPathTablePointer ; CPU:$EBD1 PRG:6BD1 20 51 ED
|
|
jsr Sub_ED60 ; CPU:$EBD4 PRG:6BD4 20 60 ED
|
|
ldy #$00 ; CPU:$EBD7 PRG:6BD7 A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$EBD9 PRG:6BD9 91 00
|
|
jsr Sub_ED60 ; CPU:$EBDB PRG:6BDB 20 60 ED
|
|
ldy #$01 ; CPU:$EBDE PRG:6BDE A0 01
|
|
sta (StarFieldPtrLo),y ; CPU:$EBE0 PRG:6BE0 91 00
|
|
jsr Sub_ED60 ; CPU:$EBE2 PRG:6BE2 20 60 ED
|
|
ldy #$02 ; CPU:$EBE5 PRG:6BE5 A0 02
|
|
sta (StarFieldPtrLo),y ; CPU:$EBE7 PRG:6BE7 91 00
|
|
jsr Sub_ED60 ; CPU:$EBE9 PRG:6BE9 20 60 ED
|
|
ldy #$04 ; CPU:$EBEC PRG:6BEC A0 04
|
|
sta (StarFieldPtrLo),y ; CPU:$EBEE PRG:6BEE 91 00
|
|
ldy #$00 ; CPU:$EBF0 PRG:6BF0 A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$EBF2 PRG:6BF2 B1 00
|
|
cmp #$04 ; CPU:$EBF4 PRG:6BF4 C9 04
|
|
bne NmiHandler_Loop363 ; CPU:$EBF6 PRG:6BF6 D0 0C
|
|
jsr Sub_ED60 ; CPU:$EBF8 PRG:6BF8 20 60 ED
|
|
ldy #$03 ; CPU:$EBFB PRG:6BFB A0 03
|
|
sta (StarFieldPtrLo),y ; CPU:$EBFD PRG:6BFD 91 00
|
|
bpl NmiHandler_Loop363 ; CPU:$EBFF PRG:6BFF 10 03
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop362
|
|
; Global: The routine calls GetPathTablePointer.
|
|
; Local: Executes 1 instruction: calls GetPathTablePointer.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop362:
|
|
jsr GetPathTablePointer ; CPU:$EC01 PRG:6C01 20 51 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop363
|
|
; Global: The routine calls Sub_ED60.
|
|
; Local: Executes 19 instructions: calls Sub_ED60; compares A with $E8;
|
|
; branches on carry set to NmiHandler_Loop367; compares A with $60;
|
|
; branches on equal to NmiHandler_Loop365; branches on carry set to
|
|
; NmiHandler_Loop366; and 13 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop363:
|
|
jsr Sub_ED60 ; CPU:$EC04 PRG:6C04 20 60 ED
|
|
cmp #$E8 ; CPU:$EC07 PRG:6C07 C9 E8
|
|
bcs NmiHandler_Loop367 ; CPU:$EC09 PRG:6C09 B0 51
|
|
cmp #$60 ; CPU:$EC0B PRG:6C0B C9 60
|
|
beq NmiHandler_Loop365 ; CPU:$EC0D PRG:6C0D F0 3B
|
|
bcs NmiHandler_Loop366 ; CPU:$EC0F PRG:6C0F B0 43
|
|
pha ; CPU:$EC11 PRG:6C11 48
|
|
and #$F8 ; CPU:$EC12 PRG:6C12 29 F8
|
|
lsr a ; CPU:$EC14 PRG:6C14 4A
|
|
lsr a ; CPU:$EC15 PRG:6C15 4A
|
|
tax ; CPU:$EC16 PRG:6C16 AA
|
|
lda $ED8E,x ; CPU:$EC17 PRG:6C17 BD 8E ED
|
|
sta StarFieldCount ; CPU:$EC1A PRG:6C1A 85 06
|
|
lda $ED8F,x ; CPU:$EC1C PRG:6C1C BD 8F ED
|
|
sta Zp07 ; CPU:$EC1F PRG:6C1F 85 07
|
|
pla ; CPU:$EC21 PRG:6C21 68
|
|
and #$07 ; CPU:$EC22 PRG:6C22 29 07
|
|
beq NmiHandler_Loop364 ; CPU:$EC24 PRG:6C24 F0 08
|
|
tax ; CPU:$EC26 PRG:6C26 AA
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero63
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 4 instructions: shifts StarFieldCount right; rotates Zp07
|
|
; right; decrements X; branches on not equal to
|
|
; NmiHandler_OnNonzero63.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero63:
|
|
lsr StarFieldCount ; CPU:$EC27 PRG:6C27 46 06
|
|
ror Zp07 ; CPU:$EC29 PRG:6C29 66 07
|
|
dex ; CPU:$EC2B PRG:6C2B CA
|
|
bne NmiHandler_OnNonzero63 ; CPU:$EC2C PRG:6C2C D0 F9
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop364
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 15 instructions: loads Y with $04; loads A from
|
|
; ((StarFieldPtrLo),y); ANDs A with $F8; ORs A with StarFieldCount;
|
|
; stores A to ((StarFieldPtrLo),y); loads A from Zp07; and 9 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop364:
|
|
ldy #$04 ; CPU:$EC2E PRG:6C2E A0 04
|
|
lda (StarFieldPtrLo),y ; CPU:$EC30 PRG:6C30 B1 00
|
|
and #$F8 ; CPU:$EC32 PRG:6C32 29 F8
|
|
ora StarFieldCount ; CPU:$EC34 PRG:6C34 05 06
|
|
sta (StarFieldPtrLo),y ; CPU:$EC36 PRG:6C36 91 00
|
|
lda Zp07 ; CPU:$EC38 PRG:6C38 A5 07
|
|
dey ; CPU:$EC3A PRG:6C3A 88
|
|
sta (StarFieldPtrLo),y ; CPU:$EC3B PRG:6C3B 91 00
|
|
ldy #$00 ; CPU:$EC3D PRG:6C3D A0 00
|
|
lda (StarFieldPtrLo),y ; CPU:$EC3F PRG:6C3F B1 00
|
|
cmp #$05 ; CPU:$EC41 PRG:6C41 C9 05
|
|
bcc NmiHandler_Loop365 ; CPU:$EC43 PRG:6C43 90 05
|
|
sec ; CPU:$EC45 PRG:6C45 38
|
|
sbc #$04 ; CPU:$EC46 PRG:6C46 E9 04
|
|
sta (StarFieldPtrLo),y ; CPU:$EC48 PRG:6C48 91 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop365
|
|
; Global: The routine calls NmiHandler_Loop359.
|
|
; Local: Executes 5 instructions: loads Y with $06; loads A from
|
|
; ((StarFieldPtrLo),y); increments Y; stores A to
|
|
; ((StarFieldPtrLo),y); calls NmiHandler_Loop359.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop365:
|
|
ldy #$06 ; CPU:$EC4A PRG:6C4A A0 06
|
|
lda (StarFieldPtrLo),y ; CPU:$EC4C PRG:6C4C B1 00
|
|
iny ; CPU:$EC4E PRG:6C4E C8
|
|
sta (StarFieldPtrLo),y ; CPU:$EC4F PRG:6C4F 91 00
|
|
jmp NmiHandler_Loop359 ; CPU:$EC51 PRG:6C51 4C B7 EB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop366
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop359.
|
|
; Local: Executes 47 instructions: calls Sub_ED60; compares A with $E8;
|
|
; branches on carry set to NmiHandler_Loop367; compares A with $60;
|
|
; branches on equal to NmiHandler_Loop365; branches on carry set to
|
|
; NmiHandler_Loop366; and 41 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop366:
|
|
sbc #$60 ; CPU:$EC54 PRG:6C54 E9 60
|
|
ldy #$06 ; CPU:$EC56 PRG:6C56 A0 06
|
|
sta (StarFieldPtrLo),y ; CPU:$EC58 PRG:6C58 91 00
|
|
bpl NmiHandler_Loop363 ; CPU:$EC5A PRG:6C5A 10 A8
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop367
|
|
; Global: The routine calls CallHandlerThroughPointer.
|
|
; Local: Executes 3 instructions: subtracts $E8 from A; calls CallHandlerThroughPointer; stores
|
|
; A to ZpEC.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, ZpEC.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop367:
|
|
sbc #$E8 ; CPU:$EC5C PRG:6C5C E9 E8
|
|
jsr CallHandlerThroughPointer ; CPU:$EC5E PRG:6C5E 20 01 C3
|
|
sta ZpEC ; CPU:$EC61 PRG:6C61 85 EC
|
|
.byte $93, $EC ; CPU:$EC63 PRG:6C63 93 EC -- sha (ZpEC),y (undocumented; ca65 cannot encode) ; CPU:$EC63 PRG:6C63 93 EC
|
|
lda ZpEC ; CPU:$EC65 PRG:6C65 A5 EC
|
|
.byte $B7, $EC ; CPU:$EC67 PRG:6C67 B7 EC -- lax ZpEC,y (undocumented; ca65 cannot encode) ; CPU:$EC67 PRG:6C67 B7 EC
|
|
cmp #$EC ; CPU:$EC69 PRG:6C69 C9 EC
|
|
.byte $D3, $EC ; CPU:$EC6B PRG:6C6B D3 EC -- dcp (ZpEC),y (undocumented; ca65 cannot encode) ; CPU:$EC6B PRG:6C6B D3 EC
|
|
cmp $E7EC,x ; CPU:$EC6D PRG:6C6D DD EC E7
|
|
cpx $ECF3 ; CPU:$EC70 PRG:6C70 EC F3 EC
|
|
.byte $F7, $EC ; CPU:$EC73 PRG:6C73 F7 EC -- isc ZpEC,y (undocumented; ca65 cannot encode) ; CPU:$EC73 PRG:6C73 F7 EC
|
|
.byte $FA, $EC, $0B ; CPU:$EC75 PRG:6C75 FA EC 0B -- nop $0BEC,x (undocumented; ca65 cannot encode) ; CPU:$EC75 PRG:6C75 FA EC 0B
|
|
sbc $ED0F ; CPU:$EC78 PRG:6C78 ED 0F ED
|
|
; ---- data $EC7B-$EC84 (10 bytes) ----
|
|
EnemyBehaviourPointerTable:
|
|
.byte $12, $ED, $23, $ED, $27, $ED, $2A, $ED, $47, $ED ; CPU:$EC7B PRG:6C7B 12 ED 23 ED 27 ED 2A ED 47 ED
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCEC85
|
|
; Global: The routine calls NmiHandler_Loop359.
|
|
; Local: Executes 6 instructions: loads X from PpuAddrLow; loads A with $00;
|
|
; stores A to $0580,x; loads Y with $00; stores A to
|
|
; ((StarFieldPtrLo),y); calls NmiHandler_Loop359.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCEC85:
|
|
ldx PpuAddrLow ; CPU:$EC85 PRG:6C85 A6 04
|
|
lda #$00 ; CPU:$EC87 PRG:6C87 A9 00
|
|
sta $0580,x ; CPU:$EC89 PRG:6C89 9D 80 05
|
|
ldy #$00 ; CPU:$EC8C PRG:6C8C A0 00
|
|
sta (StarFieldPtrLo),y ; CPU:$EC8E PRG:6C8E 91 00
|
|
jmp NmiHandler_Loop359 ; CPU:$EC90 PRG:6C90 4C B7 EB
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCEC93
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 8 instructions: calls Sub_ED60; stores A to StarFieldCount;
|
|
; loads Y with $01; loads A from ((StarFieldPtrLo),y); ANDs A with
|
|
; $3F; ORs A with StarFieldCount; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCEC93:
|
|
jsr Sub_ED60 ; CPU:$EC93 PRG:6C93 20 60 ED
|
|
sta StarFieldCount ; CPU:$EC96 PRG:6C96 85 06
|
|
ldy #$01 ; CPU:$EC98 PRG:6C98 A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$EC9A PRG:6C9A B1 00
|
|
and #$3F ; CPU:$EC9C PRG:6C9C 29 3F
|
|
ora StarFieldCount ; CPU:$EC9E PRG:6C9E 05 06
|
|
sta (StarFieldPtrLo),y ; CPU:$ECA0 PRG:6CA0 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECA2 PRG:6CA2 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECA5
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 8 instructions: calls Sub_ED60; stores A to StarFieldCount;
|
|
; loads Y with $01; loads A from ((StarFieldPtrLo),y); ANDs A with
|
|
; $C0; ORs A with StarFieldCount; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECA5:
|
|
jsr Sub_ED60 ; CPU:$ECA5 PRG:6CA5 20 60 ED
|
|
sta StarFieldCount ; CPU:$ECA8 PRG:6CA8 85 06
|
|
ldy #$01 ; CPU:$ECAA PRG:6CAA A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$ECAC PRG:6CAC B1 00
|
|
and #$C0 ; CPU:$ECAE PRG:6CAE 29 C0
|
|
ora StarFieldCount ; CPU:$ECB0 PRG:6CB0 05 06
|
|
sta (StarFieldPtrLo),y ; CPU:$ECB2 PRG:6CB2 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECB4 PRG:6CB4 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECB7
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 8 instructions: calls Sub_ED60; stores A to StarFieldCount;
|
|
; loads Y with $01; loads A from ((StarFieldPtrLo),y); ANDs A with
|
|
; $F0; ORs A with StarFieldCount; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECB7:
|
|
jsr Sub_ED60 ; CPU:$ECB7 PRG:6CB7 20 60 ED
|
|
sta StarFieldCount ; CPU:$ECBA PRG:6CBA 85 06
|
|
ldy #$01 ; CPU:$ECBC PRG:6CBC A0 01
|
|
lda (StarFieldPtrLo),y ; CPU:$ECBE PRG:6CBE B1 00
|
|
and #$F0 ; CPU:$ECC0 PRG:6CC0 29 F0
|
|
ora StarFieldCount ; CPU:$ECC2 PRG:6CC2 05 06
|
|
sta (StarFieldPtrLo),y ; CPU:$ECC4 PRG:6CC4 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECC6 PRG:6CC6 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECC9
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 4 instructions: calls Sub_ED60; loads Y with $02; stores A
|
|
; to ((StarFieldPtrLo),y); calls NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECC9:
|
|
jsr Sub_ED60 ; CPU:$ECC9 PRG:6CC9 20 60 ED
|
|
ldy #$02 ; CPU:$ECCC PRG:6CCC A0 02
|
|
sta (StarFieldPtrLo),y ; CPU:$ECCE PRG:6CCE 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECD0 PRG:6CD0 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECD3
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 4 instructions: calls Sub_ED60; loads Y with $04; stores A
|
|
; to ((StarFieldPtrLo),y); calls NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECD3:
|
|
jsr Sub_ED60 ; CPU:$ECD3 PRG:6CD3 20 60 ED
|
|
ldy #$04 ; CPU:$ECD6 PRG:6CD6 A0 04
|
|
sta (StarFieldPtrLo),y ; CPU:$ECD8 PRG:6CD8 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECDA PRG:6CDA 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECDD
|
|
; Global: The routine calls Sub_ED60 and NmiHandler_Loop363.
|
|
; Local: Executes 4 instructions: calls Sub_ED60; loads Y with $01; stores A
|
|
; to ((StarFieldPtrLo),y); calls NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECDD:
|
|
jsr Sub_ED60 ; CPU:$ECDD PRG:6CDD 20 60 ED
|
|
ldy #$01 ; CPU:$ECE0 PRG:6CE0 A0 01
|
|
sta (StarFieldPtrLo),y ; CPU:$ECE2 PRG:6CE2 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ECE4 PRG:6CE4 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECE7
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads A with $00; loads X with $08.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECE7:
|
|
lda #$00 ; CPU:$ECE7 PRG:6CE7 A9 00
|
|
ldx #$08 ; CPU:$ECE9 PRG:6CE9 A2 08
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonnegative29
|
|
; Global: The routine calls NmiHandler_Loop363.
|
|
; Local: Executes 4 instructions: stores A to ZpB4,x; decrements X; branches
|
|
; on non-negative to NmiHandler_OnNonnegative29; calls
|
|
; NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonnegative29:
|
|
sta ZpB4,x ; CPU:$ECEB PRG:6CEB 95 B4
|
|
dex ; CPU:$ECED PRG:6CED CA
|
|
bpl NmiHandler_OnNonnegative29 ; CPU:$ECEE PRG:6CEE 10 FB
|
|
jmp NmiHandler_Loop363 ; CPU:$ECF0 PRG:6CF0 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCECF3
|
|
; Global: The routine reads $02A2.
|
|
; Local: Executes 4 instructions: loads X with $00; branches on equal to
|
|
; NmiHandler_Loop368; loads X with $01; tests the bits of $02A2.
|
|
; Parameters: Reads $02A2 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCECF3:
|
|
ldx #$00 ; CPU:$ECF3 PRG:6CF3 A2 00
|
|
beq NmiHandler_Loop368 ; CPU:$ECF5 PRG:6CF5 F0 05
|
|
ldx #$01 ; CPU:$ECF7 PRG:6CF7 A2 01
|
|
bit $02A2 ; CPU:$ECF9 PRG:6CF9 2C A2 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop368
|
|
; Global: The routine calls Sub_ED60.
|
|
; Local: Executes 7 instructions: calls Sub_ED60; increments ZpB4,x; compares
|
|
; A with ZpB4,x; branches on not equal to NmiHandler_Loop372; loads A
|
|
; with $00; stores A to ZpB4,x; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop368:
|
|
jsr Sub_ED60 ; CPU:$ECFC PRG:6CFC 20 60 ED
|
|
inc ZpB4,x ; CPU:$ECFF PRG:6CFF F6 B4
|
|
cmp ZpB4,x ; CPU:$ED01 PRG:6D01 D5 B4
|
|
bne NmiHandler_Loop372 ; CPU:$ED03 PRG:6D03 D0 42
|
|
lda #$00 ; CPU:$ED05 PRG:6D05 A9 00
|
|
sta ZpB4,x ; CPU:$ED07 PRG:6D07 95 B4
|
|
beq NmiHandler_Loop371 ; CPU:$ED09 PRG:6D09 F0 30
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: SubCED0B
|
|
; Global: The routine reads $02A2.
|
|
; Local: Executes 4 instructions: loads X with $00; branches on equal to
|
|
; NmiHandler_Loop369; loads X with $01; tests the bits of $02A2.
|
|
; Parameters: Reads $02A2 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
SubCED0B:
|
|
ldx #$00 ; CPU:$ED0B PRG:6D0B A2 00
|
|
beq NmiHandler_Loop369 ; CPU:$ED0D PRG:6D0D F0 05
|
|
ldx #$01 ; CPU:$ED0F PRG:6D0F A2 01
|
|
bit $02A2 ; CPU:$ED11 PRG:6D11 2C A2 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop369
|
|
; Global: The routine calls Sub_ED60, reads $02A2.
|
|
; Local: Executes 11 instructions: calls Sub_ED60; increments ZpB7,x; compares
|
|
; A with ZpB7,x; branches on not equal to NmiHandler_Loop371; loads A
|
|
; with $00; stores A to ZpB7,x; and 5 more instructions.
|
|
; Parameters: Reads $02A2 from the zero page and RAM; the values it acts on
|
|
; are those fields' contents.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop369:
|
|
jsr Sub_ED60 ; CPU:$ED14 PRG:6D14 20 60 ED
|
|
inc ZpB7,x ; CPU:$ED17 PRG:6D17 F6 B7
|
|
cmp ZpB7,x ; CPU:$ED19 PRG:6D19 D5 B7
|
|
bne NmiHandler_Loop371 ; CPU:$ED1B PRG:6D1B D0 1E
|
|
lda #$00 ; CPU:$ED1D PRG:6D1D A9 00
|
|
sta ZpB7,x ; CPU:$ED1F PRG:6D1F 95 B7
|
|
beq NmiHandler_Loop372 ; CPU:$ED21 PRG:6D21 F0 24
|
|
ldx #$00 ; CPU:$ED23 PRG:6D23 A2 00
|
|
beq NmiHandler_Loop370 ; CPU:$ED25 PRG:6D25 F0 05
|
|
ldx #$01 ; CPU:$ED27 PRG:6D27 A2 01
|
|
bit $02A2 ; CPU:$ED29 PRG:6D29 2C A2 02
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop370
|
|
; Global: The routine calls Sub_ED60.
|
|
; Local: Executes 7 instructions: calls Sub_ED60; increments ZpBA,x; compares
|
|
; A with ZpBA,x; branches on not equal to NmiHandler_Loop371; loads A
|
|
; with $00; stores A to ZpBA,x; and 1 more instruction.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop370:
|
|
jsr Sub_ED60 ; CPU:$ED2C PRG:6D2C 20 60 ED
|
|
inc ZpBA,x ; CPU:$ED2F PRG:6D2F F6 BA
|
|
cmp ZpBA,x ; CPU:$ED31 PRG:6D31 D5 BA
|
|
bne NmiHandler_Loop371 ; CPU:$ED33 PRG:6D33 D0 06
|
|
lda #$00 ; CPU:$ED35 PRG:6D35 A9 00
|
|
sta ZpBA,x ; CPU:$ED37 PRG:6D37 95 BA
|
|
beq NmiHandler_Loop372 ; CPU:$ED39 PRG:6D39 F0 0C
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop371
|
|
; Global: The routine calls NmiHandler_Loop363.
|
|
; Local: Executes 6 instructions: loads Y with $05; loads A from
|
|
; ((StarFieldPtrLo),y); clears the carry flag; adds $01 to A; stores
|
|
; A to ((StarFieldPtrLo),y); calls NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop371:
|
|
ldy #$05 ; CPU:$ED3B PRG:6D3B A0 05
|
|
lda (StarFieldPtrLo),y ; CPU:$ED3D PRG:6D3D B1 00
|
|
clc ; CPU:$ED3F PRG:6D3F 18
|
|
adc #$01 ; CPU:$ED40 PRG:6D40 69 01
|
|
sta (StarFieldPtrLo),y ; CPU:$ED42 PRG:6D42 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ED44 PRG:6D44 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop372
|
|
; Global: Reads the 16-bit pointer of the path table the current state selects.
|
|
; Local: Executes 4 instructions: calls Sub_ED60; loads Y with $05; stores A
|
|
; to ((StarFieldPtrLo),y); calls NmiHandler_Loop363.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, the RAM fields it writes.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop372:
|
|
jsr Sub_ED60 ; CPU:$ED47 PRG:6D47 20 60 ED
|
|
ldy #$05 ; CPU:$ED4A PRG:6D4A A0 05
|
|
sta (StarFieldPtrLo),y ; CPU:$ED4C PRG:6D4C 91 00
|
|
jmp NmiHandler_Loop363 ; CPU:$ED4E PRG:6D4E 4C 04 EC
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: GetPathTablePointer
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: loads A from PpuAddrLow; shifts a left;
|
|
; copies A into X; loads A from $EDA6,x; stores A to Zp02; loads A
|
|
; from $EDA7,x; and 2 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z and C flags, Zp02, Zp03.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
GetPathTablePointer:
|
|
lda PpuAddrLow ; CPU:$ED51 PRG:6D51 A5 04
|
|
asl a ; CPU:$ED53 PRG:6D53 0A
|
|
tax ; CPU:$ED54 PRG:6D54 AA
|
|
lda $EDA6,x ; CPU:$ED55 PRG:6D55 BD A6 ED
|
|
sta Zp02 ; CPU:$ED58 PRG:6D58 85 02
|
|
lda $EDA7,x ; CPU:$ED5A PRG:6D5A BD A7 ED
|
|
sta Zp03 ; CPU:$ED5D PRG:6D5D 85 03
|
|
rts ; CPU:$ED5F PRG:6D5F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_ED60
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 11 instructions: loads Y with $05; loads A from
|
|
; ((StarFieldPtrLo),y); copies A into Y; loads A from ((Zp02),y);
|
|
; pushes A; increments Y; and 5 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_ED60:
|
|
ldy #$05 ; CPU:$ED60 PRG:6D60 A0 05
|
|
lda (StarFieldPtrLo),y ; CPU:$ED62 PRG:6D62 B1 00
|
|
tay ; CPU:$ED64 PRG:6D64 A8
|
|
lda (Zp02),y ; CPU:$ED65 PRG:6D65 B1 02
|
|
pha ; CPU:$ED67 PRG:6D67 48
|
|
iny ; CPU:$ED68 PRG:6D68 C8
|
|
tya ; CPU:$ED69 PRG:6D69 98
|
|
ldy #$05 ; CPU:$ED6A PRG:6D6A A0 05
|
|
sta (StarFieldPtrLo),y ; CPU:$ED6C PRG:6D6C 91 00
|
|
pla ; CPU:$ED6E PRG:6D6E 68
|
|
rts ; CPU:$ED6F PRG:6D6F 60
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_ED70
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 8 instructions: copies A into X; loads Y with $05; stores Y
|
|
; to Zp1F; shifts a left; shifts a left; shifts a left; and 2 more
|
|
; instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A, X and Y, the N, Z, C and V flags, Zp1E, Zp1F, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_ED70:
|
|
tax ; CPU:$ED70 PRG:6D70 AA
|
|
ldy #$05 ; CPU:$ED71 PRG:6D71 A0 05
|
|
sty Zp1F ; CPU:$ED73 PRG:6D73 84 1F
|
|
asl a ; CPU:$ED75 PRG:6D75 0A
|
|
asl a ; CPU:$ED76 PRG:6D76 0A
|
|
asl a ; CPU:$ED77 PRG:6D77 0A
|
|
bcc NmiHandler_Loop373 ; CPU:$ED78 PRG:6D78 90 02
|
|
inc Zp1F ; CPU:$ED7A PRG:6D7A E6 1F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop373
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: clears the carry flag; adds $B0 to A; stores
|
|
; A to Zp1E; branches on carry clear to NmiHandler_Loop374;
|
|
; increments Zp1F.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and Y, the N, Z, C and V flags, Zp1E, Zp1F, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop373:
|
|
clc ; CPU:$ED7C PRG:6D7C 18
|
|
adc #$B0 ; CPU:$ED7D PRG:6D7D 69 B0
|
|
sta Zp1E ; CPU:$ED7F PRG:6D7F 85 1E
|
|
bcc NmiHandler_Loop374 ; CPU:$ED81 PRG:6D81 90 02
|
|
inc Zp1F ; CPU:$ED83 PRG:6D83 E6 1F
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_Loop374
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 5 instructions: loads A with $00; copies A into Y; stores A
|
|
; to ((Zp1E),y); stores A to $0580,x; returns with RTS.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and Y, the N and Z flags, $0580.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_Loop374:
|
|
lda #$00 ; CPU:$ED85 PRG:6D85 A9 00
|
|
tay ; CPU:$ED87 PRG:6D87 A8
|
|
sta (Zp1E),y ; CPU:$ED88 PRG:6D88 91 1E
|
|
sta $0580,x ; CPU:$ED8A PRG:6D8A 9D 80 05
|
|
rts ; CPU:$ED8D PRG:6D8D 60
|
|
; ---- data $ED8E-$F78F (2562 bytes) ----
|
|
; referenced by `lda $ED8E,x` at $EC17 (operand $ED8E falls inside this region)
|
|
; referenced by `lda $ED8F,x` at $EC1C (operand $ED8F falls inside this region)
|
|
; referenced by `lda $EDA6,x` at $ED55 (operand $EDA6 falls inside this region)
|
|
; referenced by `lda $EDA7,x` at $ED5A (operand $EDA7 falls inside this region)
|
|
EnemyPathSineTable:
|
|
.byte $07, $F2, $07, $80, $07, $14, $06, $AE, $06, $43, $05, $F4, $05, $9E, $05, $4E ; CPU:$ED8E PRG:6D8E 07 F2 07 80 07 14 06 AE 06 43 05 F4
|
|
EnemyPathHandlerPointerTable:
|
|
.byte $05, $02, $04, $BA, $04, $76, $04, $36, $FD, $ED, $66, $F0, $73, $F0, $15, $EE ; CPU:$ED9E PRG:6D9E 05 02 04 BA 04 76 04 36 FD ED 66 F0 73 F0 15 EE
|
|
.byte $5E, $EE, $A0, $EE, $0B, $EE, $9D, $EF, $AC, $EF, $BB, $EF, $CB, $EE, $39, $EF ; CPU:$EDAE PRG:6DAE 5E EE A0 EE 0B EE 9D EF AC EF BB EF
|
|
.byte $61, $EF, $42, $F1, $68, $F1, $8E, $F1, $D4, $F0, $FA, $F0, $20, $F1, $80, $F0 ; CPU:$EDBE PRG:6DBE 61 EF 42 F1 68 F1 8E F1 D4 F0 FA F0
|
|
.byte $A0, $F0, $C0, $F0, $EF, $F1, $20, $F2, $50, $F2, $8C, $EF, $F4, $ED, $CA, $EF ; CPU:$EDCE PRG:6DCE A0 F0 C0 F0 EF F1 20 F2 50 F2 8C EF
|
|
.byte $53, $F0, $22, $F0, $0C, $F0, $E8, $EF, $0B, $EF, $D9, $EF, $B0, $F1, $C4, $F1 ; CPU:$EDDE PRG:6DDE 53 F0 22 F0 0C F0 E8 EF 0B EF D9 EF
|
|
.byte $D3, $F1, $E1, $F1, $6A, $F2, $01, $C6, $7F, $28, $62, $24, $04, $14, $E8, $01 ; CPU:$EDEE PRG:6DEE D3 F1 E1 F1 6A F2 01 C6 7F 28 62 24
|
|
.byte $02, $7F, $40, $63, $2B, $3B, $04, $2B, $3B, $04, $6A, $14, $E8, $02, $B0, $7F ; CPU:$EDFE PRG:6DFE 02 7F 40 63 2B 3B 04 2B 3B 04 6A 14
|
|
.byte $40, $6C, $60, $EA, $38, $F9, $0F, $01, $4F, $7F, $40, $EF, $72, $51, $66, $1A ; CPU:$EE0E PRG:6E0E 40 6C 60 EA 38 F9 0F 01 4F 7F 40 EF
|
|
.byte $72, $2A, $66, $42, $72, $3A, $66, $1A, $72, $2A, $66, $03, $72, $52, $66, $1A ; CPU:$EE1E PRG:6E1E 72 2A 66 42 72 3A 66 1A 72 2A 66 03
|
|
.byte $72, $2A, $66, $42, $72, $3A, $66, $1A, $72, $52, $66, $13, $72, $1B, $66, $0B ; CPU:$EE2E PRG:6E2E 72 2A 66 42 72 3A 66 1A 72 52 66 13
|
|
.byte $72, $5A, $66, $52, $72, $42, $66, $32, $72, $2A, $66, $0A, $72, $0B, $66, $1B ; CPU:$EE3E PRG:6E3E 72 5A 66 52 72 42 66 32 72 2A 66 0A
|
|
.byte $72, $0B, $66, $52, $68, $03, $42, $2A, $52, $3A, $EA, $1B, $ED, $80, $2A, $E8 ; CPU:$EE4E PRG:6E4E 72 0B 66 52 68 03 42 2A 52 3A EA 1B
|
|
.byte $02, $4F, $7F, $40, $72, $3A, $66, $51, $72, $2A, $66, $02, $72, $1A, $66, $51 ; CPU:$EE5E PRG:6E5E 02 4F 7F 40 72 3A 66 51 72 2A 66 02
|
|
.byte $F3, $02, $19, $72, $02, $66, $12, $F9, $04, $72, $2A, $66, $52, $72, $5A, $66 ; CPU:$EE6E PRG:6E6E F3 02 19 72 02 66 12 F9 04 72 2A 66
|
|
.byte $52, $72, $42, $66, $32, $72, $2A, $66, $1A, $72, $0A, $66, $2A, $72, $32, $66 ; CPU:$EE7E PRG:6E7E 52 72 42 66 32 72 2A 66 1A 72 0A 66
|
|
.byte $42, $72, $32, $66, $1A, $68, $42, $2A, $02, $2A, $12, $EA, $1B, $ED, $80, $70 ; CPU:$EE8E PRG:6E8E 42 72 32 66 1A 68 42 2A 02 2A 12 EA
|
|
.byte $02, $E8, $03, $8C, $7F, $08, $78, $52, $72, $03, $66, $1B, $78, $13, $52, $1B ; CPU:$EE9E PRG:6E9E 02 E8 03 8C 7F 08 78 52 72 03 66 1B
|
|
.byte $72, $2B, $66, $43, $78, $3B, $2B, $33, $72, $2B, $66, $1B, $78, $0B, $33, $0C ; CPU:$EEAE PRG:6EAE 72 2B 66 43 78 3B 2B 33 72 2B 66 1B
|
|
.byte $72, $53, $66, $33, $78, $2B, $72, $53, $EE, $10, $66, $3B, $E8, $01, $44, $7F ; CPU:$EEBE PRG:6EBE 72 53 66 33 78 2B 72 53 EE 10 66 3B
|
|
.byte $20, $EF, $6F, $3B, $65, $3B, $6A, $3B, $74, $2B, $2B, $6A, $2B, $6F, $43, $65 ; CPU:$EECE PRG:6ECE 20 EF 6F 3B 65 3B 6A 3B 74 2B 2B 6A
|
|
.byte $43, $6A, $43, $74, $3B, $3B, $6A, $3B, $EA, $01, $65, $43, $6A, $43, $65, $43 ; CPU:$EEDE PRG:6EDE 43 6A 43 74 3B 3B 6A 3B EA 01 65 43
|
|
.byte $6A, $43, $65, $53, $6A, $53, $65, $53, $6A, $53, $53, $53, $65, $04, $6A, $04 ; CPU:$EEEE PRG:6EEE 6A 43 65 53 6A 53 65 53 6A 53 53 53
|
|
.byte $65, $04, $6A, $04, $04, $E9, $00, $EA, $07, $ED, $38, $F9, $44, $02, $07, $7F ; CPU:$EEFE PRG:6EFE 65 04 6A 04 04 E9 00 EA 07 ED 38 F9
|
|
.byte $38, $63, $1D, $15, $0D, $05, $5C, $54, $4C, $44, $3C, $34, $2C, $24, $1C, $14 ; CPU:$EF0E PRG:6F0E 38 63 1D 15 0D 05 5C 54 4C 44 3C 34
|
|
.byte $0C, $04, $5B, $53, $4B, $43, $3B, $33, $2B, $23, $1B, $13, $0B, $03, $5A, $52 ; CPU:$EF1E PRG:6F1E 0C 04 5B 53 4B 43 3B 33 2B 23 1B 13
|
|
.byte $4A, $42, $3A, $32, $2A, $22, $1A, $12, $0A, $02, $E8, $02, $49, $7F, $88, $74 ; CPU:$EF2E PRG:6F2E 4A 42 3A 32 2A 22 1A 12 0A 02 E8 02
|
|
.byte $1A, $51, $F1, $04, $05, $EA, $01, $65, $59, $6A, $59, $65, $59, $6A, $59, $65 ; CPU:$EF3E PRG:6F3E 1A 51 F1 04 05 EA 01 65 59 6A 59 65
|
|
.byte $0A, $6A, $0A, $65, $0A, $6A, $0A, $0A, $0A, $ED, $90, $EA, $0F, $74, $43, $6A ; CPU:$EF4E PRG:6F4E 0A 6A 0A 65 0A 6A 0A 0A 0A ED 90 EA
|
|
.byte $1B, $42, $E8, $03, $0A, $7F, $08, $EF, $65, $1B, $3B, $53, $1C, $F0, $08, $05 ; CPU:$EF5E PRG:6F5E 1B 42 E8 03 0A 7F 08 EF 65 1B 3B 53
|
|
.byte $65, $24, $6A, $24, $65, $24, $6A, $24, $65, $34, $6A, $34, $65, $34, $6A, $34 ; CPU:$EF6E PRG:6F6E 65 24 6A 24 65 24 6A 24 65 34 6A 34
|
|
.byte $34, $34, $EE, $0A, $65, $43, $04, $1C, $44, $44, $1C, $04, $43, $E8, $02, $4F ; CPU:$EF7E PRG:6F7E 34 34 EE 0A 65 43 04 1C 44 44 1C 04
|
|
.byte $7F, $48, $EF, $64, $52, $03, $F0, $02, $06, $1B, $2B, $F0, $02, $0B, $E8, $01 ; CPU:$EF8E PRG:6F8E 7F 48 EF 64 52 03 F0 02 06 1B 2B F0
|
|
.byte $8F, $7F, $C8, $75, $2B, $67, $2B, $33, $43, $ED, $A0, $75, $53, $E8, $02, $CF ; CPU:$EF9E PRG:6F9E 8F 7F C8 75 2B 67 2B 33 43 ED A0 75
|
|
.byte $7F, $C8, $75, $03, $67, $03, $0B, $1B, $ED, $A0, $75, $2B, $E8, $03, $36, $7F ; CPU:$EFAE PRG:6FAE 7F C8 75 03 67 03 0B 1B ED A0 75 2B
|
|
.byte $08, $75, $4B, $67, $4B, $53, $04, $EE, $58, $75, $14, $E8, $02, $44, $7F, $28 ; CPU:$EFBE PRG:6FBE 08 75 4B 67 4B 53 04 EE 58 75 14 E8
|
|
.byte $62, $53, $3B, $4B, $2B, $3B, $1B, $2B, $13, $F9, $05, $01, $44, $7F, $28, $62 ; CPU:$EFCE PRG:6FCE 62 53 3B 4B 2B 3B 1B 2B 13 F9 05 01
|
|
.byte $1B, $33, $4B, $04, $1C, $04, $4B, $33, $F9, $05, $02, $7F, $7F, $28, $61, $53 ; CPU:$EFDE PRG:6FDE 1B 33 4B 04 1C 04 4B 33 F9 05 02 7F
|
|
.byte $5B, $04, $62, $14, $0C, $61, $04, $5C, $EA, $0F, $63, $53, $EA, $3F, $61, $1B ; CPU:$EFEE PRG:6FEE 5B 04 62 14 0C 61 04 5C EA 0F 63 53
|
|
.byte $23, $2B, $33, $3B, $33, $2B, $23, $1B, $13, $0B, $EA, $0F, $03, $E8, $02, $87 ; CPU:$EFFE PRG:6FFE 23 2B 33 3B 33 2B 23 1B 13 0B EA 0F
|
|
.byte $7F, $28, $61, $2B, $3B, $4B, $53, $04, $14, $24, $67, $2C, $61, $0C, $04, $5B ; CPU:$F00E PRG:700E 7F 28 61 2B 3B 4B 53 04 14 24 67 2C
|
|
.byte $53, $4B, $43, $E8, $03, $08, $7F, $08, $61, $42, $4A, $62, $52, $61, $5A, $03 ; CPU:$F01E PRG:701E 53 4B 43 E8 03 08 7F 08 61 42 4A 62
|
|
.byte $62, $0B, $61, $13, $1B, $64, $23, $61, $52, $5A, $62, $03, $61, $0B, $13, $62 ; CPU:$F02E PRG:702E 62 0B 61 13 1B 64 23 61 52 5A 62 03
|
|
.byte $1B, $61, $23, $2B, $65, $33, $61, $03, $0B, $62, $1B, $61, $1B, $23, $62, $2B ; CPU:$F03E PRG:703E 1B 61 23 2B 65 33 61 03 0B 62 1B 61
|
|
.byte $61, $33, $3B, $43, $E8, $03, $08, $7F, $08, $61, $03, $0B, $62, $13, $61, $1B ; CPU:$F04E PRG:704E 61 33 3B 43 E8 03 08 7F 08 61 03 0B
|
|
.byte $23, $62, $2B, $61, $33, $3B, $43, $E8, $01, $03, $7F, $40, $66, $3B, $2B, $3B ; CPU:$F05E PRG:705E 23 62 2B 61 33 3B 43 E8 01 03 7F 40
|
|
.byte $53, $14, $72, $2C, $E8, $02, $03, $7F, $40, $66, $2B, $13, $2B, $3B, $53, $72 ; CPU:$F06E PRG:706E 53 14 72 2C E8 02 03 7F 40 66 2B 13
|
|
.byte $14, $E8, $01, $8F, $7F, $A8, $65, $3B, $1B, $2B, $13, $1B, $03, $13, $5A, $03 ; CPU:$F07E PRG:707E 14 E8 01 8F 7F A8 65 3B 1B 2B 13 1B
|
|
.byte $3A, $3A, $2A, $1A, $12, $02, $59, $02, $12, $1A, $2A, $1A, $3A, $4A, $5A, $74 ; CPU:$F08E PRG:708E 3A 3A 2A 1A 12 02 59 02 12 1A 2A 1A
|
|
.byte $03, $E8, $02, $4F, $7F, $A8, $65, $1B, $03, $13, $5A, $03, $4A, $5A, $3A, $3A ; CPU:$F09E PRG:709E 03 E8 02 4F 7F A8 65 1B 03 13 5A 03
|
|
.byte $1A, $1A, $12, $02, $59, $49, $39, $39, $41, $49, $59, $02, $12, $1A, $2A, $74 ; CPU:$F0AE PRG:70AE 1A 1A 12 02 59 49 39 39 41 49 59 02
|
|
.byte $3A, $E8, $03, $30, $7F, $08, $6A, $04, $14, $1C, $14, $04, $5B, $4B, $5B, $04 ; CPU:$F0BE PRG:70BE 3A E8 03 30 7F 08 6A 04 14 1C 14 04
|
|
.byte $43, $3B, $1B, $74, $04, $E8, $01, $8F, $7F, $88, $66, $3B, $23, $2B, $13, $23 ; CPU:$F0CE PRG:70CE 43 3B 1B 74 04 E8 01 8F 7F 88 66 3B
|
|
.byte $03, $13, $5A, $03, $3A, $4A, $2A, $22, $12, $02, $59, $02, $22, $12, $2A, $22 ; CPU:$F0DE PRG:70DE 03 13 5A 03 3A 4A 2A 22 12 02 59 02
|
|
.byte $3A, $2A, $4A, $3A, $03, $5A, $03, $13, $3A, $4A, $5A, $E8, $02, $4F, $7F, $88 ; CPU:$F0EE PRG:70EE 3A 2A 4A 3A 03 5A 03 13 3A 4A 5A E8
|
|
.byte $66, $23, $03, $13, $5A, $03, $4A, $5A, $3A, $4A, $22, $2A, $12, $02, $59, $49 ; CPU:$F0FE PRG:70FE 66 23 03 13 5A 03 4A 5A 3A 4A 22 2A
|
|
.byte $39, $39, $02, $59, $12, $02, $22, $12, $2A, $22, $3A, $2A, $4A, $3A, $2A, $22 ; CPU:$F10E PRG:710E 39 39 02 59 12 02 22 12 2A 22 3A 2A
|
|
.byte $12, $E8, $03, $AD, $7F, $08, $6C, $03, $3B, $72, $04, $66, $3B, $2B, $23, $13 ; CPU:$F11E PRG:711E 12 E8 03 AD 7F 08 6C 03 3B 72 04 66
|
|
.byte $6C, $03, $72, $13, $6C, $23, $2B, $3B, $4B, $3B, $66, $2B, $23, $13, $5A, $03 ; CPU:$F12E PRG:712E 6C 03 72 13 6C 23 2B 3B 4B 3B 66 2B
|
|
.byte $EE, $2A, $13, $E8, $01, $8F, $7F, $88, $66, $3B, $1B, $2B, $13, $1B, $03, $13 ; CPU:$F13E PRG:713E EE 2A 13 E8 01 8F 7F 88 66 3B 1B 2B
|
|
.byte $5A, $03, $3A, $42, $2A, $1A, $12, $02, $59, $02, $1A, $12, $2A, $1A, $3A, $2A ; CPU:$F14E PRG:714E 5A 03 3A 42 2A 1A 12 02 59 02 1A 12
|
|
.byte $42, $3A, $03, $5A, $03, $13, $3A, $4A, $5A, $E8, $02, $8F, $7F, $88, $66, $1B ; CPU:$F15E PRG:715E 42 3A 03 5A 03 13 3A 4A 5A E8 02 8F
|
|
.byte $03, $13, $5A, $03, $4A, $5A, $3A, $42, $1A, $2A, $12, $02, $59, $49, $39, $39 ; CPU:$F16E PRG:716E 03 13 5A 03 4A 5A 3A 42 1A 2A 12 02
|
|
.byte $02, $59, $12, $02, $1A, $12, $2A, $1A, $3A, $2A, $42, $3A, $2A, $1A, $12, $E8 ; CPU:$F17E PRG:717E 02 59 12 02 1A 12 2A 1A 3A 2A 42 3A
|
|
.byte $03, $AD, $7F, $08, $6C, $03, $3B, $72, $04, $66, $3B, $2B, $1B, $13, $6C, $03 ; CPU:$F18E PRG:718E 03 AD 7F 08 6C 03 3B 72 04 66 3B 2B
|
|
.byte $72, $13, $6C, $1B, $2B, $3B, $43, $3B, $66, $2B, $1B, $13, $5A, $03, $EE, $2A ; CPU:$F19E PRG:719E 72 13 6C 1B 2B 3B 43 3B 66 2B 1B 13
|
|
.byte $13, $E8, $01, $47, $7F, $18, $61, $1D, $15, $0D, $05, $5C, $4C, $3C, $2C, $1C ; CPU:$F1AE PRG:71AE 13 E8 01 47 7F 18 61 1D 15 0D 05 5C
|
|
.byte $0C, $5B, $4B, $3B, $2B, $E8, $04, $1F, $7F, $40, $0A, $67, $1E, $1E, $EA, $0B ; CPU:$F1BE PRG:71BE 0C 5B 4B 3B 2B E8 04 1F 7F 40 0A 67
|
|
.byte $6A, $1E, $1E, $1E, $E8, $02, $93, $ED, $30, $77, $21, $39, $21, $41, $39, $59 ; CPU:$F1CE PRG:71CE 6A 1E 1E 1E E8 02 93 ED 30 77 21 39
|
|
.byte $41, $02, $E8, $02, $93, $F5, $30, $77, $13, $4A, $03, $42, $4A, $2A, $42, $22 ; CPU:$F1DE PRG:71DE 41 02 E8 02 93 F5 30 77 13 4A 03 42
|
|
.byte $E8, $01, $82, $7F, $F8, $EF, $78, $13, $52, $3A, $1A, $72, $60, $66, $13, $72 ; CPU:$F1EE PRG:71EE E8 01 82 7F F8 EF 78 13 52 3A 1A 72
|
|
.byte $52, $66, $3A, $68, $1A, $3A, $52, $32, $4A, $03, $78, $42, $03, $1B, $2B, $72 ; CPU:$F1FE PRG:71FE 52 66 3A 68 1A 3A 52 32 4A 03 78 42
|
|
.byte $60, $66, $33, $72, $1B, $66, $5A, $68, $42, $32, $1A, $5A, $32, $1B, $F0, $03 ; CPU:$F20E PRG:720E 60 66 33 72 1B 66 5A 68 42 32 1A 5A
|
|
.byte $05, $E8, $02, $82, $7F, $F8, $78, $52, $3A, $1A, $12, $72, $60, $66, $51, $72 ; CPU:$F21E PRG:721E 05 E8 02 82 7F F8 78 52 3A 1A 12 72
|
|
.byte $3A, $66, $1A, $68, $12, $1A, $3A, $1A, $32, $42, $78, $2A, $42, $03, $1B, $72 ; CPU:$F22E PRG:722E 3A 66 1A 68 12 1A 3A 1A 32 42 78 2A
|
|
.byte $60, $66, $1B, $72, $5A, $66, $42, $68, $3A, $1A, $59, $42, $32, $59, $F1, $03 ; CPU:$F23E PRG:723E 60 66 1B 72 5A 66 42 68 3A 1A 59 42
|
|
.byte $04, $E8, $03, $FE, $7F, $08, $C0, $14, $90, $14, $78, $53, $14, $C0, $04, $90 ; CPU:$F24E PRG:724E 04 E8 03 FE 7F 08 C0 14 90 14 78 53
|
|
.byte $5B, $78, $1C, $EE, $40, $2C, $EE, $FE, $F2, $03, $04, $E8, $02, $47, $7F, $18 ; CPU:$F25E PRG:725E 5B 78 1C EE 40 2C EE FE F2 03 04 E8
|
|
.byte $63, $53, $F9, $05, $E2, $06, $E0, $00, $E1, $B7, $E3, $60, $10, $C5, $92, $C9 ; CPU:$F26E PRG:726E 63 53 F9 05 E2 06 E0 00 E1 B7 E3 60
|
|
.byte $89, $E7, $C9, $89, $E6, $01, $E2, $06, $E0, $00, $E1, $B7, $E3, $80, $10, $C5 ; CPU:$F27E PRG:727E 89 E7 C9 89 E6 01 E2 06 E0 00 E1 B7
|
|
.byte $95, $E5, $C9, $89, $E4, $E7, $C9, $89, $E5, $E6, $01, $E2, $06, $E0, $00, $E1 ; CPU:$F28E PRG:728E 95 E5 C9 89 E4 E7 C9 89 E5 E6 01 E2
|
|
.byte $A7, $E3, $60, $11, $C5, $91, $E5, $C9, $85, $E7, $C9, $85, $E4, $E6, $01, $E2 ; CPU:$F29E PRG:729E A7 E3 60 11 C5 91 E5 C9 85 E7 C9 85
|
|
.byte $0C, $E0, $50, $E1, $FF, $E3, $60, $0E, $C2, $8C, $92, $C2, $14, $E7, $CA, $49 ; CPU:$F2AE PRG:72AE 0C E0 50 E1 FF E3 60 0E C2 8C 92 C2
|
|
.byte $E6, $01, $E2, $0C, $E0, $50, $E1, $FF, $E3, $60, $0E, $C2, $8C, $92, $C2, $14 ; CPU:$F2BE PRG:72BE E6 01 E2 0C E0 50 E1 FF E3 60 0E C2
|
|
.byte $E7, $E4, $CA, $49, $E5, $E6, $01, $E2, $0C, $E0, $40, $E1, $FF, $E3, $80, $10 ; CPU:$F2CE PRG:72CE E7 E4 CA 49 E5 E6 01 E2 0C E0 40 E1
|
|
.byte $C2, $90, $E5, $92, $C2, $14, $E3, $40, $E7, $CA, $45, $E4, $E6, $01, $E6, $0B ; CPU:$F2DE PRG:72DE C2 90 E5 92 C2 14 E3 40 E7 CA 45 E4
|
|
.byte $E3, $00, $EC, $0A, $ED, $0A, $E3, $20, $EA, $1A, $E6, $0B, $E3, $20, $CB, $42 ; CPU:$F2EE PRG:72EE E3 00 EC 0A ED 0A E3 20 EA 1A E6 0B
|
|
.byte $46, $46, $E6, $0A, $6C, $C3, $46, $EC, $06, $ED, $EA, $2F, $E6, $0B, $E3, $20 ; CPU:$F2FE PRG:72FE 46 46 E6 0A 6C C3 46 EC 06 ED EA 2F
|
|
.byte $CB, $42, $46, $E6, $0A, $6C, $C4, $46, $EC, $14, $ED, $0C, $EA, $2F, $CB, $42 ; CPU:$F30E PRG:730E CB 42 46 E6 0A 6C C4 46 EC 14 ED 0C
|
|
.byte $C1, $46, $E6, $0A, $6C, $C3, $46, $08, $90, $9A, $97, $93, $8F, $8C, $88, $88 ; CPU:$F31E PRG:731E C1 46 E6 0A 6C C3 46 08 90 9A 97 93
|
|
.byte $E6, $0C, $E3, $60, $E6, $01, $E3, $20, $E2, $00, $CB, $42, $C1, $46, $E6, $0A ; CPU:$F32E PRG:732E E6 0C E3 60 E6 01 E3 20 E2 00 CB 42
|
|
.byte $6C, $C3, $46, $08, $90, $9A, $97, $93, $8F, $8C, $CB, $88, $E8, $CC, $88, $88 ; CPU:$F33E PRG:733E 6C C3 46 08 90 9A 97 93 8F 8C CB 88
|
|
.byte $E6, $0A, $E8, $E9, $E2, $09, $EB, $0E, $4A, $49, $49, $4E, $53, $4E, $52, $C2 ; CPU:$F34E PRG:734E E6 0A E8 E9 E2 09 EB 0E 4A 49 49 4E
|
|
.byte $14, $92, $14, $8D, $8C, $91, $14, $CB, $88, $E8, $CC, $88, $08, $E6, $0A, $E8 ; CPU:$F35E PRG:735E 14 92 14 8D 8C 91 14 CB 88 E8 CC 88
|
|
.byte $E9, $EA, $24, $E2, $00, $E3, $20, $CB, $42, $C2, $46, $E6, $0A, $4C, $46, $17 ; CPU:$F36E PRG:736E E9 EA 24 E2 00 E3 20 CB 42 C2 46 E6
|
|
.byte $1E, $C5, $85, $45, $45, $46, $46, $50, $10, $86, $86, $86, $88, $E6, $0A, $E8 ; CPU:$F37E PRG:737E 1E C5 85 45 45 46 46 50 10 86 86 86
|
|
.byte $E9, $E8, $EB, $E2, $09, $C2, $0C, $C3, $4A, $4E, $5C, $1E, $88, $86, $86, $86 ; CPU:$F38E PRG:738E E9 E8 EB E2 09 C2 0C C3 4A 4E 5C 1E
|
|
.byte $8D, $45, $46, $45, $46, $49, $51, $8A, $C4, $85, $E6, $0A, $E8, $E9, $E8, $E2 ; CPU:$F39E PRG:739E 8D 45 46 45 46 49 51 8A C4 85 E6 0A
|
|
.byte $09, $0C, $C3, $4A, $4E, $52, $56, $14, $50, $14, $99, $88, $C4, $84, $86, $86 ; CPU:$F3AE PRG:73AE 09 0C C3 4A 4E 52 56 14 50 14 99 88
|
|
.byte $C4, $46, $4D, $C2, $85, $96, $E6, $0A, $E8, $E9, $E8, $E3, $20, $E2, $09, $C2 ; CPU:$F3BE PRG:73BE C4 46 4D C2 85 96 E6 0A E8 E9 E8 E3
|
|
.byte $0C, $C3, $4A, $4E, $5C, $1E, $88, $86, $86, $86, $8D, $45, $46, $45, $46, $49 ; CPU:$F3CE PRG:73CE 0C C3 4A 4E 5C 1E 88 86 86 86 8D 45
|
|
.byte $51, $8A, $C4, $85, $E6, $0A, $E8, $E9, $E8, $EA, $23, $E2, $00, $E3, $20, $CB ; CPU:$F3DE PRG:73DE 51 8A C4 85 E6 0A E8 E9 E8 EA 23 E2
|
|
.byte $44, $16, $4E, $17, $D7, $46, $0F, $51, $55, $14, $9E, $9E, $88, $E6, $0A, $D8 ; CPU:$F3EE PRG:73EE 44 16 4E 17 D7 46 0F 51 55 14 9E 9E
|
|
.byte $EB, $E6, $0A, $E8, $E9, $E8, $EA, $22, $E2, $00, $E3, $20, $C5, $44, $C7, $45 ; CPU:$F3FE PRG:73FE EB E6 0A E8 E9 E8 EA 22 E2 00 E3 20
|
|
.byte $C5, $10, $0D, $E3, $00, $C1, $84, $E6, $05, $E3, $20, $10, $E6, $0A, $E8, $E9 ; CPU:$F40E PRG:740E C5 10 0D E3 00 C1 84 E6 05 E3 20 10
|
|
.byte $E8, $EB, $E2, $09, $10, $47, $46, $45, $4B, $54, $4E, $18, $D7, $46, $C3, $13 ; CPU:$F41E PRG:741E E8 EB E2 09 10 47 46 45 4B 54 4E 18
|
|
.byte $9E, $9E, $88, $E6, $0A, $E8, $E9, $E8, $EA, $22, $E3, $00, $C5, $0F, $E3, $20 ; CPU:$F42E PRG:742E 9E 9E 88 E6 0A E8 E9 E8 EA 22 E3 00
|
|
.byte $04, $C5, $84, $E6, $01, $E3, $00, $C7, $0F, $E3, $20, $CB, $44, $16, $4E, $17 ; CPU:$F43E PRG:743E 04 C5 84 E6 01 E3 00 C7 0F E3 20 CB
|
|
.byte $D7, $46, $0F, $51, $55, $14, $94, $14, $9D, $8E, $E6, $0A, $E8, $E6, $09, $E2 ; CPU:$F44E PRG:744E D7 46 0F 51 55 14 94 14 9D 8E E6 0A
|
|
.byte $00, $E3, $20, $CB, $44, $16, $4E, $17, $D7, $46, $0F, $51, $55, $14, $9E, $9E ; CPU:$F45E PRG:745E 00 E3 20 CB 44 16 4E 17 D7 46 0F 51
|
|
.byte $88, $E6, $0A, $E8, $E9, $E8, $EB, $E2, $0C, $10, $E2, $09, $10, $47, $46, $45 ; CPU:$F46E PRG:746E 88 E6 0A E8 E9 E8 EB E2 0C 10 E2 09
|
|
.byte $4B, $54, $4E, $18, $D7, $46, $C3, $13, $9E, $9E, $88, $E6, $0A, $E8, $E9, $E8 ; CPU:$F47E PRG:747E 4B 54 4E 18 D7 46 C3 13 9E 9E 88 E6
|
|
.byte $EA, $28, $E0, $54, $E1, $FF, $E2, $0C, $E3, $60, $CA, $08, $8E, $14, $97, $94 ; CPU:$F48E PRG:748E EA 28 E0 54 E1 FF E2 0C E3 60 CA 08
|
|
.byte $91, $8E, $8C, $8A, $C3, $88, $8A, $8C, $8E, $90, $88, $E6, $04, $E0, $00, $E1 ; CPU:$F49E PRG:749E 91 8E 8C 8A C3 88 8A 8C 8E 90 88 E6
|
|
.byte $B7, $E2, $06, $E3, $60, $1F, $97, $92, $14, $94, $14, $97, $8F, $90, $C2, $10 ; CPU:$F4AE PRG:74AE B7 E2 06 E3 60 1F 97 92 14 94 14 97
|
|
.byte $CB, $83, $C4, $10, $C9, $86, $E6, $04, $E0, $54, $E1, $FF, $E2, $0C, $E3, $60 ; CPU:$F4BE PRG:74BE CB 83 C4 10 C9 86 E6 04 E0 54 E1 FF
|
|
.byte $CC, $08, $90, $10, $10, $E3, $00, $CB, $81, $E3, $60, $10, $10, $10, $48, $E6 ; CPU:$F4CE PRG:74CE CC 08 90 10 10 E3 00 CB 81 E3 60 10
|
|
.byte $04, $E0, $00, $E1, $B7, $E2, $06, $E3, $60, $1E, $C4, $10, $D7, $95, $E6, $04 ; CPU:$F4DE PRG:74DE 04 E0 00 E1 B7 E2 06 E3 60 1E C4 10
|
|
.byte $E0, $54, $E1, $FF, $E2, $0C, $E3, $60, $18, $C4, $10, $06, $C4, $8C, $86, $E3 ; CPU:$F4EE PRG:74EE E0 54 E1 FF E2 0C E3 60 18 C4 10 06
|
|
.byte $00, $CB, $81, $E3, $60, $06, $C4, $4C, $4E, $E6, $04, $E0, $54, $E1, $FF, $E2 ; CPU:$F4FE PRG:74FE 00 CB 81 E3 60 06 C4 4C 4E E6 04 E0
|
|
.byte $0C, $E3, $60, $18, $C4, $10, $06, $C4, $4C, $46, $E3, $00, $CB, $41, $E3, $60 ; CPU:$F50E PRG:750E 0C E3 60 18 C4 10 06 C4 4C 46 E3 00
|
|
.byte $06, $C4, $8C, $8E, $E6, $04, $E0, $00, $E1, $B7, $E2, $06, $E3, $60, $C3, $14 ; CPU:$F51E PRG:751E 06 C4 8C 8E E6 04 E0 00 E1 B7 E2 06
|
|
.byte $E3, $00, $CB, $81, $E3, $60, $07, $C5, $50, $C3, $10, $CB, $49, $1C, $E3, $00 ; CPU:$F52E PRG:752E E3 00 CB 81 E3 60 07 C5 50 C3 10 CB
|
|
.byte $C5, $81, $E3, $60, $E6, $04, $E0, $50, $E1, $FF, $E2, $0C, $E3, $60, $18, $E3 ; CPU:$F53E PRG:753E C5 81 E3 60 E6 04 E0 50 E1 FF E2 0C
|
|
.byte $00, $C5, $41, $E3, $60, $02, $CB, $85, $CB, $45, $D7, $85, $CB, $45, $CA, $85 ; CPU:$F54E PRG:754E 00 C5 41 E3 60 02 CB 85 CB 45 D7 85
|
|
.byte $81, $E3, $00, $C5, $41, $E3, $60, $E6, $04, $E0, $50, $E1, $FF, $E2, $0C, $E3 ; CPU:$F55E PRG:755E 81 E3 00 C5 41 E3 60 E6 04 E0 50 E1
|
|
.byte $60, $18, $E3, $00, $C5, $81, $E3, $60, $02, $CB, $45, $CB, $85, $D7, $45, $CB ; CPU:$F56E PRG:756E 60 18 E3 00 C5 81 E3 60 02 CB 45 CB
|
|
.byte $85, $CA, $45, $41, $E3, $00, $C5, $81, $E3, $60, $E6, $04, $E0, $00, $E1, $B7 ; CPU:$F57E PRG:757E 85 CA 45 41 E3 00 C5 81 E3 60 E6 04
|
|
.byte $E2, $03, $E3, $60, $16, $92, $99, $14, $4E, $47, $C6, $46, $C2, $4C, $48, $C6 ; CPU:$F58E PRG:758E E2 03 E3 60 16 92 99 14 4E 47 C6 46
|
|
.byte $44, $48, $C2, $4C, $48, $4B, $C3, $4A, $45, $46, $48, $C2, $4C, $48, $C6, $44 ; CPU:$F59E PRG:759E 44 48 C2 4C 48 4B C3 4A 45 46 48 C2
|
|
.byte $48, $C2, $4C, $48, $4B, $C3, $4A, $45, $46, $48, $C2, $4C, $48, $C6, $44, $48 ; CPU:$F5AE PRG:75AE 48 C2 4C 48 4B C3 4A 45 46 48 C2 4C
|
|
.byte $C2, $4C, $48, $46, $44, $43, $46, $46, $46, $47, $4E, $59, $14, $92, $86, $E6 ; CPU:$F5BE PRG:75BE C2 4C 48 46 44 43 46 46 46 47 4E 59
|
|
.byte $04, $E0, $50, $E1, $00, $E2, $12, $E3, $60, $CB, $91, $CB, $8D, $CB, $8B, $CB ; CPU:$F5CE PRG:75CE 04 E0 50 E1 00 E2 12 E3 60 CB 91 CB
|
|
.byte $89, $CB, $86, $CB, $84, $E3, $00, $C2, $44, $20, $E3, $60, $E6, $04, $E0, $00 ; CPU:$F5DE PRG:75DE 89 CB 86 CB 84 E3 00 C2 44 20 E3 60
|
|
.byte $E1, $B7, $E2, $06, $E3, $60, $0C, $8F, $9B, $14, $94, $14, $0F, $5A, $4E, $CC ; CPU:$F5EE PRG:75EE E1 B7 E2 06 E3 60 0C 8F 9B 14 94 14
|
|
.byte $47, $4E, $5A, $4F, $0F, $9A, $8E, $CC, $87, $8E, $9A, $8F, $16, $9E, $88, $CC ; CPU:$F5FE PRG:75FE 47 4E 5A 4F 0F 9A 8E CC 87 8E 9A 8F
|
|
.byte $89, $88, $9E, $96, $14, $14, $9B, $14, $8F, $84, $E6, $04, $E0, $50, $E1, $FF ; CPU:$F60E PRG:760E 89 88 9E 96 14 14 9B 14 8F 84 E6 04
|
|
.byte $E2, $0C, $E3, $60, $10, $1C, $E3, $00, $C5, $81, $E3, $60, $10, $0C, $E3, $00 ; CPU:$F61E PRG:761E E2 0C E3 60 10 1C E3 00 C5 81 E3 60
|
|
.byte $C5, $41, $E3, $60, $10, $14, $E3, $00, $C5, $81, $E3, $60, $10, $0C, $E3, $00 ; CPU:$F62E PRG:762E C5 41 E3 60 10 14 E3 00 C5 81 E3 60
|
|
.byte $C5, $41, $E3, $60, $10, $14, $E3, $00, $C5, $81, $E3, $60, $10, $0C, $E3, $00 ; CPU:$F63E PRG:763E C5 41 E3 60 10 14 E3 00 C5 81 E3 60
|
|
.byte $C5, $41, $E3, $60, $10, $14, $E3, $00, $C5, $81, $E3, $60, $E6, $04, $E0, $00 ; CPU:$F64E PRG:764E C5 41 E3 60 10 14 E3 00 C5 81 E3 60
|
|
.byte $E1, $B7, $E2, $06, $E3, $60, $18, $92, $C6, $10, $8C, $84, $C4, $82, $84, $8C ; CPU:$F65E PRG:765E E1 B7 E2 06 E3 60 18 92 C6 10 8C 84
|
|
.byte $90, $10, $90, $12, $52, $48, $44, $C4, $42, $44, $48, $52, $52, $0E, $8E, $86 ; CPU:$F66E PRG:766E 90 10 90 12 52 48 44 C4 42 44 48 52
|
|
.byte $83, $C4, $82, $83, $86, $8E, $8E, $0E, $4E, $46, $43, $C4, $42, $43, $46, $4B ; CPU:$F67E PRG:767E 83 C4 82 83 86 8E 8E 0E 4E 46 43 C4
|
|
.byte $46, $E3, $00, $C5, $81, $E3, $60, $E6, $04, $E0, $50, $E1, $FF, $E2, $0C, $E3 ; CPU:$F68E PRG:768E 46 E3 00 C5 81 E3 60 E6 04 E0 50 E1
|
|
.byte $60, $10, $10, $E3, $00, $C5, $41, $E3, $60, $C6, $08, $E3, $00, $C8, $81, $E3 ; CPU:$F69E PRG:769E 60 10 10 E3 00 C5 41 E3 60 C6 08 E3
|
|
.byte $60, $D0, $0C, $E3, $00, $C8, $41, $E3, $60, $E6, $04, $E0, $00, $E1, $B7, $E2 ; CPU:$F6AE PRG:76AE 60 D0 0C E3 00 C8 41 E3 60 E6 04 E0
|
|
.byte $06, $E3, $60, $0C, $C5, $84, $C4, $10, $18, $C9, $44, $C2, $10, $C7, $86, $C2 ; CPU:$F6BE PRG:76BE 06 E3 60 0C C5 84 C4 10 18 C9 44 C2
|
|
.byte $10, $C9, $44, $18, $C4, $10, $C5, $84, $E6, $04, $E0, $50, $E1, $FF, $E2, $0C ; CPU:$F6CE PRG:76CE 10 C9 44 18 C4 10 C5 84 E6 04 E0 50
|
|
.byte $E3, $60, $C8, $08, $E4, $08, $4D, $4B, $48, $C4, $47, $48, $4B, $4D, $50, $4D ; CPU:$F6DE PRG:76DE E3 60 C8 08 E4 08 4D 4B 48 C4 47 48
|
|
.byte $4B, $48, $C4, $47, $48, $4B, $4D, $56, $E5, $93, $10, $90, $8E, $98, $91, $E5 ; CPU:$F6EE PRG:76EE 4B 48 C4 47 48 4B 4D 56 E5 93 10 90
|
|
.byte $C1, $83, $84, $85, $86, $88, $8C, $88, $86, $85, $84, $C2, $83, $84, $85, $86 ; CPU:$F6FE PRG:76FE C1 83 84 85 86 88 8C 88 86 85 84 C2
|
|
.byte $88, $8C, $88, $86, $85, $84, $E4, $92, $E6, $04, $E0, $40, $E1, $FF, $E2, $0C ; CPU:$F70E PRG:770E 88 8C 88 86 85 84 E4 92 E6 04 E0 40
|
|
.byte $E3, $60, $C8, $08, $E5, $06, $48, $46, $45, $44, $C2, $43, $44, $45, $46, $48 ; CPU:$F71E PRG:771E E3 60 C8 08 E5 06 48 46 45 44 C2 43
|
|
.byte $4C, $48, $46, $45, $44, $C2, $43, $44, $45, $46, $48, $56, $E4, $96, $E4, $10 ; CPU:$F72E PRG:772E 4C 48 46 45 44 C2 43 44 45 46 48 56
|
|
.byte $92, $94, $90, $10, $95, $C1, $85, $87, $88, $8B, $8D, $90, $8D, $8B, $88, $C4 ; CPU:$F73E PRG:773E 92 94 90 10 95 C1 85 87 88 8B 8D 90
|
|
.byte $87, $88, $8B, $8D, $90, $8D, $8B, $88, $87, $87, $E5, $19, $12, $E6, $04, $E0 ; CPU:$F74E PRG:774E 87 88 8B 8D 90 8D 8B 88 87 87 E5 19
|
|
.byte $00, $E1, $A7, $E2, $06, $E3, $60, $1C, $95, $14, $9E, $96, $14, $93, $E5, $D7 ; CPU:$F75E PRG:775E 00 E1 A7 E2 06 E3 60 1C 95 14 9E 96
|
|
.byte $89, $E4, $13, $4C, $14, $4E, $E6, $04, $E0, $00, $E1, $B7, $E2, $06, $E3, $60 ; CPU:$F76E PRG:776E 89 E4 13 4C 14 4E E6 04 E0 00 E1 B7
|
|
.byte $1D, $9A, $14, $8F, $14, $99, $14, $97, $E4, $D7, $8D, $E5, $06, $51, $14, $4C ; CPU:$F77E PRG:777E 1D 9A 14 8F 14 99 14 97 E4 D7 8D E5
|
|
.byte $E6, $04 ; CPU:$F78E PRG:778E E6 04
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: Sub_F790
|
|
; Global: The routine reads no RAM field, writes none and calls nothing - it
|
|
; is a straight-line sequence whose only effect is on the registers
|
|
; and the flags.
|
|
; Local: Executes 2 instructions: loads X with $00; stores X to
|
|
; StarFieldPtrLo.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Falls through to the next routine in the source; it has no return
|
|
; of its own.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp6E, Zp6F, $04C0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
Sub_F790:
|
|
ldx #$00 ; CPU:$F790 PRG:7790 A2 00
|
|
stx StarFieldPtrLo ; CPU:$F792 PRG:7792 86 00
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnNonzero64
|
|
; Global: The routine calls Sub_C317.
|
|
; Local: Executes 6 instructions: loads A from $F7B4,x; stores A to $04C0,x;
|
|
; calls Sub_C317; increments X; compares X with $2A; branches on not
|
|
; equal to NmiHandler_OnNonzero64.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Leaves through one of its branches rather than a return; the caller
|
|
; resumes at the branch target.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp6E, Zp6F, $04C0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnNonzero64:
|
|
lda $F7B4,x ; CPU:$F794 PRG:7794 BD B4 F7
|
|
sta $04C0,x ; CPU:$F797 PRG:7797 9D C0 04
|
|
jsr Sub_C317 ; CPU:$F79A PRG:779A 20 17 C3
|
|
inx ; CPU:$F79D PRG:779D E8
|
|
cpx #$2A ; CPU:$F79E PRG:779E E0 2A
|
|
bne NmiHandler_OnNonzero64 ; CPU:$F7A0 PRG:77A0 D0 F2
|
|
; -----------------------------------------------------------------------------
|
|
; Routine: NmiHandler_OnZero14
|
|
; Global: The routine calls Sub_C317.
|
|
; Local: Executes 9 instructions: calls Sub_C317; stores A to $04C0,x; ANDs A
|
|
; with $03; compares A with $03; branches on equal to
|
|
; NmiHandler_OnZero14; increments X; and 3 more instructions.
|
|
; Parameters: Takes its input from the registers and the immediate values in
|
|
; the code; it reads no zero-page or RAM field.
|
|
; Returns: Returns with RTS; the registers it loaded still hold the values it
|
|
; computed.
|
|
; Clobbers:
|
|
; A and X, the N, Z, C and V flags, Zp6E, Zp6F, $04C0.
|
|
;
|
|
; -----------------------------------------------------------------------------
|
|
NmiHandler_OnZero14:
|
|
jsr Sub_C317 ; CPU:$F7A2 PRG:77A2 20 17 C3
|
|
sta $04C0,x ; CPU:$F7A5 PRG:77A5 9D C0 04
|
|
and #$03 ; CPU:$F7A8 PRG:77A8 29 03
|
|
cmp #$03 ; CPU:$F7AA PRG:77AA C9 03
|
|
beq NmiHandler_OnZero14 ; CPU:$F7AC PRG:77AC F0 F4
|
|
inx ; CPU:$F7AE PRG:77AE E8
|
|
cpx #$C0 ; CPU:$F7AF PRG:77AF E0 C0
|
|
bne NmiHandler_OnZero14 ; CPU:$F7B1 PRG:77B1 D0 EF
|
|
rts ; CPU:$F7B3 PRG:77B3 60
|
|
; ---- data $F7B4-$FFFF (2124 bytes) ----
|
|
; referenced by `lda $FA0C,y` at $C61B (operand $FA0C falls inside this region)
|
|
; referenced by `lda $FA0C,y` at $C621 (operand $FA0C falls inside this region)
|
|
; referenced by `lda $FA58,y` at $C631 (operand $FA58 falls inside this region)
|
|
; referenced by `lda $FA58,y` at $C642 (operand $FA58 falls inside this region)
|
|
; referenced by `lda $FA28,y` at $C682 (operand $FA28 falls inside this region)
|
|
; referenced by `lda $FA58,y` at $C6F6 (operand $FA58 falls inside this region)
|
|
; ... and 47 further references from decoded code
|
|
SpriteOamEntryTable:
|
|
.byte $42, $57, $1B, $65, $58, $1B, $60, $91, $1B, $3D, $82, $1B, $4A, $6F, $1B, $51 ; CPU:$F7B4 PRG:77B4 42 57 1B 65 58 1B 60 91 1B 3D 82 1B
|
|
.byte $70, $1B, $58, $71, $1B, $9D, $28, $1B, $9D, $3B, $1B, $B0, $40, $1B, $BA, $2F ; CPU:$F7C4 PRG:77C4 70 1B 58 71 1B 9D 28 1B 9D 3B 1B B0
|
|
.byte $1B, $C9, $32, $1B, $DA, $3C, $1B, $EA, $3F, $1B, $46, $2E, $4B, $FF, $FF, $FF ; CPU:$F7D4 PRG:77D4 1B C9 32 1B DA 3C 1B EA 3F 1B 46 2E
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F7E4 PRG:77E4 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F7F4 PRG:77F4 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F804 PRG:7804 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F814 PRG:7814 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F824 PRG:7824 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $98, $22, $05, $19, $0A, $1E, $1C, $0E, $FF ; CPU:$F834 PRG:7834 FF FF FF FF FF FF FF 98 22 05 19 0A
|
|
.byte $C8, $29, $01, $35, $08, $2A, $01, $35, $A8, $21, $07, $19, $15, $0A, $22, $0E ; CPU:$F844 PRG:7844 C8 29 01 35 08 2A 01 35 A8 21 07 19
|
|
.byte $1B, $24, $E7, $21, $09, $10, $0A, $16, $0E, $24, $18, $1F, $0E, $1B, $A7, $21 ; CPU:$F854 PRG:7854 1B 24 E7 21 09 10 0A 16 0E 24 18 1F
|
|
.byte $05, $1C, $1D, $0A, $10, $0E, $E9, $21, $05, $1B, $0E, $0A, $0D, $22, $E9, $21 ; CPU:$F864 PRG:7864 05 1C 1D 0A 10 0E E9 21 05 1B 0E 0A
|
|
.byte $05, $1C, $1D, $0A, $1B, $1D, $A3, $21, $11, $0C, $11, $0A, $15, $15, $0E, $17 ; CPU:$F874 PRG:7874 05 1C 1D 0A 1B 1D A3 21 11 0C 11 0A
|
|
.byte $10, $12, $17, $10, $24, $1C, $1D, $0A, $10, $0E, $08, $21, $09, $19, $0E, $1B ; CPU:$F884 PRG:7884 10 12 17 10 24 1C 1D 0A 10 0E 08 21
|
|
.byte $0F, $0E, $0C, $1D, $24, $2A, $63, $21, $0E, $17, $1E, $16, $0B, $0E, $1B, $24 ; CPU:$F894 PRG:7894 0F 0E 0C 1D 24 2A 63 21 0E 17 1E 16
|
|
.byte $18, $0F, $24, $11, $12, $1D, $1C, $63, $21, $11, $A9, $21, $05, $0B, $18, $17 ; CPU:$F8A4 PRG:78A4 18 0F 24 11 12 1D 1C 63 21 11 A9 21
|
|
.byte $1E, $1C, $A5, $21, $0D, $1C, $19, $0E, $0C, $12, $0A, $15, $24, $0B, $18, $17 ; CPU:$F8B4 PRG:78B4 1E 1C A5 21 0D 1C 19 0E 0C 12 0A 15
|
|
.byte $1E, $1C, $E7, $21, $09, $01, $00, $00, $00, $00, $24, $19, $1D, $1C, $EA, $21 ; CPU:$F8C4 PRG:78C4 1E 1C E7 21 09 01 00 00 00 00 24 19
|
|
.byte $06, $00, $00, $24, $19, $1D, $1C, $E7, $21, $09, $48, $21, $0A, $27, $24, $1B ; CPU:$F8D4 PRG:78D4 06 00 00 24 19 1D 1C E7 21 09 48 21
|
|
.byte $0E, $1C, $1E, $15, $1D, $24, $27, $A1, $21, $0B, $1C, $11, $18, $1D, $1C, $24 ; CPU:$F8E4 PRG:78E4 0E 1C 1E 15 1D 24 27 A1 21 0B 1C 11
|
|
.byte $0F, $12, $1B, $0E, $0D, $01, $22, $0E, $17, $1E, $16, $0B, $0E, $1B, $24, $18 ; CPU:$F8F4 PRG:78F4 0F 12 1B 0E 0D 01 22 0E 17 1E 16 0B
|
|
.byte $0F, $24, $11, $12, $1D, $1C, $61, $22, $0E, $11, $12, $1D, $26, $16, $12, $1C ; CPU:$F904 PRG:7904 0F 24 11 12 1D 1C 61 22 0E 11 12 1D
|
|
.byte $1C, $24, $1B, $0A, $1D, $12, $18, $E0, $23, $06, $A0, $A0, $A0, $A0, $A0, $A0 ; CPU:$F914 PRG:7914 1C 24 1B 0A 1D 12 18 E0 23 06 A0 A0
|
|
.byte $D0, $23, $0D, $F5, $F5, $F5, $F5, $F5, $F5, $50, $50, $AA, $AA, $AA, $AA, $AA ; CPU:$F924 PRG:7924 D0 23 0D F5 F5 F5 F5 F5 F5 50 50 AA
|
|
.byte $AA, $D0, $23, $0D, $FF, $FF, $FF, $FF, $FF, $FF, $50, $50, $FF, $FF, $FF, $FF ; CPU:$F934 PRG:7934 AA D0 23 0D FF FF FF FF FF FF 50 50
|
|
.byte $FF, $FF, $D0, $23, $0D, $55, $55, $55, $55, $55, $55, $50, $50, $5F, $5F, $5F ; CPU:$F944 PRG:7944 FF FF D0 23 0D 55 55 55 55 55 55 50
|
|
.byte $5F, $5F, $5F, $E0, $23, $06, $FF, $FF, $FF, $FF, $FF, $FF, $E4, $21, $10, $0F ; CPU:$F954 PRG:7954 5F 5F 5F E0 23 06 FF FF FF FF FF FF
|
|
.byte $12, $10, $11, $1D, $0E, $1B, $24, $0C, $0A, $19, $1D, $1E, $1B, $0E, $0D, $00 ; CPU:$F964 PRG:7964 12 10 11 1D 0E 1B 24 0C 0A 19 1D 1E
|
|
.byte $3F, $20, $0F, $16, $12, $30, $0F, $12, $28, $16, $0F, $16, $1A, $28, $0F, $01 ; CPU:$F974 PRG:7974 3F 20 0F 16 12 30 0F 12 28 16 0F 16
|
|
.byte $11, $21, $0F, $16, $12, $30, $0F, $12, $28, $16, $0F, $16, $1A, $28, $0F, $10 ; CPU:$F984 PRG:7984 11 21 0F 16 12 30 0F 12 28 16 0F 16
|
|
.byte $16, $16, $C0, $23, $38, $AA, $AA, $AA, $AA, $AA, $AA, $55, $55, $00, $00, $00 ; CPU:$F994 PRG:7994 16 16 C0 23 38 AA AA AA AA AA AA 55
|
|
.byte $00, $00, $00, $50, $50, $55, $55, $55, $55, $55, $55, $50, $50, $5F, $5F, $5F ; CPU:$F9A4 PRG:79A4 00 00 00 50 50 55 55 55 55 55 55 50
|
|
.byte $5F, $5F, $5F, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $FF, $FF, $FF ; CPU:$F9B4 PRG:79B4 5F 5F 5F 00 00 FF FF FF FF FF FF 00
|
|
.byte $FF, $FF, $FF, $55, $55, $FF, $FF, $FF, $FF, $FF, $FF, $55, $55, $C0, $2B, $38 ; CPU:$F9C4 PRG:79C4 FF FF FF 55 55 FF FF FF FF FF FF 55
|
|
.byte $05, $05, $05, $05, $05, $05, $05, $05, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F9D4 PRG:79D4 05 05 05 05 05 05 05 05 FF FF FF FF
|
|
.byte $AA, $AA, $AA, $AA, $FA, $AA, $AA, $AA, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$F9E4 PRG:79E4 AA AA AA AA FA AA AA AA 00 00 00 00
|
|
.byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$F9F4 PRG:79F4 00 00 00 00 00 00 00 00 00 00 00 00
|
|
.byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $1A, $02, $1A, $00 ; CPU:$FA04 PRG:7A04 00 00 00 00 00 00 00 00 00 00 00 03
|
|
.byte $34, $00, $4E, $01, $68, $01, $82, $01, $9C, $02, $B6, $00, $D0, $00, $EA, $00 ; CPU:$FA14 PRG:7A14 34 00 4E 01 68 01 82 01 9C 02 B6 00
|
|
.byte $34, $01, $4E, $02, $EA, $EE, $F2, $EA, $EE, $F2, $EA, $EE, $F2, $EA, $EE, $F2 ; CPU:$FA24 PRG:7A24 34 01 4E 02 EA EE F2 EA EE F2 EA EE
|
|
.byte $EA, $EE, $F2, $EA, $EE, $F2, $EA, $EE, $F2, $EA, $EE, $F2, $F6, $F6, $F8, $F8 ; CPU:$FA34 PRG:7A34 EA EE F2 EA EE F2 EA EE F2 EA EE F2
|
|
.byte $F8, $FA, $FA, $FA, $F8, $F8, $F8, $F6, $F6, $F6, $F8, $F8, $F8, $FA, $FA, $FA ; CPU:$FA44 PRG:7A44 F8 FA FA FA F8 F8 F8 F6 F6 F6 F8 F8
|
|
.byte $F8, $F8, $F8, $F6, $00, $02, $06, $0A, $0E, $12, $16, $92, $8E, $8A, $86, $82 ; CPU:$FA54 PRG:7A54 F8 F8 F8 F6 00 02 06 0A 0E 12 16 92
|
|
.byte $80, $C2, $C6, $CA, $CE, $D2, $56, $52, $4E, $4A, $46, $42, $B9, $BB, $03, $BD ; CPU:$FA64 PRG:7A64 80 C2 C6 CA CE D2 56 52 4E 4A 46 42
|
|
.byte $BB, $03, $BF, $BB, $01, $C1, $BB, $00, $C3, $BB, $02, $C5, $BB, $02, $C9, $CB ; CPU:$FA74 PRG:7A74 BB 03 BF BB 01 C1 BB 00 C3 BB 02 C5
|
|
.byte $02, $C7, $CB, $00, $00, $00, $03, $00, $00, $00, $00, $02, $00, $00, $00, $00 ; CPU:$FA84 PRG:7A84 02 C7 CB 00 00 00 03 00 00 00 00 02
|
|
.byte $01, $06, $00, $00, $00, $01, $05, $00, $00, $00, $01, $00, $00, $00, $00, $00 ; CPU:$FA94 PRG:7A94 01 06 00 00 00 01 05 00 00 00 01 00
|
|
.byte $08, $00, $00, $00, $00, $05, $00, $00, $00, $00, $04, $00, $00, $00, $00, $01 ; CPU:$FAA4 PRG:7AA4 08 00 00 00 00 05 00 00 00 00 04 00
|
|
.byte $06, $00, $00, $00, $01, $05, $00, $00, $00, $01, $00, $00, $00, $00, $00, $08 ; CPU:$FAB4 PRG:7AB4 06 00 00 00 01 05 00 00 00 01 00 00
|
|
.byte $00, $00, $00, $00, $05, $00, $01, $00, $00, $00, $2A, $28, $08, $11, $12, $26 ; CPU:$FAC4 PRG:7AC4 00 00 00 00 05 00 01 00 00 00 2A 28
|
|
.byte $1C, $0C, $18, $1B, $0E, $22, $28, $03, $01, $1E, $19, $34, $28, $03, $02, $1E ; CPU:$FAD4 PRG:7AD4 1C 0C 18 1B 0E 22 28 03 01 1E 19 34
|
|
.byte $19, $58, $20, $04, $11, $12, $10, $11, $79, $20, $05, $1C, $0C, $18, $1B, $0E ; CPU:$FAE4 PRG:7AE4 19 58 20 04 11 12 10 11 79 20 05 1C
|
|
.byte $F8, $20, $03, $01, $1E, $19, $78, $21, $03, $02, $1E, $19, $11, $0E, $1B, $18 ; CPU:$FAF4 PRG:7AF4 F8 20 03 01 1E 19 78 21 03 02 1E 19
|
|
.byte $24, $32, $02, $46, $48, $1E, $02, $42, $44, $14, $02, $3E, $40, $0A, $02, $3A ; CPU:$FB04 PRG:7B04 24 32 02 46 48 1E 02 42 44 14 02 3E
|
|
.byte $3C, $05, $01, $38, $39, $01, $01, $36, $37, $B9, $22, $05, $1C, $1D, $0A, $10 ; CPU:$FB14 PRG:7B14 3C 05 01 38 39 01 01 36 37 B9 22 05
|
|
.byte $0E, $0D, $3F, $03, $01, $11, $21, $0D, $3F, $03, $21, $01, $11, $0D, $3F, $03 ; CPU:$FB24 PRG:7B24 0E 0D 3F 03 01 11 21 0D 3F 03 21 01
|
|
.byte $11, $21, $01, $40, $22, $24, $4E, $4F, $50, $51, $24, $60, $22, $24, $52, $53 ; CPU:$FB34 PRG:7B34 11 21 01 40 22 24 4E 4F 50 51 24 60
|
|
.byte $54, $55, $24, $80, $22, $24, $56, $57, $58, $59, $24, $A0, $22, $24, $5A, $5B ; CPU:$FB44 PRG:7B44 54 55 24 80 22 24 56 57 58 59 24 A0
|
|
.byte $5C, $5D, $24, $C0, $22, $5E, $5F, $60, $61, $62, $63, $E0, $22, $64, $65, $66 ; CPU:$FB54 PRG:7B54 5C 5D 24 C0 22 5E 5F 60 61 62 63 E0
|
|
.byte $67, $68, $69, $00, $23, $6A, $6B, $6C, $6D, $6E, $6F, $C0, $23, $06, $AA, $AA ; CPU:$FB64 PRG:7B64 67 68 69 00 23 6A 6B 6C 6D 6E 6F C0
|
|
.byte $AA, $AA, $AA, $AA, $C0, $23, $06, $00, $00, $00, $00, $00, $00, $48, $58, $68 ; CPU:$FB74 PRG:7B74 AA AA AA AA C0 23 06 00 00 00 00 00
|
|
.byte $78, $00, $0A, $14, $1E, $28, $32, $3C, $32, $28, $1E, $14, $0A, $46, $50, $5A ; CPU:$FB84 PRG:7B84 78 00 0A 14 1E 28 32 3C 32 28 1E 14
|
|
.byte $64, $6E, $78, $82, $8C, $96, $8C, $82, $78, $6E, $64, $5A, $50, $1A, $1A, $12 ; CPU:$FB94 PRG:7B94 64 6E 78 82 8C 96 8C 82 78 6E 64 5A
|
|
.byte $12, $12, $0A, $0A, $0A, $02, $02, $2A, $2A, $2A, $2A, $2A, $2A, $2A, $2A, $2A ; CPU:$FBA4 PRG:7BA4 12 12 0A 0A 0A 02 02 2A 2A 2A 2A 2A
|
|
.byte $2A, $19, $02, $0A, $12, $12, $12, $12, $1A, $03, $0B, $21, $31, $22, $2A, $2A ; CPU:$FBB4 PRG:7BB4 2A 19 02 0A 12 12 12 12 1A 03 0B 21
|
|
.byte $2A, $2A, $32, $23, $33, $18, $09, $19, $02, $0A, $1A, $03, $0B, $1B, $0C, $20 ; CPU:$FBC4 PRG:7BC4 2A 2A 32 23 33 18 09 19 02 0A 1A 03
|
|
.byte $30, $21, $31, $22, $32, $23, $33, $24, $34, $00, $10, $01, $11, $02, $1A, $13 ; CPU:$FBD4 PRG:7BD4 30 21 31 22 32 23 33 24 34 00 10 01
|
|
.byte $1B, $14, $1C, $28, $28, $28, $28, $28, $28, $28, $28, $28, $28, $01, $01, $01 ; CPU:$FBE4 PRG:7BE4 1B 14 1C 28 28 28 28 28 28 28 28 28
|
|
.byte $01, $01, $01, $01, $01, $01, $01, $29, $29, $29, $29, $29, $29, $29, $29, $29 ; CPU:$FBF4 PRG:7BF4 01 01 01 01 01 01 01 29 29 29 29 29
|
|
.byte $29, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $2A, $2A, $2A, $2A, $2A ; CPU:$FC04 PRG:7C04 29 02 02 02 02 02 02 02 02 02 02 2A
|
|
.byte $2A, $2A, $2A, $2A, $2A, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $2B ; CPU:$FC14 PRG:7C14 2A 2A 2A 2A 2A 03 03 03 03 03 03 03
|
|
.byte $2B, $2B, $2B, $2B, $2B, $2B, $2B, $2B, $2B, $04, $04, $04, $04, $04, $04, $04 ; CPU:$FC24 PRG:7C24 2B 2B 2B 2B 2B 2B 2B 2B 2B 04 04 04
|
|
.byte $04, $04, $04, $2C, $2C, $2C, $2C, $2C, $2C, $2C, $2C, $2C, $2C, $1B, $2B, $39 ; CPU:$FC34 PRG:7C34 04 04 04 2C 2C 2C 2C 2C 2C 2C 2C 2C
|
|
.byte $49, $59, $67, $77, $87, $95, $A5, $19, $29, $39, $49, $59, $69, $79, $89, $99 ; CPU:$FC44 PRG:7C44 49 59 67 77 87 95 A5 19 29 39 49 59
|
|
.byte $A9, $13, $25, $37, $49, $59, $69, $79, $8B, $9D, $AF, $0F, $22, $37, $49, $59 ; CPU:$FC54 PRG:7C54 A9 13 25 37 49 59 69 79 8B 9D AF 0F
|
|
.byte $69, $79, $8A, $9F, $B2, $09, $1F, $33, $45, $57, $6B, $7D, $8F, $A3, $B7, $08 ; CPU:$FC64 PRG:7C64 69 79 8A 9F B2 09 1F 33 45 57 6B 7D
|
|
.byte $1A, $2F, $42, $57, $6A, $7F, $92, $A7, $BA, $06, $19, $2D, $41, $57, $6B, $81 ; CPU:$FC74 PRG:7C74 1A 2F 42 57 6A 7F 92 A7 BA 06 19 2D
|
|
.byte $93, $A9, $BB, $09, $19, $29, $39, $49, $59, $69, $79, $89, $99, $0D, $1D, $2D ; CPU:$FC84 PRG:7C84 93 A9 BB 09 19 29 39 49 59 69 79 89
|
|
.byte $3D, $4D, $5D, $6D, $7D, $8D, $9D, $11, $21, $31, $41, $51, $61, $71, $81, $91 ; CPU:$FC94 PRG:7C94 3D 4D 5D 6D 7D 8D 9D 11 21 31 41 51
|
|
.byte $A1, $15, $25, $35, $45, $55, $65, $75, $85, $95, $A5, $19, $29, $39, $49, $59 ; CPU:$FCA4 PRG:7CA4 A1 15 25 35 45 55 65 75 85 95 A5 19
|
|
.byte $69, $79, $89, $99, $A9, $1D, $2D, $3D, $4D, $5D, $6D, $7D, $8D, $9D, $AD, $21 ; CPU:$FCB4 PRG:7CB4 69 79 89 99 A9 1D 2D 3D 4D 5D 6D 7D
|
|
.byte $31, $41, $51, $61, $71, $81, $91, $A1, $B1, $25, $35, $45, $55, $65, $75, $85 ; CPU:$FCC4 PRG:7CC4 31 41 51 61 71 81 91 A1 B1 25 35 45
|
|
.byte $95, $A5, $B5, $29, $39, $49, $59, $69, $79, $89, $99, $A9, $B9, $FF, $FF, $FF ; CPU:$FCD4 PRG:7CD4 95 A5 B5 29 39 49 59 69 79 89 99 A9
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FCE4 PRG:7CE4 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FCF4 PRG:7CF4 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD04 PRG:7D04 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD14 PRG:7D14 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD24 PRG:7D24 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD34 PRG:7D34 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD44 PRG:7D44 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD54 PRG:7D54 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD64 PRG:7D64 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD74 PRG:7D74 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD84 PRG:7D84 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FD94 PRG:7D94 FF FF FF FF FF FF FF FF FF FF FF FF
|
|
.byte $00, $00, $00, $00, $00, $02, $00, $00, $02, $02, $02, $02, $02, $02, $02, $04 ; CPU:$FDA4 PRG:7DA4 00 00 00 00 00 02 00 00 02 02 02 02
|
|
.byte $02, $02, $04, $04, $04, $04, $04, $04, $04, $05, $04, $02, $04, $04, $04, $05 ; CPU:$FDB4 PRG:7DB4 02 02 04 04 04 04 04 04 04 05 04 02
|
|
.byte $05, $05, $05, $05, $04, $09, $07, $0B, $08, $06, $0A, $97, $17, $14, $14, $94 ; CPU:$FDC4 PRG:7DC4 05 05 05 05 04 09 07 0B 08 06 0A 97
|
|
.byte $94, $97, $97, $17, $17, $97, $17, $15, $16, $95, $96, $98, $99, $18, $19, $97 ; CPU:$FDD4 PRG:7DD4 94 97 97 17 17 97 17 15 16 95 96 98
|
|
.byte $17, $14, $94, $94, $14, $17, $97, $97, $17, $00, $80, $01, $01, $81, $81, $80 ; CPU:$FDE4 PRG:7DE4 17 14 94 94 14 17 97 97 17 00 80 01
|
|
.byte $80, $00, $00, $02, $82, $03, $83, $03, $83, $82, $82, $02, $02, $04, $05, $06 ; CPU:$FDF4 PRG:7DF4 80 00 00 02 82 03 83 03 83 82 82 02
|
|
.byte $86, $06, $86, $04, $05, $84, $85, $07, $08, $09, $09, $89, $89, $07, $08, $87 ; CPU:$FE04 PRG:7E04 86 06 86 04 05 84 85 07 08 09 09 89
|
|
.byte $88, $0A, $0A, $0B, $0B, $8B, $8B, $0A, $0A, $8A, $8A, $0C, $0C, $0D, $8D, $0D ; CPU:$FE14 PRG:7E14 88 0A 0A 0B 0B 8B 8B 0A 0A 8A 8A 0C
|
|
.byte $8D, $0C, $0C, $8C, $8C, $0E, $0E, $0F, $0F, $8F, $8F, $0E, $0E, $8E, $8E, $10 ; CPU:$FE24 PRG:7E24 8D 0C 0C 8C 8C 0E 0E 0F 0F 8F 8F 0E
|
|
.byte $11, $12, $13, $92, $93, $10, $11, $90, $91, $53, $FE, $5D, $FE, $5D, $FE, $53 ; CPU:$FE34 PRG:7E34 11 12 13 92 93 10 11 90 91 53 FE 5D
|
|
.byte $FE, $67, $FE, $71, $FE, $7B, $FE, $85, $FE, $71, $FE, $85, $FE, $5D, $FE, $08 ; CPU:$FE44 PRG:7E44 FE 67 FE 71 FE 7B FE 85 FE 71 FE 85
|
|
.byte $00, $08, $08, $08, $08, $08, $08, $08, $08, $08, $00, $08, $00, $08, $00, $08 ; CPU:$FE54 PRG:7E54 00 08 08 08 08 08 08 08 08 08 00 08
|
|
.byte $00, $08, $00, $08, $00, $08, $00, $08, $00, $08, $08, $08, $08, $08, $08, $08 ; CPU:$FE64 PRG:7E64 00 08 00 08 00 08 00 08 00 08 08 08
|
|
.byte $00, $08, $00, $08, $08, $08, $08, $08, $00, $08, $08, $08, $08, $08, $00, $08 ; CPU:$FE74 PRG:7E74 00 08 00 08 08 08 08 08 00 08 08 08
|
|
.byte $00, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $34, $14, $00, $00, $35 ; CPU:$FE84 PRG:7E84 00 08 08 08 08 08 08 08 08 08 08 34
|
|
.byte $15, $44, $24, $45, $25, $00, $00, $FE, $03, $13, $04, $16, $00, $00, $05, $23 ; CPU:$FE94 PRG:7E94 15 44 24 45 25 00 00 FE 03 13 04 16
|
|
.byte $00, $00, $06, $26, $FE, $00, $00, $17, $11, $18, $12, $00, $00, $27, $21, $28 ; CPU:$FEA4 PRG:7EA4 00 00 06 26 FE 00 00 17 11 18 12 00
|
|
.byte $22, $FE, $36, $32, $37, $00, $00, $33, $46, $42, $00, $00, $47, $43, $FE, $30 ; CPU:$FEB4 PRG:7EB4 22 FE 36 32 37 00 00 33 46 42 00 00
|
|
.byte $38, $31, $39, $00, $00, $40, $48, $41, $49, $00, $00, $01, $FF, $03, $06, $05 ; CPU:$FEC4 PRG:7EC4 38 31 39 00 00 40 48 41 49 00 00 01
|
|
.byte $04, $40, $49, $48, $41, $42, $47, $46, $43, $44, $45, $30, $39, $38, $31, $32 ; CPU:$FED4 PRG:7ED4 04 40 49 48 41 42 47 46 43 44 45 30
|
|
.byte $37, $36, $33, $34, $35, $28, $21, $22, $27, $26, $23, $24, $25, $18, $11, $12 ; CPU:$FEE4 PRG:7EE4 37 36 33 34 35 28 21 22 27 26 23 24
|
|
.byte $17, $16, $13, $14, $15, $90, $F4, $AB, $F4, $C6, $F4, $DF, $F4, $09, $F5, $EE ; CPU:$FEF4 PRG:7EF4 17 16 13 14 15 90 F4 AB F4 C6 F4 DF
|
|
.byte $F4, $24, $F5, $67, $F5, $44, $F5, $8A, $F5, $CF, $F5, $EC, $F5, $1A, $F6, $5C ; CPU:$FF04 PRG:7F04 F4 24 F5 67 F5 44 F5 8A F5 CF F5 EC
|
|
.byte $F6, $97, $F6, $B9, $F6, $D8, $F6, $18, $F7, $5D, $F7, $76, $F7, $72, $F2, $99 ; CPU:$FF14 PRG:7F14 F6 97 F6 B9 F6 D8 F6 18 F7 5D F7 76
|
|
.byte $F2, $84, $F2, $AD, $F2, $C0, $F2, $D5, $F2, $34, $F3, $34, $F3, $34, $F3, $34 ; CPU:$FF24 PRG:7F24 F2 84 F2 AD F2 C0 F2 D5 F2 34 F3 34
|
|
.byte $F3, $71, $F3, $71, $F3, $E9, $F3, $06, $F4, $1F, $F4, $90, $F3, $52, $F3, $38 ; CPU:$FF34 PRG:7F34 F3 71 F3 71 F3 E9 F3 06 F4 1F F4 90
|
|
.byte $F4, $43, $F4, $5D, $F4, $74, $F4, $EC, $F2, $1C, $F3, $0A, $F3, $26, $F3, $F8 ; CPU:$FF44 PRG:7F44 F4 43 F4 5D F4 74 F4 EC F2 1C F3 0A
|
|
.byte $F2, $30, $F3, $41, $F3, $04, $E8, $E9, $EB, $EF, $F4, $FA, $00, $06, $0C, $11 ; CPU:$FF54 PRG:7F54 F2 30 F3 41 F3 04 E8 E9 EB EF F4 FA
|
|
.byte $15, $17, $18, $17, $15, $11, $0C, $06, $00, $FA, $F4, $EF, $EB, $E9, $E8, $E9 ; CPU:$FF64 PRG:7F64 15 17 18 17 15 11 0C 06 00 FA F4 EF
|
|
.byte $EB, $EF, $F4, $FA, $00, $06, $E0, $E1, $E4, $E9, $F0, $F8, $00, $08, $10, $17 ; CPU:$FF74 PRG:7F74 EB EF F4 FA 00 06 E0 E1 E4 E9 F0 F8
|
|
.byte $1C, $1F, $20, $1F, $1C, $17, $10, $08, $00, $F8, $F0, $E9, $E4, $E1, $E0, $E1 ; CPU:$FF84 PRG:7F84 1C 1F 20 1F 1C 17 10 08 00 F8 F0 E9
|
|
.byte $E4, $E9, $F0, $F8, $00, $08, $D8, $D9, $DD, $E4, $EC, $F6, $00, $0A, $14, $1C ; CPU:$FF94 PRG:7F94 E4 E9 F0 F8 00 08 D8 D9 DD E4 EC F6
|
|
.byte $23, $27, $28, $27, $23, $1C, $14, $0A, $00, $F6, $EC, $E4, $DD, $D9, $D8, $D9 ; CPU:$FFA4 PRG:7FA4 23 27 28 27 23 1C 14 0A 00 F6 EC E4
|
|
.byte $DD, $E4, $EC, $F6, $00, $0A, $CC, $CE, $D3, $DB, $E6, $F3, $00, $0D, $1A, $25 ; CPU:$FFB4 PRG:7FB4 DD E4 EC F6 00 0A CC CE D3 DB E6 F3
|
|
.byte $2D, $32, $34, $32, $2D, $25, $1A, $0D, $00, $F3, $E6, $DB, $D3, $CE, $CC, $CE ; CPU:$FFC4 PRG:7FC4 2D 32 34 32 2D 25 1A 0D 00 F3 E6 DB
|
|
.byte $D3, $DB, $E6, $F3, $00, $0D, $C0, $C2, $C9, $D3, $E0, $EF, $00, $11, $20, $2D ; CPU:$FFD4 PRG:7FD4 D3 DB E6 F3 00 0D C0 C2 C9 D3 E0 EF
|
|
.byte $37, $3E, $40, $3E, $37, $2D, $20, $11, $00, $EF, $E0, $D3, $C9, $C2, $C0, $C2 ; CPU:$FFE4 PRG:7FE4 37 3E 40 3E 37 2D 20 11 00 EF E0 D3
|
|
.byte $C9, $D3, $E0, $EF, $00, $10, $C8, $C0, $00, $C0, $00, $C0 ; CPU:$FFF4 PRG:7FF4 C9 D3 E0 EF 00 10 C8 C0 00 C0 00 C0
|