mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-26 11:30:12 +00:00
megamusic: more language card support
This commit is contained in:
parent
3c3c1664b6
commit
236736decd
@ -10,7 +10,7 @@ all: megamusic.dsk
|
||||
megamusic.dsk: MEGAMUSIC MEGALOAD HALFMUSIC MUSIC.D000X2 MUSIC.D000 MUSIC.1000
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x1000 MUSIC.1000
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x4000 MUSIC.D000
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0xD000 MUSIC.D000X2
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x4000 MUSIC.D000X2
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x4000 MEGAMUSIC
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x4000 HALFMUSIC
|
||||
$(DOS33) -y megamusic.dsk BSAVE -a 0x800 MEGALOAD
|
||||
|
@ -150,21 +150,20 @@ page1_loop: ; delay 115+(7 loop)+4 (bit)+4(extra)
|
||||
; -1 (+1-2) from above
|
||||
; -25 inc framecount
|
||||
; -7 see if timeout
|
||||
;-1023 play_music
|
||||
;-1031 play_music
|
||||
; -10 keypress
|
||||
;================
|
||||
; 3484
|
||||
; 3476
|
||||
|
||||
jsr play_music ; 6+1017
|
||||
jsr play_music ; 6+1025
|
||||
|
||||
|
||||
; Try X=29 Y=23 cycles=3474 R2
|
||||
|
||||
; Try X=231 Y=3 cycles=3484
|
||||
nop
|
||||
|
||||
|
||||
|
||||
ldy #3 ; 2
|
||||
faloop1:ldx #231 ; 2
|
||||
ldy #23 ; 2
|
||||
faloop1:ldx #29 ; 2
|
||||
faloop2:dex ; 2
|
||||
bne faloop2 ; 2nt/3
|
||||
dey ; 2
|
||||
|
@ -19,7 +19,8 @@
|
||||
tmptrk = $fe ; temporary copy of current track
|
||||
phase = $ff ; current phase for /seek
|
||||
|
||||
dirbuf = $1e00 ; note, don't put this immediately below
|
||||
dirbuf = $2200
|
||||
; $1e00 ; note, don't put this immediately below
|
||||
; the value being read as destaddr-4
|
||||
; is temporarily overwritten during read
|
||||
; process
|
||||
@ -31,6 +32,66 @@
|
||||
start:
|
||||
jsr init ; unhook DOS, init nibble table
|
||||
|
||||
; Language card! READ ROM, WRITE RAM, $D000 bank 1
|
||||
lda $c089
|
||||
lda $c089
|
||||
|
||||
; open and read a file
|
||||
lda #<md000_filename
|
||||
sta namlo
|
||||
lda #>md000_filename
|
||||
sta namhi
|
||||
jsr opendir ; open and read entire file into memory
|
||||
|
||||
; copy 12k from $4000 to $d000
|
||||
|
||||
ldy #0
|
||||
yloop:
|
||||
ldx #0
|
||||
xloop:
|
||||
xloop_smc1:
|
||||
lda $4000,X
|
||||
xloop_smc2:
|
||||
sta $D000,X
|
||||
inx
|
||||
bne xloop
|
||||
iny
|
||||
inc xloop_smc1+2
|
||||
inc xloop_smc2+2
|
||||
cpy #48
|
||||
bne yloop
|
||||
|
||||
|
||||
; open and read a file
|
||||
lda #<md000x2_filename
|
||||
sta namlo
|
||||
lda #>md000x2_filename
|
||||
sta namhi
|
||||
jsr opendir ; open and read entire file into memory
|
||||
|
||||
; Language card! READ ROM, WRITE RAM, $D000 bank 2
|
||||
lda $c081
|
||||
lda $c081
|
||||
|
||||
; copy 4k from $4000 to $d000
|
||||
|
||||
ldy #0
|
||||
yloop2:
|
||||
ldx #0
|
||||
xloop2:
|
||||
xloop2_smc1:
|
||||
lda $4000,X
|
||||
xloop2_smc2:
|
||||
sta $D000,X
|
||||
inx
|
||||
bne xloop2
|
||||
iny
|
||||
inc xloop2_smc1+2
|
||||
inc xloop2_smc2+2
|
||||
cpy #16
|
||||
bne yloop2
|
||||
|
||||
|
||||
; open and read a file
|
||||
lda #<megademo_filename
|
||||
sta namlo
|
||||
@ -39,11 +100,15 @@ start:
|
||||
jsr opendir ; open and read entire file into memory
|
||||
|
||||
; open and read a file
|
||||
; lda #<half_filename
|
||||
; sta namlo
|
||||
; lda #>half_filename
|
||||
; sta namhi
|
||||
; jsr opendir ; open and read entire file into memory
|
||||
lda #<m1000_filename
|
||||
sta namlo
|
||||
lda #>m1000_filename
|
||||
sta namhi
|
||||
jsr opendir ; open and read entire file into memory
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jmp $4000 ; jump to entry point
|
||||
|
||||
@ -55,9 +120,21 @@ megademo_filename: ;.byte "MEGAMUSIC "
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
half_filename: ;.byte "HALFMUSIC "
|
||||
.byte 'H'|$80,'A'|$80,'L'|$80,'F'|$80,'M'|$80,'U'|$80,'S'|$80,'I'|$80
|
||||
.byte 'C'|$80,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
m1000_filename: ;.byte "MUSIC.1000 "
|
||||
.byte 'M'|$80,'U'|$80,'S'|$80,'I'|$80,'C'|$80,'.'|$80,'1'|$80,'0'|$80
|
||||
.byte '0'|$80,'0'|$80,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
md000_filename: ;.byte "MUSIC.D000 "
|
||||
.byte 'M'|$80,'U'|$80,'S'|$80,'I'|$80,'C'|$80,'.'|$80,'D'|$80,'0'|$80
|
||||
.byte '0'|$80,'0'|$80,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
md000x2_filename: ;.byte "MUSIC.D000X2 "
|
||||
.byte 'M'|$80,'U'|$80,'S'|$80,'I'|$80,'C'|$80,'.'|$80,'D'|$80,'0'|$80
|
||||
.byte '0'|$80,'0'|$80,'X'|$80,'2'|$80,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
.byte $A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
|
@ -75,13 +75,16 @@ MB_FRAME = $94
|
||||
MB_PATTERN = $95
|
||||
|
||||
; takes
|
||||
; 4 +
|
||||
; 3 + 79 +
|
||||
; 80 + 82 + 88 +
|
||||
; 80 + 82 + 88 +
|
||||
; 80 + 82 + 88 +
|
||||
; 80 + 80 +
|
||||
; 21 = 1017
|
||||
; 25 = 1025
|
||||
play_music:
|
||||
; turn on language card
|
||||
lda $C088 ; 4
|
||||
|
||||
; self-modify the code
|
||||
lda MB_PATTERN ; 3
|
||||
@ -241,10 +244,13 @@ mb_no_change:
|
||||
nop ; 2
|
||||
mb_done_change:
|
||||
|
||||
; restore language card
|
||||
lda $C08A ; 4
|
||||
rts ; 6
|
||||
;=======
|
||||
; 21
|
||||
; 25
|
||||
|
||||
.align $100
|
||||
.include "mockingboard.s"
|
||||
|
||||
.align $100
|
||||
|
Loading…
Reference in New Issue
Block a user