forked from p4plus2/DKC2-disassembly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank_EE.asm
10019 lines (9825 loc) · 366 KB
/
bank_EE.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
spc_base_engine:
arch spc700
base $04D8
CODE_04D8:
CLRP ;$04D8 |
MOV X, #$FF ;$04D9 |
MOV SP, X ;$04DB |
INC X ;$04DC |
MOV $F4, X ;$04DD |
INC X ;$04DF |
MOV $E9, X ;$04E0 |
MOV A, #$00 ;$04E2 |
MOV $00, A ;$04E4 |
MOV $01, #$D0 ;$04E6 |
CODE_04E9: ; |
MOV Y, A ;$04E9 |
CODE_04EA: ; |
MOV ($00)+Y, A ;$04EA |
INC Y ;$04EC |
BNE CODE_04EA ;$04ED |
INC $01 ;$04EF |
BNE CODE_04E9 ;$04F1 |
CODE_04F3: ; |
MOV X, #$FF ;$04F3 |
MOV $F2, #$6C ;$04F5 |
MOV $F3, X ;$04F8 |
MOV $F2, #$7D ;$04FA |
MOV $F3, #$00 ;$04FD |
MOV $F2, #$6D ;$0500 |
MOV $F3, X ;$0503 |
MOV $04B7, X ;$0505 |
MOV X, $E9 ;$0508 |
CODE_050A: ; |
CMP X, $F4 ;$050A |
BNE CODE_050A ;$050C |
MOVW YA, $F5 ;$050E |
MOV $F4, X ;$0510 |
INC X ;$0512 |
MOV $0539, A ;$0513 |
MOV $0542, A ;$0516 |
MOV $053A, Y ;$0519 |
MOV $0543, Y ;$051C |
CODE_051F: ; |
CMP X, $F4 ;$051F |
BNE CODE_051F ;$0521 |
MOVW YA, $F5 ;$0523 |
MOV $F4, X ;$0525 |
INC X ;$0527 |
MOV $EA, A ;$0528 |
MOV $EB, Y ;$052A |
DECW $EA ;$052C |
BMI CODE_0556 ;$052E |
MOV Y, #$00 ;$0530 |
CODE_0532: ; |
CMP X, $F4 ;$0532 |
BNE CODE_0532 ;$0534 |
MOV A, $F5 ;$0536 |
DATA_0538: ; |
MOV $0000+Y, A ;$0538 |
MOV A, $F6 ;$053B |
MOV $F4, X ;$053D |
INC X ;$053F |
INC Y ;$0540 |
MOV $0000+Y, A ;$0541 |
INC Y ;$0544 |
BEQ CODE_054E ;$0545 |
CODE_0547: ; |
DECW $EA ;$0547 |
BPL CODE_0532 ;$0549 |
JMP CODE_050A ;$054B |
CODE_054E:
INC $053A ;$054E |
INC $0543 ;$0551 |
BRA CODE_0547 ;$0554 |
CODE_0556:
MOV $E9, X ;$0556 |
MOV X, #$00 ;$0558 |
JMP (DATA_0538+1+X) ;$055A |
db $00
dw $D604
base off
arch 65816
spc_sound_engine:
arch spc700
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
base $0660
CODE_0660:
MOV A, $055D ;$0660 |
ASL A ;$0663 |
MOV Y, A ;$0664 |
MOV A, $1312+Y ;$0665 |
MOV $E5, A ;$0668 |
MOV A, $1313+Y ;$066A |
MOV $E6, A ;$066D |
JMP CODE_0678 ;$066F |
MOV $E6, #$13 ;$0672 |
MOV $E5, #$00 ;$0675 |
CODE_0678: ; |
CALL $100B ;$0678 |
MOV A, #$00 ;$067B |
MOV $1C, A ;$067D |
MOV $1D, A ;$067F |
MOV $F1, A ;$0681 |
CODE_0683: ; |
MOV A, $E9 ;$0683 |
CMP A, $F4 ;$0685 |
BEQ CODE_068C ;$0687 |
JMP CODE_0781 ;$0689 |
CODE_068C:
MOV X, $F6 ;$068C |
MOV $055D, X ;$068E |
MOV X, $F5 ;$0691 |
MOV $F4, A ;$0693 |
INC A ;$0695 |
MOV $E9, A ;$0696 |
MOV A, X ;$0698 |
CMP A, #$80 ;$0699 |
BPL CODE_06A0 ;$069B |
JMP CODE_0773 ;$069D |
CODE_06A0:
AND A, #$07 ;$06A0 |
ASL A ;$06A2 |
MOV X, A ;$06A3 |
JMP (DATA_06A7+X) ;$06A4 |
DATA_06A7:
dw CODE_070A
dw CODE_0702
dw CODE_06FA
dw CODE_06B7
dw CODE_0739
dw CODE_0712
dw CODE_077B
dw CODE_07DB
CODE_06B7:
MOV X, #$7F ;$06B7 |
CODE_06B9: ; |
MOV A, #$71 ;$06B9 |
CODE_06BB: ; |
MOV Y, A ;$06BB |
MOV $F2, Y ;$06BC |
CALL CODE_06EB ;$06BE |
DEC Y ;$06C1 |
MOV $F2, Y ;$06C2 |
CALL CODE_06EB ;$06C4 |
MOV A, Y ;$06C7 |
SETC ;$06C8 |
SBC A, #$0F ;$06C9 |
BPL CODE_06BB ;$06CB |
MOV $F2, #$0C ;$06CD |
CALL CODE_06EB ;$06D0 |
MOV $F2, #$1C ;$06D3 |
CALL CODE_06EB ;$06D6 |
MOV $F2, #$2C ;$06D9 |
CALL CODE_06EB ;$06DC |
MOV $F2, #$3C ;$06DF |
CALL CODE_06EB ;$06E2 |
DEC X ;$06E5 |
BNE CODE_06B9 ;$06E6 |
JMP CODE_0660 ;$06E8 |
CODE_06EB:
MOV A, $F3 ;$06EB |
BEQ CODE_06F7 ;$06ED |
BMI CODE_06F5 ;$06EF |
DEC A ;$06F1 |
DEC A ;$06F2 |
BRA CODE_06F7 ;$06F3 |
CODE_06F5:
INC A ;$06F5 |
INC A ;$06F6 |
CODE_06F7: ; |
MOV $F3, A ;$06F7 |
RET ;$06F9 |
CODE_06FA: ; |
MOV A, $055D ;$06FA |
MOV $1D, A ;$06FD |
JMP CODE_0781 ;$06FF |
CODE_0702: ; |
MOV A, $055D ;$0702 |
MOV $E7, A ;$0705 |
JMP CODE_0781 ;$0707 |
CODE_070A: ; |
MOV A, $055D ;$070A |
MOV $E8, A ;$070D |
JMP CODE_0781 ;$070F |
CODE_0712: ; |
MOV A, $04B6 ;$0712 |
PUSH A ;$0715 |
PUSH X ;$0716 |
MOV X, #$05 ;$0717 |
MOV A, $055D ;$0719 |
MOV $04B6, A ;$071C |
MOV $F2, #$50 ;$071F |
MOV A, $F3 ;$0722 |
CALL CODE_0C59 ;$0724 |
MOV $F3, A ;$0727 |
INC $F2 ;$0729 |
MOV A, $F3 ;$072B |
CALL CODE_0C59 ;$072D |
MOV $F3, A ;$0730 |
POP X ;$0732 |
POP A ;$0733 |
MOV $04B6, A ;$0734 |
BRA CODE_0781 ;$0737 |
CODE_0739: ; |
MOV A, $055D ;$0739 |
BMI CODE_074A ;$073C |
CLRC ;$073E |
MOV A, $055D ;$073F |
MOV $EC, A ;$0742 |
MOV A, #$00 ;$0744 |
MOV $ED, A ;$0746 |
BRA CODE_0756 ;$0748 |
CODE_074A:
MOV $055D, A ;$074A |
MOV A, $055D ;$074D |
MOV $EC, A ;$0750 |
MOV A, #$FF ;$0752 |
MOV $ED, A ;$0754 |
CODE_0756: ; |
MOVW YA, $EC ;$0756 |
ADDW YA, $EC ;$0758 |
ADDW YA, $EC ;$075A |
ADDW YA, $EC ;$075C |
ADDW YA, $EC ;$075E |
ADDW YA, $EC ;$0760 |
ADDW YA, $EC ;$0762 |
ADDW YA, $EC ;$0764 |
MOVW $EC, YA ;$0766 |
MOV $F2, #$4D ;$0768 |
MOV A, $F3 ;$076B |
AND A, #$DF ;$076D |
MOV $F3, A ;$076F |
BRA CODE_0781 ;$0771 |
CODE_0773: ; |
MOV X, $055D ;$0773 |
CALL CODE_10F7 ;$0776 |
BRA CODE_078E ;$0779 |
CODE_077B: ; |
MOV $1C, #$01 ;$077B |
MOV $F1, #$00 ;$077E |
CODE_0781:
MOV A, $1C ;$0781 |
BNE CODE_0788 ;$0783 |
JMP CODE_0683 ;$0785 |
CODE_0788:
MOV ($FA), ($E4) ;$0788 |
MOV $F1, #$01 ;$078B |
CODE_078E: ; |
MOV A, $FD ;$078E |
BEQ CODE_078E ;$0790 |
MOV $F1, #$01 ;$0792 |
MOV $20, #$00 ;$0795 |
CLRC ;$0798 |
ADC ($1E), ($1F) ;$0799 |
ROR $20 ;$079C |
MOV $23, #$00 ;$079E |
CLRC ;$07A1 |
ADC ($21), ($22) ;$07A2 |
ROR $23 ;$07A5 |
MOV X, #$00 ;$07A7 |
CODE_07A9: ; |
MOV A, $20 ;$07A9 |
BNE CODE_07B2 ;$07AB |
CALL CODE_09BC ;$07AD |
BRA CODE_07B7 ;$07B0 |
CODE_07B2:
CALL CODE_0813 ;$07B2 |
BNE CODE_07B2 ;$07B5 |
CODE_07B7: ; |
MOV A, $01E0+X ;$07B7 |
BEQ CODE_07D0 ;$07BA |
PUSH X ;$07BC |
MOV A, X ;$07BD |
OR A, #$08 ;$07BE |
MOV X, A ;$07C0 |
MOV A, $23 ;$07C1 |
BNE CODE_07CA ;$07C3 |
CALL CODE_09BC ;$07C5 |
BRA CODE_07CF ;$07C8 |
CODE_07CA:
CALL CODE_0813 ;$07CA |
BNE CODE_07CA ;$07CD |
CODE_07CF: ; |
POP X ;$07CF |
CODE_07D0: ; |
INC X ;$07D0 |
CMP X, #$08 ;$07D1 |
BEQ CODE_07D8 ;$07D3 |
JMP CODE_07A9 ;$07D5 |
CODE_07D8:
JMP CODE_0683 ;$07D8 |
CODE_07DB:
MOV A, $055D ;$07DB |
BEQ CODE_07E3 ;$07DE |
JMP CODE_04F3 ;$07E0 |
CODE_07E3:
MOV $F2, #$5C ;$07E3 |
MOV $F3, #$FF ;$07E6 |
MOV $F1, #$00 ;$07E9 |
MOV $FB, #$C8 ;$07EC |
MOV $F1, #$02 ;$07EF |
CODE_07F2: ; |
MOV A, $FE ;$07F2 |
BEQ CODE_07F2 ;$07F4 |
MOV $F2, #$6C ;$07F6 |
MOV $F3, #$A0 ;$07F9 |
MOV X, #$00 ;$07FC |
MOV $F2, #$4D ;$07FE |
MOV $F3, X ;$0801 |
MOV $F2, #$2C ;$0803 |
MOV $F3, X ;$0806 |
MOV $F2, #$3C ;$0808 |
MOV $F3, X ;$080B |
CALL CODE_100B ;$080D |
JMP CODE_04F3 ;$0810 |
CODE_0813:
MOV A, $0110+X ;$0813 |
BNE CODE_081B ;$0816 |
MOV A, #$00 ;$0818 |
RET ;$081A |
CODE_081B:
DEC $34+X ;$081B |
MOV A, $34+X ;$081D |
CMP A, #$01 ;$081F |
BEQ CODE_0839 ;$0821 |
CMP A, #$FF ;$0823 |
BNE CODE_082F ;$0825 |
MOV A, $24+X ;$0827 |
BEQ CODE_0850 ;$0829 |
DEC $24+X ;$082B |
BRA CODE_084A ;$082D |
CODE_082F:
CMP A, #$00 ;$082F |
BNE CODE_084A ;$0831 |
MOV A, $24+X ;$0833 |
BEQ CODE_0850 ;$0835 |
BRA CODE_084A ;$0837 |
CODE_0839:
MOV A, $24+X ;$0839 |
BNE CODE_084A ;$083B |
MOV A, $01E0+X ;$083D |
BNE CODE_084A ;$0840 |
MOV A, $0F95+X ;$0842 |
MOV $F2, #$5C ;$0845 |
MOV $F3, A ;$0848 |
CODE_084A: ; |
CALL CODE_09BC ;$084A |
MOV A, #$00 ;$084D |
RET ;$084F |
CODE_0850:
MOV A, $44+X ;$0850 |
MOV Y, $54+X ;$0852 |
MOVW $00, YA ;$0854 |
MOV Y, #$00 ;$0856 |
MOV A, ($00)+Y ;$0858 |
BMI CODE_0862 ;$085A |
PUSH X ;$085C |
ASL A ;$085D |
MOV X, A ;$085E |
JMP (DATA_0FA5+X) ;$085F |
CODE_0862:
CALL CODE_0867 ;$0862 |
BRA CODE_084A ;$0865 |
CODE_0867:
CMP A, #$80 ;$0867 |
BNE CODE_088B ;$0869 |
MOV A, $01E0+X ;$086B |
BNE CODE_0888 ;$086E |
MOV A, $0F95+X ;$0870 |
MOV $F2, #$5C ;$0873 |
MOV $F3, A ;$0876 |
MOV A, X ;$0878 |
AND A, #$07 ;$0879 |
XCN A ;$087B |
OR A, #$02 ;$087C |
MOV $F2, A ;$087E |
MOV A, #$00 ;$0880 |
MOV $F3, A ;$0882 |
INC $F2 ;$0884 |
MOV $F3, A ;$0886 |
CODE_0888: ; |
JMP CODE_0983 ;$0888 |
CODE_088B:
CMP A, #$E0 ;$088B |
BMI CODE_0899 ;$088D |
CMP A, #$E1 ;$088F |
BEQ CODE_0897 ;$0891 |
MOV A, $0C+X ;$0893 |
BRA CODE_0899 ;$0895 |
CODE_0897:
MOV A, $14+X ;$0897 |
CODE_0899: ; |
CLRC ;$0899 |
ADC A, #$24 ;$089A |
ADC A, $0140+X ;$089C |
ASL A ;$089F |
PUSH X ;$08A0 |
MOV Y, $64+X ;$08A1 |
BEQ CODE_08DF ;$08A3 |
MOV X, A ;$08A5 |
MOV $04, Y ;$08A6 |
MOV A, Y ;$08A8 |
BPL CODE_08AE ;$08A9 |
EOR A, #$FF ;$08AB |
INC A ;$08AD |
CODE_08AE: ; |
MOV Y, A ;$08AE |
PUSH Y ;$08AF |
MOV A, $1199+X ;$08B0 |
MUL YA ;$08B3 |
MOV $02, Y ;$08B4 |
MOV $03, #$00 ;$08B6 |
POP Y ;$08B9 |
MOV A, $119A+X ;$08BA |
MUL YA ;$08BD |
ADDW YA, $02 ;$08BE |
MOV $03, Y ;$08C0 |
LSR $03 ;$08C2 |
ROR A ;$08C4 |
LSR $03 ;$08C5 |
ROR A ;$08C7 |
MOV $02, A ;$08C8 |
MOV A, $119A+X ;$08CA |
MOV Y, A ;$08CD |
MOV A, $1199+X ;$08CE |
MOV X, $04 ;$08D1 |
BMI CODE_08D9 ;$08D3 |
ADDW YA, $02 ;$08D5 |
BRA CODE_08DB ;$08D7 |
CODE_08D9:
SUBW YA, $02 ;$08D9 |
CODE_08DB: ; |
MOVW $02, YA ;$08DB |
BRA CODE_08EA ;$08DD |
CODE_08DF:
MOV X, A ;$08DF |
MOV A, $1199+X ;$08E0 |
MOV $02, A ;$08E3 |
MOV A, $119A+X ;$08E5 |
MOV $03, A ;$08E8 |
CODE_08EA: ; |
POP A ;$08EA |
MOV X, A ;$08EB |
AND A, #$07 ;$08EC |
XCN A ;$08EE |
MOV $F2, A ;$08EF |
MOV A, $01E0+X ;$08F1 |
BEQ CODE_08F9 ;$08F4 |
JMP CODE_0983 ;$08F6 |
CODE_08F9:
MOV A, $0254+X ;$08F9 |
CALL CODE_0C59 ;$08FC |
MOV $F3, A ;$08FF |
INC $F2 ;$0901 |
MOV A, $0264+X ;$0903 |
CALL CODE_0C59 ;$0906 |
MOV $F3, A ;$0909 |
INC $F2 ;$090B |
MOV A, $0150+X ;$090D |
AND A, #$01 ;$0910 |
BEQ CODE_092B ;$0912 |
MOV A, $0160+X ;$0914 |
MOV $01A0+X, A ;$0917 |
MOV A, $0170+X ;$091A |
MOV $0100+X, A ;$091D |
MOV A, $0180+X ;$0920 |
MOV $94+X, A ;$0923 |
MOV A, $0190+X ;$0925 |
MOV $01C0+X, A ;$0928 |
CODE_092B: ; |
MOV A, $0150+X ;$092B |
AND A, #$02 ;$092E |
BEQ CODE_094D ;$0930 |
MOV A, $0234+X ;$0932 |
BPL CODE_093D ;$0935 |
EOR A, #$FF ;$0937 |
INC A ;$0939 |
MOV $0234+X, A ;$093A |
CODE_093D: ; |
MOV A, $0200+X ;$093D |
LSR A ;$0940 |
MOV $A4+X, A ;$0941 |
MOV A, $0210+X ;$0943 |
MOV $B4+X, A ;$0946 |
MOV A, $0220+X ;$0948 |
MOV $C4+X, A ;$094B |
CODE_094D: ; |
MOV A, $02 ;$094D |
MOV $84+X, A ;$094F |
MOV $F3, A ;$0951 |
INC $F2 ;$0953 |
MOV A, $03 ;$0955 |
MOV $74+X, A ;$0957 |
MOV $F3, A ;$0959 |
INC $F2 ;$095B |
MOV A, $0244+X ;$095D |
MOV $F3, A ;$0960 |
INC $F2 ;$0962 |
MOV A, $0274+X ;$0964 |
MOV $F3, A ;$0967 |
INC $F2 ;$0969 |
MOV A, $0284+X ;$096B |
MOV $F3, A ;$096E |
INC $F2 ;$0970 |
MOV $F3, #$7F ;$0972 |
MOV $F2, #$5C ;$0975 |
MOV $F3, #$00 ;$0978 |
MOV $F2, #$4C ;$097B |
MOV A, $0F95+X ;$097E |
MOV $F3, A ;$0981 |
CODE_0983: ; |
MOV A, $0120+X ;$0983 |
BEQ CODE_0997 ;$0986 |
MOV $00, #$01 ;$0988 |
MOV A, $0120+X ;$098B |
MOV $34+X, A ;$098E |
MOV A, $0130+X ;$0990 |
MOV $24+X, A ;$0993 |
BRA CODE_09AE ;$0995 |
CODE_0997:
MOV Y, #$01 ;$0997 |
MOV A, ($00)+Y ;$0999 |
MOV $34+X, A ;$099B |
MOV A, $01D0+X ;$099D |
BEQ CODE_09AB ;$09A0 |
MOV A, $34+X ;$09A2 |
MOV $24+X, A ;$09A4 |
INC Y ;$09A6 |
MOV A, ($00)+Y ;$09A7 |
MOV $34+X, A ;$09A9 |
CODE_09AB: ; |
INC Y ;$09AB |
MOV $00, Y ;$09AC |
CODE_09AE: ; |
MOV $01, #$00 ;$09AE |
MOV A, $44+X ;$09B1 |
MOV Y, $54+X ;$09B3 |
ADDW YA, $00 ;$09B5 |
MOV $54+X, Y ;$09B7 |
MOV $44+X, A ;$09B9 |
RET ;$09BB |
CODE_09BC:
MOV A, $0150+X ;$09BC |
AND A, #$01 ;$09BF |
BNE CODE_09C6 ;$09C1 |
JMP CODE_0A39 ;$09C3 |
CODE_09C6:
MOV A, $01A0+X ;$09C6 |
BEQ CODE_09DA ;$09C9 |
CMP A, #$FF ;$09CB |
BEQ CODE_0A39 ;$09CD |
DEC A ;$09CF |
MOV $01A0+X, A ;$09D0 |
BNE CODE_0A39 ;$09D3 |
MOV A, #$01 ;$09D5 |
MOV $0100+X, A ;$09D7 |
CODE_09DA: ; |
MOV A, $0100+X ;$09DA |
DEC A ;$09DD |
MOV $0100+X, A ;$09DE |
BNE CODE_0A39 ;$09E1 |
MOV A, $0170+X ;$09E3 |
MOV $0100+X, A ;$09E6 |
MOV A, $01C0+X ;$09E9 |
BEQ CODE_0A10 ;$09EC |
DEC A ;$09EE |
MOV $01C0+X, A ;$09EF |
MOV A, $01B0+X ;$09F2 |
EOR A, #$FF ;$09F5 |
INC A ;$09F7 |
MOV $00, A ;$09F8 |
BPL CODE_0A00 ;$09FA |
MOV A, #$FF ;$09FC |
BRA CODE_0A02 ;$09FE |
CODE_0A00:
MOV A, #$00 ;$0A00 |
CODE_0A02: ; |
MOV $01, A ;$0A02 |
MOV A, $84+X ;$0A04 |
MOV Y, $74+X ;$0A06 |
ADDW YA, $00 ;$0A08 |
MOV $74+X, Y ;$0A0A |
MOV $84+X, A ;$0A0C |
BRA CODE_0A1B ;$0A0E |
CODE_0A10:
MOV A, $01B0+X ;$0A10 |
MOV $00, A ;$0A13 |
BPL CODE_0A00 ;$0A15 |
MOV A, #$FF ;$0A17 |
BRA CODE_0A02 ;$0A19 |
CODE_0A1B:
MOV A, $01E0+X ;$0A1B |
BNE CODE_0A30 ;$0A1E |
MOV A, X ;$0A20 |
AND A, #$07 ;$0A21 |
XCN A ;$0A23 |
OR A, #$02 ;$0A24 |
MOV $F2, A ;$0A26 |
MOV A, $84+X ;$0A28 |
MOV $F3, A ;$0A2A |
INC $F2 ;$0A2C |
MOV $F3, Y ;$0A2E |
CODE_0A30: ; |
DEC $94+X ;$0A30 |
BNE CODE_0A39 ;$0A32 |
MOV A, #$FF ;$0A34 |
MOV $01A0+X, A ;$0A36 |
CODE_0A39: ; |
MOV A, $0150+X ;$0A39 |
AND A, #$02 ;$0A3C |
BEQ CODE_0AB4 ;$0A3E |
MOV A, $C4+X ;$0A40 |
BEQ CODE_0A48 ;$0A42 |
DEC $C4+X ;$0A44 |
BRA CODE_0AB4 ;$0A46 |
CODE_0A48:
DEC $B4+X ;$0A48 |
BNE CODE_0AB4 ;$0A4A |
MOV A, $0210+X ;$0A4C |
MOV $B4+X, A ;$0A4F |
MOV A, $0234+X ;$0A51 |
MOV $00, A ;$0A54 |
BPL CODE_0A5C ;$0A56 |
MOV A, #$FF ;$0A58 |
BRA CODE_0A5E ;$0A5A |
CODE_0A5C:
MOV A, #$00 ;$0A5C |
CODE_0A5E: ; |
MOV $01, A ;$0A5E |
MOV A, $84+X ;$0A60 |
MOV Y, $74+X ;$0A62 |
CMP X, #$0D ;$0A64 |
BNE CODE_0A87 ;$0A66 |
PUSH A ;$0A68 |
MOV A, $EC ;$0A69 |
CMP A, $EE ;$0A6B |
BNE CODE_0A78 ;$0A6D |
MOV A, $ED ;$0A6F |
CMP A, $EF ;$0A71 |
BNE CODE_0A78 ;$0A73 |
POP A ;$0A75 |
BRA CODE_0A87 ;$0A76 |
CODE_0A78:
POP A ;$0A78 |
SUBW YA, $EE ;$0A79 |
ADDW YA, $EC ;$0A7B |
PUSH A ;$0A7D |
MOV A, $EC ;$0A7E |
MOV $EE, A ;$0A80 |
MOV A, $ED ;$0A82 |
MOV $EF, A ;$0A84 |
POP A ;$0A86 |
CODE_0A87: ; |
ADDW YA, $00 ;$0A87 |
MOV $74+X, Y ;$0A89 |
MOV $84+X, A ;$0A8B |
MOV A, $01E0+X ;$0A8D |
BNE CODE_0AA2 ;$0A90 |
MOV A, X ;$0A92 |
AND A, #$07 ;$0A93 |
XCN A ;$0A95 |
OR A, #$02 ;$0A96 |
MOV $F2, A ;$0A98 |
MOV A, $84+X ;$0A9A |
MOV $F3, A ;$0A9C |
INC $F2 ;$0A9E |
MOV $F3, Y ;$0AA0 |
CODE_0AA2: ; |
DEC $A4+X ;$0AA2 |
BNE CODE_0AB4 ;$0AA4 |
MOV A, $0200+X ;$0AA6 |
MOV $A4+X, A ;$0AA9 |
MOV A, $0234+X ;$0AAB |
EOR A, #$FF ;$0AAE |
INC A ;$0AB0 |
MOV $0234+X, A ;$0AB1 |
CODE_0AB4: ; |
MOV A, $0150+X ;$0AB4 |
AND A, #$0C ;$0AB7 |
BNE CODE_0ABE ;$0AB9 |
JMP CODE_0B17 ;$0ABB |
CODE_0ABE:
MOV A, $02A4+X ;$0ABE |
BEQ CODE_0ACD ;$0AC1 |
MOV A, $02A4+X ;$0AC3 |
DEC A ;$0AC6 |
MOV $02A4+X, A ;$0AC7 |
JMP CODE_0B17 ;$0ACA |
CODE_0ACD:
MOV A, $02B4+X ;$0ACD |
DEC A ;$0AD0 |
MOV $02B4+X, A ;$0AD1 |
BEQ CODE_0AD9 ;$0AD4 |
JMP CODE_0B17 ;$0AD6 |
CODE_0AD9:
MOV A, $02C4+X ;$0AD9 |
MOV $02B4+X, A ;$0ADC |
MOV A, $01E0+X ;$0ADF |
BNE CODE_0AF8 ;$0AE2 |
MOV A, X ;$0AE4 |
AND A, #$07 ;$0AE5 |
XCN A ;$0AE7 |
OR A, #$00 ;$0AE8 |
MOV $F2, A ;$0AEA |
MOV A, $0254+X ;$0AEC |
MOV $F3, A ;$0AEF |
MOV A, $0264+X ;$0AF1 |
INC $F2 ;$0AF4 |
MOV $F3, A ;$0AF6 |
CODE_0AF8: ; |
MOV A, $02E4+X ;$0AF8 |
DEC A ;$0AFB |
MOV $02E4+X, A ;$0AFC |
BNE CODE_0B17 ;$0AFF |
MOV A, $0150+X ;$0B01 |
AND A, #$08 ;$0B04 |
BNE CODE_0B17 ;$0B06 |
MOV A, $02F4+X ;$0B08 |
MOV $02E4+X, A ;$0B0B |
MOV A, $02D4+X ;$0B0E |
EOR A, #$FF ;$0B11 |
INC A ;$0B13 |
MOV $02D4+X, A ;$0B14 |
CODE_0B17:
RET ;$0B17 |
CODE_0B18: ; |
POP X ;$0B18 |
MOV A, #$00 ;$0B19 |
MOV $0110+X, A ;$0B1B |
MOV A, $01E0+X ;$0B1E |
BNE CODE_0B2B ;$0B21 |
MOV $F2, #$5C ;$0B23 |
MOV A, $0F95+X ;$0B26 |
MOV $F3, A ;$0B29 |
CODE_0B2B: ; |
MOV A, X ;$0B2B |
CMP A, #$08 ;$0B2C |
BCC CODE_0B61 ;$0B2E |
PUSH X ;$0B30 |
SETC ;$0B31 |
SBC A, #$08 ;$0B32 |
MOV X, A ;$0B34 |
MOV A, #$00 ;$0B35 |
MOV $01E0+X, A ;$0B37 |
MOV $F2, #$3D ;$0B3A |
MOV A, $0F95+X ;$0B3D |
EOR A, #$FF ;$0B40 |
AND A, $F3 ;$0B42 |
MOV $F3, A ;$0B44 |
MOV $F2, #$4D ;$0B46 |
MOV A, $0294+X ;$0B49 |
BEQ CODE_0B57 ;$0B4C |
MOV A, $0F95+X ;$0B4E |
OR A, $F3 ;$0B51 |
MOV $F3, A ;$0B53 |
BRA CODE_0B60 ;$0B55 |
CODE_0B57:
MOV A, $0F95+X ;$0B57 |
EOR A, #$FF ;$0B5A |
AND A, $F3 ;$0B5C |
MOV $F3, A ;$0B5E |
CODE_0B60: ; |
POP X ;$0B60 |
CODE_0B61: ; |
MOV A, #$00 ;$0B61 |
RET ;$0B63 |
CODE_0B64:
POP Y ;$0B64 |
POP A ;$0B65 |
POP X ;$0B66 |
PUSH A ;$0B67 |
PUSH Y ;$0B68 |
CODE_0B69: ; |
MOV Y, #$01 ;$0B69 |
MOV $34+X, Y ;$0B6B |
MOV A, #$00 ;$0B6D |
MOV $24+X, A ;$0B6F |
RET ;$0B71 |
CODE_0B72: ; |
CALL CODE_0B64 ;$0B72 |
CALL CODE_0B8B ;$0B75 |
CODE_0B78: ; |
MOV $00, #$02 ;$0B78 |
CODE_0B7B: ; |
MOV $01, #$00 ;$0B7B |
MOV A, $44+X ;$0B7E |
MOV Y, $54+X ;$0B80 |
ADDW YA, $00 ;$0B82 |
MOV $54+X, Y ;$0B84 |
MOV $44+X, A ;$0B86 |
MOV A, #$01 ;$0B88 |
RET ;$0B8A |
CODE_0B8B:
PUSH X ;$0B8B |
MOV A, ($00)+Y ;$0B8C |
MOV X, A ;$0B8E |
MOV A, $0560+X ;$0B8F |
POP X ;$0B92 |
MOV $0244+X, A ;$0B93 |
RET ;$0B96 |
CODE_0B97: ; |
CALL CODE_0B64 ;$0B97 |
CALL CODE_0B8B ;$0B9A |
INC Y ;$0B9D |
MOV A, ($00)+Y ;$0B9E |
MOV $0140+X, A ;$0BA0 |
INC Y ;$0BA3 |
MOV A, ($00)+Y ;$0BA4 |
MOV $64+X, A ;$0BA6 |
INC Y ;$0BA8 |
CALL CODE_0BC2 ;$0BA9 |
INC Y ;$0BAC |
CALL CODE_0E4E ;$0BAD |
MOV $00, #$08 ;$0BB0 |
JMP CODE_0B7B ;$0BB3 |
CODE_0BB6: ; |
CALL CODE_0B64 ;$0BB6 |
CALL CODE_0BC2 ;$0BB9 |
CODE_0BBC: ; |
MOV $00, #$03 ;$0BBC |
JMP CODE_0B7B ;$0BBF |
CODE_0BC2:
MOV A, $1D ;$0BC2 |
BNE CODE_0BD2 ;$0BC4 |
MOV A, ($00)+Y ;$0BC6 |
MOV $0254+X, A ;$0BC8 |
INC Y ;$0BCB |
CODE_0BCC: ; |
MOV A, ($00)+Y ;$0BCC |
MOV $0264+X, A ;$0BCE |
RET ;$0BD1 |
CODE_0BD2:
MOV A, ($00)+Y ;$0BD2 |
BPL CODE_0BD9 ;$0BD4 |
EOR A, #$FF ;$0BD6 |
INC A ;$0BD8 |
CODE_0BD9: ; |
LSR A ;$0BD9 |
MOV $03, A ;$0BDA |
INC Y ;$0BDC |
CLRC ;$0BDD |
MOV A, ($00)+Y ;$0BDE |
BPL CODE_0BE5 ;$0BE0 |
EOR A, #$FF ;$0BE2 |
INC A ;$0BE4 |
CODE_0BE5: ; |
LSR A ;$0BE5 |
CLRC ;$0BE6 |
ADC A, $03 ;$0BE7 |
MOV $0254+X, A ;$0BE9 |
MOV $0264+X, A ;$0BEC |
RET ;$0BEF |
CODE_0BF0: ; |
CALL CODE_0B64 ;$0BF0 |
MOV $0254+X, A ;$0BF3 |
CALL CODE_0BCC ;$0BF6 |
MOV A, $0264+X ;$0BF9 |
MOV $0254+X, A ;$0BFC |
JMP CODE_0B78 ;$0BFF |
CODE_0C02: ; |
CALL CODE_0B64 ;$0C02 |
MOV A, $04B8 ;$0C05 |
MOV $0254+X, A ;$0C08 |
MOV A, $04B9 ;$0C0B |
MOV $0264+X, A ;$0C0E |
MOV A, $1D ;$0C11 |
BNE CODE_0C2E ;$0C13 |
JMP CODE_0ED6 ;$0C15 |
CODE_0C18: ; |
CALL CODE_0B64 ;$0C18 |
MOV A, $04BA ;$0C1B |
MOV $0254+X, A ;$0C1E |
MOV A, $04BB ;$0C21 |
MOV $0264+X, A ;$0C24 |
MOV A, $1D ;$0C27 |
BNE CODE_0C2E ;$0C29 |
JMP CODE_0ED6 ;$0C2B |
CODE_0C2E:
MOV A, $0254+X ;$0C2E |
BPL CODE_0C36 ;$0C31 |
EOR A, #$FF ;$0C33 |
INC A ;$0C35 |
CODE_0C36: ; |
LSR A ;$0C36 |
MOV $00, A ;$0C37 |
MOV A, $0264+X ;$0C39 |
BPL CODE_0C41 ;$0C3C |
EOR A, #$FF ;$0C3E |
INC A ;$0C40 |
CODE_0C41: ; |
LSR A ;$0C41 |
CLRC ;$0C42 |
ADC A, $00 ;$0C43 |
MOV $0254+X, A ;$0C45 |
MOV $0264+X, A ;$0C48 |
JMP CODE_0ED6 ;$0C4B |
CODE_0C4E: ; |
CALL CODE_0B64 ;$0C4E |
MOV A, ($00)+Y ;$0C51 |
MOV $04B6, A ;$0C53 |
JMP CODE_0B78 ;$0C56 |