From 3a770f99137ca2fc88ed58907f0808fca61994a7 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 4 Nov 2023 00:24:36 -0400 Subject: [PATCH] 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 --- demos/second/pt3_lib_core.s | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demos/second/pt3_lib_core.s b/demos/second/pt3_lib_core.s index 89a5f2d5..9a0c350e 100644 --- a/demos/second/pt3_lib_core.s +++ b/demos/second/pt3_lib_core.s @@ -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