mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-12 15:30:55 +00:00
mockingboard: attempt 6ch sound support
second half not working
This commit is contained in:
parent
c0ffa5e271
commit
bd7eef3dda
@ -6,10 +6,11 @@ PNG2GR = ../gr-utils/png2gr
|
||||
all: dump_ed mock.dsk lzss_compress
|
||||
|
||||
mock.dsk: KSP_THEME_UNCOMPRESSED KSP_THEME_COMPRESSED \
|
||||
KSP_THEME_INTERRUPT INTERRUPT_TEST
|
||||
KSP_THEME_INTERRUPT INTERRUPT_TEST KSP_THEME_6CH
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_UNCOMPRESSED
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_COMPRESSED
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x4000 KSP_THEME_INTERRUPT
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x4000 KSP_THEME_6CH
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 INTERRUPT_TEST
|
||||
|
||||
KSP_THEME_COMPRESSED: ksp_theme_compressed.o
|
||||
@ -20,6 +21,19 @@ ksp_theme_compressed.o: ksp_theme_compressed.s \
|
||||
ksp_theme_compressed.inc
|
||||
ca65 -o ksp_theme_compressed.o ksp_theme_compressed.s -l ksp_theme_compressed.lst
|
||||
|
||||
KSP_THEME_6CH: ksp_theme_6ch.o
|
||||
ld65 -o KSP_THEME_6CH ksp_theme_6ch.o -C ../linker_scripts/apple2_4000.inc
|
||||
|
||||
ksp_theme_6ch.o: ksp_theme_6ch.s \
|
||||
../asm_routines/mockingboard.s \
|
||||
../asm_routines/lzss_decompress.s \
|
||||
ksp_theme_compressed.inc ksp_theme2_compressed.inc \
|
||||
ksp_title.inc
|
||||
ca65 -o ksp_theme_6ch.o ksp_theme_6ch.s -l ksp_theme_6ch.lst
|
||||
|
||||
|
||||
|
||||
|
||||
KSP_THEME_INTERRUPT: ksp_theme_interrupt.o
|
||||
ld65 -o KSP_THEME_INTERRUPT ksp_theme_interrupt.o -C ../linker_scripts/apple2_4000.inc
|
||||
|
||||
@ -71,5 +85,6 @@ lzss_compress: lzss_compress.o
|
||||
|
||||
clean:
|
||||
rm -f *~ TITLE.GR *.o *.lst ED KSP_THEME_UNCOMPRESSED \
|
||||
KSP_THEME_COMPRESSED KSP_THEME_INTERRUPT INTERRUPT_TEST dump_ed
|
||||
KSP_THEME_COMPRESSED KSP_THEME_INTERRUPT \
|
||||
KSP_THEME_6CH INTERRUPT_TEST dump_ed
|
||||
|
||||
|
464
mockingboard/ksp_theme2_compressed.inc
Normal file
464
mockingboard/ksp_theme2_compressed.inc
Normal file
@ -0,0 +1,464 @@
|
||||
|
||||
; Using ym5_to_mockingboard to convert song ../songs/kerbal2.ym5
|
||||
; YM5 Song attributes (1) : Interleaved=yes
|
||||
; Frames: 4128, Chip clock: 1000000 Hz, Frame rate: 50 Hz, Length=1:22
|
||||
; Loop frame: 0, Extra data size: 0
|
||||
; Song name: Kerbal Space Program Theme
|
||||
; Author name: Felipe Falanghe
|
||||
; Comment: Tracked by Vince Weaver
|
||||
|
||||
ksp_theme2:
|
||||
|
||||
.byte $01,$80,$38,$00 ; 00000
|
||||
.byte $01,$3C,$7D,$02,$BB,$03,$06,$0D,$0D ; 00096
|
||||
.byte $01,$00,$06,$0E,$0E ; 00097
|
||||
.byte $01,$00,$06,$0F,$0F ; 00098
|
||||
.byte $01,$00,$06,$0E,$0E ; 00099
|
||||
.byte $14,$00,$06,$0C,$0C ; 00119
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00120
|
||||
.byte $18,$0C,$7D,$02,$02,$0C ; 00144
|
||||
.byte $01,$00,$02,$0D ; 00145
|
||||
.byte $01,$00,$02,$0E ; 00146
|
||||
.byte $01,$00,$02,$0D ; 00147
|
||||
.byte $14,$00,$02,$0B ; 00167
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00168
|
||||
.byte $18,$0C,$7D,$02,$02,$0D ; 00192
|
||||
.byte $01,$00,$02,$0E ; 00193
|
||||
.byte $01,$00,$02,$0F ; 00194
|
||||
.byte $01,$00,$02,$0E ; 00195
|
||||
.byte $14,$00,$02,$0C ; 00215
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00216
|
||||
.byte $18,$0C,$7D,$02,$02,$0D ; 00240
|
||||
.byte $01,$00,$02,$0E ; 00241
|
||||
.byte $01,$00,$02,$0F ; 00242
|
||||
.byte $01,$00,$02,$0E ; 00243
|
||||
.byte $14,$00,$02,$0C ; 00263
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00264
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 00288
|
||||
.byte $01,$00,$06,$0E,$0E ; 00289
|
||||
.byte $01,$00,$06,$0F,$0F ; 00290
|
||||
.byte $01,$00,$06,$0E,$0E ; 00291
|
||||
.byte $14,$00,$06,$0C,$0C ; 00311
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00312
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0D,$0D ; 00336
|
||||
.byte $01,$00,$06,$0E,$0E ; 00337
|
||||
.byte $01,$00,$06,$0F,$0F ; 00338
|
||||
.byte $01,$00,$06,$0E,$0E ; 00339
|
||||
.byte $14,$00,$06,$0C,$0C ; 00359
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00360
|
||||
.byte $18,$3D,$EE,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 00384
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00385
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 00386
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00387
|
||||
.byte $14,$00,$06,$0C,$0C ; 00407
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00408
|
||||
.byte $17,$00,$01,$0C ; 00431
|
||||
.byte $01,$0D,$00,$7D,$02,$03,$00,$0D ; 00432
|
||||
.byte $01,$00,$02,$0E ; 00433
|
||||
.byte $01,$00,$02,$0F ; 00434
|
||||
.byte $01,$00,$02,$0E ; 00435
|
||||
.byte $14,$00,$02,$0C ; 00455
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00456
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 00480
|
||||
.byte $01,$00,$06,$0E,$0E ; 00481
|
||||
.byte $01,$00,$06,$0F,$0F ; 00482
|
||||
.byte $01,$00,$06,$0E,$0E ; 00483
|
||||
.byte $14,$00,$06,$0C,$0C ; 00503
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00504
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0D,$0D ; 00528
|
||||
.byte $01,$00,$06,$0E,$0E ; 00529
|
||||
.byte $01,$00,$06,$0F,$0F ; 00530
|
||||
.byte $01,$00,$06,$0E,$0E ; 00531
|
||||
.byte $14,$00,$06,$0C,$0C ; 00551
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00552
|
||||
.byte $18,$3D,$EE,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 00576
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00577
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 00578
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00579
|
||||
.byte $14,$00,$06,$0C,$0C ; 00599
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00600
|
||||
.byte $17,$00,$01,$0C ; 00623
|
||||
.byte $01,$01,$00,$01,$00 ; 00624
|
||||
.byte $30,$3C,$18,$02,$A9,$01,$06,$0C,$0C ; 00672
|
||||
.byte $01,$00,$06,$0D,$0D ; 00673
|
||||
.byte $01,$00,$06,$0E,$0E ; 00674
|
||||
.byte $01,$00,$06,$0D,$0D ; 00675
|
||||
.byte $14,$00,$06,$0B,$0B ; 00695
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 00696
|
||||
.byte $18,$0C,$A9,$01,$02,$0C ; 00720
|
||||
.byte $01,$00,$02,$0D ; 00721
|
||||
.byte $01,$00,$02,$0E ; 00722
|
||||
.byte $01,$00,$02,$0D ; 00723
|
||||
.byte $14,$00,$02,$0B ; 00743
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00744
|
||||
.byte $18,$0C,$A9,$01,$02,$0C ; 00768
|
||||
.byte $01,$00,$02,$0D ; 00769
|
||||
.byte $01,$00,$02,$0E ; 00770
|
||||
.byte $01,$00,$02,$0D ; 00771
|
||||
.byte $14,$00,$02,$0B ; 00791
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00792
|
||||
.byte $48,$0C,$7B,$01,$02,$0D ; 00864
|
||||
.byte $01,$00,$02,$0E ; 00865
|
||||
.byte $01,$00,$02,$0F ; 00866
|
||||
.byte $01,$00,$02,$0E ; 00867
|
||||
.byte $14,$00,$02,$0C ; 00887
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00888
|
||||
.byte $18,$0C,$7D,$02,$02,$0C ; 00912
|
||||
.byte $01,$00,$02,$0D ; 00913
|
||||
.byte $01,$00,$02,$0E ; 00914
|
||||
.byte $01,$00,$02,$0D ; 00915
|
||||
.byte $14,$00,$02,$0B ; 00935
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00936
|
||||
.byte $18,$0D,$EE,$7D,$02,$03,$0D,$0D ; 00960
|
||||
.byte $01,$00,$03,$0E,$0E ; 00961
|
||||
.byte $01,$00,$03,$0F,$0F ; 00962
|
||||
.byte $01,$00,$03,$0E,$0E ; 00963
|
||||
.byte $14,$00,$02,$0C ; 00983
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 00984
|
||||
.byte $17,$00,$01,$0C ; 01007
|
||||
.byte $01,$0D,$00,$7D,$02,$03,$00,$0C ; 01008
|
||||
.byte $01,$00,$02,$0D ; 01009
|
||||
.byte $01,$00,$02,$0E ; 01010
|
||||
.byte $01,$00,$02,$0D ; 01011
|
||||
.byte $14,$00,$02,$0B ; 01031
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 01032
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 01056
|
||||
.byte $01,$00,$06,$0E,$0E ; 01057
|
||||
.byte $01,$00,$06,$0F,$0F ; 01058
|
||||
.byte $01,$00,$06,$0E,$0E ; 01059
|
||||
.byte $14,$00,$06,$0C,$0C ; 01079
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01080
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0D,$0D ; 01104
|
||||
.byte $01,$00,$06,$0E,$0E ; 01105
|
||||
.byte $01,$00,$06,$0F,$0F ; 01106
|
||||
.byte $01,$00,$06,$0E,$0E ; 01107
|
||||
.byte $14,$00,$06,$0C,$0C ; 01127
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01128
|
||||
.byte $18,$3D,$EE,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 01152
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 01153
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 01154
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 01155
|
||||
.byte $14,$00,$06,$0C,$0C ; 01175
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01176
|
||||
.byte $17,$00,$01,$0C ; 01199
|
||||
.byte $01,$0D,$00,$7D,$02,$03,$00,$0C ; 01200
|
||||
.byte $01,$00,$02,$0D ; 01201
|
||||
.byte $01,$00,$02,$0E ; 01202
|
||||
.byte $01,$00,$02,$0D ; 01203
|
||||
.byte $14,$00,$02,$0B ; 01223
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 01224
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 01248
|
||||
.byte $01,$00,$06,$0E,$0E ; 01249
|
||||
.byte $01,$00,$06,$0F,$0F ; 01250
|
||||
.byte $01,$00,$06,$0E,$0E ; 01251
|
||||
.byte $14,$00,$06,$0C,$0C ; 01271
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01272
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0D,$0D ; 01296
|
||||
.byte $01,$00,$06,$0E,$0E ; 01297
|
||||
.byte $01,$00,$06,$0F,$0F ; 01298
|
||||
.byte $01,$00,$06,$0E,$0E ; 01299
|
||||
.byte $14,$00,$06,$0C,$0C ; 01319
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01320
|
||||
.byte $18,$3D,$EE,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 01344
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 01345
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 01346
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 01347
|
||||
.byte $14,$00,$06,$0C,$0C ; 01367
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01368
|
||||
.byte $17,$00,$01,$0C ; 01391
|
||||
.byte $01,$01,$00,$01,$00 ; 01392
|
||||
.byte $30,$3C,$18,$02,$A9,$01,$06,$0C,$0C ; 01440
|
||||
.byte $01,$00,$06,$0D,$0D ; 01441
|
||||
.byte $01,$00,$06,$0E,$0E ; 01442
|
||||
.byte $01,$00,$06,$0D,$0D ; 01443
|
||||
.byte $14,$00,$06,$0B,$0B ; 01463
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01464
|
||||
.byte $18,$0C,$A9,$01,$02,$0C ; 01488
|
||||
.byte $01,$00,$02,$0D ; 01489
|
||||
.byte $01,$00,$02,$0E ; 01490
|
||||
.byte $01,$00,$02,$0D ; 01491
|
||||
.byte $14,$00,$02,$0B ; 01511
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 01512
|
||||
.byte $18,$0C,$A9,$01,$02,$0B ; 01536
|
||||
.byte $01,$00,$02,$0C ; 01537
|
||||
.byte $01,$00,$02,$0D ; 01538
|
||||
.byte $01,$00,$02,$0C ; 01539
|
||||
.byte $5C,$00,$02,$0A ; 01631
|
||||
.byte $01,$3C,$00,$00,$7D,$02,$06,$00,$0B ; 01632
|
||||
.byte $01,$00,$04,$0C ; 01633
|
||||
.byte $01,$00,$04,$0D ; 01634
|
||||
.byte $01,$00,$04,$0C ; 01635
|
||||
.byte $14,$00,$04,$0A ; 01655
|
||||
.byte $01,$00,$04,$0B ; 01656
|
||||
.byte $01,$00,$04,$0C ; 01657
|
||||
.byte $01,$00,$04,$0D ; 01658
|
||||
.byte $01,$00,$04,$0C ; 01659
|
||||
.byte $14,$00,$04,$0A ; 01679
|
||||
.byte $01,$00,$04,$0B ; 01680
|
||||
.byte $01,$00,$04,$0C ; 01681
|
||||
.byte $01,$00,$04,$0D ; 01682
|
||||
.byte $01,$00,$04,$0C ; 01683
|
||||
.byte $14,$00,$04,$0A ; 01703
|
||||
.byte $01,$00,$04,$0B ; 01704
|
||||
.byte $01,$00,$04,$0C ; 01705
|
||||
.byte $01,$00,$04,$0D ; 01706
|
||||
.byte $01,$00,$04,$0C ; 01707
|
||||
.byte $14,$00,$04,$0A ; 01727
|
||||
.byte $01,$30,$BB,$03,$04,$0B ; 01728
|
||||
.byte $01,$00,$04,$0C ; 01729
|
||||
.byte $01,$00,$04,$0D ; 01730
|
||||
.byte $01,$00,$04,$0C ; 01731
|
||||
.byte $14,$00,$04,$0A ; 01751
|
||||
.byte $01,$30,$7D,$02,$04,$0B ; 01752
|
||||
.byte $01,$00,$04,$0C ; 01753
|
||||
.byte $01,$00,$04,$0D ; 01754
|
||||
.byte $01,$00,$04,$0C ; 01755
|
||||
.byte $14,$00,$04,$0A ; 01775
|
||||
.byte $01,$00,$04,$0B ; 01776
|
||||
.byte $01,$00,$04,$0C ; 01777
|
||||
.byte $01,$00,$04,$0D ; 01778
|
||||
.byte $01,$00,$04,$0C ; 01779
|
||||
.byte $14,$00,$04,$0A ; 01799
|
||||
.byte $01,$00,$04,$0B ; 01800
|
||||
.byte $01,$00,$04,$0C ; 01801
|
||||
.byte $01,$00,$04,$0D ; 01802
|
||||
.byte $01,$00,$04,$0C ; 01803
|
||||
.byte $14,$00,$04,$0A ; 01823
|
||||
.byte $01,$1C,$A9,$01,$18,$06,$0B,$0B ; 01824
|
||||
.byte $01,$00,$06,$0C,$0C ; 01825
|
||||
.byte $01,$00,$06,$0D,$0D ; 01826
|
||||
.byte $01,$00,$06,$0C,$0C ; 01827
|
||||
.byte $14,$00,$06,$0A,$0A ; 01847
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 01848
|
||||
.byte $A8,$3C,$7B,$01,$DD,$01,$06,$0B,$0B ; 02016
|
||||
.byte $01,$00,$06,$0C,$0C ; 02017
|
||||
.byte $01,$00,$06,$0D,$0D ; 02018
|
||||
.byte $01,$00,$06,$0C,$0C ; 02019
|
||||
.byte $14,$00,$06,$0A,$0A ; 02039
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02040
|
||||
.byte $18,$30,$7B,$01,$04,$0B ; 02064
|
||||
.byte $01,$00,$04,$0C ; 02065
|
||||
.byte $01,$00,$04,$0D ; 02066
|
||||
.byte $01,$00,$04,$0C ; 02067
|
||||
.byte $14,$00,$04,$0A ; 02087
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02088
|
||||
.byte $18,$0C,$7B,$01,$02,$0B ; 02112
|
||||
.byte $01,$00,$02,$0C ; 02113
|
||||
.byte $01,$00,$02,$0D ; 02114
|
||||
.byte $01,$00,$02,$0C ; 02115
|
||||
.byte $14,$00,$02,$0A ; 02135
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 02136
|
||||
.byte $18,$0C,$7B,$01,$02,$0B ; 02160
|
||||
.byte $01,$00,$02,$0C ; 02161
|
||||
.byte $01,$00,$02,$0D ; 02162
|
||||
.byte $01,$00,$02,$0C ; 02163
|
||||
.byte $14,$00,$02,$0A ; 02183
|
||||
.byte $01,$0C,$00,$00,$02,$00 ; 02184
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0B,$0B ; 02208
|
||||
.byte $01,$00,$06,$0C,$0C ; 02209
|
||||
.byte $01,$00,$06,$0D,$0D ; 02210
|
||||
.byte $01,$00,$06,$0C,$0C ; 02211
|
||||
.byte $14,$00,$06,$0A,$0A ; 02231
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02232
|
||||
.byte $18,$30,$A9,$01,$04,$0B ; 02256
|
||||
.byte $01,$00,$04,$0C ; 02257
|
||||
.byte $01,$00,$04,$0D ; 02258
|
||||
.byte $01,$00,$04,$0C ; 02259
|
||||
.byte $14,$00,$04,$0A ; 02279
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02280
|
||||
.byte $78,$3C,$DD,$01,$7B,$01,$06,$0C,$0C ; 02400
|
||||
.byte $01,$00,$06,$0D,$0D ; 02401
|
||||
.byte $01,$00,$06,$0E,$0E ; 02402
|
||||
.byte $01,$00,$06,$0D,$0D ; 02403
|
||||
.byte $14,$00,$06,$0B,$0B ; 02423
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02424
|
||||
.byte $18,$30,$7D,$02,$04,$0C ; 02448
|
||||
.byte $01,$00,$04,$0D ; 02449
|
||||
.byte $01,$00,$04,$0E ; 02450
|
||||
.byte $01,$00,$04,$0D ; 02451
|
||||
.byte $14,$00,$04,$0B ; 02471
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02472
|
||||
.byte $18,$31,$77,$7D,$02,$05,$0C,$0C ; 02496
|
||||
.byte $01,$00,$05,$0D,$0D ; 02497
|
||||
.byte $01,$00,$05,$0E,$0E ; 02498
|
||||
.byte $01,$00,$05,$0D,$0D ; 02499
|
||||
.byte $14,$00,$04,$0B ; 02519
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02520
|
||||
.byte $17,$00,$01,$0B ; 02543
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0C ; 02544
|
||||
.byte $01,$00,$04,$0D ; 02545
|
||||
.byte $01,$00,$04,$0E ; 02546
|
||||
.byte $01,$00,$04,$0D ; 02547
|
||||
.byte $14,$00,$04,$0B ; 02567
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02568
|
||||
.byte $18,$3C,$A9,$01,$18,$02,$06,$0C,$0C ; 02592
|
||||
.byte $01,$00,$06,$0D,$0D ; 02593
|
||||
.byte $01,$00,$06,$0E,$0E ; 02594
|
||||
.byte $01,$00,$06,$0D,$0D ; 02595
|
||||
.byte $14,$00,$06,$0B,$0B ; 02615
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02616
|
||||
.byte $18,$3C,$7D,$02,$38,$02,$06,$0C,$0C ; 02640
|
||||
.byte $01,$00,$06,$0D,$0D ; 02641
|
||||
.byte $01,$00,$06,$0E,$0E ; 02642
|
||||
.byte $01,$00,$06,$0D,$0D ; 02643
|
||||
.byte $14,$00,$06,$0B,$0B ; 02663
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02664
|
||||
.byte $18,$3D,$77,$7D,$02,$BB,$03,$07,$0C,$0C,$0C ; 02688
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 02689
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 02690
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 02691
|
||||
.byte $14,$00,$06,$0B,$0B ; 02711
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02712
|
||||
.byte $17,$00,$01,$0B ; 02735
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0C ; 02736
|
||||
.byte $01,$00,$04,$0D ; 02737
|
||||
.byte $01,$00,$04,$0E ; 02738
|
||||
.byte $01,$00,$04,$0D ; 02739
|
||||
.byte $14,$00,$04,$0B ; 02759
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02760
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0C,$0C ; 02784
|
||||
.byte $01,$00,$06,$0D,$0D ; 02785
|
||||
.byte $01,$00,$06,$0E,$0E ; 02786
|
||||
.byte $01,$00,$06,$0D,$0D ; 02787
|
||||
.byte $14,$00,$06,$0B,$0B ; 02807
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02808
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0C,$0C ; 02832
|
||||
.byte $01,$00,$06,$0D,$0D ; 02833
|
||||
.byte $01,$00,$06,$0E,$0E ; 02834
|
||||
.byte $01,$00,$06,$0D,$0D ; 02835
|
||||
.byte $14,$00,$06,$0B,$0B ; 02855
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02856
|
||||
.byte $18,$3D,$77,$BB,$03,$7D,$02,$07,$0C,$0C,$0C ; 02880
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 02881
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 02882
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 02883
|
||||
.byte $14,$00,$06,$0B,$0B ; 02903
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 02904
|
||||
.byte $17,$00,$01,$0B ; 02927
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0C ; 02928
|
||||
.byte $01,$00,$04,$0D ; 02929
|
||||
.byte $01,$00,$04,$0E ; 02930
|
||||
.byte $01,$00,$04,$0D ; 02931
|
||||
.byte $14,$00,$04,$0B ; 02951
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 02952
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0C,$0C ; 02976
|
||||
.byte $01,$00,$06,$0D,$0D ; 02977
|
||||
.byte $01,$00,$06,$0E,$0E ; 02978
|
||||
.byte $01,$00,$06,$0D,$0D ; 02979
|
||||
.byte $14,$00,$06,$0B,$0B ; 02999
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03000
|
||||
.byte $18,$30,$A9,$01,$04,$0C ; 03024
|
||||
.byte $01,$00,$04,$0D ; 03025
|
||||
.byte $01,$00,$04,$0E ; 03026
|
||||
.byte $01,$00,$04,$0D ; 03027
|
||||
.byte $14,$00,$04,$0B ; 03047
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 03048
|
||||
.byte $18,$3D,$6A,$18,$02,$A9,$01,$07,$0D,$0D,$0D ; 03072
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03073
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 03074
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03075
|
||||
.byte $14,$00,$06,$0C,$0C ; 03095
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03096
|
||||
.byte $17,$00,$01,$0C ; 03119
|
||||
.byte $01,$31,$59,$A9,$01,$05,$0D,$0D ; 03120
|
||||
.byte $01,$00,$05,$0E,$0E ; 03121
|
||||
.byte $01,$00,$05,$0F,$0F ; 03122
|
||||
.byte $01,$00,$05,$0E,$0E ; 03123
|
||||
.byte $14,$00,$04,$0C ; 03143
|
||||
.byte $01,$30,$18,$02,$04,$0D ; 03144
|
||||
.byte $01,$00,$04,$0E ; 03145
|
||||
.byte $01,$00,$04,$0F ; 03146
|
||||
.byte $01,$00,$04,$0E ; 03147
|
||||
.byte $14,$00,$05,$0C,$0C ; 03167
|
||||
.byte $01,$3D,$00,$DD,$01,$7B,$01,$07,$00,$0D,$0D ; 03168
|
||||
.byte $01,$00,$06,$0E,$0E ; 03169
|
||||
.byte $01,$00,$06,$0F,$0F ; 03170
|
||||
.byte $01,$00,$06,$0E,$0E ; 03171
|
||||
.byte $14,$00,$06,$0C,$0C ; 03191
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03192
|
||||
.byte $18,$3C,$7D,$02,$BB,$03,$06,$0D,$0D ; 03216
|
||||
.byte $01,$00,$06,$0E,$0E ; 03217
|
||||
.byte $01,$00,$06,$0F,$0F ; 03218
|
||||
.byte $01,$00,$06,$0E,$0E ; 03219
|
||||
.byte $14,$00,$06,$0C,$0C ; 03239
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03240
|
||||
.byte $18,$31,$77,$7D,$02,$05,$0D,$0D ; 03264
|
||||
.byte $01,$00,$05,$0E,$0E ; 03265
|
||||
.byte $01,$00,$05,$0F,$0F ; 03266
|
||||
.byte $01,$00,$05,$0E,$0E ; 03267
|
||||
.byte $14,$00,$04,$0C ; 03287
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 03288
|
||||
.byte $17,$00,$01,$0C ; 03311
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0D ; 03312
|
||||
.byte $01,$00,$04,$0E ; 03313
|
||||
.byte $01,$00,$04,$0F ; 03314
|
||||
.byte $01,$00,$04,$0E ; 03315
|
||||
.byte $14,$00,$04,$0C ; 03335
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 03336
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 03360
|
||||
.byte $01,$00,$06,$0E,$0E ; 03361
|
||||
.byte $01,$00,$06,$0F,$0F ; 03362
|
||||
.byte $01,$00,$06,$0E,$0E ; 03363
|
||||
.byte $14,$00,$06,$0C,$0C ; 03383
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03384
|
||||
.byte $18,$3C,$38,$02,$CB,$02,$06,$0D,$0D ; 03408
|
||||
.byte $01,$00,$06,$0E,$0E ; 03409
|
||||
.byte $01,$00,$06,$0F,$0F ; 03410
|
||||
.byte $01,$00,$06,$0E,$0E ; 03411
|
||||
.byte $14,$00,$06,$0C,$0C ; 03431
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03432
|
||||
.byte $18,$3D,$77,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 03456
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03457
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 03458
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03459
|
||||
.byte $14,$00,$06,$0C,$0C ; 03479
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03480
|
||||
.byte $17,$00,$01,$0C ; 03503
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0D ; 03504
|
||||
.byte $01,$00,$04,$0E ; 03505
|
||||
.byte $01,$00,$04,$0F ; 03506
|
||||
.byte $01,$00,$04,$0E ; 03507
|
||||
.byte $14,$00,$04,$0C ; 03527
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 03528
|
||||
.byte $18,$3C,$18,$02,$A9,$01,$06,$0D,$0D ; 03552
|
||||
.byte $01,$00,$06,$0E,$0E ; 03553
|
||||
.byte $01,$00,$06,$0F,$0F ; 03554
|
||||
.byte $01,$00,$06,$0E,$0E ; 03555
|
||||
.byte $14,$00,$06,$0C,$0C ; 03575
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03576
|
||||
.byte $18,$3C,$CB,$02,$38,$02,$06,$0D,$0D ; 03600
|
||||
.byte $01,$00,$06,$0E,$0E ; 03601
|
||||
.byte $01,$00,$06,$0F,$0F ; 03602
|
||||
.byte $01,$00,$06,$0E,$0E ; 03603
|
||||
.byte $14,$00,$06,$0C,$0C ; 03623
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03624
|
||||
.byte $18,$3D,$77,$7D,$02,$BB,$03,$07,$0D,$0D,$0D ; 03648
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03649
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 03650
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03651
|
||||
.byte $14,$00,$06,$0C,$0C ; 03671
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03672
|
||||
.byte $17,$00,$01,$0C ; 03695
|
||||
.byte $01,$31,$00,$7D,$02,$05,$00,$0D ; 03696
|
||||
.byte $01,$00,$04,$0E ; 03697
|
||||
.byte $01,$00,$04,$0F ; 03698
|
||||
.byte $01,$00,$04,$0E ; 03699
|
||||
.byte $14,$00,$04,$0C ; 03719
|
||||
.byte $01,$30,$00,$00,$04,$00 ; 03720
|
||||
.byte $18,$3D,$43,$18,$02,$A9,$01,$07,$0C,$0C,$0C ; 03744
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 03745
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03746
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 03747
|
||||
.byte $14,$00,$06,$0B,$0B ; 03767
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03768
|
||||
.byte $A7,$00,$01,$0B ; 03935
|
||||
.byte $01,$3D,$EE,$DD,$01,$7B,$01,$07,$0C,$0C,$0C ; 03936
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 03937
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 03938
|
||||
.byte $01,$00,$07,$0D,$0D,$0D ; 03939
|
||||
.byte $14,$00,$06,$0B,$0B ; 03959
|
||||
.byte $01,$3C,$00,$00,$00,$00,$06,$00,$00 ; 03960
|
||||
.byte $17,$00,$01,$0B ; 03983
|
||||
.byte $01,$01,$00,$01,$00 ; 03984
|
||||
; Raw size = 57792 bytes
|
||||
; Updated size = 2539 bytes
|
616
mockingboard/ksp_theme_6ch.s
Normal file
616
mockingboard/ksp_theme_6ch.s
Normal file
@ -0,0 +1,616 @@
|
||||
; Play the KSP theme, but compressed a bit (only write registers that change)
|
||||
; Still 3-channel
|
||||
; The KSP theme is fairly small, will need to compress more
|
||||
|
||||
.include "zp.inc"
|
||||
|
||||
;=============================
|
||||
; Print message
|
||||
;=============================
|
||||
jsr HOME
|
||||
jsr TEXT
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
sta CH
|
||||
sta CV
|
||||
sta DONE_PLAYING
|
||||
sta XPOS
|
||||
|
||||
lda #1
|
||||
sta MB_FRAME_DIFF
|
||||
sta MB_FRAME_DIFF2
|
||||
|
||||
lda #<mocking_message
|
||||
sta OUTL
|
||||
lda #>mocking_message
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
jsr mockingboard_detect_slot4
|
||||
cpx #$1
|
||||
beq mockingboard_found
|
||||
|
||||
lda #<not_message
|
||||
sta OUTL
|
||||
lda #>not_message
|
||||
sta OUTH
|
||||
inc CV
|
||||
jsr move_and_print
|
||||
|
||||
jmp forever_loop
|
||||
|
||||
mockingboard_found:
|
||||
lda #<found_message
|
||||
sta OUTL
|
||||
lda #>found_message
|
||||
sta OUTH
|
||||
inc CV
|
||||
jsr move_and_print
|
||||
|
||||
;============================
|
||||
; Init the Mockingboard
|
||||
;============================
|
||||
|
||||
jsr mockingboard_init
|
||||
jsr reset_ay_left
|
||||
jsr reset_ay_right
|
||||
jsr clear_ay_left
|
||||
jsr clear_ay_right
|
||||
|
||||
|
||||
;===========================
|
||||
; load pointer to the music
|
||||
;===========================
|
||||
|
||||
lda #<ksptheme
|
||||
sta INL
|
||||
lda #>ksptheme
|
||||
sta INH
|
||||
|
||||
lda (INL),Y ; read in frame delay
|
||||
sta MB_FRAME_DIFF
|
||||
inc INL ; FIXME: should check if we oflowed
|
||||
|
||||
|
||||
lda #<ksp_theme2
|
||||
sta NUM1L
|
||||
lda #>ksp_theme2
|
||||
sta NUM1H
|
||||
|
||||
lda (NUM1L),Y ; read in frame delay
|
||||
sta MB_FRAME_DIFF2
|
||||
inc NUM1L ; FIXME: should check if we oflowed
|
||||
|
||||
|
||||
;=========================
|
||||
; Setup Interrupt Handler
|
||||
;=========================
|
||||
; Vector address goes to 0x3fe/0x3ff
|
||||
; FIXME: should chain any existing handler
|
||||
|
||||
lda #<interrupt_handler
|
||||
sta $03fe
|
||||
lda #>interrupt_handler
|
||||
sta $03ff
|
||||
|
||||
;============================
|
||||
; Enable 50Hz clock on 6522
|
||||
;============================
|
||||
|
||||
lda #$40 ; Generate continuous interrupts, don't touch PB7
|
||||
sta $C40B ; ACR register
|
||||
lda #$7F ; clear all interrupt flags
|
||||
sta $C40E ; IER register (interrupt enable)
|
||||
|
||||
lda #$C0
|
||||
sta $C40D ; IFR: 1100, enable interrupt on timer one oflow
|
||||
sta $C40E ; IER: 1100, enable timer one interrupt
|
||||
|
||||
lda #$E7
|
||||
sta $C404 ; write into low-order latch
|
||||
lda #$4f
|
||||
sta $C405 ; write into high-order latch,
|
||||
; load both values into counter
|
||||
; clear interrupt and start counting
|
||||
|
||||
; 4fe7 / 1e6 = .020s, 50Hz
|
||||
|
||||
;============================
|
||||
; Enable 6502 interrupts
|
||||
;============================
|
||||
;
|
||||
cli ; clear interrupt mask
|
||||
|
||||
|
||||
bit SET_GR ; graphics mode
|
||||
bit HIRES ; hires mode
|
||||
bit TEXTGR ; mixed text/graphics
|
||||
bit PAGE0 ; first graphics page
|
||||
|
||||
;==========================
|
||||
; Graphics
|
||||
;==========================
|
||||
uncompress_graphics:
|
||||
jsr lzss_init ; init R to zero
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; Loading Sequence
|
||||
;==========================
|
||||
;==========================
|
||||
jsr clear_bottom
|
||||
|
||||
;==========================
|
||||
; Squad Logo
|
||||
;==========================
|
||||
|
||||
lda #>squad_logo ; load logo pointer
|
||||
sta BASH
|
||||
lda #<squad_logo
|
||||
sta BASL
|
||||
|
||||
lda #>squad_logo_end ; load logo end pointer
|
||||
sta LZSS_ENDH
|
||||
lda #<squad_logo_end
|
||||
sta LZSS_ENDL
|
||||
|
||||
; HGR page 2
|
||||
lda #>$2000
|
||||
sta OUTH
|
||||
lda #<$2000
|
||||
sta OUTL
|
||||
|
||||
jsr lzss_decompress
|
||||
|
||||
lda #<load_quotes
|
||||
sta NAMEL
|
||||
lda #>load_quotes
|
||||
sta NAMEH
|
||||
|
||||
lda #$54 ; HTAB 4 : VTAB 21
|
||||
sta OUTL
|
||||
lda #$6
|
||||
sta OUTH
|
||||
|
||||
ldy #31
|
||||
lda #('.'+$80) ; '.'
|
||||
dot_loop:
|
||||
sta (OUTL),Y
|
||||
dey
|
||||
bpl dot_loop
|
||||
|
||||
ldx #$0
|
||||
progress_bar_loop:
|
||||
ldy #$0
|
||||
lda #$6
|
||||
sta OUTH
|
||||
clc
|
||||
txa
|
||||
adc #$54 ; HTAB 4 : VTAB 21
|
||||
sta OUTL
|
||||
lda #' ' ; inverse space
|
||||
sta (OUTL),Y
|
||||
|
||||
; Halfway, change logo
|
||||
|
||||
cpx #16
|
||||
bne no_change_logo
|
||||
|
||||
txa
|
||||
pha
|
||||
|
||||
jsr lzss_init ; init R to zero
|
||||
|
||||
lda #>loading_logo ; load logo pointer
|
||||
sta BASH
|
||||
lda #<loading_logo
|
||||
sta BASL
|
||||
|
||||
lda #>loading_logo_end ; load logo end pointer
|
||||
sta LZSS_ENDH
|
||||
lda #<loading_logo_end
|
||||
sta LZSS_ENDL
|
||||
|
||||
; HGR page 2
|
||||
lda #>$2000
|
||||
sta OUTH
|
||||
lda #<$2000
|
||||
sta OUTL
|
||||
|
||||
jsr lzss_decompress
|
||||
|
||||
pla
|
||||
tax
|
||||
|
||||
no_change_logo:
|
||||
|
||||
; Update message
|
||||
|
||||
txa
|
||||
and #$3
|
||||
bne no_quotes
|
||||
|
||||
; clear line
|
||||
|
||||
lda #$D0 ; VTAB 22
|
||||
sta OUTL
|
||||
lda #$6
|
||||
sta OUTH
|
||||
|
||||
ldy #40
|
||||
lda #(' '+$80) ; ' '
|
||||
clear_line:
|
||||
sta (OUTL),Y
|
||||
dey
|
||||
bpl clear_line
|
||||
|
||||
|
||||
ldy #0
|
||||
lda (NAMEL),Y
|
||||
adc #$CE ; -1 because we inc Y once
|
||||
; and another because HTAB starts at 1
|
||||
sta OUTL
|
||||
iny
|
||||
print_quote_loop:
|
||||
lda (NAMEL),Y
|
||||
beq done_quote
|
||||
ora #$80 ; make non-inverse
|
||||
sta (OUTL),Y
|
||||
iny
|
||||
jmp print_quote_loop
|
||||
done_quote:
|
||||
iny
|
||||
clc
|
||||
tya
|
||||
adc NAMEL
|
||||
sta NAMEL
|
||||
lda #0
|
||||
adc NAMEH
|
||||
sta NAMEH
|
||||
|
||||
no_quotes:
|
||||
lda #$f0
|
||||
jsr WAIT
|
||||
lda #$f0
|
||||
jsr WAIT
|
||||
lda #$f0
|
||||
jsr WAIT
|
||||
lda #$f0
|
||||
jsr WAIT
|
||||
|
||||
inx
|
||||
cpx #32
|
||||
bpl done_progress_bar
|
||||
jmp progress_bar_loop
|
||||
done_progress_bar:
|
||||
jsr clear_bottom
|
||||
|
||||
|
||||
lda #>ksp_title ; load logo pointer
|
||||
sta BASH
|
||||
lda #<ksp_title
|
||||
sta BASL
|
||||
|
||||
lda #>ksp_title_end ; load logo end pointer
|
||||
sta LZSS_ENDH
|
||||
lda #<ksp_title_end
|
||||
sta LZSS_ENDL
|
||||
|
||||
; HGR page 2
|
||||
lda #>$2000
|
||||
sta OUTH
|
||||
lda #<$2000
|
||||
sta OUTL
|
||||
|
||||
jsr lzss_decompress
|
||||
|
||||
;============================
|
||||
; Loop forever
|
||||
;============================
|
||||
playing_loop:
|
||||
lda DONE_PLAYING
|
||||
beq playing_loop
|
||||
|
||||
done_play:
|
||||
|
||||
; FIXME: disable timer on 6522
|
||||
; FIXME: unhook interrupt handler
|
||||
|
||||
sei ; disable interrupts
|
||||
|
||||
jsr clear_ay_left
|
||||
jsr clear_ay_right
|
||||
|
||||
lda #0
|
||||
sta CH
|
||||
lda #21
|
||||
sta CV
|
||||
lda #<done_message
|
||||
sta OUTL
|
||||
lda #>done_message
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
forever_loop:
|
||||
jmp forever_loop
|
||||
|
||||
;=============================
|
||||
;=============================
|
||||
; simple interrupt handler
|
||||
;=============================
|
||||
;=============================
|
||||
; On Apple II/6502 the interrupt handler jumps to address in 0xfffe
|
||||
; This is in the ROM, which saves the registers
|
||||
; on older IIe it saved A to $45 (which could mess with DISK II)
|
||||
; newer IIe doesn't do that.
|
||||
; It then calculates if it is a BRK or not (which trashes A)
|
||||
; Then it sets up the stack like an interrupt and calls 0x3fe
|
||||
|
||||
interrupt_handler:
|
||||
pha ; save A
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
; Should we save X and Y too?
|
||||
|
||||
bit $C404 ; can clear 6522 interrupt by reading T1C-L
|
||||
|
||||
inc $0401 ; DEBUG: increment text char
|
||||
|
||||
jsr interrupt_handle_right
|
||||
jsr interrupt_handle_left
|
||||
|
||||
done_interrupt:
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
pla
|
||||
rti
|
||||
|
||||
|
||||
|
||||
interrupt_handle_right:
|
||||
dec MB_FRAME_DIFF
|
||||
bne done_right_interrupt
|
||||
|
||||
ldy #0
|
||||
bottom_regs_right:
|
||||
lda (INL),Y ; load low reg bitmask
|
||||
sta MASK
|
||||
ldx #$ff ; init to -1
|
||||
bottom_regs_right_loop:
|
||||
inx ; increment X
|
||||
cpx #$8 ; if we reach 8, done
|
||||
beq top_regs_right ; move on to top
|
||||
|
||||
ror MASK
|
||||
bcc bottom_regs_right_loop ; if bit not set in mask, skip reg
|
||||
|
||||
stx XX ; save X
|
||||
|
||||
iny ; get next output value
|
||||
lda (INL),Y ; read in value
|
||||
|
||||
sty YY ; save Y
|
||||
|
||||
tax ; value in X
|
||||
ldy XX ; register# in Y
|
||||
|
||||
; reg in Y, value in X
|
||||
jsr write_ay_right ; so write same to both left/write
|
||||
|
||||
ldx XX ; restore X
|
||||
ldy YY ; restore Y
|
||||
|
||||
jmp bottom_regs_right_loop ; loop
|
||||
|
||||
top_regs_right:
|
||||
iny ; point to next value
|
||||
lda (INL),Y ; load top reg bitmask
|
||||
sta MASK
|
||||
ldx #$7 ; load X as 7 (we increment first)
|
||||
top_regs_right_loop:
|
||||
inx ; increment
|
||||
cpx #$16
|
||||
beq done_with_masks_right ; exit if done
|
||||
|
||||
ror MASK
|
||||
bcc top_regs_right_loop ; loop if not set
|
||||
|
||||
stx XX ; save X value
|
||||
|
||||
iny ; point to value
|
||||
lda (INL),Y ; read in output value
|
||||
|
||||
sty YY ; save Y value
|
||||
|
||||
tax ; value in X
|
||||
ldy XX ; register in Y
|
||||
|
||||
; reg in Y, value in X
|
||||
jsr write_ay_right ; so write same to both left/write
|
||||
|
||||
ldx XX
|
||||
ldy YY
|
||||
|
||||
jmp top_regs_right_loop
|
||||
|
||||
done_with_masks_right:
|
||||
iny
|
||||
lda (INL),Y ; read in frame delay
|
||||
cmp #$ff ; see if end
|
||||
bne not_done_right ; if so, done
|
||||
inc DONE_PLAYING ; set done playing flag
|
||||
jmp done_right_interrupt
|
||||
not_done_right:
|
||||
sta MB_FRAME_DIFF
|
||||
|
||||
iny
|
||||
clc
|
||||
tya
|
||||
adc INL
|
||||
sta INL
|
||||
lda #0
|
||||
adc INH
|
||||
sta INH
|
||||
|
||||
done_right_interrupt:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;=============
|
||||
; Left
|
||||
;=============
|
||||
|
||||
interrupt_handle_left:
|
||||
dec MB_FRAME_DIFF2
|
||||
bne done_left_interrupt
|
||||
|
||||
ldy #0
|
||||
bottom_regs_left:
|
||||
lda (NUM1L),Y ; load low reg bitmask
|
||||
sta MASK
|
||||
ldx #$ff ; init to -1
|
||||
bottom_regs_left_loop:
|
||||
inx ; increment X
|
||||
cpx #$8 ; if we reach 8, done
|
||||
beq top_regs_left ; move on to top
|
||||
|
||||
ror MASK
|
||||
bcc bottom_regs_left_loop ; if bit not set in mask, skip reg
|
||||
|
||||
stx XX ; save X
|
||||
|
||||
iny ; get next output value
|
||||
lda (NUM1L),Y ; read in value
|
||||
|
||||
sty YY ; save Y
|
||||
|
||||
tax ; value in X
|
||||
ldy XX ; register# in Y
|
||||
|
||||
; reg in Y, value in X
|
||||
jsr write_ay_left ; assume 3 channel (not six)
|
||||
|
||||
ldx XX ; restore X
|
||||
ldy YY ; restore Y
|
||||
|
||||
jmp bottom_regs_left_loop ; loop
|
||||
|
||||
top_regs_left:
|
||||
iny ; point to next value
|
||||
lda (NUM1L),Y ; load top reg bitmask
|
||||
sta MASK
|
||||
ldx #$7 ; load X as 7 (we increment first)
|
||||
top_regs_left_loop:
|
||||
inx ; increment
|
||||
cpx #$16
|
||||
beq done_with_masks_left ; exit if done
|
||||
|
||||
ror MASK
|
||||
bcc top_regs_left_loop ; loop if not set
|
||||
|
||||
stx XX ; save X value
|
||||
|
||||
iny ; point to value
|
||||
lda (NUM1L),Y ; read in output value
|
||||
|
||||
sty YY ; save Y value
|
||||
|
||||
tax ; value in X
|
||||
ldy XX ; register in Y
|
||||
|
||||
; reg in Y, value in X
|
||||
jsr write_ay_left ; assume 3 channel (not six)
|
||||
|
||||
ldx XX
|
||||
ldy YY
|
||||
|
||||
jmp top_regs_left_loop
|
||||
|
||||
done_with_masks_left:
|
||||
iny
|
||||
lda (NUM1L),Y ; read in frame delay
|
||||
cmp #$ff ; see if end
|
||||
bne not_done_left ; if so, done
|
||||
inc DONE_PLAYING ; set done playing flag
|
||||
jmp done_left_interrupt
|
||||
not_done_left:
|
||||
sta MB_FRAME_DIFF2
|
||||
|
||||
iny
|
||||
clc
|
||||
tya
|
||||
adc NUM1L
|
||||
sta NUM1L
|
||||
lda #0
|
||||
adc NUM1H
|
||||
sta NUM1H
|
||||
|
||||
done_left_interrupt:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;=========
|
||||
;routines
|
||||
;=========
|
||||
.include "../asm_routines/gr_offsets.s"
|
||||
.include "../asm_routines/text_print.s"
|
||||
.include "../asm_routines/mockingboard.s"
|
||||
.include "../asm_routines/lzss_decompress.s"
|
||||
.include "../asm_routines/gr_fast_clear.s"
|
||||
|
||||
;=======
|
||||
; music
|
||||
;=======
|
||||
.include "ksp_theme_compressed.inc"
|
||||
.include "ksp_theme2_compressed.inc"
|
||||
|
||||
|
||||
;=========
|
||||
; strings
|
||||
;=========
|
||||
mocking_message: .asciiz "LOOKING FOR MOCKINGBOARD IN SLOT #4"
|
||||
not_message: .byte "NOT "
|
||||
found_message: .asciiz "FOUND"
|
||||
done_message: .asciiz "DONE PLAYING"
|
||||
|
||||
load_quotes:
|
||||
.byte 10
|
||||
.asciiz "Adding Extraneous Ks"
|
||||
.byte 14
|
||||
.asciiz "Locating Jeb"
|
||||
.byte 11
|
||||
.asciiz "Breaking Quicksaves"
|
||||
.byte 12
|
||||
.asciiz "Patching Conics"
|
||||
.byte 12
|
||||
.asciiz "Spinning up Duna"
|
||||
.byte 11
|
||||
.asciiz "Warming up the 6502"
|
||||
.byte 10
|
||||
.asciiz "Preparing Explosions"
|
||||
.byte 10
|
||||
.asciiz "Unleashing the Kraken"
|
||||
|
||||
|
||||
;=============
|
||||
; Grahpics
|
||||
; Must be at end as get over-written
|
||||
;=============
|
||||
|
||||
.include "ksp_title.inc"
|
||||
.include "ksp_squad.inc"
|
||||
.include "ksp_loading.inc"
|
||||
|
@ -1,4 +1,4 @@
|
||||
ksptheme:
|
||||
|
||||
; Using ym5_to_mockingboard to convert song ../songs/kerbal.ym5
|
||||
; YM5 Song attributes (1) : Interleaved=yes
|
||||
; Frames: 4128, Chip clock: 1000000 Hz, Frame rate: 50 Hz, Length=1:22
|
||||
@ -7,6 +7,8 @@ ksptheme:
|
||||
; Author name: Felipe Falanghe
|
||||
; Comment: Tracked by Vince Weaver
|
||||
|
||||
ksptheme:
|
||||
|
||||
.byte $01,$80,$38,$00 ; 00000
|
||||
.byte $01,$35,$BD,$EE,$DD,$01,$07,$0D,$0D,$0D ; 00096
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00097
|
||||
@ -124,12 +126,13 @@ ksptheme:
|
||||
.byte $01,$00,$04,$0E ; 00554
|
||||
.byte $01,$00,$04,$0D ; 00555
|
||||
.byte $14,$00,$07,$0C,$0C,$0B ; 00575
|
||||
.byte $01,$35,$9F,$BD,$BB,$03,$07,$0D,$0D,$0D ; 00576
|
||||
.byte $01,$35,$9F,$BD,$DD,$01,$07,$0D,$0D,$0D ; 00576
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00577
|
||||
.byte $01,$00,$07,$0F,$0F,$0F ; 00578
|
||||
.byte $01,$00,$07,$0E,$0E,$0E ; 00579
|
||||
.byte $14,$00,$04,$0C ; 00599
|
||||
.byte $02,$00,$04,$0D ; 00601
|
||||
.byte $01,$30,$BB,$03,$00 ; 00600
|
||||
.byte $01,$00,$04,$0D ; 00601
|
||||
.byte $01,$00,$04,$0E ; 00602
|
||||
.byte $01,$00,$04,$0D ; 00603
|
||||
.byte $14,$00,$07,$0C,$0C,$0B ; 00623
|
||||
@ -604,7 +607,7 @@ ksptheme:
|
||||
.byte $01,$00,$04,$0E ; 02714
|
||||
.byte $01,$00,$04,$0D ; 02715
|
||||
.byte $14,$00,$07,$0B,$0B,$0B ; 02735
|
||||
.byte $01,$35,$77,$00,$7D,$02,$07,$0C,$00,$0C ; 02736
|
||||
.byte $01,$35,$77,$00,$DD,$01,$07,$0C,$00,$0C ; 02736
|
||||
.byte $01,$00,$05,$0D,$0D ; 02737
|
||||
.byte $01,$00,$05,$0E,$0E ; 02738
|
||||
.byte $01,$00,$05,$0D,$0D ; 02739
|
||||
@ -939,6 +942,5 @@ ksptheme:
|
||||
.byte $01,$00,$01,$09 ; 04035
|
||||
.byte $08,$00,$01,$08 ; 04043
|
||||
.byte $01,$01,$00,$01,$00 ; 04044
|
||||
.byte $ff
|
||||
; Raw size = 57792 bytes
|
||||
; Updated size = 4800 bytes
|
||||
; Updated size = 4805 bytes
|
||||
|
@ -110,7 +110,7 @@ LZSS_COUNT EQU $97
|
||||
LZSS_MASK EQU $98
|
||||
LZSS_ENDL EQU $99
|
||||
LZSS_ENDH EQU $9A
|
||||
|
||||
MB_FRAME_DIFF2 EQU $9F
|
||||
|
||||
SHIPY EQU $E4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user