fireworks: stall the rocket a bit

This commit is contained in:
Vince Weaver 2018-09-12 15:24:02 -04:00
parent b0bf3f6449
commit 6ef2122b57
5 changed files with 39 additions and 12 deletions

View File

@ -1,17 +1,17 @@
sound effects:
one more at start explosion?
adjust speed:
slow for launch, fast for fireworks
text scrolling (split?)
cycle invariant HPLOT TO
re-arrange to minimize padding
remove dead code
adjust speed
adjust colors of gradient?
Not sure:
adjust colors of gradient?
version number in the BASIC booter
REACH:
cycle invariant HPLOT TO
BUGS:
sometimes far left firework will wrap?

Binary file not shown.

View File

@ -403,6 +403,7 @@ jump_table:
.word (action_move_rocket-1)
.word (action_start_explosion-1)
.word (action_continue_explosion-1)
.word (action_stall_rocket-1)

View File

@ -15,6 +15,7 @@ STATE_LAUNCH_ROCKET = 0
STATE_MOVE_ROCKET = 2
STATE_START_EXPLOSION = 4
STATE_CONTINUE_EXPLOSION = 6
STATE_STALL_ROCKET = 8
; Constants
NUMSTARS = 16
@ -425,21 +426,18 @@ done_with_loop:
; 9
;-1
lda #STATE_START_EXPLOSION
; lda #STATE_LAUNCH_ROCKET ; 2
lda #STATE_START_EXPLOSION ; 2
sta STATE ; 3
jmp not_done_with_launch2 ; 3
;==========
; 7
not_done_with_launch:
lda STATE ; nop ; 3
nop ; 2
lda #STATE_STALL_ROCKET ; 2
sta STATE ; 3
nop ; 2
;==========
; 7
; lda #$c0
; jsr WAIT
not_done_with_launch2:
inc CURRENT_STEP ; 5

View File

@ -97,3 +97,31 @@ action_continue_explosion:
jmp check_keyboard ; 3
;=================================
; action_stall_rocket
;=================================
; and take 4504 cycles to do it
; 4504 - 8 = 4496
action_stall_rocket:
lda #STATE_MOVE_ROCKET ; 2
sta STATE ; 3
; Try X=12 Y=68 cycles=4489 R7
nop ;
nop ;
lda STATE ;3
ldy #68 ; 2
Bloop1: ldx #12 ; 2
Bloop2: dex ; 2
bne Bloop2 ; 2nt/3
dey ; 2
bne Bloop1 ; 2nt/3
jmp check_keyboard ; 3