pt3: player supports multiple songs now

This commit is contained in:
Vince Weaver 2019-05-15 14:13:54 -04:00
parent 0fe675bc96
commit 2ec2da0891
5 changed files with 31 additions and 21 deletions

View File

@ -47,6 +47,14 @@ pt3_play_music:
jsr pt3_make_frame
; set song over
lda DONE_SONG
beq mb_write_frame
; same as "press right"
lda #$40
jmp quiet_exit
;======================================
; Write frames to Mockingboard
;======================================
@ -217,16 +225,6 @@ quiet_exit:
sta DONE_PLAYING
jsr clear_ay_both
;=====================================
; clear register area
;=====================================
ldx #13 ; 2
lda #0 ; 2
mb_clear_reg:
sta REGISTER_DUMP,X ; clear register value ; 4
dex ; 2
bpl mb_clear_reg ; 2nt/3
exit_interrupt:
; pla ; restore a ; 4

View File

@ -365,7 +365,9 @@ pt3_init_song:
sta note_a+NOTE_VOLUME
sta note_b+NOTE_VOLUME
sta note_c+NOTE_VOLUME
lda #$0
sta DONE_SONG
sta note_a+NOTE_TONE_SLIDING_L
sta note_b+NOTE_TONE_SLIDING_L
sta note_c+NOTE_TONE_SLIDING_L
@ -442,8 +444,18 @@ not_ascii_number:
rts
e_slide_amount: .byte $0
;=====================================
; Calculate Note
;=====================================
@ -1626,7 +1638,7 @@ pt3_set_pattern:
cmp #$ff
bne not_done
sta DONE_PLAYING
sta DONE_SONG
rts
not_done:
@ -1704,7 +1716,7 @@ pt3_make_frame:
; load a new pattern in
jsr pt3_set_pattern
lda DONE_PLAYING
lda DONE_SONG
beq pattern_good
rts

View File

@ -4,8 +4,8 @@
PT3_LOC = $4000
UNPACK_BUFFER EQU $6000 ; $6000 - $9800, 14k, $3800
NUM_FILES EQU 15
NUM_FILES EQU 3
;=============================
@ -144,8 +144,6 @@ mockingboard_found:
main_loop:
jmp main_loop
check_done:
lda #$ff
bit DONE_PLAYING
@ -170,10 +168,10 @@ done_play:
lda #0
sta DONE_PLAYING
lda #0
sta CH
; lda #0
; sta CH
jsr clear_bottoms
; jsr clear_bottoms
jsr new_song
@ -379,7 +377,7 @@ frame_count_loop:
; load a new pattern in
jsr pt3_set_pattern
lda DONE_PLAYING
lda DONE_SONG
beq fc_pattern_good
jmp done_counting
@ -591,7 +589,6 @@ song_list:
.include "../asm_routines/gr_setpage.s"
.include "qkumba_rts.s"
.include "../asm_routines/gr_hlin.s"
.include "../asm_routines/lz4_decode.s"
.include "../asm_routines/keypress_minimal.s"
;.include "rasterbars.s"
;.include "volume_bars.s"

View File

@ -1,2 +1,4 @@
.asciiz "SR.PT3"
.asciiz "EA.PT3"
.asciiz "VC.PT3"

View File

@ -114,6 +114,7 @@ MB_ADDRL EQU $9F
MB_ADDRH EQU $A0
DONE_PLAYING EQU $A1
MB_CHUNK_OFFSET EQU $A2
DONE_SONG EQU $A3
; More zero-page addresses
; we try not to conflict with anything DOS, MONITOR or BASIC related