ds: sound loops properly now

This commit is contained in:
Vince Weaver 2019-11-15 11:56:28 -05:00
parent 6c2cc34ca5
commit 10572d8b81
2 changed files with 18 additions and 1 deletions

View File

@ -1519,7 +1519,24 @@ reset_note:
; in the player note length code
is_done:
lda LOOP ; see if looping
beq really_done
sp_pt3_loop_smc:
lda #$d1 ; looping, move to loop location
; non-zero to avoid the temptation
; to merge with following lda #$0
sta current_pattern_smc+1
lda #$0
sta current_line_smc+1
sta current_subframe_smc+1
sta DONE_SONG ; undo the next song
jmp pt3_set_pattern
really_done:
; done with song, set it to non-zero
lda #1
sta DONE_SONG ; 3
rts ; 6

View File

@ -69,7 +69,7 @@ zero_song_structs_loop:
lda PT3_LOC+PT3_LOOP ; 4
sta pt3_loop_smc+1 ; 4
sta sp_pt3_loop_smc+1
;========================
;========================