mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-22 14:29:00 +00:00
second: add falling bars during interference
This commit is contained in:
parent
4a1ac9a061
commit
94c3c05d45
@ -19,6 +19,7 @@ chess.o: chess.s \
|
||||
../hgr_copy_fast.s \
|
||||
interference.s \
|
||||
circles.s \
|
||||
falling_bars.s \
|
||||
sierzoom.s \
|
||||
../irq_wait.s \
|
||||
../zp.inc ../hardware.inc ../qload.inc \
|
||||
|
@ -320,9 +320,45 @@ main_tunnel_done:
|
||||
sta interference_end_smc+1
|
||||
jsr interference
|
||||
|
||||
;======================
|
||||
; TODO: falling bars
|
||||
;======================
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
bit PAGE1
|
||||
jsr clear_all
|
||||
lda #50
|
||||
|
||||
; left
|
||||
|
||||
lda #$FF
|
||||
sta BAR_X1
|
||||
lda #13
|
||||
sta BAR_X2
|
||||
jsr falling_bars
|
||||
|
||||
lda #3
|
||||
jsr wait_ticks
|
||||
|
||||
; middle
|
||||
|
||||
lda #13
|
||||
sta BAR_X1
|
||||
lda #27
|
||||
sta BAR_X2
|
||||
jsr falling_bars
|
||||
|
||||
lda #3
|
||||
jsr wait_ticks
|
||||
|
||||
; right
|
||||
|
||||
lda #27
|
||||
sta BAR_X1
|
||||
lda #39
|
||||
sta BAR_X2
|
||||
jsr falling_bars
|
||||
|
||||
lda #5
|
||||
jsr wait_ticks
|
||||
|
||||
|
||||
@ -360,6 +396,7 @@ main_interference_done:
|
||||
.include "circles.s"
|
||||
.include "sierzoom.s"
|
||||
.include "../hgr_page_flip.s"
|
||||
.include "falling_bars.s"
|
||||
|
||||
; wait A * 1/50s
|
||||
wait_irq:
|
||||
|
30
demos/second/part04_chess_shapes/falling_bars.s
Normal file
30
demos/second/part04_chess_shapes/falling_bars.s
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
;==============================
|
||||
; falling bars
|
||||
;==============================
|
||||
; set X1 and X2 before calling
|
||||
falling_bars:
|
||||
|
||||
ldx #0
|
||||
falling_bar_outer:
|
||||
lda gr_offsets_l,X
|
||||
sta GBASL
|
||||
lda gr_offsets_h,X
|
||||
sta GBASH
|
||||
|
||||
ldy BAR_X2
|
||||
lda #0
|
||||
falling_bar_inner:
|
||||
sta (GBASL),Y
|
||||
dey
|
||||
cpy BAR_X1
|
||||
bne falling_bar_inner
|
||||
|
||||
lda #50
|
||||
jsr wait
|
||||
|
||||
inx
|
||||
cpx #24
|
||||
bne falling_bar_outer
|
||||
|
||||
rts
|
@ -198,7 +198,8 @@ T_L = $F6
|
||||
T_H = $F7
|
||||
SAVED = $F8
|
||||
|
||||
|
||||
BAR_X1 = $F0
|
||||
BAR_X2 = $F1
|
||||
|
||||
;==============================================
|
||||
; $FC-$FF we use for in/out pointers
|
||||
|
Loading…
x
Reference in New Issue
Block a user