mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-10 08:23:49 +00:00
fw: update timings
This commit is contained in:
parent
14a3924f4e
commit
a46e345e50
119
fireworks/fw.s
119
fireworks/fw.s
@ -1,6 +1,12 @@
|
|||||||
;=======================================================================
|
;=======================================================================
|
||||||
; Based on BASIC program posted by FozzTexx, originally written in 1987
|
; Based on BASIC program posted by FozzTexx, originally written in 1987
|
||||||
;=======================================================================
|
;=======================================================================
|
||||||
|
|
||||||
|
; State: Launch
|
||||||
|
; rocketing
|
||||||
|
; explosion
|
||||||
|
|
||||||
|
|
||||||
; Constants
|
; Constants
|
||||||
NUMSTARS = 16
|
NUMSTARS = 16
|
||||||
YSIZE = 160
|
YSIZE = 160
|
||||||
@ -39,80 +45,83 @@ draw_fireworks:
|
|||||||
|
|
||||||
launch_firework:
|
launch_firework:
|
||||||
|
|
||||||
jsr random16
|
jsr random16 ; 6+?
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$4
|
and #$4 ; 2
|
||||||
sta COLOR_GROUP ; HGR color group (0 PG or 4 BO)
|
sta COLOR_GROUP ; HGR color group (0 PG or 4 BO) ; 4
|
||||||
|
|
||||||
jsr random16
|
jsr random16 ; 6+
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$3
|
and #$3 ; 2
|
||||||
clc
|
clc ; 2
|
||||||
adc #$1
|
adc #$1 ; 2
|
||||||
sta X_VELOCITY ; x velocity = 1..4
|
sta X_VELOCITY ; x velocity = 1..4 ; 3
|
||||||
|
|
||||||
jsr random16
|
jsr random16 ; 6+
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$3
|
and #$3 ; 2
|
||||||
clc
|
clc ; 2
|
||||||
adc #$2
|
adc #$2 ; 2
|
||||||
eor #$ff
|
eor #$ff ; 2
|
||||||
sta Y_VELOCITY_H ; y velocity = -3..-6
|
sta Y_VELOCITY_H ; y velocity = -3..-6 ; 3
|
||||||
lda #0
|
lda #0 ; 2
|
||||||
sta Y_VELOCITY_L ; it's 8:8 fixed point
|
sta Y_VELOCITY_L ; it's 8:8 fixed point ; 3
|
||||||
|
|
||||||
jsr random16
|
jsr random16 ; 6+
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$1f
|
and #$1f ; 2
|
||||||
clc
|
clc ; 2
|
||||||
adc #33
|
adc #33 ; 2
|
||||||
sta MAX_STEPS ; 33..64
|
sta MAX_STEPS ; 33..64 ; 3
|
||||||
|
|
||||||
; launch from the two hills
|
; launch from the two hills
|
||||||
jsr random16
|
jsr random16 ; 6+
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$3f
|
and #$3f ; 2
|
||||||
sta XPOS_L
|
sta XPOS_L ; 3
|
||||||
|
|
||||||
jsr random16
|
jsr random16 ; 6+
|
||||||
lda SEEDL
|
lda SEEDL ; 3
|
||||||
and #$1
|
and #$1 ; 2
|
||||||
beq right_hill
|
beq right_hill ; 2
|
||||||
left_hill:
|
left_hill:
|
||||||
lda XPOS_L
|
lda XPOS_L ; 3
|
||||||
clc
|
clc ; 2
|
||||||
adc #24
|
adc #24 ; 2
|
||||||
sta XPOS_L ; 24-88 (64)
|
sta XPOS_L ; 24-88 (64) ; 3
|
||||||
|
|
||||||
jmp done_hill
|
jmp done_hill ; 3
|
||||||
right_hill:
|
right_hill:
|
||||||
lda XPOS_L
|
; 1
|
||||||
clc
|
lda XPOS_L ; 3
|
||||||
adc #191
|
clc ; 2
|
||||||
sta XPOS_L ; 191-255 (64)
|
adc #191 ; 2
|
||||||
|
sta XPOS_L ; 191-255 (64) ; 3
|
||||||
|
|
||||||
lda X_VELOCITY
|
lda X_VELOCITY ; 3
|
||||||
eor #$ff
|
eor #$ff ; 2
|
||||||
sta X_VELOCITY
|
sta X_VELOCITY ; 3
|
||||||
inc X_VELOCITY ; aim toward middle
|
inc X_VELOCITY ; aim toward middle ; 5
|
||||||
|
|
||||||
done_hill:
|
done_hill:
|
||||||
|
|
||||||
lda #YSIZE
|
lda #YSIZE ; 2
|
||||||
sta YPOS_H
|
sta YPOS_H ; 3
|
||||||
lda #0 ; fixed point 8:8
|
lda #0 ; fixed point 8:8 ; 2
|
||||||
sta YPOS_L ; start at ground
|
sta YPOS_L ; start at ground ; 3
|
||||||
|
|
||||||
|
lda YPOS_H ; 3
|
||||||
|
sta PEAK ; peak starts at ground ; 3
|
||||||
|
|
||||||
|
lda #1 ; 2
|
||||||
|
sta CURRENT_STEP ; 3
|
||||||
|
|
||||||
|
|
||||||
lda YPOS_H
|
|
||||||
sta PEAK ; peak starts at ground
|
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; Draw rocket
|
; Draw rocket
|
||||||
;===============
|
;===============
|
||||||
|
|
||||||
lda #1
|
|
||||||
sta CURRENT_STEP
|
|
||||||
|
|
||||||
draw_rocket_loop:
|
draw_rocket_loop:
|
||||||
|
|
||||||
lda Y_OLD
|
lda Y_OLD
|
||||||
|
Loading…
Reference in New Issue
Block a user