second: urgh bug in music player, previous fix was broken

didn't handle the corner case of two carries, and the credits music
was crashing after pattern 13

this is an ugly fix but hopefully correct
This commit is contained in:
Vince Weaver 2023-11-04 00:24:36 -04:00
parent 7a11877cce
commit 3a770f9913
1 changed files with 4 additions and 0 deletions

View File

@ -1561,11 +1561,15 @@ not_done:
clc
sta PATTERN_L
adc PT3_LOC+PT3_PATTERN_LOC_L
php ; save carry as we might generate two
clc
adc PATTERN_L
sta PATTERN_L
lda PT3_LOC+PT3_PATTERN_LOC_H ; 4
adc #>PT3_LOC ; assume page boundary ; 2
plp ; restore carry
adc #0
sta PATTERN_H ; 3
; clc