-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank_16.asm
3383 lines (3011 loc) · 173 KB
/
bank_16.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 "BANK_16"
.include "copy_bank_ram.inc"
.include "copy_bank_val.inc"
; 0x02C010-0x03000F
.org $8000
.export sub_0x02C0DE
.export sub_0x02E6E6
.export sub_0x02E74B
.export ofs_0x02E7CA
.export ofs_0x02E86E
.export sub_0x02EA10_автобаланс_сил_в_vs_team
.export sub_0x02EE60_выбрать_палитру_уровня
.export sub_0x02EF50_записать_3_цвета_в_буфер
.export sub_0x02EFA0
.export ofs_0x02F73B_суперка_casey_песок
.export loc_0x02FC90
.export sub_0x02FD40_отрисовать_колво_побед_в_матчах
.export sub_0x02FEE4
.export loc_0x02FF80
.export sub_0x025E5F_обработка_состояния_мяча
.export sub_0x0268BB_обработчик_состояния_летящего_сплинтера
- D 0 - - - 0x02C010 0B:8000: 06 .byte con_bank_id + $16 ;
sub_0x02C0DE:
C - - - - - 0x02C0DE 0B:80CE: 20 D4 80 JSR sub_80D4
C - - - - - 0x02C0E1 0B:80D1: 4C D4 82 JMP loc_82D4
sub_80D4:
C - - - - - 0x02C0E4 0B:80D4: AD 3E 06 LDA ram_063E
C - - - - - 0x02C0E7 0B:80D7: 20 32 D0 JSR sub_0x03D042_поинтеры_после_JSR
- D 0 - I - 0x02C0EA 0B:80DA: E4 80 .word ofs_041_80E4_00
- D 0 - I - 0x02C0EC 0B:80DC: 06 81 .word ofs_041_8106_01_отрисовать_экран_player_select
- D 0 - I - 0x02C0EE 0B:80DE: 58 81 .word ofs_041_8158_02
- D 0 - I - 0x02C0F0 0B:80E0: 5B 81 .word ofs_041_815B_03
- D 0 - I - 0x02C0F2 0B:80E2: 3C 83 .word ofs_041_833C_04
ofs_041_80E4_00:
C - - J - - 0x02C0F4 0B:80E4: 20 BE DA JSR sub_0x03DACE_удалить_все_объекты
C - - - - - 0x02C0F7 0B:80E7: EE 3E 06 INC ram_063E
C - - - - - 0x02C0FA 0B:80EA: A9 74 LDA #con_chr_bank_bg + $74
C - - - - - 0x02C0FC 0B:80EC: 85 32 STA ram_chr_bank_bg
C - - - - - 0x02C0FE 0B:80EE: 20 00 AC JSR sub_AC00
C - - - - - 0x02C102 0B:80F2: A0 02 LDY #con_chr_pair_02
C - - - - - 0x02C104 0B:80F4: 20 04 DC JSR sub_0x03DC14_запись_1й_пары_chr_spr
C - - - - - 0x02C107 0B:80F7: A5 2C LDA ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C109 0B:80F9: F0 03 BEQ bra_80FE ; if con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C10B 0B:80FB: EE E0 04 INC ram_04E0_obj
bra_80FE:
C - - - - - 0x02C10E 0B:80FE: A9 0A LDA #con_0048_0A
C - - - - - 0x02C110 0B:8100: 20 14 F8 JSR sub_0x03F824_подготовить_irq_handler
C - - - - - 0x02C113 0B:8103: 4C 6D D4 JMP loc_0x03D47D_запись_черной_палитры_в_буфер
ofs_041_8106_01_отрисовать_экран_player_select:
C - - J - - 0x02C116 0B:8106: EE 3E 06 INC ram_063E
C - - - - - 0x02C119 0B:8109: A4 2C LDY ram_game_mode
BNE bra_812C
; Y = 00
LDA ram_флаг_всех_персов_в_story
BEQ bra_812C
INY ; 01
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
bra_812C:
C - - - - - 0x02C11B 0B:810B: BE FA BF LDX tbl_BFFA,Y
C - - - - - 0x02C11E 0B:810E: 20 44 F0 JSR sub_0x03F054_отрисовать_экран
LDX ram_game_mode
C - - - - - 0x02C12B 0B:811B: A0 06 LDY tbl_B3EA_выбор_палитры_фона,X
C - - - - - 0x02C12D 0B:811D: A9 13 LDA #con_D57A_13
C - - - - - 0x02C12F 0B:811F: 20 94 D3 JSR sub_0x03D3A4_записать_палитру_для_фона_и_спрайтов
C - - - - - 0x02C132 0B:8122: A0 00 LDY #$00
C - - - - - 0x02C134 0B:8124: 8C 30 05 STY ram_0530_obj_state
C - - - - - 0x02C137 0B:8127: 8C 31 05 STY ram_0530_obj_state + $01
C - - - - - 0x02C13A 0B:812A: C8 INY ; 01
C - - - - - 0x02C13B 0B:812B: 84 08 STY ram_0008
bra_812D_loop:
C - - - - - 0x02C13D 0B:812D: A6 08 LDX ram_0008
C - - - - - 0x02C13F 0B:812F: 20 4F 81 JSR sub_814F
C - - - - - 0x02C142 0B:8132: C6 08 DEC ram_0008
C - - - - - 0x02C144 0B:8134: 10 F7 BPL bra_812D_loop
C - - - - - 0x02C146 0B:8136: A9 37 LDA #con_music_player_select
C - - - - - 0x02C148 0B:8138: 20 90 F6 JSR sub_0x03F6A0_записать_звук_сохранив_X_Y
C - - - - - 0x02C14B 0B:813B: A2 00 LDX #$00
C - - - - - 0x02C14D 0B:813D: 20 2F 82 JSR sub_822F
C - - - - - 0x02C150 0B:8140: A5 2C LDA ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C152 0B:8142: F0 08 BEQ bra_814C ; if con_gm_story
C - - - - - 0x02C154 0B:8144: C9 02 CMP #$02
C - - - - - 0x02C156 0B:8146: F0 04 BEQ bra_814C ; if con_gm_vs_cpu
C - - - - - 0x02C158 0B:8148: E8 INX ; 01
C - - - - - 0x02C159 0B:8149: 20 2F 82 JSR sub_822F
bra_814C:
C - - - - - 0x02C15C 0B:814C: 4C 41 E1 JMP loc_0x03E151_подготовить_осветление_из_черного_в_цветной
sub_814F:
C - - - - - 0x02C15F 0B:814F: B4 A2 LDY ram_plr_id,X
C - - - - - 0x02C161 0B:8151: B9 8C E9 LDA tbl_0x03E99C_индекс_3х_цветов_для_перса,Y
C - - - - - 0x02C164 0B:8154: E8 INX
; tip_индекс_буфера_палитры + $01
; tip_индекс_буфера_палитры + $02
C - - - - - 0x02C165 0B:8155: 4C 46 D3 JMP loc_0x03D356_записать_3_цвета_в_буфер
ofs_041_8158_02:
C - - J - - 0x02C168 0B:8158: EE 3E 06 INC ram_063E
ofs_041_815B_03:
C - - - - - 0x02C16B 0B:815B: A5 2C LDA ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C16D 0B:815D: C9 02 CMP #$02
C - - - - - 0x02C16F 0B:815F: F0 23 BEQ bra_8184_vs_cpu
; con_gm_story
; con_gm_vs_player
; con_gm_vs_team
C - - - - - 0x02C171 0B:8161: 4C 80 BD JMP loc_BD80
loc_8164:
C D 0 - - - 0x02C174 0B:8164: 85 A8 STA ram_local_obj_index
bra_8166_loop:
C - - - - - 0x02C176 0B:8166: A6 A8 LDX ram_local_obj_index
C - - - - - 0x02C178 0B:8168: 8A TXA
C - - - - - 0x02C179 0B:8169: 29 01 AND #$01
C - - - - - 0x02C17B 0B:816B: 09 80 ORA #$80
C - - - - - 0x02C17D 0B:816D: 9D 00 05 STA ram_0500_obj,X ; 0500 0501
C - - - - - 0x02C180 0B:8170: 20 78 81 JSR sub_8178
C - - - - - 0x02C183 0B:8173: C6 A8 DEC ram_local_obj_index
C - - - - - 0x02C185 0B:8175: 10 EF BPL bra_8166_loop
C - - - - - 0x02C187 0B:8177: 60 RTS
sub_8178:
C - - - - - 0x02C188 0B:8178: BD 30 05 LDA ram_0530_obj_state,X ; 0530 0531
C - - - - - 0x02C18B 0B:817B: 20 32 D0 JSR sub_0x03D042_поинтеры_после_JSR
- D 0 - I - 0x02C18E 0B:817E: C9 81 .word ofs_040_81C9_00
- D 0 - I - 0x02C190 0B:8180: 93 82 .word ofs_040_8293_01
- D 0 - I - 0x02C192 0B:8182: BC 82 .word ofs_040_82BC_02
bra_8184_vs_cpu:
loc_8184:
C D 0 - - - 0x02C194 0B:8184: 18 CLC
C - - - - - 0x02C195 0B:8185: AD 30 05 LDA ram_0530_obj_state
C - - - - - 0x02C198 0B:8188: 6D 31 05 ADC ram_0530_obj_state + $01
C - - - - - 0x02C19B 0B:818B: 8D 30 05 STA ram_0530_obj_state
C - - - - - 0x02C19E 0B:818E: A9 00 LDA #$00
C - - - - - 0x02C1A0 0B:8190: 8D 31 05 STA ram_0530_obj_state + $01
C - - - - - 0x02C1A3 0B:8193: A2 81 LDX #$81
C - - - - - 0x02C1A5 0B:8195: 8E 01 05 STX ram_0500_obj + $01
C - - - - - 0x02C1A8 0B:8198: CA DEX ; 80
C - - - - - 0x02C1A9 0B:8199: 8E 00 05 STX ram_0500_obj
C - - - - - 0x02C1AC 0B:819C: AD 30 05 LDA ram_0530_obj_state
C - - - - - 0x02C1AF 0B:819F: 20 32 D0 JSR sub_0x03D042_поинтеры_после_JSR
- D 0 - I - 0x02C1B2 0B:81A2: C5 81 .word ofs_039_81C5_00
- D 0 - I - 0x02C1B4 0B:81A4: 91 82 .word ofs_039_8291_01
- D 0 - I - 0x02C1B6 0B:81A6: AE 81 .word ofs_039_81AE_02
- D 0 - I - 0x02C1B8 0B:81A8: B6 81 .word ofs_039_81B6_03
- D 0 - I - 0x02C1BA 0B:81AA: 8D 82 .word ofs_039_828D_04
- D 0 - I - 0x02C1BC 0B:81AC: CC 82 .word ofs_039_82CC_05
ofs_039_81AE_02:
C - - J - - 0x02C1BE 0B:81AE: EE 30 05 INC ram_0530_obj_state
C - - - - - 0x02C1C1 0B:81B1: A2 01 LDX #$01
C - - - - - 0x02C1C3 0B:81B3: 4C 2F 82 JMP loc_822F
ofs_039_81B6_03:
C - - J - - 0x02C1C6 0B:81B6: A2 01 LDX #$01
C - - - - - 0x02C1C8 0B:81B8: 86 A8 STX ram_local_obj_index
C - - - - - 0x02C1CA 0B:81BA: A5 8E LDA ram_btn_press
C - - - - - 0x02C1CC 0B:81BC: 20 CB 81 JSR sub_81CB
C - - - - - 0x02C1CF 0B:81BF: A9 1A LDA #$1A
C - - - - - 0x02C1D1 0B:81C1: 8D 01 04 STA ram_obj_anim_id + $01
bra_81C4_RTS:
C - - - - - 0x02C1D4 0B:81C4: 60 RTS
ofs_039_81C5_00:
C - - J - - 0x02C1D5 0B:81C5: A2 00 LDX #$00
C - - - - - 0x02C1D7 0B:81C7: 86 A8 STX ram_local_obj_index
ofs_040_81C9_00:
C - - J - - 0x02C1D9 0B:81C9: B5 8E LDA ram_btn_press,X
sub_81CB:
C - - - - - 0x02C1DB 0B:81CB: A8 TAY
C - - - - - 0x02C1DC 0B:81CC: 29 D0 AND #con_btns_AB + con_btn_Start
C - - - - - 0x02C1DE 0B:81CE: F0 03 BEQ bra_81D3
C - - - - - 0x02C1E0 0B:81D0: 4C 12 BE JMP loc_BE12
bra_81D3:
C - - - - - 0x02C1E3 0B:81D3: 98 TYA
C - - - - - 0x02C1E4 0B:81D4: 29 0F AND #con_btns_Dpad
C - - - - - 0x02C1E6 0B:81D6: F0 EC BEQ bra_81C4_RTS
C - - - - - 0x02C1E8 0B:81D8: A0 FF LDY #$FF
C - - - - - 0x02C1EA 0B:81DA: 29 09 AND #con_btn_Up + con_btn_Right
C - - - - - 0x02C1EC 0B:81DC: F0 02 BEQ bra_81E0
C - - - - - 0x02C1EE 0B:81DE: A0 01 LDY #$01
bra_81E0:
C - - - - - 0x02C1F0 0B:81E0: 84 00 TYA
C - - - - - 0x02C1F4 0B:81E4: 18 CLC
C - - - - - 0x02C1F5 0B:81E5: 75 A2 ADC ram_plr_id,X
PHA
C - - - - - 0x02EA9C 0B:AA8C: AC E0 04 LDY ram_04E0_obj
LDA ram_флаг_всех_персов_в_story
BEQ bra_81F4
LDY #$01
bra_81F4:
PLA
C - - - - - 0x02C1FA 0B:81EA: D9 62 83 CMP tbl_8362_лимит_курсора,Y
C - - - - - 0x02C1FD 0B:81ED: 90 08 BCC bra_81F7
C - - - - - 0x02C1FF 0B:81EF: 10 04 BPL bra_81F5
C - - - - - 0x02C201 0B:81F1: B9 64 83 LDA tbl_8364_default_курсор_справа,Y
C - - - - - 0x02C204 0B:81F4: 2C .byte $2C ; BIT
bra_81F5:
C - - - - - 0x02C205 0B:81F5: A9 00 LDA #$00
bra_81F7:
C - - - - - 0x02C207 0B:81F7: 95 A2 STA ram_plr_id,X
C - - - - - 0x02C1F7 0B:81E7: 20 50 AA JSR sub_AA50_автобаланс_сил_в_vs_player
C - - - - - 0x02C228 0B:8218: 20 7F 82 JSR sub_827F
C - - - - - 0x02C22B 0B:821B: B0 03 BCS bra_8220
C - - - - - 0x02C22D 0B:821D: 20 4F 81 JSR sub_814F
bra_8220:
C - - - - - 0x02C230 0B:8220: A6 A8 LDX ram_local_obj_index
C - - - - - 0x02C232 0B:8222: A9 00 LDA #$00
C - - - - - 0x02C234 0B:8224: 9D D0 05 STA ram_obj_anim_cnt,X ; 05D0 05D1
C - - - - - 0x02C237 0B:8227: 9D C0 05 STA ram_obj_anim_timer,X ; 05C0 05C1
C - - - - - 0x02C23A 0B:822A: A9 25 LDA #con_075C_25
C - - - - - 0x02C23C 0B:822C: 20 90 F6 JSR sub_0x03F6A0_записать_звук_сохранив_X_Y
sub_822F:
loc_822F:
; позиция курсора при выборе перса
C D 0 - - - 0x02C23F 0B:822F: B4 A2 LDY ram_plr_id,X ; 00A2 00A3
C - - - - - 0x02C241 0B:8231: B9 50 83 LDA tbl_8350_pos_X_курсор,Y
C - - - - - 0x02C244 0B:8234: 9D 40 04 STA ram_obj_pos_X_lo,X ; 0440 0441
C - - - - - 0x02C247 0B:8237: B9 57 83 LDA tbl_8357_pos_Y_курсор,Y
C - - - - - 0x02C24A 0B:823A: 9D 10 04 STA ram_obj_pos_Y_lo,X ; 0410 0411
C - - - - - 0x02C24D 0B:823D: 20 AB 82 JSR sub_82AB
C - - - - - 0x02C250 0B:8240: B4 A2 LDY ram_plr_id,X ; 00A2 00A3
C - - - - - 0x02C252 0B:8242: B9 49 83 LDA tbl_8349_pos_X_спрайты_портрета,Y
C - - - - - 0x02C255 0B:8245: 9D 42 04 STA ram_obj_pos_X_lo + $02,X ; 0442 0443
C - - - - - 0x02C258 0B:8248: B9 42 83 LDA tbl_8342_pos_Y_спрайты_портрета,Y
C - - - - - 0x02C25B 0B:824B: 9D 12 04 STA ram_obj_pos_Y_lo + $02,X ; 0412 0413
; запись индекса анимации портрета на экране выбора перса
C - - - - - 0x02C25E 0B:824E: 98 LDA tbl_0x03E32D_индекс_анимации_портрета,Y
C - - - - - 0x02C262 0B:8252: 9D 02 04 STA ram_obj_anim_id + $02,X ; 0402 0403
C - - - - - 0x02C265 0B:8255: 8A TXA
C - - - - - 0x02C266 0B:8256: 09 82 ORA #$82
C - - - - - 0x02C268 0B:8258: 9D 02 05 STA ram_0500_obj + $02,X ; 0502 0503
C - - - - - 0x02C26B 0B:825B: 20 7F 82 JSR sub_827F
C - - - - - 0x02C26E 0B:825E: B0 0E BCS bra_826E_RTS
C - - - - - 0x02C270 0B:8260: 8A TXA
C - - - - - 0x02C271 0B:8261: 48 PHA
C - - - - - 0x02C272 0B:8262: 18 CLC
C - - - - - 0x02C273 0B:8263: 69 06 ADC #$06
C - - - - - 0x02C275 0B:8265: AA TAX
C - - - - - 0x02C276 0B:8266: B9 85 E9 LDA tbl_0x03E995_индекс_3х_цветов_для_перса,Y
; tip_индекс_буфера_палитры + $06
; tip_индекс_буфера_палитры + $07
C - - - - - 0x02C279 0B:8269: 20 46 D3 JSR sub_0x03D356_записать_3_цвета_в_буфер
C - - - - - 0x02C27C 0B:826C: 68 PLA
C - - - - - 0x02C27D 0B:826D: AA TAX
bra_826E_RTS:
C - - - - - 0x02C27E 0B:826E: 60 RTS
sub_827F:
; con_новые_персы ?
C - - - - - 0x02C28F 0B:827F: E0 01 CPX #$01
C - - - - - 0x02C291 0B:8281: D0 06 BNE bra_8289
C - - - - - 0x02C293 0B:8283: A5 A2 LDA ram_plr_id
C - - - - - 0x02C295 0B:8285: C5 A3 CMP ram_plr_id + $01
C - - - - - 0x02C297 0B:8287: F0 02 BEQ bra_828B
bra_8289:
C - - - - - 0x02C299 0B:8289: 18 CLC
C - - - - - 0x02C29A 0B:828A: 60 RTS
bra_828B:
C - - - - - 0x02C29B 0B:828B: 18 CLC
C - - - - - 0x02C29C 0B:828C: 60 RTS
ofs_039_828D_04:
C - - J - - 0x02C29D 0B:828D: A2 01 LDX #$01
C - - - - - 0x02C29F 0B:828F: D0 02 BNE bra_8293 ; jmp
ofs_039_8291_01:
C - - J - - 0x02C2A1 0B:8291: A2 00 LDX #$00
bra_8293:
ofs_040_8293_01:
C - - J - - 0x02C2A3 0B:8293: 20 AB 82 JSR sub_82AB
C - - - - - 0x02C2A6 0B:8296: BD A0 04 LDA ram_obj_spd_Y_hi,X ; 04A0 04A1
C - - - - - 0x02C2A9 0B:8299: 4A LSR
C - - - - - 0x02C2AA 0B:829A: 4A LSR
C - - - - - 0x02C2AB 0B:829B: 4A LSR
C - - - - - 0x02C2AC 0B:829C: 90 05 BCC bra_82A3
C - - - - - 0x02C2AE 0B:829E: A9 00 LDA #$00
C - - - - - 0x02C2B0 0B:82A0: 9D 00 04 STA ram_obj_anim_id,X ; 0400 0401
bra_82A3:
C - - - - - 0x02C2B3 0B:82A3: DE A0 04 DEC ram_obj_spd_Y_hi,X ; 04A0 04A1
C - - - - - 0x02C2B6 0B:82A6: D0 13 BNE bra_82BB_RTS
C - - - - - 0x02C2B8 0B:82A8: 20 4C BF JSR sub_BF4C
sub_82AB:
C - - - - - 0x02C2BB 0B:82AB: 8A TXA
C - - - - - 0x02C2BC 0B:82AC: A4 2C LDY ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C2BE 0B:82AE: C0 02 CPY #$02
C - - - - - 0x02C2C0 0B:82B0: D0 02 BNE bra_82B4
; if con_gm_vs_cpu
C - - - - - 0x02C2C2 0B:82B2: 69 01 ADC #$01
bra_82B4:
C - - - - - 0x02C2C4 0B:82B4: A8 TAY
C - - - - - 0x02C2C5 0B:82B5: B9 66 83 LDA tbl_8366,Y
C - - - - - 0x02C2C8 0B:82B8: 4C 2C BF JMP loc_BF2C
bra_82BB_RTS:
C - - - - - 0x02C2CB 0B:82BB: 60 RTS
ofs_040_82BC_02:
C - - J - - 0x02C2CC 0B:82BC: AD E0 04 LDA ram_04E0_obj
C - - - - - 0x02C2CF 0B:82BF: F0 0B BEQ bra_82CC
C - - - - - 0x02C2D1 0B:82C1: 8A TXA
C - - - - - 0x02C2D2 0B:82C2: 49 01 EOR #$01
C - - - - - 0x02C2D4 0B:82C4: A8 TAY
C - - - - - 0x02C2D5 0B:82C5: B9 30 05 LDA ram_0530_obj_state,Y ; 0530 0531
C - - - - - 0x02C2D8 0B:82C8: C9 02 CMP #$02
C - - - - - 0x02C2DA 0B:82CA: 90 EF BCC bra_82BB_RTS
bra_82CC:
ofs_039_82CC_05:
C - - - - - 0x02C2DC 0B:82CC: A9 04 LDA #$04
C - - - - - 0x02C2DE 0B:82CE: 8D 3E 06 STA ram_063E
C - - - - - 0x02C2E1 0B:82D1: 4C 2E E1 JMP loc_0x03E13E_подготовить_затемнение_из_цветного_в_черный
loc_82D4:
C D 0 - - - 0x02C2E4 0B:82D4: A9 03 LDA #$03
C - - - - - 0x02C2E6 0B:82D6: 20 5D D2 JSR sub_0x03D26D_записать_A_в_буфер_с_чтением_индекса
C - - - - - 0x02C2E9 0B:82D9: A9 D0 LDA #< $23D0
C - - - - - 0x02C2EB 0B:82DB: 20 5F D2 JSR sub_0x03D26F_записать_A_в_буфер_с_сохранением_индекса
C - - - - - 0x02C2EE 0B:82DE: A9 23 LDA #> $23D0
C - - - - - 0x02C2F0 0B:82E0: 20 5F D2 JSR sub_0x03D26F_записать_A_в_буфер_с_сохранением_индекса
C - - - - - 0x02C2F3 0B:82E3: A9 1F LDA #$1F
C - - - - - 0x02C2F5 0B:82E5: 20 5F D2 JSR sub_0x03D26F_записать_A_в_буфер_с_сохранением_индекса
C - - - - - 0x02C2F8 0B:82E8: 20 59 D2 JSR sub_0x03D269_записать_FF_в_буфер_без_чтения_индекса
C - - - - - 0x02C2FB 0B:82EB: AE E0 04 LDX ram_04E0_obj
C - - - - - 0x02C2FE 0B:82EE: A5 2C LDA ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
C - - - - - 0x02C300 0B:82F0: C9 02 CMP #$02
C - - - - - 0x02C302 0B:82F2: D0 08 BNE bra_82FC
; if con_gm_vs_cpu
C - - - - - 0x02C304 0B:82F4: AD 30 05 LDA ram_0530_obj_state
C - - - - - 0x02C307 0B:82F7: 4A LSR
C - - - - - 0x02C308 0B:82F8: D0 02 BNE bra_82FC
C - - - - - 0x02C30A 0B:82FA: A2 00 LDX #$00
bra_82FC:
C - - - - - 0x02C30C 0B:82FC: 86 00 STX ram_0000
bra_82FE_loop:
C - - - - - 0x02C30E 0B:82FE: A6 00 LDX ram_0000
; запись атрибутов для добавления цветов роже на экране выбора персов
C - - - - - 0x02C310 0B:8300: B5 A2 LDA ram_plr_id,X ; 00A2 00A3
ASL
TAY
LDA tbl_832E_ppu,Y
PHA ; 2006 hi
LDA tbl_832E_ppu + $01,Y
C - - - - - 0x02C31C 0B:830C: 85 01 STA ram_0001
C - - - - - 0x02C31E 0B:830E: A8 TAY ; 2006 lo
PLA ; 2006 hi
C - - - - - 0x02C321 0B:8311: 20 6B D2 JSR sub_0x03D27B_записать_адрес_2006_Y_и_A_в_буфер
C - - - - - 0x02C324 0B:8314: A6 00 LDX ram_0000
C - - - - - 0x02C326 0B:8316: 20 30 83 JSR sub_8330
C - - - - - 0x02C329 0B:8319: 18 CLC
C - - - - - 0x02C32A 0B:831A: A5 01 LDA ram_0001
C - - - - - 0x02C32C 0B:831C: 69 08 ADC #< $2308
C - - - - - 0x02C32E 0B:831E: A8 TAY
C - - - - - 0x02C32F 0B:831F: A9 23 LDA #> $2308
C - - - - - 0x02C331 0B:8321: 20 6B D2 JSR sub_0x03D27B_записать_адрес_2006_Y_и_A_в_буфер
C - - - - - 0x02C334 0B:8324: A6 00 LDX ram_0000
C - - - - - 0x02C336 0B:8326: E8 INX
C - - - - - 0x02C337 0B:8327: E8 INX
C - - - - - 0x02C338 0B:8328: 20 30 83 JSR sub_8330
C - - - - - 0x02C33B 0B:832B: C6 00 DEC ram_0000
C - - - - - 0x02C33D 0B:832D: 10 CF BPL bra_82FE_loop
C - - - - - 0x02C33F 0B:832F: 60 RTS
tbl_832E_ppu:
.dbyt $23D0 ; 00 con_fighter_leo
.dbyt $23D2 ; 01 con_fighter_raph
.dbyt $23D4 ; 02 con_fighter_mike
.dbyt $23D6 ; 03 con_fighter_don
.dbyt $23E1 ; 04 con_fighter_casey
.dbyt $23E3 ; 05 con_fighter_hot
.dbyt $23E5 ; 06 con_fighter_shred
.if con_новые_персы <> $00
.dbyt $23D0 ; 07 con_fighter___leo
.dbyt $23D2 ; 08 con_fighter___raph
.dbyt $23D4 ; 09 con_fighter___mike
.dbyt $23D6 ; 0A con_fighter___don
.dbyt $23E1 ; 0B con_fighter___casey
.dbyt $23E3 ; 0C con_fighter___hot
.dbyt $23E5 ; 0D con_fighter___shred
.endif
sub_8330:
C - - - - - 0x02C340 0B:8330: BD 5E 83 LDA tbl_835E,X
C - - - - - 0x02C343 0B:8333: 20 5D D2 JSR sub_0x03D26D_записать_A_в_буфер_с_чтением_индекса
C - - - - - 0x02C346 0B:8336: 20 5D D2 JSR sub_0x03D26D_записать_A_в_буфер_с_чтением_индекса
C - - - - - 0x02C349 0B:8339: 4C 5B D2 JMP loc_0x03D26B_записать_FF_в_буфер_с_чтением_индекса
ofs_041_833C_04:
C - - J - - 0x02C34C 0B:833C: A9 00 LDA #$00
C - - - - - 0x02C34E 0B:833E: 8D 3E 06 STA ram_063E
C - - - - - 0x02C351 0B:8341: 60 RTS
tbl_8342_pos_Y_спрайты_портрета:
- D 0 - - - 0x02C352 0B:8342: 4F .byte $4F ; 00 con_fighter_leo
- D 0 - - - 0x02C353 0B:8343: 4F .byte $4F ; 01 con_fighter_raph
- D 0 - - - 0x02C354 0B:8344: 4F .byte $4F ; 02 con_fighter_mike
- D 0 - - - 0x02C355 0B:8345: 4F .byte $4F ; 03 con_fighter_don
- D 0 - - - 0x02C356 0B:8346: 97 .byte $97 ; 04 con_fighter_casey
- D 0 - - - 0x02C357 0B:8347: 97 .byte $97 ; 05 con_fighter_hot
- D 0 - - - 0x02C358 0B:8348: 97 .byte $97 ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $4F ; 07 con_fighter___leo
.byte $4F ; 08 con_fighter___raph
.byte $4F ; 09 con_fighter___mike
.byte $4F ; 0A con_fighter___don
.byte $97 ; 0B con_fighter___casey
.byte $97 ; 0C con_fighter___hot
.byte $97 ; 0D con_fighter___shred
.endif
tbl_8349_pos_X_спрайты_портрета:
- D 0 - - - 0x02C359 0B:8349: 18 .byte $18 ; 00 con_fighter_leo
- D 0 - - - 0x02C35A 0B:834A: 50 .byte $50 ; 01 con_fighter_raph
- D 0 - - - 0x02C35B 0B:834B: 88 .byte $88 ; 02 con_fighter_mike
- D 0 - - - 0x02C35C 0B:834C: C0 .byte $C0 ; 03 con_fighter_don
- D 0 - - - 0x02C35D 0B:834D: 30 .byte $30 ; 04 con_fighter_casey
- D 0 - - - 0x02C35E 0B:834E: 70 .byte $70 ; 05 con_fighter_hot
- D 0 - - - 0x02C35F 0B:834F: B0 .byte $B0 ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $18 ; 07 con_fighter___leo
.byte $50 ; 08 con_fighter___raph
.byte $88 ; 09 con_fighter___mike
.byte $C0 ; 0A con_fighter___don
.byte $30 ; 0B con_fighter___casey
.byte $70 ; 0C con_fighter___hot
.byte $B0 ; 0D con_fighter___shred
.endif
tbl_8350_pos_X_курсор:
- D 0 - - - 0x02C360 0B:8350: 14 .byte $14 ; 00 con_fighter_leo
- D 0 - - - 0x02C361 0B:8351: 4C .byte $4C ; 01 con_fighter_raph
- D 0 - - - 0x02C362 0B:8352: 84 .byte $84 ; 02 con_fighter_mike
- D 0 - - - 0x02C363 0B:8353: BC .byte $BC ; 03 con_fighter_don
- D 0 - - - 0x02C364 0B:8354: 2C .byte $2C ; 04 con_fighter_casey
- D 0 - - - 0x02C365 0B:8355: 6C .byte $6C ; 05 con_fighter_hot
- D 0 - - - 0x02C366 0B:8356: AC .byte $AC ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $14 ; 07 con_fighter___leo
.byte $4C ; 08 con_fighter___raph
.byte $84 ; 09 con_fighter___mike
.byte $BC ; 0A con_fighter___don
.byte $2C ; 0B con_fighter___casey
.byte $6C ; 0C con_fighter___hot
.byte $AC ; 0D con_fighter___shred
.endif
tbl_8357_pos_Y_курсор:
- D 0 - - - 0x02C367 0B:8357: 46 .byte $46 ; 00 con_fighter_leo
- D 0 - - - 0x02C368 0B:8358: 46 .byte $46 ; 01 con_fighter_raph
- D 0 - - - 0x02C369 0B:8359: 46 .byte $46 ; 02 con_fighter_mike
- D 0 - - - 0x02C36A 0B:835A: 46 .byte $46 ; 03 con_fighter_don
- D 0 - - - 0x02C36B 0B:835B: 8E .byte $8E ; 04 con_fighter_casey
- D 0 - - - 0x02C36C 0B:835C: 8E .byte $8E ; 05 con_fighter_hot
- D 0 - - - 0x02C36D 0B:835D: 8E .byte $8E ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $46 - $08 ; 07 con_fighter___leo
.byte $46 - $08 ; 08 con_fighter___raph
.byte $46 - $08 ; 09 con_fighter___mike
.byte $46 - $08 ; 0A con_fighter___don
.byte $8E - $08 ; 0B con_fighter___casey
.byte $8E - $08 ; 0C con_fighter___hot
.byte $8E - $08 ; 0D con_fighter___shred
.endif
tbl_835E:
- D 0 - - - 0x02C36E 0B:835E: 50 .byte $50 ; 00
- D 0 - - - 0x02C36F 0B:835F: A0 .byte $A0 ; 01
- D 0 - - - 0x02C370 0B:8360: 55 .byte $55 ; 02
- D 0 - - - 0x02C371 0B:8361: AA .byte $AA ; 03
tbl_8362_лимит_курсора:
; для проверки на overflow
- D 0 - - - 0x02C372 0B:8362: 04 .byte $04 ; 00 story
- D 0 - - - 0x02C373 0B:8363: 07 .byte con_колво_персов ; 01 другие режимы
tbl_8364_default_курсор_справа:
; индекс перса, который будет записан при underflow
- D 0 - - - 0x02C374 0B:8364: 03 .byte $03 ; 00 story
- D 0 - - - 0x02C375 0B:8365: 06 .byte con_колво_персов - $01 ; 01 другие режимы
tbl_8366:
- D 0 - - - 0x02C376 0B:8366: 16 .byte $16 ; 00
- D 0 - - - 0x02C377 0B:8367: 17 .byte $17 ; 01
- D 0 - - - 0x02C378 0B:8368: 16 .byte $16 ; 02
- D 0 - - - 0x02C379 0B:8369: 1A .byte $1A ; 03
sub_A591:
C - - - - - 0x02E5A1 0B:A591: A4 A9 LDY ram_global_obj_index
C - - - - - 0x02E5A3 0B:A593: BD 40 04 LDA ram_obj_pos_X_lo,X ; 0440 0441
C - - - - - 0x02E5A6 0B:A596: D9 40 04 CMP ram_obj_pos_X_lo,Y ; 0440 0441
C - - - - - 0x02E5A9 0B:A599: A9 00 LDA #$00
C - - - - - 0x02E5AB 0B:A59B: 6A ROR
C - - - - - 0x02E5AC 0B:A59C: 6A ROR
C - - - - - 0x02E5AD 0B:A59D: DD 10 05 CMP ram_obj_flip,X ; 0510 0511
C - - - - - 0x02E5B0 0B:A5A0: 60 RTS
sub_0x02E6E6:
C D 1 - - - 0x02E6E6 0B:A6D6: 20 91 A5 JSR sub_A591
C - - - - - 0x02E6E9 0B:A6D9: D0 13 BNE bra_A6EE
C - - - - - 0x02E6EB 0B:A6DB: B9 10 04 LDA ram_obj_pos_Y_lo,Y ; 0410 0411
C - - - - - 0x02E6EE 0B:A6DE: C9 B0 CMP #con_координата_пола
C - - - - - 0x02E6F0 0B:A6E0: 90 0C BCC bra_A6EE
C - - - - - 0x02E6F2 0B:A6E2: B9 80 05 LDA ram_0580_obj,Y ; 0580 0581
C - - - - - 0x02E6F5 0B:A6E5: D0 07 BNE bra_A6EE
C - - - - - 0x02E6F7 0B:A6E7: AC 38 06 LDY ram_расстояние_между_персами
C - - - - - 0x02E6FA 0B:A6EA: C0 10 CPY #$10
C - - - - - 0x02E6FC 0B:A6EC: 90 03 BCC bra_A6F1_слишком_близко
; if персы достаточно далеко друг от друга
bra_A6EE:
C - - - - - 0x02E6FE 0B:A6EE: A9 23 LDA #con_колво_персов * $05 ; для дешей рукой
C - - - - - 0x02E700 0B:A6F0: 18 CLC
bra_A6F1_слишком_близко:
C - - - - - 0x02E701 0B:A6F1: 7D 50 05 ADC ram_obj_id,X ; 0550 0551
C - - - - - 0x02E704 0B:A6F4: 85 12 STA ram_0012
C - - - - - 0x02E706 0B:A6F6: 4C 17 F6 RTS
sub_0x02E74B:
- - - - - - 0x02E74B 0B:A73B: 05 AF ORA ram_p1_score + $01
- - - - - - 0x02E74D 0B:A73D: 8D 0F 01 STA ram_010F
- - - - - - 0x02E750 0B:A740: A5 B0 LDA ram_p1_score + $02
- - - - - - 0x02E752 0B:A742: 20 02 D2 JSR sub_0x03D212_ASLx4
- - - - - - 0x02E755 0B:A745: 05 B1 ORA ram_p1_score + $03
- - - - - - 0x02E757 0B:A747: 8D 10 01 STA ram_0110
- - - - - - 0x02E75A 0B:A74A: 20 09 DE JSR sub_0x03DE19_очистить_очки_обоих_игроков
- - - - - - 0x02E75D 0B:A74D: 4C 17 F6 JMP loc_0x03F627_restore_prg
ofs_0x02E7CA:
; бряк срабатывает после нанесения урона персу обычными ударами
; не суперкой, не мячом
C - - - - - 0x02E7CA 0B:A7BA: BC 50 05 LDY ram_obj_id,X ; 0550 0551
C - - - - - 0x02E7CD 0B:A7BD: B9 E0 B5 LDA tbl_B5E0_lo,Y
C - - - - - 0x02E7D0 0B:A7C0: 85 00 STA ram_0000
C - - - - - 0x02E7D2 0B:A7C2: B9 E7 B5 LDA tbl_B5E7_hi,Y
C - - - - - 0x02E7D5 0B:A7C5: 85 01 STA ram_0001
C - - - - - 0x02E7D7 0B:A7C7: A4 A9 LDY ram_global_obj_index
C - - - - - 0x02E7D9 0B:A7C9: B9 12 06 LDA ram_plr_индекс_атаки,Y ; 0612 0613
C - - - - - 0x02E7DC 0B:A7CC: 0A ASL
C - - - - - 0x02E7DD 0B:A7CD: A8 TAY
C - - - - - 0x02E7DE 0B:A7CE: BD C0 04 LDA ram_obj_hit_state,X ; 04C0 04C1
C - - - - - 0x02E7E1 0B:A7D1: 4A LSR
C - - - - - 0x02E7E2 0B:A7D2: B0 06 BCS bra_A7DA
C - - - - - 0x02E7E4 0B:A7D4: C8 INY
C - - - - - 0x02E7E5 0B:A7D5: A9 14 LDA #$14
C - - - - - 0x02E7E7 0B:A7D7: 9D F0 05 STA ram_05F0_obj,X ; 05F0 05F1
bra_A7DA:
C - - - - - 0x02E7EA 0B:A7DA: B1 00 LDA (ram_0000),Y
C - - - - - 0x02E7EC 0B:A7DC: 9D D0 04 STA ram_04D0_obj,X ; 04D0 04D1
C - - - - - 0x02E7EF 0B:A7DF: FE 40 05 INC ram_obj_state_lo,X ; 0540 0541
C - - - - - 0x02E7F2 0B:A7E2: BD 00 06 LDA ram_0600_plr,X ; 0600 0601
C - - - - - 0x02E7F5 0B:A7E5: C0 11 CPY #$11
C - - - - - 0x02E7F7 0B:A7E7: D0 03 BNE bra_A7EC
C - - - - - 0x02E7F9 0B:A7E9: 09 10 ORA #$10
C - - - - - 0x02E7FB 0B:A7EB: 2C .byte $2C ; BIT
bra_A7EC:
C - - - - - 0x02E7FC 0B:A7EC: 29 EF AND #$EF
C - - - - - 0x02E7FE 0B:A7EE: 9D 00 06 STA ram_0600_plr,X ; 0600 0601
C - - - - - 0x02E801 0B:A7F1: 4C 17 F6 JMP loc_0x03F627_restore_prg
ofs_0x02E86E:
C - - - - - 0x02E86E 0B:A85E: B5 91 LDA ram_btn_hold,X
C - - - - - 0x02E870 0B:A860: 29 08 AND #con_btn_Up
C - - - - - 0x02E872 0B:A862: F0 1C BEQ bra_A880
C - - - - - 0x02E874 0B:A864: A4 A9 LDY ram_global_obj_index
C - - - - - 0x02E876 0B:A866: B9 20 05 LDA ram_obj_state_hi,Y ; 0520 0521
C - - - - - 0x02E879 0B:A869: C9 03 CMP #con_plr_state_получает_урон
C - - - - - 0x02E87B 0B:A86B: D0 13 BNE bra_A880
C - - - - - 0x02E87D 0B:A86D: B9 C0 04 LDA ram_obj_hit_state,Y ; 04C1
C - - - - - 0x02E880 0B:A870: C9 04 CMP #$04
C - - - - - 0x02E882 0B:A872: B0 0C BCS bra_A880
C - - - - - 0x02E884 0B:A874: C9 02 CMP #$02
C - - - - - 0x02E886 0B:A876: F0 08 BEQ bra_A880
C - - - - - 0x02E888 0B:A878: BC 50 05 LDY ram_obj_id,X ; 0550
C - - - - - 0x02E88B 0B:A87B: B9 9C A8 LDA tbl_A89C,Y
C - - - - - 0x02E88E 0B:A87E: D0 06 BNE bra_A886 ; jmp
bra_A880:
C - - - - - 0x02E890 0B:A880: BC 50 05 LDY ram_obj_id,X ; 0550 0551
C - - - - - 0x02E893 0B:A883: B9 A6 A8 LDA tbl_A8A6,Y
bra_A886:
C - - - - - 0x02E896 0B:A886: 9D 60 05 STA ram_obj_timer,X ; 0560 0561
C - - - - - 0x02E899 0B:A889: A9 86 LDA #> (ofs_0x024635 - $01)
C - - - - - 0x02E89B 0B:A88B: 48 PHA
C - - - - - 0x02E89C 0B:A88C: A9 24 LDA #< (ofs_0x024635 - $01)
C - - - - - 0x02E89E 0B:A88E: 48 PHA
C - - - - - 0x02E89F 0B:A88F: 4C 17 F6 JMP loc_0x03F627_restore_prg
tbl_A89C:
- D 1 - - - 0x02E8AC 0B:A89C: 04 .byte $04 ; 00 con_fighter_leo
- - - - - - 0x02E8AD 0B:A89D: 05 .byte $05 ; 01 con_fighter_raph
- - - - - - 0x02E8AE 0B:A89E: 04 .byte $04 ; 02 con_fighter_mike
- D 1 - - - 0x02E8AF 0B:A89F: 05 .byte $05 ; 03 con_fighter_don
- - - - - - 0x02E8B0 0B:A8A0: 05 .byte $05 ; 04 con_fighter_casey
- - - - - - 0x02E8B1 0B:A8A1: 09 .byte $09 ; 05 con_fighter_hot
- - - - - - 0x02E8B2 0B:A8A2: 06 .byte $06 ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $04 ; 07 con_fighter___leo
.byte $05 ; 08 con_fighter___raph
.byte $04 ; 09 con_fighter___mike
.byte $05 ; 0A con_fighter___don
.byte $05 ; 0B con_fighter___casey
.byte $09 ; 0C con_fighter___hot
.byte $06 ; 0D con_fighter___shred
.endif
tbl_A8A6:
- D 1 - - - 0x02E8B6 0B:A8A6: 05 .byte $05 ; 00 con_fighter_leo
- D 1 - - - 0x02E8B7 0B:A8A7: 06 .byte $06 ; 01 con_fighter_raph
- D 1 - - - 0x02E8B8 0B:A8A8: 05 .byte $05 ; 02 con_fighter_mike
- D 1 - - - 0x02E8B9 0B:A8A9: 06 .byte $06 ; 03 con_fighter_don
- D 1 - - - 0x02E8BA 0B:A8AA: 05 .byte $05 ; 04 con_fighter_casey
- D 1 - - - 0x02E8BB 0B:A8AB: 09 .byte $09 ; 05 con_fighter_hot
- D 1 - - - 0x02E8BC 0B:A8AC: 07 .byte $07 ; 06 con_fighter_shred
.if con_новые_персы <> $00
.byte $05 ; 07 con_fighter___leo
.byte $06 ; 08 con_fighter___raph
.byte $05 ; 09 con_fighter___mike
.byte $06 ; 0A con_fighter___don
.byte $05 ; 0B con_fighter___casey
.byte $09 ; 0C con_fighter___hot
.byte $07 ; 0D con_fighter___shred
.endif
loc_AA1A_расчет_автобаланса_с_индексом:
sub_AA1A_расчет_автобаланса_с_индексом:
C - - - - - 0x02EA2A 0B:AA1A: 8A TXA
C - - - - - 0x02EA2B 0B:AA1B: 49 01 EOR #$01
C - - - - - 0x02EA2D 0B:AA1D: A8 TAY
sub_AA1E_расчет_автобаланса:
; con_колво_персов
.if con_новые_персы = $00
C - - - - - 0x02EA2E 0B:AA1E: B9 A2 00 LDA ram_plr_id,Y
C - - - - - 0x02EA31 0B:AA21: 0A ASL
C - - - - - 0x02EA32 0B:AA22: 0A ASL
C - - - - - 0x02EA33 0B:AA23: 0A ASL
C - - - - - 0x02EA34 0B:AA24: 75 A2 ADC ram_plr_id,X
SEC
SBC ram_plr_id,Y
.else
LDA ram_plr_id,Y
ASL
ASL
ASL
ASL
ADC ram_plr_id,X
SEC
SBC ram_plr_id,Y
SBC ram_plr_id,Y
.endif
C - - - - - 0x02EA36 0B:AA26: A8 TAY
C - - - - - 0x02EA37 0B:AA27: B9 90 AA LDA tbl_AA90_автобаланс,Y
bra_AA2A:
C - - - - - 0x02EA3A 0B:AA2A: 95 A0 STA ram_strength,X
C - - - - - 0x02EA3C 0B:AA2C: A0 01 RTS
sub_0x02EA10_автобаланс_сил_в_vs_team:
C - - - - - 0x02EA16 0B:AA06: A5 2C LDA ram_game_mode
; con_gm_story
; con_gm_vs_player
; con_gm_vs_cpu
; con_gm_vs_team
; con_gm_tournament
C - - - - - 0x02EA18 0B:AA08: 49 03 EOR #$03
C - - - - - 0x02EA1A 0B:AA0A: D0 20 BNE bra_AA8C_RTS
; if con_gm_vs_team
C - - - - - 0x02EA1C 0B:AA0C: AD 51 01 LDA ram_tournament_индекс_игрока
C - - - - - 0x02EA1F 0B:AA0F: 49 01 EOR ram_tournament_индекс_игрока + $01
ASL
LDA #$00
C - - - - - 0x02EA21 0B:AA11: F0 17 BCS bra_AA2A
C - - - - - 0x02EA23 0B:AA13: AD 2B 01 LDA ram_option_misc
C - - - - - 0x02EA26 0B:AA16: 29 08 AND #$08
C - - - - - 0x02EA28 0B:AA18: F0 12 BEQ bra_AA8C_RTS
JMP loc_AA1A_расчет_автобаланса_с_индексом
sub_AA50_автобаланс_сил_в_vs_player:
; свободный адрес 009D
C - - - - - 0x02EA61 0B:AA51: AD 2B 01 LDA ram_option_misc
C - - - - - 0x02EA64 0B:AA54: 29 08 AND #$08
C - - - - - 0x02EA69 0B:AA59: 90 31 BEQ bra_AA8C_RTS
C - - - - - 0x02EA6B 0B:AA5B: A4 27 LDA ram_позиция_курсора_в_главном_меню
C - - - - - 0x02EA6D 0B:AA5D: C0 01 CMP #$01
C - - - - - 0x02EA6F 0B:AA5F: D0 2B BNE bra_AA8C_RTS
C - - - - - 0x02EA71 0B:AA61: 86 9C TXA
PHA
JSR sub_AA1A_расчет_автобаланса_с_индексом
TXA
TAY
C - - - - - 0x02EA83 0B:AA73: 49 01 EOR #$01
C - - - - - 0x02EA85 0B:AA75: AA TAX
JSR sub_AA1E_расчет_автобаланса
C - - - - - 0x02EA9A 0B:AA8A: A6 9C PLA
TAX
bra_AA8C_RTS:
C - - - - - 0x02EA9F 0B:AA8F: 60 RTS
tbl_AA90_автобаланс:
.if con_новые_персы = $00
; +----------------------------------- 00 con_fighter_leo
; | +------------------------------ 01 con_fighter_raph
; | | +------------------------- 02 con_fighter_mike
; | | | +-------------------- 03 con_fighter_don
; | | | | +--------------- 04 con_fighter_casey
; | | | | | +---------- 05 con_fighter_hot
; | | | | | | +----- 06 con_fighter_shred
; | | | | | | |
; | | | | | | |
- D 1 - - - 0x02EAA0 0B:AA90: 00 .byte $00, $00, $01, $00, $01, $FE, $FC ; 00 con_fighter_leo
- D 1 - - - 0x02EAA8 0B:AA98: 00 .byte $01, $00, $02, $01, $02, $FE, $FD ; 01 con_fighter_raph
- D 1 - - - 0x02EAB0 0B:AAA0: 00 .byte $00, $00, $00, $00, $00, $FC, $FC ; 02 con_fighter_mike
- D 1 - - - 0x02EAB8 0B:AAA8: 00 .byte $00, $00, $01, $00, $01, $FD, $FC ; 03 con_fighter_don
- D 1 - - - 0x02EAC0 0B:AAB0: 00 .byte $00, $00, $01, $00, $01, $FF, $FD ; 04 con_fighter_casey
- D 1 - - - 0x02EAC8 0B:AAB8: 01 .byte $01, $01, $02, $02, $02, $FE, $FE ; 05 con_fighter_hot
- D 1 - - - 0x02EAD0 0B:AAC0: 02 .byte $02, $02, $04, $03, $04, $01, $FE ; 06 con_fighter_shred
.else
; +---------------------------------------------------------------------- 00 con_fighter_leo
; | +----------------------------------------------------------------- 01 con_fighter_raph
; | | +------------------------------------------------------------ 02 con_fighter_mike
; | | | +------------------------------------------------------- 03 con_fighter_don
; | | | | +-------------------------------------------------- 04 con_fighter_casey
; | | | | | +--------------------------------------------- 05 con_fighter_hot
; | | | | | | +---------------------------------------- 06 con_fighter_shred
; | | | | | | | +----------------------------------- 07 con_fighter___leo
; | | | | | | | | +------------------------------ 08 con_fighter___raph
; | | | | | | | | | +------------------------- 09 con_fighter___mike
; | | | | | | | | | | +-------------------- 0A con_fighter___don
; | | | | | | | | | | | +--------------- 0B con_fighter___casey
; | | | | | | | | | | | | +---------- 0C con_fighter___hot
; | | | | | | | | | | | | | +----- 0D con_fighter___shred
; | | | | | | | | | | | | | |
; | | | | | | | | | | | | | |
; | | | | | | | | | | | | | |
.byte $00, $00, $01, $00, $01, $FE, $FC, $00, $00, $01, $00, $01, $FE, $FC ; 00 con_fighter_leo
.byte $01, $00, $02, $01, $02, $FE, $FD, $01, $00, $02, $01, $02, $FE, $FD ; 01 con_fighter_raph
.byte $00, $00, $00, $00, $00, $FC, $FC, $00, $00, $00, $00, $00, $FC, $FC ; 02 con_fighter_mike
.byte $00, $00, $01, $00, $01, $FD, $FC, $00, $00, $01, $00, $01, $FD, $FC ; 03 con_fighter_don
.byte $00, $00, $01, $00, $01, $FF, $FD, $00, $00, $01, $00, $01, $FF, $FD ; 04 con_fighter_casey
.byte $01, $01, $02, $02, $02, $FE, $FE, $01, $01, $02, $02, $02, $FE, $FE ; 05 con_fighter_hot
.byte $02, $02, $04, $03, $04, $01, $FE, $02, $02, $04, $03, $04, $01, $FE ; 06 con_fighter_shred
.byte $00, $00, $01, $00, $01, $FE, $FC, $00, $00, $01, $00, $01, $FE, $FC ; 07 con_fighter___leo
.byte $01, $00, $02, $01, $02, $FE, $FD, $01, $00, $02, $01, $02, $FE, $FD ; 08 con_fighter___raph
.byte $00, $00, $00, $00, $00, $FC, $FC, $00, $00, $00, $00, $00, $FC, $FC ; 09 con_fighter___mike
.byte $00, $00, $01, $00, $01, $FD, $FC, $00, $00, $01, $00, $01, $FD, $FC ; 0A con_fighter___don
.byte $00, $00, $01, $00, $01, $FF, $FD, $00, $00, $01, $00, $01, $FF, $FD ; 0B con_fighter___casey
.byte $01, $01, $02, $02, $02, $FE, $FE, $01, $01, $02, $02, $02, $FE, $FE ; 0C con_fighter___hot
.byte $02, $02, $04, $03, $04, $01, $FE, $02, $02, $04, $03, $04, $01, $FE ; 0D con_fighter___shred
.endif
tbl_ABFC:
- D 1 - - - 0x02EC0C 0B:ABFC: 58 .byte con_chr_bank_bg + $58 ; 00 story
- D 1 - - - 0x02EC0D 0B:ABFD: 58 .byte con_chr_bank_bg + $58 ; 01 vs player
- D 1 - - - 0x02EC0E 0B:ABFE: 58 .byte con_chr_bank_bg + $58 ; 02 vs cpu
- D 1 - - - 0x02EC0F 0B:ABFF: 76 .byte con_chr_bank_bg + $76 ; 03 vs team
sub_AC00:
C - - - - - 0x02EC10 0B:AC00: A4 2C LDY ram_game_mode
C - - - - - 0x02EC12 0B:AC02: B9 FC AB LDA tbl_ABFC,Y
C - - - - - 0x02EC15 0B:AC05: 85 33 STA ram_chr_bank_bg + $01
C - - - - - 0x02EC17 0B:AC07: 60 RTS
tbl_ACB0_палитра_боя:
; green, original
- D 1 - - - 0x02ECC0 0B:ACB0: 00 .word off_AD00_00_leo
- D 1 - - - 0x02ECC1 0B:ACB1: 0C .word off_AD0C_01_raph
- D 1 - - - 0x02ECC2 0B:ACB2: 00 .word off_AD00_02_mike
- D 1 - - - 0x02ECC3 0B:ACB3: 0C .word off_AD0C_03_don
- D 1 - - - 0x02ECC4 0B:ACB4: 18 .word off_AD18_04_casey
- D 1 - - - 0x02ECC5 0B:ACB5: 18 .word off_AD18_05_hot
- D 1 - - - 0x02ECC6 0B:ACB6: 24 .word off_AD24_06_shred
- D 1 - - - 0x02ECC7 0B:ACB7: 30 .word off_AD30_07
; night
- - - - - - 0x02ECD0 0B:ACC0: 80 .word off_AD80_10_leo
- - - - - - 0x02ECD1 0B:ACC1: 8C .word off_AD8C_11_raph
- - - - - - 0x02ECD2 0B:ACC2: 80 .word off_AD80_12_mike
- - - - - - 0x02ECD3 0B:ACC3: 8C .word off_AD8C_13_don
- - - - - - 0x02ECD4 0B:ACC4: 98 .word off_AD98_14_casey
- - - - - - 0x02ECD5 0B:ACC5: 98 .word off_AD98_15_hot
- - - - - - 0x02ECD6 0B:ACC6: A4 .word off_ADA4_16_shred
- - - - - - 0x02ECD7 0B:ACC7: B0 .word off_ADB0_17
tbl_ACD0_фиксированная_палитра:
- D 1 - - - 0x02ECE0 0B:ACD0: 0F .byte $0F, $16, $1A, $20 ;
- D 1 - - - 0x02ECE4 0B:ACD4: 0F .byte $0F, $0B, $2A, $12 ;
- D 1 - - - 0x02ECE8 0B:ACD8: 0F .byte $0F, $07, $16, $31 ;
- D 1 - - - 0x02ECEC 0B:ACDC: 0F .byte $0F, $04, $16, $37 ;
- D 1 - - - 0x02ECF0 0B:ACE0: 0F .byte $0F, $11, $21, $20 ;
off_AD00_00_leo:
off_AD00_02_mike:
- D 1 - I - 0x02ED10 0B:AD00: 0F .byte $0F, $17, $27, $38 ;
- D 1 - I - 0x02ED14 0B:AD04: 0F .byte $0F, $04, $14, $24 ;
- D 1 - I - 0x02ED18 0B:AD08: 0F .byte $0F, $06, $16, $26 ;
off_AD0C_01_raph:
off_AD0C_03_don:
- D 1 - I - 0x02ED1C 0B:AD0C: 0F .byte $0F, $00, $10, $20 ;
- D 1 - I - 0x02ED20 0B:AD10: 0F .byte $0F, $06, $16, $27 ;
- D 1 - I - 0x02ED24 0B:AD14: 0F .byte $0F, $08, $18, $28 ;
off_AD18_04_casey:
off_AD18_05_hot:
- D 1 - I - 0x02ED28 0B:AD18: 0F .byte $0F, $07, $17, $27 ;
- D 1 - I - 0x02ED2C 0B:AD1C: 0F .byte $0F, $06, $16, $26 ;
- D 1 - I - 0x02ED30 0B:AD20: 0F .byte $0F, $05, $07, $10 ;
off_AD24_06_shred:
- D 1 - I - 0x02ED34 0B:AD24: 0F .byte $0F, $0C, $1C, $21 ;
- D 1 - I - 0x02ED38 0B:AD28: 0F .byte $0F, $01, $11, $21 ;
- D 1 - I - 0x02ED3C 0B:AD2C: 0F .byte $0F, $03, $13, $23 ;
off_AD30_07:
- D 1 - I - 0x02ED40 0B:AD30: 0F .byte $0F, $20, $10, $00 ;
- D 1 - I - 0x02ED44 0B:AD34: 0F .byte $0F, $37, $27, $17 ;
- D 1 - I - 0x02ED48 0B:AD38: 0F .byte $0F, $06, $16, $26 ;
off_AD80_10_leo:
off_AD80_12_mike:
- - - - - - 0x02ED90 0B:AD80: 0F .byte $0F, $01, $11, $21 ;
- - - - - - 0x02ED94 0B:AD84: 0F .byte $0F, $03, $13, $23 ;
- - - - - - 0x02ED98 0B:AD88: 0F .byte $0F, $0C, $1C, $21 ;
off_AD8C_11_raph:
off_AD8C_13_don:
- - - - - - 0x02ED9C 0B:AD8C: 0F .byte $0F, $01, $11, $21 ;
- - - - - - 0x02EDA0 0B:AD90: 0F .byte $0F, $03, $13, $23 ;
- - - - - - 0x02EDA4 0B:AD94: 0F .byte $0F, $0C, $1C, $21 ;
off_AD98_14_casey:
off_AD98_15_hot:
- - - - - - 0x02EDA8 0B:AD98: 0F .byte $0F, $01, $11, $21 ;
- - - - - - 0x02EDAC 0B:AD9C: 0F .byte $0F, $0C, $1C, $21 ;
- - - - - - 0x02EDB0 0B:ADA0: 0F .byte $0F, $03, $02, $23 ;
off_ADA4_16_shred:
- - - - - - 0x02EDB4 0B:ADA4: 0F .byte $0F, $0C, $1C, $21 ;
- - - - - - 0x02EDB8 0B:ADA8: 0F .byte $0F, $01, $11, $21 ;
- - - - - - 0x02EDBC 0B:ADAC: 0F .byte $0F, $03, $13, $23 ;
off_ADB0_17:
- - - - - - 0x02EDC0 0B:ADB0: 0F .byte $0F, $20, $10, $00 ;
- - - - - - 0x02EDC4 0B:ADB4: 0F .byte $0F, $2C, $1C, $0C ;
- - - - - - 0x02EDC8 0B:ADB8: 0F .byte $0F, $03, $13, $23 ;
tbl_AE20_уровень_для_отрисовки:
- D 1 - - - 0x02EE30 0B:AE20: 0A .byte con_screen_stage_sewer ; 00 con_fighter_leo
- D 1 - - - 0x02EE31 0B:AE21: 14 .byte con_screen_stage_down_town ; 01 con_fighter_raph
- D 1 - - - 0x02EE32 0B:AE22: 0A .byte con_screen_stage_sewer ; 02 con_fighter_mike
- D 1 - - - 0x02EE33 0B:AE23: 14 .byte con_screen_stage_down_town ; 03 con_fighter_don
- D 1 - - - 0x02EE34 0B:AE24: 0E .byte con_screen_stage_pirate_ship ; 04 con_fighter_casey
- D 1 - - - 0x02EE35 0B:AE25: 0E .byte con_screen_stage_pirate_ship ; 05 con_fighter_hot
- D 1 - - - 0x02EE36 0B:AE26: 08 .byte con_screen_stage_water_front ; 06 con_fighter_shred
- D 1 - - - 0x02EE37 0B:AE27: 3E .byte con_screen_stage_technodrome ; 07
tbl_AE30:
- D 1 - - - 0x02EE40 0B:AE30: 68 .byte con_chr_bank_bg + $68, con_chr_bank_bg + $6A ; 00 con_fighter_leo
- D 1 - - - 0x02EE42 0B:AE32: 64 .byte con_chr_bank_bg + $64, con_chr_bank_bg + $66 ; 01 con_fighter_raph
- D 1 - - - 0x02EE44 0B:AE34: 68 .byte con_chr_bank_bg + $68, con_chr_bank_bg + $6A ; 02 con_fighter_mike
- D 1 - - - 0x02EE46 0B:AE36: 64 .byte con_chr_bank_bg + $64, con_chr_bank_bg + $66 ; 03 con_fighter_don
- D 1 - - - 0x02EE48 0B:AE38: 60 .byte con_chr_bank_bg + $60, con_chr_bank_bg + $62 ; 04 con_fighter_casey
- D 1 - - - 0x02EE4A 0B:AE3A: 60 .byte con_chr_bank_bg + $60, con_chr_bank_bg + $62 ; 05 con_fighter_hot
- D 1 - - - 0x02EE4C 0B:AE3C: 5C .byte con_chr_bank_bg + $5C, con_chr_bank_bg + $5E ; 06 con_fighter_shred
- D 1 - - - 0x02EE4E 0B:AE3E: 88 .byte con_chr_bank_bg + $88, con_chr_bank_bg + $8A ; 07
sub_0x02EE60_выбрать_палитру_уровня:
C - - - - - 0x02EE60 0B:AE50: A5 9E LDA ram_номер_боя_story
C - - - - - 0x02EE62 0B:AE52: 8D 5C 01 STA ram_tournament_индекс_игрока + $07
C - - - - - 0x02EE65 0B:AE55: EE 52 01 INC ram_0152
C - - - - - 0x02EE68 0B:AE58: 20 8C FC JSR sub_0x03FC9C_set_mirroring_V
LDA #$00
C - - - - - 0x02EE6B 0B:AE5B: 8D CA 06 STA ram_06CA_cpu_script
C - - - - - 0x02EE6E 0B:AE5E: 8D CB 06 STA ram_06CA_cpu_script + $01
C - - - - - 0x02EE71 0B:AE61: 8D 71 06 STA ram_0671
C - - - - - 0x02EE74 0B:AE64: 85 AA STA ram_таймер_задержки_фпс
C - - - - - 0x02EE76 0B:AE66: 85 86 STA ram_0086
C - - - - - 0x02EE78 0B:AE68: 85 4D STA ram_004D
; bzk optimize, предположительно ram_irq_handler будет перезаписан до чтения
C - - - - - 0x02EE7A 0B:AE6A: A9 01 LDA #con_0048_01
C - - - - - 0x02EE7C 0B:AE6C: 85 48 STA ram_irq_handler
LDA #$01 ; enable irq
C - - - - - 0x02EE7E 0B:AE6E: 85 49 STA ram_irq_flag
C - - - - - 0x02EE80 0B:AE70: A5 9E LDA ram_номер_боя_story
C - - - - - 0x02EE82 0B:AE72: 0A ASL
C - - - - - 0x02EE83 0B:AE73: A8 TAY