second: polar, scroll but no bounce

This commit is contained in:
Vince Weaver 2023-11-02 16:23:33 -04:00
parent a69e21353b
commit 2c66242415
2 changed files with 69 additions and 9 deletions

View File

@ -110,12 +110,15 @@ done_ocean:
really_done_ocean:
lda #0
jsr hgr_page1_clearscreen
jsr hgr_page2_clearscreen
bit PAGE2
jsr hgr_page1_clearscreen
bit PAGE1
lda #76
jsr wait_for_pattern
bcs really_done_ocean
bcs really_done_ocean ; bge
rts

View File

@ -50,22 +50,79 @@ load_loop:
lda #$60
jsr zx02_full_decomp
;===============================
;===============================
;===============================
; TODO
; scroll in and bounce
;===============================
;===============================
polar_scroll_loop:
lda #0
sta COUNT
sta DRAW_PAGE ; draw to PAGE1
lda #$60
jsr hgr_copy
lda #188
sta SCROLL_START
bit PAGE1 ; look at PAGE1
polar_outer_loop:
lda SCROLL_START
sta COUNT
lda #0
sta YDEST
polar_scroll_loop:
; setup source
ldx COUNT
lda hposn_low,X
sta polar_load_smc+1
lda hposn_high,X
clc
adc #$40 ; load from $6000
sta polar_load_smc+2
; setup destination
ldx YDEST
lda hposn_low,X
sta polar_store_smc+1
lda hposn_high,X
clc
adc DRAW_PAGE ; store to $2000/$4000
sta polar_store_smc+2
ldy #39
polar_scroll_inner:
polar_load_smc:
lda $6000,Y
polar_store_smc:
sta $2000,Y
dey
bne polar_scroll_inner
inc YDEST
inc COUNT
lda COUNT
cmp #192
bne polar_scroll_loop
; flip pages
jsr hgr_page_flip
lda SCROLL_START
beq done_polar_scroll
sec
sbc #4
sta SCROLL_START
jmp polar_outer_loop
done_polar_scroll:
polar_loop:
@ -85,7 +142,7 @@ polar_done:
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
.include "../irq_wait.s"
.include "../hgr_page_flip.s"
polar_data: