second: add falling bars during interference

This commit is contained in:
Vince Weaver 2023-11-01 15:52:08 -04:00
parent 4a1ac9a061
commit 94c3c05d45
4 changed files with 71 additions and 2 deletions

View File

@ -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 \

View File

@ -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:

View 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

View File

@ -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