forked from p4plus2/DKC2-disassembly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank_B8.asm
13833 lines (12749 loc) · 321 KB
/
bank_B8.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
DATA_B88000:
db $B3, $DE, $12, $29
DATA_B88004:
dw CODE_B89197
dw CODE_B89220
dw CODE_B8852B
dw CODE_B8842B
dw CODE_B8848E
dw CODE_B884EC
dw CODE_B88623
dw CODE_B885B8
dw CODE_B8871B
dw CODE_B8865B
dw CODE_B8811E
dw CODE_B880D2
dw CODE_B89385
dw CODE_B88755
dw CODE_B89385
dw CODE_B89385
dw CODE_B886F3
dw CODE_B8869E
dw CODE_B89319
dw CODE_B8934A
dw CODE_B881E9
dw CODE_B88228
dw CODE_B893AA
dw CODE_B894C2
dw CODE_B88B15
dw CODE_B8874D
dw CODE_B887D2
dw CODE_B8857E
dw CODE_B88911
dw CODE_B88929
dw CODE_B885D5
dw CODE_B88A4C
dw CODE_B88A92
dw CODE_B88C9D
dw CODE_B88CA3
dw CODE_B8815F
dw CODE_B885F5
dw CODE_B8899C
dw CODE_B88269
dw CODE_B88340
dw CODE_B88379
dw CODE_B88864
dw CODE_B89385
dw CODE_B88421
dw CODE_B8841C
CODE_B8805E:
LDA $08C2 ;$B8805E \
AND #$0002 ;$B88061 |
BNE CODE_B8806A ;$B88064 |
CODE_B88066: ; |
JSR CODE_B8807D ;$B88066 |
RTL ;$B88069 /
CODE_B8806A:
LDA $0512 ;$B8806A \
BNE CODE_B88066 ;$B8806D |
LDA #$0002 ;$B8806F |
TRB $08C2 ;$B88072 |
LDA #$002D ;$B88075 |
JSR CODE_B8D8BE ;$B88078 |
BRA CODE_B88066 ;$B8807B /
CODE_B8807D:
PHK ;$B8807D \
PLB ;$B8807E |
LDA $0A82 ;$B8807F |
BNE CODE_B88085 ;$B88082 |
RTS ;$B88084 /
CODE_B88085:
STZ $0A82 ;$B88085 \
DEC A ;$B88088 |
ASL A ;$B88089 |
TAX ;$B8808A |
JMP (DATA_B88004,x) ;$B8808B /
CODE_B8808E:
JSR CODE_B88092 ;$B8808E \
RTL ;$B88091 /
CODE_B88092:
LDA $0595 ;$B88092 \
STA $66 ;$B88095 |
TAY ;$B88097 |
LDX $0593 ;$B88098 |
STX $64 ;$B8809B |
LDA $54,x ;$B8809D |
STA $8E ;$B8809F |
RTS ;$B880A1 /
CODE_B880A2:
JSR CODE_B880AB ;$B880A2 \
RTL ;$B880A5 /
CODE_B880A6:
CPX $0593 ;$B880A6 \
BEQ CODE_B88092 ;$B880A9 |
CODE_B880AB: ; |
LDA $0599 ;$B880AB |
STA $66 ;$B880AE |
TAY ;$B880B0 |
LDX $0597 ;$B880B1 |
STX $64 ;$B880B4 |
LDA $54,x ;$B880B6 |
STA $8E ;$B880B8 |
RTS ;$B880BA /
RTS ;$B880BB /
CODE_B880BC:
LDX $0593 ;$B880BC \
LDY $0597 ;$B880BF |
LDA $2E,x ;$B880C2 |
CMP #$0011 ;$B880C4 |
BNE CODE_B880D1 ;$B880C7 |
LDA #$0000 ;$B880C9 |
STA $1C,x ;$B880CC |
STA $001C,y ;$B880CE |
CODE_B880D1: ; |
RTS ;$B880D1 /
CODE_B880D2:
JSR CODE_B88092 ;$B880D2 \
JSR CODE_B88EBC ;$B880D5 |
LDX $0593 ;$B880D8 |
LDA $2E,x ;$B880DB |
ASL A ;$B880DD |
ASL A ;$B880DE |
TAX ;$B880DF |
LDA.l DATA_B896B7,x ;$B880E0 |
AND #$0005 ;$B880E4 |
BNE CODE_B8811D ;$B880E7 |
LDX $0593 ;$B880E9 |
LDA $6E ;$B880EC |
BNE CODE_B8811D ;$B880EE |
LDA #$0069 ;$B880F0 |
STA $2E,x ;$B880F3 |
LDX $64 ;$B880F5 |
LDA $24,x ;$B880F7 |
BMI CODE_B88103 ;$B880F9 |
CMP #$0200 ;$B880FB |
BMI CODE_B88103 ;$B880FE |
LDA #$0200 ;$B88100 |
CODE_B88103: ; |
STA $24,x ;$B88103 |
STZ $2A,x ;$B88105 |
STZ $0AEE ;$B88107 |
STZ $0AF2 ;$B8810A |
JSR CODE_B8CEBA ;$B8810D |
JSR CODE_B8CE99 ;$B88110 |
LDA #$00A2 ;$B88113 |
JSL CODE_B9D0B8 ;$B88116 |
JSR CODE_B881BB ;$B8811A |
CODE_B8811D: ; |
RTS ;$B8811D /
CODE_B8811E:
JSR CODE_B88092 ;$B8811E \
LDA $1E,x ;$B88121 |
LSR A ;$B88123 |
BCS CODE_B88127 ;$B88124 |
CODE_B88126: ; |
RTS ;$B88126 /
CODE_B88127:
LDA $2E,x ;$B88127 \
ASL A ;$B88129 |
ASL A ;$B8812A |
TAX ;$B8812B |
LDA.l DATA_B896B7,x ;$B8812C |
AND #$0005 ;$B88130 |
BNE CODE_B88126 ;$B88133 |
JSR CODE_B8CEBA ;$B88135 |
JSR CODE_B8CE99 ;$B88138 |
LDX $64 ;$B8813B |
LDA #$0063 ;$B8813D |
STA $2E,x ;$B88140 |
STZ $24,x ;$B88142 |
STZ $20,x ;$B88144 |
STZ $26,x ;$B88146 |
LDA #$00A0 ;$B88148 |
JSL CODE_B9D0B8 ;$B8814B |
LDA $0A86 ;$B8814F |
STA $091F ;$B88152 |
LDA #$0008 ;$B88155 |
TRB $0B02 ;$B88158 |
JSR CODE_B881BB ;$B8815B |
RTS ;$B8815E /
CODE_B8815F:
JSR CODE_B88092 ;$B8815F \
JSR CODE_B8CEBA ;$B88162 |
JSR CODE_B8CE99 ;$B88165 |
LDX $64 ;$B88168 |
LDA #$005D ;$B8816A |
STA $2E,x ;$B8816D |
LDA #$0020 ;$B8816F |
STA $42,x ;$B88172 |
LDY #$0000 ;$B88174 |
LDA $0E,x ;$B88177 |
AND #$7FFF ;$B88179 |
CMP #$0010 ;$B8817C |
BMI CODE_B88184 ;$B8817F |
LDY #$0500 ;$B88181 |
CODE_B88184: ; |
TYA ;$B88184 |
STA $44,x ;$B88185 |
STZ $24,x ;$B88187 |
STZ $20,x ;$B88189 |
STZ $26,x ;$B8818B |
LDA #$00A0 ;$B8818D |
JSL CODE_B9D0B8 ;$B88190 |
LDA $0A86 ;$B88194 |
STA $091F ;$B88197 |
LDA #$0008 ;$B8819A |
TRB $0B02 ;$B8819D |
LDA $091B ;$B881A0 |
AND #$FCFF ;$B881A3 |
ORA #$0100 ;$B881A6 |
STA $091B ;$B881A9 |
JSL CODE_BB8C2C ;$B881AC |
JSR CODE_B881BB ;$B881B0 |
RTS ;$B881B3 /
CODE_B881B4:
JSR CODE_B881BB ;$B881B4 \
JSR CODE_B88EBC ;$B881B7 |
RTL ;$B881BA /
CODE_B881BB:
LDA $0D7A ;$B881BB \
CMP $0597 ;$B881BE |
BEQ CODE_B881C4 ;$B881C1 |
RTS ;$B881C3 /
CODE_B881C4:
STZ $0D7A ;$B881C4 \
LDX $0597 ;$B881C7 |
LDA #$0022 ;$B881CA |
STA $2E,x ;$B881CD |
LDA #$00D8 ;$B881CF |
STA $02,x ;$B881D2 |
LDA #$001F ;$B881D4 |
LDX #$001C ;$B881D7 |
LDY #$0000 ;$B881DA |
JSR CODE_B8D8D5 ;$B881DD |
LDX $0593 ;$B881E0 |
LDA #$00E4 ;$B881E3 |
STA $02,x ;$B881E6 |
RTS ;$B881E8 /
CODE_B881E9:
JSR CODE_B881BB ;$B881E9 \
LDX $0A88 ;$B881EC |
JSR CODE_B880A6 ;$B881EF |
JSR CODE_B88EBC ;$B881F2 |
STZ $0AEE ;$B881F5 |
STZ $0AF2 ;$B881F8 |
LDA #$004E ;$B881FB |
JSL CODE_B9D0B8 ;$B881FE |
LDX $64 ;$B88202 |
LDA $0A86 ;$B88204 |
STA $42,x ;$B88207 |
CPX $0593 ;$B88209 |
BEQ CODE_B88222 ;$B8820C |
LDY $2E,x ;$B8820E |
LDA #$005C ;$B88210 |
STA $2E,x ;$B88213 |
CPY #$002B ;$B88215 |
BNE CODE_B88221 ;$B88218 |
JSR CODE_B88092 ;$B8821A |
JSL CODE_B8A57C ;$B8821D |
CODE_B88221: ; |
RTS ;$B88221 /
CODE_B88222:
LDA #$005B ;$B88222 \
STA $2E,x ;$B88225 |
RTS ;$B88227 /
CODE_B88228:
JSR CODE_B88092 ;$B88228 \
JSL CODE_B8CEB6 ;$B8822B |
JSL CODE_B9DFB2 ;$B8822F |
JSR CODE_B8CE78 ;$B88233 |
LDA #$0006 ;$B88236 |
JSL CODE_B9D0B8 ;$B88239 |
LDX $64 ;$B8823D |
LDA #$0067 ;$B8823F |
STA $2E,x ;$B88242 |
LDA $08C2 ;$B88244 |
AND #$4000 ;$B88247 |
BNE CODE_B8824D ;$B8824A |
RTS ;$B8824C /
CODE_B8824D:
JSR CODE_B880AB ;$B8824D \
LDA #$0022 ;$B88250 |
STA $2E,x ;$B88253 |
LDA #$0001 ;$B88255 |
LDX #$0006 ;$B88258 |
LDY #$0000 ;$B8825B |
JSR CODE_B8D8D5 ;$B8825E |
RTS ;$B88261 /
CODE_B88262:
LDA #$0027 ;$B88262 \
JML CODE_B8D8BA ;$B88265 /
CODE_B88269:
LDA #$0010 ;$B88269 \
TRB $08C4 ;$B8826C |
JSR CODE_B880BC ;$B8826F |
JSL CODE_B881B4 ;$B88272 |
LDA $0515 ;$B88276 |
CMP #$0003 ;$B88279 |
BEQ CODE_B882D6 ;$B8827C |
JSR CODE_B88092 ;$B8827E |
LDA $0A86 ;$B88281 |
EOR $12,x ;$B88284 |
AND #$4000 ;$B88286 |
EOR $12,x ;$B88289 |
STA $12,x ;$B8828B |
LDA $1E,x ;$B8828D |
AND #$0001 ;$B8828F |
BNE CODE_B882D2 ;$B88292 |
LDA $6E ;$B88294 |
BNE CODE_B882D2 ;$B88296 |
LDA $2E,x ;$B88298 |
ASL A ;$B8829A |
ASL A ;$B8829B |
TAX ;$B8829C |
LDA.l DATA_B896B7,x ;$B8829D |
AND #$0002 ;$B882A1 |
BNE CODE_B882C3 ;$B882A4 |
JSL CODE_B8CEB6 ;$B882A6 |
JSL CODE_B8CE95 ;$B882AA |
JSL CODE_B9DFCF ;$B882AE |
LDA #$003F ;$B882B2 |
JSL CODE_B9D0B8 ;$B882B5 |
LDX $64 ;$B882B9 |
LDA #$0064 ;$B882BB |
STA $2E,x ;$B882BE |
STZ $26,x ;$B882C0 |
RTS ;$B882C2 /
CODE_B882C3:
LDX $64 ;$B882C3 \
LDA #$0070 ;$B882C5 |
STA $2E,x ;$B882C8 |
LDA #$0001 ;$B882CA |
JSL CODE_B58018 ;$B882CD |
RTS ;$B882D1 /
CODE_B882D2:
JSR CODE_B8830E ;$B882D2 \
RTS ;$B882D5 /
CODE_B882D6:
LDA #$FFFF ;$B882D6 \
STA $0A86 ;$B882D9 |
JSR CODE_B88B15 ;$B882DC |
JSR CODE_B88092 ;$B882DF |
LDA #$007B ;$B882E2 |
STA $2E,x ;$B882E5 |
LDA #$001E ;$B882E7 |
STA $30,x ;$B882EA |
LDA $08C2 ;$B882EC |
AND #$4000 ;$B882EF |
BEQ CODE_B8830D ;$B882F2 |
JSR CODE_B880AB ;$B882F4 |
LDA #$0022 ;$B882F7 |
STA $2E,x ;$B882FA |
LDA #$00D8 ;$B882FC |
STA $02,x ;$B882FF |
LDA #$001F ;$B88301 |
LDX #$001C ;$B88304 |
LDY #$0000 ;$B88307 |
JSR CODE_B8D8D5 ;$B8830A |
CODE_B8830D: ; |
RTS ;$B8830D /
CODE_B8830E:
JSL CODE_B3E287 ;$B8830E \
JSR CODE_B88092 ;$B88312 |
LDX $64 ;$B88315 |
LDA #$0065 ;$B88317 |
STA $2E,x ;$B8831A |
LDA $6E ;$B8831C |
BNE CODE_B88338 ;$B8831E |
JSR CODE_B8B6A7 ;$B88320 |
CMP #$0002 ;$B88323 |
BEQ CODE_B88330 ;$B88326 |
LDA #$00A1 ;$B88328 |
JSL CODE_B9D0B8 ;$B8832B |
RTS ;$B8832F /
CODE_B88330:
LDA #$00A3 ;$B88330 \
JSL CODE_B9D0B8 ;$B88333 |
RTS ;$B88337 /
CODE_B88338:
LDA #$009A ;$B88338 \
JSL CODE_B9D08C ;$B8833B |
RTS ;$B8833F /
CODE_B88340:
LDX $0593 ;$B88340 \
LDY $0597 ;$B88343 |
LDA #$0000 ;$B88346 |
STA $1C,x ;$B88349 |
STA $001C,y ;$B8834B |
JSR CODE_B88092 ;$B8834E |
LDA #$00F4 ;$B88351 |
STA $02,x ;$B88354 |
LDA $2E,x ;$B88356 |
CMP #$0011 ;$B88358 |
BNE CODE_B88364 ;$B8835B |
LDA #$0047 ;$B8835D |
JSL CODE_B9D0B8 ;$B88360 |
CODE_B88364: ; |
LDA #$001F ;$B88364 |
LDY #$0100 ;$B88367 |
JSL CODE_B8D1E4 ;$B8836A |
LDA #$0002 ;$B8836E |
JSL CODE_B58018 ;$B88371 |
JSR CODE_B8A699 ;$B88375 |
RTS ;$B88378 /
CODE_B88379:
JSR CODE_B880BC ;$B88379 \
JSR CODE_B88092 ;$B8837C |
LDA $1C ;$B8837F |
CMP #$000D ;$B88381 |
BNE CODE_B8838D ;$B88384 |
LDA #$077E ;$B88386 |
JSL CODE_B58003 ;$B88389 |
CODE_B8838D: ; |
LDA $1C ;$B8838D |
CMP #$0003 ;$B8838F |
BNE CODE_B883AA ;$B88392 |
LDY #$0018 ;$B88394 |
JSL CODE_BB842C ;$B88397 |
LDY $68 ;$B8839B |
LDA #$02C0 ;$B8839D |
STA $000A,y ;$B883A0 |
LDA #$0766 ;$B883A3 |
JSL CODE_B58003 ;$B883A6 |
CODE_B883AA: ; |
LDA $6C ;$B883AA |
BEQ CODE_B883B8 ;$B883AC |
LDX $6C ;$B883AE |
STZ $1A,x ;$B883B0 |
STZ $16,x ;$B883B2 |
STZ $6C ;$B883B4 |
STZ $6E ;$B883B6 |
CODE_B883B8: ; |
LDX $64 ;$B883B8 |
STZ $1A,x ;$B883BA |
STZ $16,x ;$B883BC |
LDA #$003B ;$B883BE |
STA $2E,x ;$B883C1 |
LDA #$00A0 ;$B883C3 |
STA $42,x ;$B883C6 |
STZ $30,x ;$B883C8 |
LDA #$0003 ;$B883CA |
STA $0A36 ;$B883CD |
JSL CODE_B883D5 ;$B883D0 |
RTS ;$B883D4 /
CODE_B883D5:
LDA $08C2 ;$B883D5 \
AND #$2000 ;$B883D8 |
BNE CODE_B8841B ;$B883DB |
JSL CODE_BEC66F ;$B883DD |
LDA $1C ;$B883E1 |
CMP #$001F ;$B883E3 |
BEQ CODE_B8841B ;$B883E6 |
BRA CODE_B88414 ;$B883E8 /
CMP #$0012 ;$B883EA |
BEQ CODE_B88414 ;$B883ED |
CMP #$001D ;$B883EF |
BEQ CODE_B88414 ;$B883F2 |
CMP #$0006 ;$B883F4 |
BEQ CODE_B88414 ;$B883F7 |
CMP #$0010 ;$B883F9 |
BEQ CODE_B88414 ;$B883FC |
CMP #$000D ;$B883FE |
BEQ CODE_B88414 ;$B88401 |
CMP #$0003 ;$B88403 |
BEQ CODE_B88414 ;$B88406 |
CMP #$0005 ;$B88408 |
BEQ CODE_B88414 ;$B8840B |
CMP #$0007 ;$B8840D |
BEQ CODE_B88414 ;$B88410 |
BRA CODE_B8841B ;$B88412 /
CODE_B88414:
LDA #$0001 ;$B88414 \
JSL CODE_B58018 ;$B88417 |
CODE_B8841B: ; |
RTL ;$B8841B /
CODE_B8841C:
JSL CODE_BBBE01 ;$B8841C \
RTS ;$B88420 /
CODE_B88421:
LDA #$FFFF ;$B88421 \
STA $059D ;$B88424 |
JML CODE_BBBE01 ;$B88427 /
CODE_B8842B:
JSR CODE_B8C87C ;$B8842B \
BCS CODE_B8848D ;$B8842E |
LDX #$0540 ;$B88430 |
LDY #$0540 ;$B88433 |
JSR CODE_B89186 ;$B88436 |
LDA $0597 ;$B88439 |
STA $0D7A ;$B8843C |
STZ $0D7C ;$B8843F |
STZ $0D7E ;$B88442 |
LDA #$0001 ;$B88445 |
STA $0D80 ;$B88448 |
LDA #$0007 ;$B8844B |
LDY #$0100 ;$B8844E |
JSL CODE_B8D1E4 ;$B88451 |
JSR CODE_B88092 ;$B88455 |
LDA #$0013 ;$B88458 |
STA $2E,x ;$B8845B |
LDA $0006,y ;$B8845D |
AND #$FFFB ;$B88460 |
STA $0006,y ;$B88463 |
LDA #$001F ;$B88466 |
JSL CODE_B9D0B8 ;$B88469 |
JSR CODE_B880AB ;$B8846D |
LDX $64 ;$B88470 |
LDA #$0040 ;$B88472 |
STA $2E,x ;$B88475 |
LDA #$FFE4 ;$B88477 |
STA $00004A ;$B8847A |
LDA #$001F ;$B8847E |
LDX #$001C ;$B88481 |
LDY #$0000 ;$B88484 |
JSR CODE_B8D8D7 ;$B88487 |
JMP CODE_B8A14E ;$B8848A /
CODE_B8848D:
RTS ;$B8848D /
CODE_B8848E:
JSR CODE_B8851B ;$B8848E \
BNE CODE_B884D6 ;$B88491 |
JSR CODE_B880BC ;$B88493 |
LDA $6C ;$B88496 |
BNE CODE_B884D7 ;$B88498 |
LDA $0597 ;$B8849A |
STA $0D7A ;$B8849D |
STZ $0D7C ;$B884A0 |
STZ $0D7E ;$B884A3 |
LDA #$0001 ;$B884A6 |
STA $0D80 ;$B884A9 |
JSR CODE_B8D1F4 ;$B884AC |
JSR CODE_B88092 ;$B884AF |
LDA #$0017 ;$B884B2 |
STA $2E,x ;$B884B5 |
LDA $0006,y ;$B884B7 |
AND #$FFFB ;$B884BA |
STA $0006,y ;$B884BD |
LDA #$001F ;$B884C0 |
JSL CODE_B9D0B8 ;$B884C3 |
JSR CODE_B880AB ;$B884C7 |
LDA #$0018 ;$B884CA |
STA $2E,x ;$B884CD |
LDA #$0020 ;$B884CF |
JSL CODE_B9D0B8 ;$B884D2 |
CODE_B884D6: ; |
RTS ;$B884D6 /
CODE_B884D7:
JSR CODE_B880AB ;$B884D7 \
LDA #$0022 ;$B884DA |
STA $2E,x ;$B884DD |
LDA #$0004 ;$B884DF |
LDX #$0003 ;$B884E2 |
LDY #$0000 ;$B884E5 |
JSR CODE_B8D8D5 ;$B884E8 |
RTS ;$B884EB /
CODE_B884EC:
JSR CODE_B8851B ;$B884EC \
BNE CODE_B8851A ;$B884EF |
LDA #$0002 ;$B884F1 |
BIT $08C4 ;$B884F4 |
BNE CODE_B8851A ;$B884F7 |
STZ $0D7A ;$B884F9 |
JSR CODE_B88092 ;$B884FC |
LDA #$007E ;$B884FF |
STA $2E,x ;$B88502 |
JSR CODE_B880AB ;$B88504 |
LDA #$0076 ;$B88507 |
STA $2E,x ;$B8850A |
LDA #$0040 ;$B8850C |
JSL CODE_B9D0B8 ;$B8850F |
STZ $20,x ;$B88513 |
LDA #$FA00 ;$B88515 |
STA $24,x ;$B88518 |
CODE_B8851A: ; |
RTS ;$B8851A /
CODE_B8851B:
LDX $0593 ;$B8851B \
LDA $2E,x ;$B8851E |
ASL A ;$B88520 |
ASL A ;$B88521 |
TAX ;$B88522 |
LDA.l DATA_B896B7,x ;$B88523 |
AND #$0020 ;$B88527 |
RTS ;$B8852A /
CODE_B8852B:
JSR CODE_B880BC ;$B8852B \
LDX $0593 ;$B8852E |
LDA $2E,x ;$B88531 |
CMP #$002C ;$B88533 |
BEQ CODE_B8853D ;$B88536 |
JSR CODE_B8851B ;$B88538 |
BNE CODE_B8857D ;$B8853B |
CODE_B8853D: ; |
LDA $0597 ;$B8853D |
STA $0D7A ;$B88540 |
STZ $0D7C ;$B88543 |
STZ $0D7E ;$B88546 |
LDA #$0001 ;$B88549 |
STA $0D80 ;$B8854C |
JSR CODE_B88092 ;$B8854F |
LDA #$001A ;$B88552 |
STA $2E,x ;$B88555 |
LDA $0006,y ;$B88557 |
AND #$FFFB ;$B8855A |
STA $0006,y ;$B8855D |
LDA #$0023 ;$B88560 |
JSL CODE_B9D0B8 ;$B88563 |
JSR CODE_B880AB ;$B88567 |
LDA #$0018 ;$B8856A |
STA $2E,x ;$B8856D |
LDA $30,x ;$B8856F |
AND #$FFF7 ;$B88571 |
STA $30,x ;$B88574 |
LDA #$0020 ;$B88576 |
JSL CODE_B9D0B8 ;$B88579 |
CODE_B8857D: ; |
RTS ;$B8857D /
CODE_B8857E:
LDA #$0080 ;$B8857E \
LDY #$0002 ;$B88581 |
JSR CODE_B8D1E8 ;$B88584 |
JSR CODE_B88092 ;$B88587 |
LDY $66 ;$B8858A |
LDA $0004,y ;$B8858C |
AND #$4000 ;$B8858F |
BEQ CODE_B885B7 ;$B88592 |
LDA $000E,y ;$B88594 |
CLC ;$B88597 |
ADC #$0100 ;$B88598 |
CMP #$0800 ;$B8859B |
BMI CODE_B885A3 ;$B8859E |
LDA #$0800 ;$B885A0 |
CODE_B885A3: ; |
STA $000E,y ;$B885A3 |
LDY #$0032 ;$B885A6 |
LDA [$8E],y ;$B885A9 |
STA $24,x ;$B885AB |
JSR CODE_B8CA07 ;$B885AD |
LDX $64 ;$B885B0 |
LDA #$0019 ;$B885B2 |
STA $2E,x ;$B885B5 |
CODE_B885B7: ; |
RTS ;$B885B7 /
CODE_B885B8:
JSR CODE_B88092 ;$B885B8 \
JSR CODE_B88EBC ;$B885BB |
LDX $64 ;$B885BE |
LDA #$0041 ;$B885C0 |
STA $2E,x ;$B885C3 |
STZ $0E,x ;$B885C5 |
STZ $26,x ;$B885C7 |
STZ $20,x ;$B885C9 |
STZ $24,x ;$B885CB |
LDA #$002B ;$B885CD |
JSL CODE_B9D0B8 ;$B885D0 |
RTS ;$B885D4 /
CODE_B885D5:
JSR CODE_B88092 ;$B885D5 \
LDA #$005A ;$B885D8 |
STA $2E,x ;$B885DB |
STZ $20,x ;$B885DD |
STZ $26,x ;$B885DF |
LDA $0A86 ;$B885E1 |
EOR $12,x ;$B885E4 |
AND #$4000 ;$B885E6 |
EOR $12,x ;$B885E9 |
STA $12,x ;$B885EB |
LDA #$009F ;$B885ED |
JSL CODE_B9D0B8 ;$B885F0 |
RTS ;$B885F4 /
CODE_B885F5:
JSR CODE_B88092 ;$B885F5 \
JSR CODE_B8CEBA ;$B885F8 |
JSR CODE_B8CE99 ;$B885FB |
LDA #$005A ;$B885FE |
STA $2E,x ;$B88601 |
LDA $0A86 ;$B88603 |
EOR $12,x ;$B88606 |
AND #$4000 ;$B88608 |
EOR $12,x ;$B8860B |
STA $12,x ;$B8860D |
LDA #$FC00 ;$B8860F |
STA $24,x ;$B88612 |
STZ $20,x ;$B88614 |
STZ $26,x ;$B88616 |
LDA #$0048 ;$B88618 |
JSL CODE_B9D0B8 ;$B8861B |
JSR CODE_B881BB ;$B8861F |
RTS ;$B88622 /
CODE_B88623:
JSR CODE_B88092 ;$B88623 \
LDX $64 ;$B88626 |
LDA #$0043 ;$B88628 |
LDY $0D7A ;$B8862B |
BEQ CODE_B88633 ;$B8862E |
LDA #$007A ;$B88630 |
CODE_B88633: ; |
STA $2E,x ;$B88633 |
STZ $26,x ;$B88635 |
STZ $20,x ;$B88637 |
STZ $24,x ;$B88639 |
JSR CODE_B88646 ;$B8863B |
LDA #$0668 ;$B8863E |
JSL CODE_B58003 ;$B88641 |
RTS ;$B88645 /
CODE_B88646:
LDA $0D7A ;$B88646 \
BNE CODE_B88653 ;$B88649 |
LDA #$002D ;$B8864B |
JSL CODE_B9D0B8 ;$B8864E |
RTS ;$B88652 /
CODE_B88653:
LDA #$002E ;$B88653 \
JSL CODE_B9D0B8 ;$B88656 |
RTS ;$B8865A /
CODE_B8865B:
LDX $0A86 ;$B8865B \
CPX $0BA2 ;$B8865E |
BEQ CODE_B88664 ;$B88661 |
CODE_B88663: ; |
RTS ;$B88663 /
CODE_B88664:
LDA $00,x ;$B88664 \
CMP #$02D8 ;$B88666 |
BEQ CODE_B88670 ;$B88669 |
CMP #$0254 ;$B8866B |
BNE CODE_B88663 ;$B8866E |
CODE_B88670: ; |
JSR CODE_B88092 ;$B88670 |
JSR CODE_B88EBC ;$B88673 |
LDA $0BA2 ;$B88676 |
STA $0BA0 ;$B88679 |
STZ $0BA2 ;$B8867C |
LDX $64 ;$B8867F |
LDA #$0045 ;$B88681 |
STA $2E,x ;$B88684 |
STZ $26,x ;$B88686 |
STZ $20,x ;$B88688 |
STZ $24,x ;$B8868A |
STZ $2A,x ;$B8868C |
LDY $0BA0 ;$B8868E |
LDA $0006,y ;$B88691 |
STA $06,x ;$B88694 |
LDA #$002F ;$B88696 |
JSL CODE_B9D0B8 ;$B88699 |
RTS ;$B8869D /
CODE_B8869E:
JSR CODE_B88092 ;$B8869E \
JSR CODE_B8B793 ;$B886A1 |
BCS CODE_B886CC ;$B886A4 |
JSR CODE_B886E0 ;$B886A6 |
LDA #$0035 ;$B886A9 |
STA $2E,x ;$B886AC |
LDA $0A86 ;$B886AE |
BEQ CODE_B886B5 ;$B886B1 |
STA $0A,x ;$B886B3 |
CODE_B886B5: ; |
JSR CODE_B886CD ;$B886B5 |
LDA $06,x ;$B886B8 |
AND #$FFF0 ;$B886BA |
ORA $32 ;$B886BD |
STA $06,x ;$B886BF |
STZ $24,x ;$B886C1 |
STZ $2A,x ;$B886C3 |
LDA #$002F ;$B886C5 |
JSL CODE_B9D0B8 ;$B886C8 |
CODE_B886CC: ; |
RTS ;$B886CC /
CODE_B886CD:
LDX $64 ;$B886CD \
LDA $0A88 ;$B886CF |
BMI CODE_B886DA ;$B886D2 |
LDA #$0003 ;$B886D4 |
STA $32 ;$B886D7 |
RTS ;$B886D9 /
CODE_B886DA:
LDA #$001F ;$B886DA \
STA $32 ;$B886DD |
RTS ;$B886DF /
CODE_B886E0:
LDA #$8000 ;$B886E0 \
STA $0AEA ;$B886E3 |
LDA #$8000 ;$B886E6 |
STA $0AEC ;$B886E9 |
STZ $0AEE ;$B886EC |
STZ $0AF2 ;$B886EF |
RTS ;$B886F2 /
CODE_B886F3:
JSR CODE_B88092 ;$B886F3 \
JSR CODE_B8B793 ;$B886F6 |
BCS CODE_B8871A ;$B886F9 |
LDA #$0038 ;$B886FB |
STA $2E,x ;$B886FE |
LDA $0A86 ;$B88700 |
CLC ;$B88703 |
ADC #$0028 ;$B88704 |
STA $0A,x ;$B88707 |
STZ $24,x ;$B88709 |
STZ $2A,x ;$B8870B |
LDA #$0039 ;$B8870D |
JSL CODE_B9D0B8 ;$B88710 |
STZ $0AEE ;$B88714 |
STZ $0AF2 ;$B88717 |
CODE_B8871A: ; |
RTS ;$B8871A /
CODE_B8871B:
JSR CODE_B88092 ;$B8871B \
LDA #$0055 ;$B8871E |
STA $2E,x ;$B88721 |
LDA $6E ;$B88723 |
BNE CODE_B8873C ;$B88725 |
LDA $0D7A ;$B88727 |
BNE CODE_B88734 ;$B8872A |
LDA #$004C ;$B8872C |
JSL CODE_B9D0B8 ;$B8872F |
RTS ;$B88733 /
CODE_B88734:
LDA #$004D ;$B88734 \
JSL CODE_B9D0B8 ;$B88737 |
RTS ;$B8873B /
CODE_B8873C:
LDA #$005E ;$B8873C \
JSL CODE_B9D08C ;$B8873F |
LDX $64 ;$B88743 |
STZ $3E ;$B88745 |
LDA #$0055 ;$B88747 |
STA $2E,x ;$B8874A |
RTS ;$B8874C /
CODE_B8874D:
JSR CODE_B880BC ;$B8874D \
NOP ;$B88750 |
NOP ;$B88751 |
NOP ;$B88752 |
NOP ;$B88753 |
RTS ;$B88754 /
CODE_B88755:
JSR CODE_B880BC ;$B88755 \
JSR CODE_B88092 ;$B88758 |
LDX $64 ;$B8875B |
LDA $0A86 ;$B8875D |
BNE CODE_B88787 ;$B88760 |
LDY $0A88 ;$B88762 |
LDA $0048,y ;$B88765 |
BIT $12,x ;$B88768 |
BVC CODE_B88770 ;$B8876A |
EOR #$FFFF ;$B8876C |
INC A ;$B8876F |
CODE_B88770: ; |
STA $20,x ;$B88770 |
LDA $004A,y ;$B88772 |
STA $24,x ;$B88775 |
LDX $66 ;$B88777 |
LDA $004C,y ;$B88779 |
STA $08,x ;$B8877C |
LDA $004E,y ;$B8877E |
STA $0A,x ;$B88781 |
LDX $64 ;$B88783 |
BRA CODE_B88796 ;$B88785 /
CODE_B88787:
STA $24,x ;$B88787 \
LDA $0A88 ;$B88789 |
STA $20,x ;$B8878C |
JSL CODE_B8CEB6 ;$B8878E |
JSL CODE_B8CE95 ;$B88792 |
CODE_B88796: ; |
STZ $1E,x ;$B88796 |
LDA $0D7A ;$B88798 |
CMP $0597 ;$B8879B |
BEQ CODE_B887BC ;$B8879E |
LDX $64 ;$B887A0 |
LDA #$0056 ;$B887A2 |
STA $2E,x ;$B887A5 |
JMP CODE_B88823 ;$B887A7 /
CODE_B887AA:
LDA #$0004 ;$B887AA \
JSR CODE_B8D1FF ;$B887AD |
LDA #$0080 ;$B887B0 |
LDY #$0003 ;$B887B3 |
JSR CODE_B8D1E8 ;$B887B6 |
JSR CODE_B8CE78 ;$B887B9 |
CODE_B887BC: ; |
LDX $64 ;$B887BC |
LDY #$0008 ;$B887BE |
LDA [$8E],y ;$B887C1 |
STA $24,x ;$B887C3 |
LDA #$001C ;$B887C5 |
STA $2E,x ;$B887C8 |
LDA #$0025 ;$B887CA |
JSL CODE_B9D0B8 ;$B887CD |
RTS ;$B887D1 /
CODE_B887D2:
JSR CODE_B88092 ;$B887D2 \
LDA $2E,x ;$B887D5 |
CMP #$0011 ;$B887D7 |
BNE CODE_B887DD ;$B887DA |
RTS ;$B887DC /
CODE_B887DD:
JSL CODE_B8CEB6 ;$B887DD \
STZ $0AEE ;$B887E1 |
STZ $0AF2 ;$B887E4 |
LDA $0D7A ;$B887E7 |
CMP $0597 ;$B887EA |
BEQ CODE_B887AA ;$B887ED |
JSL CODE_B9DFB2 ;$B887EF |
LDA #$0004 ;$B887F3 |
JSR CODE_B8D1FF ;$B887F6 |
LDA #$0080 ;$B887F9 |
LDY #$0002 ;$B887FC |
JSR CODE_B8D1E8 ;$B887FF |
JSR CODE_B88EBC ;$B88802 |
JSR CODE_B8CE78 ;$B88805 |
LDX $64 ;$B88808 |
LDA #$0016 ;$B8880A |
LDY $2E,x ;$B8880D |
CPY #$004F ;$B8880F |
BEQ CODE_B88823 ;$B88812 |
CPY #$0067 ;$B88814 |
BCC CODE_B88821 ;$B88817 |
CPY #$0069 ;$B88819 |
BCS CODE_B88821 ;$B8881C |
LDA #$0068 ;$B8881E |
CODE_B88821: ; |
STA $2E,x ;$B88821 |
CODE_B88823: ; |
LDA $6E ;$B88823 |
BNE CODE_B88854 ;$B88825 |
LDA $0D7A ;$B88827 |
BNE CODE_B8885C ;$B8882A |
LDA #$001C ;$B8882C |
JSL CODE_B9D0B8 ;$B8882F |
JSR CODE_B880AB ;$B88833 |
LDA $2E,x ;$B88836 |
CMP #$002F ;$B88838 |