diff --git a/fireworks/fireworks.s b/fireworks/fireworks.s index 2bed19d3..33a37107 100644 --- a/fireworks/fireworks.s +++ b/fireworks/fireworks.s @@ -390,11 +390,14 @@ restart: eor #$C0 sta sound1+2 - lda sound2+2 eor #$C0 sta sound2+2 + lda sound3+2 + eor #$C0 + sta sound3+2 + jmp setup_background diff --git a/fireworks/fw.s b/fireworks/fw.s index 1d1486b0..34bc88a6 100644 --- a/fireworks/fw.s +++ b/fireworks/fw.s @@ -450,7 +450,7 @@ not_done_with_launch2: ;====================================================================== ; Start explosion near x_old, y_old ;====================================================================== -; cycles = 67+16+63+16+258+16 = 436 +; cycles = 67+16+63+16+258+20 = 440 ; start_explosion: @@ -528,7 +528,10 @@ exp_sub_done: jsr hplot0 ; hplot(x_old,y_old); ; 6+244 ;============== ; 258 - ; Spread the explosion + ; Make sound and ready explosion + +sound3: + bit SPEAKER ; 4 ldy #1 ; 2 sty TEMPY ; save Y ; 3 @@ -540,7 +543,7 @@ exp_sub_done: rts ; 6 ;============= - ; 16 + ; 20 ;========================================================================== ; Continue Explosion diff --git a/fireworks/state_machine.s b/fireworks/state_machine.s index af6ace07..fc6ab9c0 100644 --- a/fireworks/state_machine.s +++ b/fireworks/state_machine.s @@ -62,21 +62,22 @@ Yloop2: dex ; 2 ;================================= ; and take 4504 cycles to do it - ; we take 445 so waste 4059 + ; we take 449 so waste 4055 action_start_explosion: - ; Try X=30 Y=26 cycles=4057 R2 + ; Try X=15 Y=50 cycles=4051 R4 + nop nop - ldy #26 ; 2 -Zloop1: ldx #30 ; 2 + ldy #50 ; 2 +Zloop1: ldx #15 ; 2 Zloop2: dex ; 2 bne Zloop2 ; 2nt/3 dey ; 2 bne Zloop1 ; 2nt/3 - jsr start_explosion ; 6+436 = 442 + jsr start_explosion ; 6+440 = 446 jmp check_keyboard ; 3