second: horiz scroll

This commit is contained in:
Vince Weaver 2023-10-30 14:39:29 -04:00
parent 885bbec511
commit ee52204238
4 changed files with 131 additions and 55 deletions

View File

@ -17,6 +17,7 @@ intro.o: intro.s ../zx02_optim.s \
graphics/igl.hgr.zx02 \
graphics/igr.hgr.zx02 \
graphics/fc_sr_logo.hgr.zx02 \
horiz_scroll.s \
../zp.inc ../hardware.inc ../qload.inc
ca65 -o intro.o intro.s -l intro.lst

View File

@ -0,0 +1,63 @@
;============================
; do the pan
horiz_pan:
pan_loop:
lda #0
sta COUNT
pan_outer_outer_loop:
ldx #191
pan_outer_loop:
lda hposn_high,X
sta pil_smc1+2
sta pil_smc2+2
sta pil_smc4+2
eor #$60
sta pil_smc3+2
lda hposn_low,X
sta pil_smc2+1
sta pil_smc4+1
sta pil_smc1+1
inc pil_smc1+1
clc
adc COUNT
sta pil_smc3+1
ldy #0
pan_inner_loop:
pil_smc1:
lda $2000+1,Y
pil_smc2:
sta $2000,Y
iny
cpy #39
bne pan_inner_loop
pil_smc3:
lda $4000
pil_smc4:
sta $2000,Y
dex
cpx #$ff
bne pan_outer_loop
; jsr wait_until_keypress
inc COUNT
lda COUNT
cmp #39
bne pan_outer_outer_loop
rts

View File

@ -0,0 +1,63 @@
;============================
; do the pan
horiz_pan:
pan_loop:
lda #0
sta COUNT
pan_outer_outer_loop:
ldx #191
pan_outer_loop:
lda hposn_high,X
sta pil_smc1+2
sta pil_smc2+2
sta pil_smc4+2
eor #$60
sta pil_smc3+2
lda hposn_low,X
sta pil_smc2+1
sta pil_smc4+1
sta pil_smc1+1
inc pil_smc1+1
clc
adc COUNT
sta pil_smc3+1
ldy #0
pan_inner_loop:
pil_smc1:
lda $2000+1,Y
pil_smc2:
sta $2000,Y
iny
cpy #39
bne pan_inner_loop
pil_smc3:
lda $4000
pil_smc4:
sta $2000,Y
dex
cpx #$ff
bne pan_outer_loop
; jsr wait_until_keypress
inc COUNT
lda COUNT
cmp #39
bne pan_outer_outer_loop
rts

View File

@ -97,65 +97,13 @@ intro_start:
jsr wait_until_keypress
;============================
;==============================
; do the pan
;==============================
pan_loop:
lda #0
sta COUNT
pan_outer_outer_loop:
ldx #191
pan_outer_loop:
lda hposn_high,X
sta pil_smc1+2
sta pil_smc2+2
sta pil_smc4+2
eor #$60
sta pil_smc3+2
lda hposn_low,X
sta pil_smc2+1
sta pil_smc4+1
sta pil_smc1+1
inc pil_smc1+1
clc
adc COUNT
sta pil_smc3+1
jsr horiz_pan
ldy #0
pan_inner_loop:
pil_smc1:
lda $2000+1,Y
pil_smc2:
sta $2000,Y
iny
cpy #39
bne pan_inner_loop
pil_smc3:
lda $4000
pil_smc4:
sta $2000,Y
dex
cpx #$ff
bne pan_outer_loop
; jsr wait_until_keypress
inc COUNT
lda COUNT
cmp #39
bne pan_outer_outer_loop
jsr wait_until_keypress
@ -196,6 +144,7 @@ done_intro:
.include "../zx02_optim.s"
.include "../hgr_table.s"
.include "../hgr_clear_screen.s"
.include "horiz_scroll.s"
demosplash_data:
.incbin "graphics/demosplash.hgr.zx02"