-
Notifications
You must be signed in to change notification settings - Fork 0
/
sound.inc
1539 lines (1485 loc) · 36.2 KB
/
sound.inc
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
; --------------------------------
; SOUND ENGINE
; --------------------------------
; =============== S U B R O U T I N E =======================================
_apu_load_chnl:
ASL
STA _apu_seqposit,X
LDA #1
STA _apu_stpindex,X
LDA #0
STA _apu_seqindex,X
STA _apu_spdcheck,X
CPX #2
BNE loc_50024
LDA #1
STA _apu_spdcount,X
LDA #0
BEQ loc_50027
loc_50024:
STA _apu_spdcount,X
loc_50027:
STA _apu_noteinit,X
STA _apu_tranbyte,X
STA _apu_stepnumb,X
STA _apu_ampindex,X
STA _apu_amplitud,X
STA _apu_sfxtrans,X
STA _apu_arptrans,X
STA _apu_continos,X
LDA #1
STA _apu_voictest,X
STA _apu_repstcnt,X
STA _apu_noteleng,X
LDA #$F
STA _APU_STATUS
RTS
; =============== S U B R O U T I N E =======================================
_apu_play:
LDX #0
JSR _apu_play_chnl
LDX #1
JSR _apu_play_chnl
LDX #2
JSR _apu_play_chnl
LDX #3
JMP _apu_play_chnl
; =============== S U B R O U T I N E =======================================
_apu_play_chnl:
LDA _apu_voictest,X
BEQ locret_50065
CPX #0
BEQ loc_5008B
CPX #1
BEQ loc_5008B
CPX #2
BEQ loc_50082
CPX #3
BEQ loc_50066
locret_50065:
RTS
loc_50066:
TXA
ASL
ASL
TAY
LDA #$10
ORA #$20
ORA _apu_amplitud,X
STA _APU_PULSE1_ENV,Y
LDA _apu_lofrqwrd,X
STA _APU_PULSE1_TIME,Y
LDA #$F8
STA _APU_PULSE1_LEN,Y
JMP loc_500B5
loc_50082:
TXA
ASL
ASL
TAY
LDA #$80
JMP loc_50096
loc_5008B:
TXA
ASL
ASL
TAY
LDA _apu_pulsbyt1,X
ORA #$10
ORA #$20
loc_50096:
ORA _apu_amplitud,X
STA _APU_PULSE1_ENV,Y
LDA #8
STA _APU_PULSE1_SWEEP,Y
LDA _apu_lofrqwrd,X
STA _APU_PULSE1_TIME,Y
LDA _apu_hifrqwrd,X
CMP _apu_continos,X
BEQ loc_500B5
STA _APU_PULSE1_LEN,Y
STA _apu_continos,X
loc_500B5:
LDA #0
STA _apu_realplay,X
DEC _apu_spdcount,X
BPL loc_500E0
LDA _apu_spdcheck,X
EOR #$FF
STA _apu_spdcheck,X
BPL loc_500D2
LDY _apu_seqposit,X
LDA _ptr_seqtabes,Y
JMP loc_500D8
loc_500D2:
LDY _apu_seqposit,X
LDA _ptr_seqtabes+1,Y
loc_500D8:
STA _apu_spdcount,X
LDA #$FF
STA _apu_realplay,X
loc_500E0:
LDA _apu_realplay,X
BPL loc_500EA
DEC _apu_noteleng,X
BEQ loc_500FA
loc_500EA:
LDA _apu_realnote,X
CMP #$FF
BEQ loc_500F4
JSR _apu_fetch
loc_500F4:
LDA #0
STA _apu_noteinit,X
RTS
loc_500FA:
LDY _apu_stepnumb,X
LDA _ptr_stptablo,Y
STA _apu_tmp0
LDA _ptr_stptabhi,Y
STA _apu_tmp0+1
LDA #0
STA _apu_gldspeed,X
LDY _apu_stpindex,X
LDA (_apu_tmp0),Y
CMP #$FF
BEQ loc_50118
JMP loc_5019D
loc_50118:
DEC _apu_repstcnt,X
BEQ loc_50128
LDA #0
STA _apu_stpindex,X
TAY
LDA (_apu_tmp0),Y
JMP loc_5019D
loc_50128:
LDY _apu_seqposit,X
LDA _ptr_seqtabel,Y
STA _apu_tmp0
LDA _ptr_seqtabel+1,Y
STA _apu_tmp0+1
LDY _apu_seqindex,X
LDA (_apu_tmp0),Y
CMP #$FF
BNE loc_5014A
INY
LDA (_apu_tmp0),Y
STA _apu_seqindex,X
TAY
LDA (_apu_tmp0),Y
JMP loc_50158
loc_5014A:
CMP #$FE
BNE loc_50154
LDA #0
STA _apu_voictest,X
RTS
loc_50154:
CMP #$FC
BNE loc_50158
loc_50158:
CMP #$80
BCC loc_50166
AND #$7F
STA _apu_tranbyte,X
INY
LDA (_apu_tmp0),Y
BMI loc_5018E
loc_50166:
CMP #$70
BCC loc_50172
AND #$F
STA _apu_sfxtrans,X
INY
LDA (_apu_tmp0),Y
loc_50172:
CMP #$60
BCC loc_5017E
AND #$F
STA _apu_repstcnt,X
INY
LDA (_apu_tmp0),Y
loc_5017E:
CMP #$50
BCC loc_5018A
AND #$F
STA _apu_arptrans,X
INY
LDA (_apu_tmp0),Y
loc_5018A:
STA _apu_stepnumb,X
INY
loc_5018E:
TYA
STA _apu_seqindex,X
INC _apu_repstcnt,X
LDA #0
STA _apu_stpindex,X
JMP loc_500FA
loc_5019D:
CMP #$FD
BNE loc_501BF
INY
LDA (_apu_tmp0),Y
STA _apu_gldspeed,X
INY
LDA (_apu_tmp0),Y
CLC
ADC _apu_tranbyte,X
STA _apu_realnote,X
INY
LDA (_apu_tmp0),Y
CLC
ADC _apu_tranbyte,X
STA _apu_destnote,X
INY
JMP loc_50222
loc_501BF:
CMP #$E0
BCC loc_501DA
AND #$1F
STA _apu_realleng,X
LDA #$FF
STA _apu_realnote,X
LDA #0
STA _apu_amplitud,X
INY
TYA
STA _apu_stpindex,X
JMP loc_5027C
loc_501DA:
CMP #$C0
BCC loc_501F2
CLC
ADC _apu_sfxtrans,X
ASL
ASL
STA _apu_realsoun,X
INY
LDA (_apu_tmp0),Y
CMP #$FD
BEQ loc_5019D
CMP #$C0
BCS loc_50222
loc_501F2:
CMP #$80
BCC loc_50206
AND #$7F
STA _apu_realleng,X
INY
LDA (_apu_tmp0),Y
CMP #$FD
BEQ loc_5019D
CMP #$80
BCS loc_50222
loc_50206:
CMP #$60
BCC loc_5021A
AND #$1F
CLC
ADC _apu_arptrans,X
STA _apu_arpnumbo,X
INY
LDA (_apu_tmp0),Y
CMP #$60
BCS loc_50222
loc_5021A:
CLC
ADC _apu_tranbyte,X
STA _apu_realnote,X
INY
loc_50222:
TYA
STA _apu_stpindex,X
INC _apu_noteinit,X
LDY _apu_realsoun,X
CPX #0
BEQ loc_5023D
CPX #1
BEQ loc_5023D
CPX #2
BEQ loc_5024C
CPX #3
BEQ loc_5024C
RTS
loc_5023D:
LDA _apu_soundfix,Y
AND #8
BNE loc_5024C
LDA _apu_soundfix,Y
AND #$C0
STA _apu_pulsbyt1,X
loc_5024C:
LDA _apu_soundfix+1,Y
STA _apu_fx01,X
LDA _apu_soundfix+2,Y
STA _apu_fx02,X
LDA _apu_soundfix+3,Y
STA _apu_fx03,X
CPX #3
BEQ loc_50276
LDY _apu_realnote,X
LDA _apu_frqtablo,Y
STA _apu_lofrqwrd,X
LDA #$F8
ORA _apu_frqtabhi,Y
STA _apu_hifrqwrd,X
JMP loc_5027C
loc_50276:
LDA _apu_realnote,X
STA _apu_lofrqwrd,X
loc_5027C:
LDA _apu_realleng,X
STA _apu_noteleng,X
RTS
; =============== S U B R O U T I N E =======================================
_apu_fetch:
LDA _apu_noteinit,X
BNE loc_5028B
JMP loc_502E0
loc_5028B:
LDA _apu_gldspeed,X
BEQ loc_502B2
TAY
LSR
LSR
LSR
LSR
STA _apu_glddelay,X
TYA
AND #$F
STA _apu_gldspeed,X
LDA _apu_realleng,X
SEC
SBC _apu_glddelay,X
STA _apu_glddelay,X
LDA _apu_realnote,X
SEC
SBC _apu_destnote,X
STA _apu_glddirec,X
loc_502B2:
LDA #0
STA _apu_ampindex,X
STA _apu_pulindex,X
STA _apu_vibindex,X
STA _apu_arpindex,X
LDA _apu_fx02,X
LSR
LSR
LSR
LSR
STA _apu_vibdelay,X
LDA _apu_realleng,X
SEC
SBC _apu_vibdelay,X
BCS loc_502DA
LDA #0
STA _apu_fx01,X
BEQ loc_502DD
loc_502DA:
STA _apu_vibdelay,X
loc_502DD:
JMP loc_503B4
loc_502E0:
LDA _apu_fx03,X
AND #$7F
TAY
LDA _ptr_amptabl,Y
STA _apu_tmp0
LDA _ptr_amptabh,Y
STA _apu_tmp0+1
LDY _apu_ampindex,X
LDA (_apu_tmp0),Y
CMP #$FE
BEQ loc_502FF
STA _apu_amplitud,X
INC _apu_ampindex,X
loc_502FF:
LDY _apu_gldspeed,X
BEQ loc_5035B
LDA _apu_glddelay,X
CMP _apu_noteleng,X
BCC loc_5035B
LDY _apu_glddirec,X
BMI loc_5032B
LDA _apu_lofrqwrd,X
CLC
ADC _apu_gldspeed,X
STA _apu_lofrqwrd,X
BCC loc_50320
INC _apu_hifrqwrd,X
loc_50320:
LDY _apu_destnote,X
SEC
SBC _apu_frqtablo,Y
BCC loc_50358
BCS loc_50343
loc_5032B:
LDA _apu_lofrqwrd,X
SEC
SBC _apu_gldspeed,X
STA _apu_lofrqwrd,X
BCS loc_5033A
DEC _apu_hifrqwrd,X
loc_5033A:
LDY _apu_destnote,X
SEC
SBC _apu_frqtablo,Y
BCS loc_50358
loc_50343:
TYA
STA _apu_realnote,X
LDA _apu_frqtablo,Y
STA _apu_lofrqwrd,X
LDA _apu_frqtabhi,Y
STA _apu_hifrqwrd,X
LDA #0
STA _apu_gldspeed,X
loc_50358:
JMP loc_503B4
loc_5035B:
LDA _apu_fx01,X
AND #$F
BEQ loc_503B4
LDA _apu_vibdelay,X
CMP _apu_noteleng,X
BCC loc_503B4
LDA _apu_fx01,X
AND #$F
TAY
LDA _ptr_vibtabl-1,Y
STA _apu_tmp0
LDA _ptr_vibtabh-1,Y
STA _apu_tmp0+1
LDY _apu_vibindex,X
LDA (_apu_tmp0),Y
CMP #$80
BNE loc_50385
LDY #0
loc_50385:
LDA (_apu_tmp0),Y
BPL loc_503A1
EOR #$FF
CLC
ADC #1
STA _apu_tmp0
LDA _apu_lofrqwrd,X
SEC
SBC _apu_tmp0
STA _apu_lofrqwrd,X
BCS loc_5039E
DEC _apu_hifrqwrd,X
loc_5039E:
JMP loc_503AF
loc_503A1:
LDA _apu_lofrqwrd,X
CLC
ADC (_apu_tmp0),Y
STA _apu_lofrqwrd,X
BCC loc_503AF
INC _apu_hifrqwrd,X
loc_503AF:
INY
TYA
STA _apu_vibindex,X
loc_503B4:
CPX #2
BCS loc_503E5
LDA _apu_fx02,X
AND #$F
BEQ loc_503E5
TAY
LDA _ptr_pultabl-1,Y
STA _apu_tmp0
LDA _ptr_pultabh-1,Y
STA _apu_tmp0+1
LDY _apu_pulindex,X
LDA (_apu_tmp0),Y
CMP #$FF
BNE loc_503D9
INY
LDA (_apu_tmp0),Y
TAY
LDA (_apu_tmp0),Y
loc_503D9:
CMP #$FE
BEQ loc_503E5
STA _apu_pulsbyt1,X
INY
TYA
STA _apu_pulindex,X
loc_503E5:
LDA _apu_fx01,X
AND #$40
BEQ locret_5045D
LDY _apu_arpnumbo,X
LDA _ptr_arptablo,Y
STA _apu_tmp0
LDA _ptr_arptabhi,Y
STA _apu_tmp0+1
LDY _apu_arpindex,X
BNE loc_50407
LDA (_apu_tmp0),Y
STA _apu_arpspeed,X
INY
JMP loc_5041C
loc_50407:
LDA _apu_arpspeed,X
SEC
SBC #$10
STA _apu_arpspeed,X
BPL loc_50443
LDY #0
LDA (_apu_tmp0),Y
STA _apu_arpspeed,X
LDY _apu_arpindex,X
loc_5041C:
LDA (_apu_tmp0),Y
CMP #$FF
BNE loc_5042C
LDY #0
LDA (_apu_tmp0),Y
AND #$F
TAY
INY
LDA (_apu_tmp0),Y
loc_5042C:
CMP #$FE
BEQ locret_5045D
BMI loc_50439
CLC
ADC _apu_realnote,X
STA _apu_arponoto,X
loc_50439:
AND #$7F
STA _apu_arponoto,X
INY
TYA
STA _apu_arpindex,X
loc_50443:
LDA _apu_arponoto,X
CPX #3
BNE loc_50450
STA _apu_lofrqwrd,X
JMP locret_5045D
loc_50450:
TAY
LDA _apu_frqtablo,Y
STA _apu_lofrqwrd,X
LDA _apu_frqtabhi,Y
STA _apu_hifrqwrd,X
locret_5045D:
RTS
_apu_frqtablo:
.BYTE $AD,$4A,$EF,$9B,$4B,$FE,$B5,$73,$30,$F5,$BD,$87 ;1
.BYTE $56,$25,$F8,$CD,$A5,$7F,$5B,$3A,$19,$FB,$DE,$C3 ;2
.BYTE $AA,$92,$7B,$66,$52,$3F,$2D,$1C, $C,$FD,$EF,$E1 ;3
.BYTE $D4,$C9,$BD,$B3,$A9,$9F,$96,$8E,$86,$7E,$77,$70 ;4
.BYTE $6A,$64,$5E,$59,$54,$4F,$4A,$47,$42,$3E,$3B,$38 ;5
.BYTE $35,$31,$2E,$2C,$29,$27,$25,$23,$21,$1F,$1D,$1B ;6
.BYTE $1A,$19,$18,$16,$15,$14,$13,$12,$11,$10, $F, $E ;7
.BYTE $FF
_apu_frqtabhi:
.BYTE 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3 ;1
.BYTE 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1 ;2
.BYTE 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ;3
.BYTE 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;4
.BYTE 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;5
.BYTE 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;6
.BYTE 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;7
.BYTE 7
_ptr_seqtabel:
.WORD _seq00
.WORD _seq01
.WORD _seq02
.WORD _seq03
.WORD _seq04
.WORD _seq05
.WORD _seq06
.WORD _seq07
.WORD _seq08
.WORD _seq09
.WORD _seq0A
.WORD _seq0B
.WORD _seq0C
.WORD _seq0D
.WORD _seq0E
.WORD _seq0F
.WORD _seq10
.WORD _seq11
.WORD _seq12
.WORD _seq13
.WORD _seq14
.WORD _seq15
.WORD _seq16
.WORD _seq17
.WORD _seq18
.WORD _seq19
.WORD _seq1A
.WORD _seq1B
.WORD _seq1C
.WORD _seq1D
.WORD _seq1E
.WORD _seq1F
.WORD _seq20
.WORD _seq21
.WORD _seq22
.WORD _seq23
.WORD _seq24
.WORD _seq25
.WORD _seq26
.WORD _seq27
.WORD _seq28
.WORD _seq29
.WORD _seq2A
.WORD _seq2B
.WORD _seq2C
.WORD _seq2D
.WORD _seq2E
.WORD _seq2F
.WORD _seq30
.WORD _seq31
.WORD _seq32
.WORD _seq33
.WORD _seq34
.WORD _seq35
.WORD _seq36
.WORD _seq37
.WORD _seq38
.WORD _seq39
.WORD _seq3A
.WORD _seq3B
_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,>s01,>s02,>s03,>s04,>s05,>s06,>s07,>s08,>s09,>s0A,>s0B,>s0C,>s0D,>s0E,>s0F
.BYTE >s10,>s11,>s12,>s13,>s14,>s15,>s16,>s17,>s18,>s19,>s1A,>s1B,>s1C,>s1D,>s1E,>s1F
.BYTE >s20,>s21,>s22,>s23,>s24,>s25,>s26,>s27,>s28,>s29,>s2A,>s2B,>s2C,>s2D,>s2E,>s2F
.BYTE >s30,>s31,>s32,>s33,>s34,>s35,>s36,>s37,>s38,>s39,>s3A,>s3B,>s3C,>s3D,>s3E,>s3F
.BYTE >s40,>s41,>s42,>s43
_ptr_amptabl:
.BYTE <am00,<am01,<am02,<am03,<am04,<am05,<am06,<am07,<am08,<am09,<am0A,<am0B,<am0C,<am0D,<am0E,<am0F
.BYTE <am10,<am11,<am12,<am13,<am14,<am15,<am16,<am17
_ptr_amptabh:
.BYTE >am00,>am01,>am02,>am03,>am04,>am05,>am06,>am07,>am08,>am09,>am0A,>am0B,>am0C,>am0D,>am0E,>am0F
.BYTE >am10,>am11,>am12,>am13,>am14,>am15,>am16,>am17
_ptr_vibtabl:
.BYTE <v00,<v01,<v02,<v03
_ptr_vibtabh:
.BYTE >v00,>v01,>v02,>v03
_ptr_pultabl:
.BYTE <p00,<p01,<p02,<p03,<p04,<p05
_ptr_pultabh:
.BYTE >p00,>p01,>p02,>p03,>p04,>p05
_ptr_arptablo:
.BYTE <a00,<a01,<a02,<a03,<a04,<a05,<a06,<a07,<a08,<a09,<a0A,<a0B,<a0C,<a0D,<a0E,<a0F
.BYTE <a10,<a11,<a12,<a13,<a14,<a15,<a16,<a17,<a18,<a19,<a1A,<a1B,<a1C,<a1D,<a1E,<a1F
.BYTE <a20,<a21
_ptr_arptabhi:
.BYTE >a00,>a01,>a02,>a03,>a04,>a05,>a06,>a07,>a08,>a09,>a0A,>a0B,>a0C,>a0D,>a0E,>a0F
.BYTE >a10,>a11,>a12,>a13,>a14,>a15,>a16,>a17,>a18,>a19,>a1A,>a1B,>a1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3, 2, 2, 2, 1,$FE
am09:
.BYTE $F, $A, 9, 8, 7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2
.BYTE $FE
am0A:
.BYTE 6, 3, 2, 2, 1,$FE
am0B:
.BYTE 1,$FE
am0C:
.BYTE $A, 6, 5, 4, 4, 3, 3, 2,$FE
am0D:
.BYTE $F, $C, $B, $A, 9, 8, 8, 7, 6, 5, 4, 3, 2,$FE
am0E:
.BYTE $F, $C, 9, 7, 6, 5,$FE
am0F:
.BYTE 8, 6, 5, 4, 3,$FE
am10:
.BYTE 2,$FE
am11:
.BYTE 1,$FE
am12:
.BYTE $A, 6, 4, 4, 3, 3, 3, 2,$FE
am13:
.BYTE 5, 4, 3, 3, 2,$FE
am14:
.BYTE 4,$FE
am15:
.BYTE 1, 2, 3, 4, 4, 5, 5, 5, 4, 3, 2, 2, 1,$FE
am16:
.BYTE 1, 3, 5, 7, 9, $B, $D, $F, $D, $B, 9, 7, 5, 3, 1, 0
.BYTE $FE
am17:
.BYTE 8,$FE
v00:
.BYTE 1, 1, 0,$FF,$FF, 0,$FF,$FF, 0, 1, 1, 0,$80
v01:
.BYTE 4, 4, 4,$FC,$FC,$FC,$FC,$FC,$FC, 4, 4, 4,$80
v02:
.BYTE 2, 1, 1,$FE,$FF,$FF,$FE,$FF,$FF, 2, 1, 1,$80
v03:
.BYTE 1, 0,$FF, 0,$80
p00:
.BYTE 0, 0, 0, 0, 0, 0,$40,$40,$40,$40,$40,$40,$80,$80,$80,$80
.BYTE $80,$80,$C0,$C0,$C0,$C0,$C0,$C0,$80,$80,$80,$80,$80,$80,$40,$40
.BYTE $40,$40,$40,$40,$FF, 0
p01:
.BYTE 0,$40,$80,$80,$C0,$C0,$80,$80,$80,$80,$80,$80,$40,$40,$40,$40
.BYTE $40,$40,$80,$80,$80,$80,$80,$80,$C0,$C0,$C0,$C0,$C0,$C0,$FF, 6
p02:
.BYTE 0, 0,$40,$40,$40,$40,$80,$80,$80,$80,$80,$80,$80,$80,$C0,$C0
.BYTE $C0,$C0,$C0,$C0,$C0,$80,$80,$80,$80,$80,$80,$80,$40,$40,$40,$40
.BYTE $40,$40,$40,$80,$80,$80,$80,$80,$80,$80,$FF, $E
p03:
.BYTE 0, 0,$40,$40,$40,$40,$80,$80,$80,$80,$C0,$C0,$C0,$C0,$80,$80
.BYTE $80,$80,$40,$40,$40,$40, 0, 0,$FF, 0
p04:
.BYTE 0, 0, 0,$40,$FE
p05:
.BYTE $80,$80,$80,$40,$40,$40, 0, 0, 0,$40,$40,$40,$80,$FE
a00:
.BYTE $C,$18,$16,$14,$12,$10, $E, $C, $B, $A, 9, 8, 7, 6, 5, 4
.BYTE 3, 2, 1, 0,$FF
a01:
.BYTE $10, 4, 6, 7, 6, 5, 4,$FE
a02:
.BYTE $10, $F, $E, $D, $C, $B, $A, 9, 8, 7, 6, 6, 5,$FE
a03:
.BYTE $10, $F, $E, $D, $C, $B, $A, 9, 8, 7, 6, 7, 6, 7, 6, 7
.BYTE 6, 7, 6, 7, 6, 7, 8, 9, 9, $A, $A, $B, $B, $A, $A, 9
.BYTE 8, 7, 6, 5, 4, 3, 2, 1, 0,$FE
a04:
.BYTE 0,$12, $F, $E,$11, $E, $D,$10, $D, $C, $F, $C, $B, $E, $B, $A
.BYTE $D, $A, 9, $C, 9, 8, $B, 8, 7, $A, 7, 6, 9, 6, 5, 8
.BYTE 5, 4, 7, 4, 3, 6, 3, 2, 5, 2, 1, 4, 1, 0, 3, 1
.BYTE 0, 2, 1, 0,$FE
a05:
.BYTE 0, 8, 9, $A, $B, $C, $D, $E, $F, $F, $E, $E, $E, $D,$FE
a06:
.BYTE 0, 2, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1,$FF
a07:
.BYTE $20, 0, 3, 7, $C, 7, 5,$FF
a08:
.BYTE $30, 0, 2, 5, 7, $A, $C,$FF
a09:
.BYTE 0, 8, 0, 6, 2, 9, 4, 7, 1,$FF
a0A:
.BYTE 7,$18,$15,$12, $F, $C, 9, 7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1, 6 ;C6 Pickupos (1)
.BYTE 0, 0, 0, 7 ;C7 Jetpacks (4)
.BYTE 0,$40, 0, 8 ;C8 RoboFall (1)
.BYTE 0,$40, 1, 9 ;C9 Titlearp (1)
.BYTE 0,$40, 2, $A ;CA Titlea-1 (1)
.BYTE 0,$40, 0, $B ;CB Titlebas (3)
.BYTE 0, 0, 0, $C ;CC Percussi (4)
.BYTE 0,$40, 0, $D ;CD PERCUSSI (4)
.BYTE 0, 1,$43, $E ;CE LEADERS! (1)
.BYTE 0, 1,$43, $F ;CF LEADER-1 (1)
.BYTE 0,$40, 3, $E ;D0 LEADARP! (1)
.BYTE 0,$40, 3, $F ;D1 LEADAR-1 (1)
.BYTE 0,$40, 0,$10 ;D2 softsoft (1)
.BYTE 0,$40, 0, $B ;D3 softso-1 (1)
.BYTE $80, 1,$60,$10 ;D4 HARDintr (1)
.BYTE $80, 1,$50,$11 ;D5 softintr (1)
.BYTE $C0, 1,$60,$10 ;D6 HARDpuls (1)
.BYTE $C0, 1,$50,$11 ;D7 softpuls (1)
.BYTE 0,$42, 0, $B ;D8 BasNorml (3)
.BYTE 0,$40, 4,$12 ;D9 ING-ARPS (2)
.BYTE 0, 0, 5,$10 ;DA ING-BA-1 (2)
.BYTE 0, 0, 5,$12 ;DB ING-BASS (2)
.BYTE 0, 3,$15,$12 ;DC ING-BAVI (2)
.BYTE $80, 1,$60,$13 ;DD HARDintr (1)
.BYTE $C0, 1,$60,$14 ;DE OPDIEHRD (1)
.BYTE $C0, 1,$50,$10 ;DF OPDIEHRD (1)
.BYTE 0,$42,$20, $B ;E0 BasVIBOS (3)
.BYTE 0, 0, 0,$15
.BYTE $80, 4, 6,$16
.BYTE $80, 0, 0,$17
_seq01:
.BYTE 1
.BYTE $FE
_seq02:
.BYTE 2
.BYTE $FE
_seq26:
.BYTE $85, 1
.BYTE $FE
_seq27:
.BYTE $85, 2
.BYTE $FE
s01:
.BYTE $C0,$8C,$60, 0
.BYTE $FF
s02:
.BYTE $C0,$8C,$61, 0
.BYTE $FF
_seq03:
.BYTE 3
.BYTE $FE
s03:
.BYTE $C1,$98,$62, 0,$E1
.BYTE $FF
_seq04:
.BYTE 4
.BYTE $FE
s04:
.BYTE $C2,$98,$63, 0,$E1