-
Notifications
You must be signed in to change notification settings - Fork 8
/
bank6.asm
16423 lines (15192 loc) · 296 KB
/
bank6.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.SEGMENT "BANK6"
.ORG $C60000
.A8
.I16
handle_pause:
SEP #$20
LDA a:.LOWORD(game_flags) ; orig=0x0314
BIT #$98
BNE locret_C60043
loc_C60009:
LDA z:$20,X
BEQ loc_C60011
loc_C6000D:
JML f:loc_C60045
; ---------------------------------------------------------------------------
loc_C60011:
JSL f:should_toggle_pause
BCS loc_C6001B
.IFNDEF DEBUG
JML f:locret_C60044
.ELSE
LDA a:.LOWORD(game_flags) ; orig=0x0314 ; Deleted debug menu activation
BIT #1
BEQ locret_C60044
JSL f:handle_debug_menu_input
RTL
.ENDIF
; ---------------------------------------------------------------------------
loc_C6001B:
LDA a:.LOWORD(game_flags) ; orig=0x0314
EOR #$40
loc_C60020:
STA a:.LOWORD(game_flags) ; orig=0x0314
BIT #$40
BEQ loc_C6003F
LDY #$E
JSL f:play_sound
SEP #$20
LDA #1
loc_C60032:
STA z:$20,X
loc_C60034:
STZ z:$21,X
LDA #$FF
STA z:$22,X
LDA #3
STA z:$23,X
locret_C6003E:
RTL
; ---------------------------------------------------------------------------
loc_C6003F:
LDA #2
STA z:$20,X
locret_C60043:
RTL
; ---------------------------------------------------------------------------
locret_C60044:
RTL
; ---------------------------------------------------------------------------
loc_C60045:
REP #$20
.A16
LDA z:$20,X
BIT #1
BNE loc_C60065
LDA z:$22,X
SEC
loc_C60051:
SBC #5
CMP #$3FF
STA z:$22,X
BCS loc_C60079
LDA #$3FF
STA z:$22,X
STZ z:$20,X
BRA loc_C60079
; ---------------------------------------------------------------------------
RTL
; ---------------------------------------------------------------------------
loc_C60065:
LDA z:$22,X
CLC
ADC #5
CMP #$428
STA z:$22,X
BCC loc_C60079
LDA #$428
STA z:$22,X
loc_C60077:
STZ z:$20,X
loc_C60079:
REP #$20
LDA z:$22,X
STA a:.LOWORD(bg3_v_scroll_2) ; orig=0x0CA7
RTL
; End of function handle_pause
.A8
.I16
should_toggle_pause:
SEP #$20
LDA a:.LOWORD(game_flags) ; orig=0x0314
BIT #4
BNE loc_C600CE
LDA a:.LOWORD(current_mode) ; orig=0x0C3C
CMP #3
BEQ loc_C60095
CMP #2
BNE loc_C600CE
loc_C60095:
LDA a:.LOWORD(level_manager_object+level_manager_object::fade_related_) ; orig=0x0D10
CMP #$34
BEQ loc_C600CE
CMP #$35
BEQ loc_C600CE
CMP #$36
BEQ loc_C600CE
LDA #0
XBA
LDA #0
STA z:$40
loc_C600AB:
TAY
LDA a:.LOWORD(player1_object+player::is_ai),Y
BNE loc_C600B6
LDA a:.LOWORD(player1_object+player::gameover_related),Y
BEQ loc_C600C6
loc_C600B6:
TYA
LSR
LSR
LSR
LSR
LSR
PHY
TAY
LDA a:.LOWORD(joypad_1_pressed+1),Y
PLY
BIT #$30
loc_C600C4:
BNE loc_C600D0
loc_C600C6:
INC z:$40
TYA
CLC
ADC #$40
BNE loc_C600AB
loc_C600CE:
CLC
RTL
; ---------------------------------------------------------------------------
loc_C600D0:
.IFDEF DEBUG
BIT #$20
BNE activate_debug
.ENDIF
SEC
RTL
activate_debug:
; ---------------------------------------------------------------------------
LDA a:.LOWORD(game_flags) ; orig=0x0314 ; Deleted debug menu activation
EOR #1
BIT #1
BNE open_debug_menu
JML f:close_debug_menu
; End of function should_toggle_pause
.A8
.I16
open_debug_menu:
REP #$20
.A16
TYA
CLC
ADC #$D40
STA z:$10,X
LDA z:$40
PHA
PHX
loc_C600EC:
JSL f:sub_C609F5
PLX
JSL f:sub_C6033D
REP #$20
PLA
STA z:$40
REP #$20
LDA #.LOWORD(unk_7E21E6)
loc_C600FF:
STA z:$53
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E21E6)
STA z:$55
LDA z:$40
ORA #$20
STA [$53]
REP #$20
.A16
LDA #.LOWORD(sub_C6011B)
STA z:0,X
SEP #$20
.A8
LDA #.BANKBYTE(sub_C6011B)
STA z:2,X
RTL
; End of function open_debug_menu
.A8
.I16
sub_C6011B:
REP #$20
.A16
LDA #.LOWORD(handle_pause)
STA z:0,X
SEP #$20
.A8
LDA #.BANKBYTE(handle_pause)
STA z:2,X
SEP #$20
LDA a:.LOWORD(game_flags) ; orig=0x0314
ORA #1
STA a:.LOWORD(game_flags) ; orig=0x0314
JSL f:sub_C605EE
SEP #$20
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
PHA
LDA #0
STA a:.LOWORD(word_7E0316) ; orig=0x0316
loc_C60141:
REP #$20
.A16
PHX
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
TAX
SEP #$20
.A8
LDA f:debug_menu_value_types,X
STA z:$40
REP #$20
.A16
PLX
SEP #$20
.A8
LDA z:$40
BEQ loc_C60177
BIT #$80
BEQ loc_C60164
JML f:loc_C60186
; ---------------------------------------------------------------------------
loc_C60164:
BRA loc_C60195
; ---------------------------------------------------------------------------
loc_C60166:
SEP #$20
INC a:.LOWORD(word_7E0316) ; orig=0x0316
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CMP #$13
BNE loc_C60141
PLA
STA a:.LOWORD(word_7E0316) ; orig=0x0316
RTL
; ---------------------------------------------------------------------------
loc_C60177:
SEP #$20
JSL f:sub_C601A4
LDA [$50]
JSL f:sub_C6036B
JMP a:.LOWORD(loc_C60166)
; ---------------------------------------------------------------------------
loc_C60186:
SEP #$20
JSL f:sub_C601A4
LDA [$50]
JSL f:sub_C60475
JMP a:.LOWORD(loc_C60166)
; ---------------------------------------------------------------------------
loc_C60195:
SEP #$20
JSL f:sub_C601A4
LDA [$50]
JSL f:sub_C603D9
JMP a:.LOWORD(loc_C60166)
; End of function sub_C6011B
.A8
.I16
sub_C601A4:
SEP #$20
STZ z:$52
REP #$20
.A16
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
CLC
ADC #$A4
STA z:$50
SEP #$20
.A8
RTL
; End of function sub_C601A4
.A8
.I16
handle_debug_menu_input:
SEP #$20
LDY z:$10,X
LDA a:.LOWORD($22),Y
BIT #$30
BNE loc_C601C8
INY
INY
INY
INY
loc_C601C8:
PHY
LDA a:.LOWORD($22),Y
BIT #$80
BEQ loc_C6020E
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CMP #$11
BNE loc_C601EE
REP #$20
.A16
PHX
LDA a:.LOWORD(debug_bgm) ; orig=0x00B5
AND #$FF
TAX
LDA f:sounds_list,X
PLX
AND #$FF
TAY
JSL f:play_music
loc_C601EE:
SEP #$20
.A8
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CMP #$12
BNE loc_C6020E
loc_C601F7:
REP #$20
.A16
PHX
LDA a:.LOWORD(debug_se) ; orig=0x00B6
AND #$FF
TAX
LDA f:musics_lists,X
PLX
AND #$FF
TAY
JSL f:play_sound
loc_C6020E:
SEP #$20
.A8
PLY
LDA a:.LOWORD($23),Y
STA z:$4E
AND #$C
BEQ loc_C60247
JSL f:sub_C6030F
SEP #$20
LDA z:$4E
BIT #8
BEQ loc_C60235
DEC a:.LOWORD(word_7E0316) ; orig=0x0316
BPL loc_C60230
LDA #$12
STA a:.LOWORD(word_7E0316) ; orig=0x0316
loc_C60230:
JSL f:sub_C6033D
RTL
; ---------------------------------------------------------------------------
loc_C60235:
INC a:.LOWORD(word_7E0316) ; orig=0x0316
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CMP #$13
BNE loc_C60242
STZ a:.LOWORD(word_7E0316) ; orig=0x0316
loc_C60242:
JSL f:sub_C6033D
locret_C60246:
RTL
; ---------------------------------------------------------------------------
loc_C60247:
SEP #$20
LDA z:$4E
AND #3
BEQ locret_C60246
REP #$20
.A16
PHX
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
TAX
SEP #$20
.A8
LDA f:debug_menu_value_types,X
loc_C6025F:
STA z:$40
REP #$20
.A16
PLX
SEP #$20
.A8
LDA z:$40
BEQ loc_C60274
BIT #$80
BEQ loc_C60272
JML f:loc_C602D3
; ---------------------------------------------------------------------------
loc_C60272:
BRA loc_C60293
; ---------------------------------------------------------------------------
loc_C60274:
SEP #$20
STZ z:$52
REP #$20
.A16
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
CLC
ADC #$A4
STA z:$50
SEP #$20
.A8
LDA [$50]
EOR #1
STA [$50]
JSL f:sub_C6036B
RTL
; ---------------------------------------------------------------------------
loc_C60293:
SEP #$20
STA z:$40
STZ z:$52
REP #$20
.A16
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
CLC
ADC #$A4
STA z:$50
SEP #$20
.A8
LDA z:$4E
BIT #1
BNE loc_C602C1
LDA [$50]
DEC
BPL loc_C602CA
DEC z:$40
LDA z:$40
STA [$50]
STA z:$40
JSL f:sub_C603D9
RTL
; ---------------------------------------------------------------------------
loc_C602C1:
LDA [$50]
INC
CMP z:$40
BNE loc_C602CA
LDA z:0
loc_C602CA:
STA [$50]
STA z:$40
JSL f:sub_C603D9
RTL
; ---------------------------------------------------------------------------
loc_C602D3:
SEP #$20
EOR #$FF
INC
STA z:$40
STZ z:$52
REP #$20
.A16
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
AND #$FF
CLC
ADC #$A4
STA z:$50
SEP #$20
.A8
LDA z:$4E
loc_C602EE:
BIT #1
BNE loc_C602FF
LDA [$50]
DEC
BPL loc_C602FB
loc_C602F7:
DEC z:$40
LDA z:$40
loc_C602FB:
STA [$50]
BRA loc_C6030A
; ---------------------------------------------------------------------------
loc_C602FF:
LDA [$50]
INC
CMP z:$40
BNE loc_C60308
.A8
LDA #0
loc_C60308:
STA [$50]
loc_C6030A:
JSL f:sub_C60475
RTL
; End of function handle_debug_menu_input
.A8
.I16
sub_C6030F:
REP #$20
.A16
LDA #.LOWORD(unk_7E2020)
STA z:$53
PHX
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E2020)
STA z:$55
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
TAX
loc_C6032A:
LDA f:offsets_to_debug_menu_map,X
CLC
ADC z:$53
STA z:$53
SEP #$20
.A8
LDA #$36
STA [$53]
REP #$20
.A16
PLX
RTL
; End of function sub_C6030F
.A8
.I16
sub_C6033D:
REP #$20
.A16
LDA #.LOWORD(unk_7E2020)
STA z:$53
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E2020)
STA z:$55
PHX
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
TAX
LDA f:offsets_to_debug_menu_map,X
CLC
ADC z:$53
STA z:$53
SEP #$20
.A8
LDA #$1F
STA [$53]
REP #$20
.A16
PLX
RTL
; End of function sub_C6033D
.A8
.I16
sub_C6036B:
SEP #$20
STA z:$40
REP #$20
.A16
LDA #.LOWORD(unk_7E2038)
STA z:$53
PHX
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E2038)
STA z:$55
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
TAX
LDA f:offsets_to_debug_menu_map,X
CLC
ADC z:$53
STA z:$53
SEP #$20
.A8
LDA z:$40
BNE loc_C603B7
LDA #$F
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
SEP #$20
.A8
LDA #6
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
SEP #$20
.A8
LDA #6
STA [$53]
BRA loc_C603D5
; ---------------------------------------------------------------------------
loc_C603B7:
SEP #$20
LDA #$36
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
SEP #$20
.A8
LDA #$F
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
SEP #$20
.A8
LDA #$E
STA [$53]
loc_C603D5:
REP #$20
.A16
PLX
RTL
; End of function sub_C6036B
.A8
.I16
sub_C603D9:
REP #$20
.A16
AND #$FF
STA z:$40
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E203A)
STA z:$55
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
PHX
TAX
LDA f:offsets_to_debug_menu_map,X
CLC
ADC #.LOWORD(unk_7E203A)
STA z:$53
SEP #$20
.A8
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CMP #$11
BEQ loc_C6040B
CMP #$12
BNE loc_C6041B
loc_C6040B:
REP #$20
.A16
LDA z:$40
AND #$FF
TAX
SEP #$20
.A8
LDA f:byte_C60447,X
STA z:$40
loc_C6041B:
REP #$20
.A16
LDA z:$40
AND #$F0
LSR
LSR
LSR
LSR
TAX
SEP #$20
.A8
LDA f:hex_digits,X
STA [$53]
REP #$20
.A16
LDA z:$40
AND #$F
TAX
INC z:$53
INC z:$53
SEP #$20
.A8
LDA f:hex_digits,X
STA [$53]
REP #$20
.A16
PLX
RTL
; End of function sub_C603D9
; ---------------------------------------------------------------------------
byte_C60447: .BYTE 0, 1, 2, 3, 4, 5, 6, 7
.BYTE 8, 9, $10, $11, $12, $13, $14, $15
.BYTE $16, $17, $18, $19, $20, $21, $22, $23
.BYTE $24, $25, $26, $27, $28, $29, $30, $31
.BYTE $32, $33, $34, $35, $36, $37, $38, $39
.BYTE $40, $41, $42, $43, $44, $45
.A8
.I16
sub_C60475:
SEP #$20
STA z:$40
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
BEQ loc_C604D4
REP #$20
.A16
LDA #.LOWORD(unk_7E2038)
STA z:$53
PHX
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E2038)
STA z:$55
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
TAX
LDA f:offsets_to_debug_menu_map,X
CLC
ADC z:$53
STA z:$53
LDA z:$40
AND #$FF
ASL
ASL
TAX
SEP #$20
.A8
LDA f:speed_names,X
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
INX
SEP #$20
.A8
LDA f:speed_names,X
STA [$53]
REP #$20
.A16
INC z:$53
loc_C604C5:
INC z:$53
INX
SEP #$20
.A8
LDA f:speed_names,X
STA [$53]
REP #$20
.A16
PLX
RTL
; ---------------------------------------------------------------------------
loc_C604D4:
REP #$20
LDA #.LOWORD(unk_7E2038)
STA z:$53
PHX
SEP #$20
.A8
LDA #.BANKBYTE(unk_7E2038)
STA z:$55
LDA a:.LOWORD(word_7E0316) ; orig=0x0316
CLC
ADC #8
REP #$20
.A16
AND #$FF
ASL
TAX
LDA f:offsets_to_debug_menu_map,X
CLC
ADC z:$53
STA z:$53
LDA z:$40
AND #$FF
ASL
ASL
TAX
SEP #$20
.A8
LDA f:screen_names,X
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
INX
SEP #$20
.A8
LDA f:screen_names,X
STA [$53]
REP #$20
.A16
INC z:$53
INC z:$53
INX
SEP #$20
.A8
LDA f:screen_names,X
STA [$53]
REP #$20
.A16
PLX
RTL
; End of function sub_C60475
.A8
.I16
close_debug_menu:
JSL f:remove_debug_menu_from_tilemap
REP #$20
.A16
LDA #.LOWORD(sub_C6053C)
STA z:0,X
SEP #$20
.A8
LDA #.BANKBYTE(sub_C6053C)
STA z:2,X
RTL
; End of function close_debug_menu
.A8
.I16
sub_C6053C:
SEP #$20
LDA a:.LOWORD(game_flags) ; orig=0x0314
AND #$FE
STA a:.LOWORD(game_flags) ; orig=0x0314
REP #$20
.A16
PHX
LDA z:$10,X
TAX
SEP #$20
.A8
LDA a:.LOWORD(debug_no_death) ; orig=0x00A5
STA z:$2E,X
LDA a:.LOWORD(debug_bomb_up) ; orig=0x00A7
STA z:$30,X
LDA z:$31,X
AND #$80
ORA a:.LOWORD(debug_fire_up) ; orig=0x00A8
STA z:$31,X
LDA a:.LOWORD(debug_speed_up) ; orig=0x00A9
STA z:$32,X
LDA a:.LOWORD(debug_remocon) ; orig=0x00AA
STA z:$33,X
STZ z:$39,X
LDA a:.LOWORD(debug_wall_pass) ; orig=0x00AB
ASL
ASL
ASL
ASL
ASL
ASL
AND #$40
ORA z:$39,X
STA z:$39,X
LDA a:.LOWORD(debug_bomb_pass) ; orig=0x00AC
ASL
ASL
ASL
ASL
ASL
AND #$20
ORA z:$39,X
STA z:$39,X
LDA a:.LOWORD(debug_fire_pass) ; orig=0x00AD
STA z:$36,X
BEQ loc_C6059A
REP #$20
.A16
LDA #$160
STA z:$36,X
SEP #$20
.A8
loc_C6059A:
LDA a:.LOWORD(debug_full_fire) ; orig=0x00AE