Duck Hunt (JUE): Pass 2 complete

- 3,058 instructions (37.5% code), 48 semantic labels, 174 zero-page aliases
- BYTE-IDENTICAL build verified
- Key routines: Reset, NmiHandler, MainGameLoop, GameModeDispatcher, InitPPU, InitVariables, UpdateController, UpdateSprites
- Zero-page aliases: PPUCtrlShadow (/bin/bash8), PPUMaskShadow (/bin/bash9), GameMode (4), RoundIndex (6), DispatchIndex (A)
- Root OVERVIEW.md updated to reflect Pass 2 completion and correct mirroring (Horizontal)
This commit is contained in:
tmerritt committed 2026-10-18 21:24:56 -04:00
1 parent c204dac739
commit 1b0682042f
6 files changed
+855 -119

No files matched your search

+82 -80
View File
@@ -11,6 +11,8 @@
; Pass 1 trace provenance (the audit trail behind every classification below):
; 41 further routine entries recovered from table references elsewhere in the image:
; $C437, $C4BF, $C4E0, $C502, $C625, $C62E, $C641, $C64B, $C7FB, $C839, $C86E, $C932, $C996, $CA0A, $CA19, $CC3D, $CC8B, $CCFD, $CD3C, $CE18, $CE20, $CE2E, $CF16, $CF56, $CFF9, $D050, $D12B, $D528, $D53C, $D54B, $D5D2, $D678, $D6D5, $D78F, $D7C5, $D81B, $D8AE, $D8DB, $D907, $D93A, $DAB5
; entries seeded by hand after inspecting code-shaped but unreferenced blocks:
; $C000, $C086
; indirect dispatch through zero page (not followed statically):
; jmp ($0014) at $C379
; jmp ($0610) at $F527
@@ -36,7 +38,7 @@ Reset:
cld ; CPU:$C000 PRG:0000 D8
sei ; CPU:$C001 PRG:0001 78
; -----------------------------------------------------------------------------
; Routine: Label_C002
; Routine: WaitVBlank
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -44,9 +46,9 @@ Reset:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C002:
WaitVBlank:
lda $2002 ; CPU:$C002 PRG:0002 AD 02 20
bpl Label_C002 ; CPU:$C005 PRG:0005 10 FB
bpl WaitVBlank ; CPU:$C005 PRG:0005 10 FB
ldx #$00 ; CPU:$C007 PRG:0007 A2 00
stx $2000 ; CPU:$C009 PRG:0009 8E 00 20
stx $2001 ; CPU:$C00C PRG:000C 8E 01 20
@@ -59,7 +61,7 @@ Label_C002:
sty Zp00 ; CPU:$C01A PRG:001A 84 00
lda #$00 ; CPU:$C01C PRG:001C A9 00
; -----------------------------------------------------------------------------
; Routine: Label_C01E
; Routine: ClearZeropage
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -67,17 +69,17 @@ Label_C002:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C01E:
ClearZeropage:
sta (Zp00),y ; CPU:$C01E PRG:001E 91 00
dey ; CPU:$C020 PRG:0020 88
bne Label_C01E ; CPU:$C021 PRG:0021 D0 FB
bne ClearZeropage ; CPU:$C021 PRG:0021 D0 FB
dec Zp01 ; CPU:$C023 PRG:0023 C6 01
bpl Label_C01E ; CPU:$C025 PRG:0025 10 F7
bpl ClearZeropage ; CPU:$C025 PRG:0025 10 F7
txa ; CPU:$C027 PRG:0027 8A
bne Label_C02C ; CPU:$C028 PRG:0028 D0 02
bne InitGameState ; CPU:$C028 PRG:0028 D0 02
ldx #$5F ; CPU:$C02A PRG:002A A2 5F
; -----------------------------------------------------------------------------
; Routine: Label_C02C
; Routine: InitGameState
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -85,7 +87,7 @@ Label_C01E:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C02C:
InitGameState:
stx $05EC ; CPU:$C02C PRG:002C 8E EC 05
jsr $C22B ; CPU:$C02F PRG:002F 20 2B C2
jsr $C23B ; CPU:$C032 PRG:0032 20 3B C2
@@ -104,7 +106,7 @@ Label_C02C:
sta Zp09 ; CPU:$C052 PRG:0052 85 09
ldx #$0B ; CPU:$C054 PRG:0054 A2 0B
; -----------------------------------------------------------------------------
; Routine: Label_C056
; Routine: InitVariables
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -112,14 +114,14 @@ Label_C02C:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C056:
InitVariables:
lda $E5DF,x ; CPU:$C056 PRG:0056 BD DF E5
sta $05F0,x ; CPU:$C059 PRG:0059 9D F0 05
dex ; CPU:$C05C PRG:005C CA
bpl Label_C056 ; CPU:$C05D PRG:005D 10 F7
bmi Label_C07C ; CPU:$C05F PRG:005F 30 1B
bpl InitVariables ; CPU:$C05D PRG:005D 10 F7
bmi MainGameLoop_3 ; CPU:$C05F PRG:005F 30 1B
; -----------------------------------------------------------------------------
; Routine: Label_C061
; Routine: MainGameLoop_1
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -127,14 +129,14 @@ Label_C056:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C061:
MainGameLoop_1:
lda Zp24 ; CPU:$C061 PRG:0061 A5 24
beq Label_C06B ; CPU:$C063 PRG:0063 F0 06
beq GameModeCheck_3 ; CPU:$C063 PRG:0063 F0 06
lda Zp26 ; CPU:$C065 PRG:0065 A5 26
cmp #$01 ; CPU:$C067 PRG:0067 C9 01
bne Label_C06E ; CPU:$C069 PRG:0069 D0 03
bne GameplayFrame ; CPU:$C069 PRG:0069 D0 03
; -----------------------------------------------------------------------------
; Routine: Label_C06B
; Routine: GameModeCheck_3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -142,10 +144,10 @@ Label_C061:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C06B:
GameModeCheck_3:
jsr $F56C ; CPU:$C06B PRG:006B 20 6C F5
; -----------------------------------------------------------------------------
; Routine: Label_C06E
; Routine: GameplayFrame
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -153,14 +155,14 @@ Label_C06B:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C06E:
GameplayFrame:
jsr $C348 ; CPU:$C06E PRG:006E 20 48 C3
jsr $C284 ; CPU:$C071 PRG:0071 20 84 C2
jsr $C0B3 ; CPU:$C074 PRG:0074 20 B3 C0
inc Zp2F ; CPU:$C077 PRG:0077 E6 2F
jsr $C61E ; CPU:$C079 PRG:0079 20 1E C6
; -----------------------------------------------------------------------------
; Routine: Label_C07C
; Routine: MainGameLoop_3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -168,9 +170,9 @@ Label_C06E:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C07C:
MainGameLoop_3:
lda Zp20 ; CPU:$C07C PRG:007C A5 20
bne Label_C061 ; CPU:$C07E PRG:007E D0 E1
bne MainGameLoop_1 ; CPU:$C07E PRG:007E D0 E1
jsr $C588 ; CPU:$C080 PRG:0080 20 88 C5
jmp $C07C ; CPU:$C083 PRG:0083 4C 7C C0
; -----------------------------------------------------------------------------
@@ -194,13 +196,13 @@ NmiHandler:
lda #$02 ; CPU:$C091 PRG:0091 A9 02
sta $4014 ; CPU:$C093 PRG:0093 8D 14 40
lda Zp22 ; CPU:$C096 PRG:0096 A5 22
bne Label_C0A6 ; CPU:$C098 PRG:0098 D0 0C
bne NmiFrameEnd ; CPU:$C098 PRG:0098 D0 0C
jsr $C2BF ; CPU:$C09A PRG:009A 20 BF C2
jsr $C249 ; CPU:$C09D PRG:009D 20 49 C2
jsr $C263 ; CPU:$C0A0 PRG:00A0 20 63 C2
jsr $C3C1 ; CPU:$C0A3 PRG:00A3 20 C1 C3
; -----------------------------------------------------------------------------
; Routine: Label_C0A6
; Routine: NmiFrameEnd
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -208,7 +210,7 @@ NmiHandler:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0A6:
NmiFrameEnd:
ldy #$01 ; CPU:$C0A6 PRG:00A6 A0 01
sty Zp22 ; CPU:$C0A8 PRG:00A8 84 22
sty Zp20 ; CPU:$C0AA PRG:00AA 84 20
@@ -220,7 +222,7 @@ Label_C0A6:
plp ; CPU:$C0B1 PRG:00B1 28
rti ; CPU:$C0B2 PRG:00B2 40
; -----------------------------------------------------------------------------
; Routine: Label_C0B3
; Routine: GameModeDispatcher
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -228,12 +230,12 @@ Label_C0A6:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0B3:
GameModeDispatcher:
lda Zp24 ; CPU:$C0B3 PRG:00B3 A5 24
beq Label_C0BA ; CPU:$C0B5 PRG:00B5 F0 03
beq TitleScreenLoop ; CPU:$C0B5 PRG:00B5 F0 03
jmp $C14E ; CPU:$C0B7 PRG:00B7 4C 4E C1
; -----------------------------------------------------------------------------
; Routine: Label_C0BA
; Routine: TitleScreenLoop
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -241,27 +243,27 @@ Label_C0B3:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0BA:
TitleScreenLoop:
lda Zp16 ; CPU:$C0BA PRG:00BA A5 16
and #$10 ; CPU:$C0BC PRG:00BC 29 10
beq Label_C11E ; CPU:$C0BE PRG:00BE F0 5E
beq UpdateGameState2 ; CPU:$C0BE PRG:00BE F0 5E
ldy $05FC ; CPU:$C0C0 PRG:00C0 AC FC 05
bne Label_C123 ; CPU:$C0C3 PRG:00C3 D0 5E
bne UpdateGameState3_1 ; CPU:$C0C3 PRG:00C3 D0 5E
iny ; CPU:$C0C5 PRG:00C5 C8
sty $05FC ; CPU:$C0C6 PRG:00C6 8C FC 05
ldy Zp25 ; CPU:$C0C9 PRG:00C9 A4 25
cpy #$10 ; CPU:$C0CB PRG:00CB C0 10
beq Label_C0FF ; CPU:$C0CD PRG:00CD F0 30
beq UpdateZp09_2 ; CPU:$C0CD PRG:00CD F0 30
cpy #$03 ; CPU:$C0CF PRG:00CF C0 03
beq Label_C0DF ; CPU:$C0D1 PRG:00D1 F0 0C
beq InitializeRoundData ; CPU:$C0D1 PRG:00D1 F0 0C
cpy #$04 ; CPU:$C0D3 PRG:00D3 C0 04
beq Label_C0DF ; CPU:$C0D5 PRG:00D5 F0 08
beq InitializeRoundData ; CPU:$C0D5 PRG:00D5 F0 08
cpy #$0B ; CPU:$C0D7 PRG:00D7 C0 0B
beq Label_C0DF ; CPU:$C0D9 PRG:00D9 F0 04
beq InitializeRoundData ; CPU:$C0D9 PRG:00D9 F0 04
cpy #$0C ; CPU:$C0DB PRG:00DB C0 0C
bne Label_C123 ; CPU:$C0DD PRG:00DD D0 44
bne UpdateGameState3_1 ; CPU:$C0DD PRG:00DD D0 44
; -----------------------------------------------------------------------------
; Routine: Label_C0DF
; Routine: InitializeRoundData
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -269,10 +271,10 @@ Label_C0BA:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0DF:
InitializeRoundData:
ldx #$05 ; CPU:$C0DF PRG:00DF A2 05
; -----------------------------------------------------------------------------
; Routine: Label_C0E1
; Routine: InitializeDuckDataLoop
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -280,11 +282,11 @@ Label_C0DF:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0E1:
InitializeDuckDataLoop:
lda Zp2A,x ; CPU:$C0E1 PRG:00E1 B5 2A
sta $0430,x ; CPU:$C0E3 PRG:00E3 9D 30 04
dex ; CPU:$C0E6 PRG:00E6 CA
bpl Label_C0E1 ; CPU:$C0E7 PRG:00E7 10 F8
bpl InitializeDuckDataLoop ; CPU:$C0E7 PRG:00E7 10 F8
lda Zp09 ; CPU:$C0E9 PRG:00E9 A5 09
and #$0E ; CPU:$C0EB PRG:00EB 29 0E
sta $2001 ; CPU:$C0ED PRG:00ED 8D 01 20
@@ -296,7 +298,7 @@ Label_C0E1:
lda #$07 ; CPU:$C0FA PRG:00FA A9 07
jmp $C112 ; CPU:$C0FC PRG:00FC 4C 12 C1
; -----------------------------------------------------------------------------
; Routine: Label_C0FF
; Routine: UpdateZp09_2
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -304,7 +306,7 @@ Label_C0E1:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C0FF:
UpdateZp09_2:
lda Zp09 ; CPU:$C0FF PRG:00FF A5 09
ora #$10 ; CPU:$C101 PRG:0101 09 10
sta $2001 ; CPU:$C103 PRG:0103 8D 01 20
@@ -315,7 +317,7 @@ Label_C0FF:
sta Zp1C ; CPU:$C10E PRG:010E 85 1C
lda #$00 ; CPU:$C110 PRG:0110 A9 00
; -----------------------------------------------------------------------------
; Routine: Label_C112
; Routine: UpdateGameState
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -323,13 +325,13 @@ Label_C0FF:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C112:
UpdateGameState:
jsr $D464 ; CPU:$C112 PRG:0112 20 64 D4
jsr $D4E2 ; CPU:$C115 PRG:0115 20 E2 D4
jsr $C5D9 ; CPU:$C118 PRG:0118 20 D9 C5
jmp $D521 ; CPU:$C11B PRG:011B 4C 21 D5
; -----------------------------------------------------------------------------
; Routine: Label_C11E
; Routine: UpdateGameState2
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -337,11 +339,11 @@ Label_C112:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C11E:
UpdateGameState2:
lda #$00 ; CPU:$C11E PRG:011E A9 00
sta $05FC ; CPU:$C120 PRG:0120 8D FC 05
; -----------------------------------------------------------------------------
; Routine: Label_C123
; Routine: UpdateGameState3_1
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -349,7 +351,7 @@ Label_C11E:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C123:
UpdateGameState3_1:
lda Zp25 ; CPU:$C123 PRG:0123 A5 25
jsr $C35E ; CPU:$C125 PRG:0125 20 5E C3
ora $39C8,x ; CPU:$C128 PRG:0128 1D C8 39
@@ -359,7 +361,7 @@ Label_C123:
.byte $93, $D5, $D2, $D5, $C9, $D2, $EF, $C7, $E0, $C5, $E0, $C5, $E0, $C5, $71, $C2 ; CPU:$C13C PRG:013C 93 D5 D2 D5 C9 D2 EF C7 E0 C5 E0 C5 E0 C5 71 C2
.byte $25, $C6 ; CPU:$C14C PRG:014C 25 C6
; -----------------------------------------------------------------------------
; Routine: Label_C14E
; Routine: UpdateGameState3_3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -367,14 +369,14 @@ Label_C123:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C14E:
UpdateGameState3_3:
lda #$00 ; CPU:$C14E PRG:014E A9 00
sta $05FF ; CPU:$C150 PRG:0150 8D FF 05
lda #$01 ; CPU:$C153 PRG:0153 A9 01
sta ZpB9 ; CPU:$C155 PRG:0155 85 B9
sta ZpBA ; CPU:$C157 PRG:0157 85 BA
lda Zp26 ; CPU:$C159 PRG:0159 A5 26
beq Label_C18D ; CPU:$C15B PRG:015B F0 30
beq UpdateGameState5 ; CPU:$C15B PRG:015B F0 30
jsr $D131 ; CPU:$C15D PRG:015D 20 31 D1
jsr $D160 ; CPU:$C160 PRG:0160 20 60 D1
lda $05FF ; CPU:$C163 PRG:0163 AD FF 05
@@ -418,7 +420,7 @@ Label_C189:
ldx Zp26 ; CPU:$C189 PRG:0189 A6 26
bne Label_C190 ; CPU:$C18B PRG:018B D0 03
; -----------------------------------------------------------------------------
; Routine: Label_C18D
; Routine: UpdateGameState5
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -426,7 +428,7 @@ Label_C189:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C18D:
UpdateGameState5:
jmp $C217 ; CPU:$C18D PRG:018D 4C 17 C2
; -----------------------------------------------------------------------------
; Routine: Label_C190
@@ -518,7 +520,7 @@ Label_C1B7:
; -----------------------------------------------------------------------------
Label_C1BB:
cpx #$01 ; CPU:$C1BB PRG:01BB E0 01
bne Label_C217 ; CPU:$C1BD PRG:01BD D0 58
bne UpdateGameState6_3 ; CPU:$C1BD PRG:01BD D0 58
lda #$51 ; CPU:$C1BF PRG:01BF A9 51
sta $0500 ; CPU:$C1C1 PRG:01C1 8D 00 05
lda #$24 ; CPU:$C1C4 PRG:01C4 A9 24
@@ -552,7 +554,7 @@ Label_C1C8:
tax ; CPU:$C1E7 PRG:01E7 AA
ldy #$05 ; CPU:$C1E8 PRG:01E8 A0 05
; -----------------------------------------------------------------------------
; Routine: Label_C1EA
; Routine: UpdateGameState6_1
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -560,7 +562,7 @@ Label_C1C8:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C1EA:
UpdateGameState6_1:
lda $05F0,x ; CPU:$C1EA PRG:01EA BD F0 05
and #$0F ; CPU:$C1ED PRG:01ED 29 0F
sta $0501,y ; CPU:$C1EF PRG:01EF 99 01 05
@@ -573,7 +575,7 @@ Label_C1EA:
sta $0501,y ; CPU:$C1FA PRG:01FA 99 01 05
dex ; CPU:$C1FD PRG:01FD CA
dey ; CPU:$C1FE PRG:01FE 88
bpl Label_C1EA ; CPU:$C1FF PRG:01FF 10 E9
bpl UpdateGameState6_1 ; CPU:$C1FF PRG:01FF 10 E9
lda $0501 ; CPU:$C201 PRG:0201 AD 01 05
bne Label_C20B ; CPU:$C204 PRG:0204 D0 05
lda #$24 ; CPU:$C206 PRG:0206 A9 24
@@ -594,7 +596,7 @@ Label_C20B:
ldy #$23 ; CPU:$C212 PRG:0212 A0 23
jsr $C71D ; CPU:$C214 PRG:0214 20 1D C7
; -----------------------------------------------------------------------------
; Routine: Label_C217
; Routine: UpdateGameState6_3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -602,7 +604,7 @@ Label_C20B:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C217:
UpdateGameState6_3:
lda Zp2D ; CPU:$C217 PRG:0217 A5 2D
bne Label_C222 ; CPU:$C219 PRG:0219 D0 07
jsr $D509 ; CPU:$C21B PRG:021B 20 09 D5
@@ -625,7 +627,7 @@ Label_C222:
; ---- data $C22A-$C22A (1 bytes) ----
.byte $C5 ; CPU:$C22A PRG:022A C5
; -----------------------------------------------------------------------------
; Routine: Label_C22B
; Routine: UpdateSprites_4
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -633,12 +635,12 @@ Label_C222:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C22B:
UpdateSprites_4:
lda #$02 ; CPU:$C22B PRG:022B A9 02
jsr $C232 ; CPU:$C22D PRG:022D 20 32 C2
lda #$01 ; CPU:$C230 PRG:0230 A9 01
; -----------------------------------------------------------------------------
; Routine: Label_C232
; Routine: UpdateSprites2_1
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -646,7 +648,7 @@ Label_C22B:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C232:
UpdateSprites2_1:
sta Zp01 ; CPU:$C232 PRG:0232 85 01
lda #$24 ; CPU:$C234 PRG:0234 A9 24
sta Zp00 ; CPU:$C236 PRG:0236 85 00
@@ -681,7 +683,7 @@ Label_C23F:
bne Label_C23F ; CPU:$C246 PRG:0246 D0 F7
rts ; CPU:$C248 PRG:0248 60
; -----------------------------------------------------------------------------
; Routine: Label_C249
; Routine: UpdateSprites2_3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -689,7 +691,7 @@ Label_C23F:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C249:
UpdateSprites2_3:
ldy Zp23 ; CPU:$C249 PRG:0249 A4 23
beq Label_C262 ; CPU:$C24B PRG:024B F0 15
dey ; CPU:$C24D PRG:024D 88
@@ -725,7 +727,7 @@ Label_C25B:
Label_C262:
rts ; CPU:$C262 PRG:0262 60
; -----------------------------------------------------------------------------
; Routine: Label_C263
; Routine: UpdateSprites3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -733,7 +735,7 @@ Label_C262:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C263:
UpdateSprites3:
ldy Zp27 ; CPU:$C263 PRG:0263 A4 27
beq Label_C262 ; CPU:$C265 PRG:0265 F0 FB
ldy #$00 ; CPU:$C267 PRG:0267 A0 00
@@ -772,7 +774,7 @@ Label_C277:
Label_C283:
rts ; CPU:$C283 PRG:0283 60
; -----------------------------------------------------------------------------
; Routine: Label_C284
; Routine: UpdateController
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -780,7 +782,7 @@ Label_C283:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C284:
UpdateController:
ldx #$01 ; CPU:$C284 PRG:0284 A2 01
stx $4016 ; CPU:$C286 PRG:0286 8E 16 40
dex ; CPU:$C289 PRG:0289 CA
@@ -788,7 +790,7 @@ Label_C284:
jsr $C291 ; CPU:$C28D PRG:028D 20 91 C2
inx ; CPU:$C290 PRG:0290 E8
; -----------------------------------------------------------------------------
; Routine: Label_C291
; Routine: UpdateController2
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -796,7 +798,7 @@ Label_C284:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C291:
UpdateController2:
ldy #$08 ; CPU:$C291 PRG:0291 A0 08
; -----------------------------------------------------------------------------
; Routine: Label_C293
@@ -838,7 +840,7 @@ Label_C293:
Label_C2B6:
sta $0440,x ; CPU:$C2B6 PRG:02B6 9D 40 04
; -----------------------------------------------------------------------------
; Routine: Label_C2B9
; Routine: UpdateController3
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -846,7 +848,7 @@ Label_C2B6:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C2B9:
UpdateController3:
lda #$00 ; CPU:$C2B9 PRG:02B9 A9 00
sta $0442,x ; CPU:$C2BB PRG:02BB 9D 42 04
; -----------------------------------------------------------------------------
@@ -861,7 +863,7 @@ Label_C2B9:
Label_C2BE:
rts ; CPU:$C2BE PRG:02BE 60
; -----------------------------------------------------------------------------
; Routine: Label_C2BF
; Routine: UpdateController4_206
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
; Local: Continues its parent routine along the condition or operation encoded in this label,
; then returns, branches again, or rejoins shared code as documented by the instructions.
@@ -869,7 +871,7 @@ Label_C2BE:
; Returns: Undetermined in Pass 1; status flags and registers may carry results.
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Label_C2BF:
UpdateController4_206:
lda Zp21 ; CPU:$C2BF PRG:02BF A5 21
beq Label_C302 ; CPU:$C2C1 PRG:02C1 F0 3F
lda #$61 ; CPU:$C2C3 PRG:02C3 A9 61