mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-17 13:29:39 +00:00
second: finally got gorilla scroll working
this was much more of a pain than needed
This commit is contained in:
parent
e410bcc31c
commit
38a56a4686
|
@ -17,7 +17,7 @@ GORILLA: gorilla.o
|
||||||
gorilla.o: gorilla.s \
|
gorilla.o: gorilla.s \
|
||||||
../zx02_optim.s \
|
../zx02_optim.s \
|
||||||
../hgr_copy_fast.s \
|
../hgr_copy_fast.s \
|
||||||
tv_effect.s \
|
tv_effect.s horiz_scroll_simple.s \
|
||||||
../zp.inc ../hardware.inc ../qload.inc \
|
../zp.inc ../hardware.inc ../qload.inc \
|
||||||
audio/a_pboy.btc.zx02 \
|
audio/a_pboy.btc.zx02 \
|
||||||
graphics/mntscrl3.hgr.zx02
|
graphics/mntscrl3.hgr.zx02
|
||||||
|
|
|
@ -50,18 +50,33 @@ gorilla_start:
|
||||||
sta COUNT
|
sta COUNT
|
||||||
sta DRAW_PAGE
|
sta DRAW_PAGE
|
||||||
|
|
||||||
lda #$60
|
;=======================
|
||||||
jsr hgr_copy
|
; scroll in from right
|
||||||
|
;=======================
|
||||||
|
|
||||||
bit PAGE1
|
bit PAGE1 ; draw on visible page
|
||||||
|
; flipping while scrolling is hard
|
||||||
|
|
||||||
|
jsr horiz_scroll_left
|
||||||
|
|
||||||
|
; lda #$60
|
||||||
|
; jsr hgr_copy
|
||||||
|
|
||||||
|
; bit PAGE1
|
||||||
|
|
||||||
|
|
||||||
|
;==============================
|
||||||
|
; todo, possibly flash at end?
|
||||||
|
;==============================
|
||||||
|
|
||||||
gorilla_wait:
|
gorilla_wait:
|
||||||
lda #29
|
lda #29
|
||||||
jsr wait_for_pattern
|
jsr wait_for_pattern
|
||||||
bcc gorilla_wait
|
bcc gorilla_wait
|
||||||
|
|
||||||
|
;======================
|
||||||
; TODO: TV_shutoff effect
|
; TV_shutoff effect
|
||||||
|
;======================
|
||||||
|
|
||||||
; lda #0
|
; lda #0
|
||||||
; jsr hgr_page1_clearscreen
|
; jsr hgr_page1_clearscreen
|
||||||
|
@ -110,15 +125,17 @@ gorilla_done:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
.align $100
|
;.align $100
|
||||||
.include "../wait_keypress.s"
|
.include "../wait_keypress.s"
|
||||||
; .include "../zx02_optim.s"
|
; .include "../zx02_optim.s"
|
||||||
; .include "../hgr_table.s"
|
; .include "../hgr_table.s"
|
||||||
.include "../hgr_clear_screen.s"
|
.include "../hgr_clear_screen.s"
|
||||||
.include "../hgr_copy_fast.s"
|
.include "../hgr_copy_fast.s"
|
||||||
|
.include "../hgr_page_flip.s"
|
||||||
|
|
||||||
.include "tv_effect.s"
|
.include "tv_effect.s"
|
||||||
.include "../irq_wait.s"
|
.include "../irq_wait.s"
|
||||||
|
.include "horiz_scroll_simple.s"
|
||||||
|
|
||||||
gorilla_data:
|
gorilla_data:
|
||||||
.incbin "graphics/mntscrl3.hgr.zx02"
|
.incbin "graphics/mntscrl3.hgr.zx02"
|
||||||
|
|
99
demos/second/part08_gorilla/horiz_scroll_simple.s
Normal file
99
demos/second/part08_gorilla/horiz_scroll_simple.s
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
; no page flip currently, that's hard
|
||||||
|
|
||||||
|
; scrolls two at a time to preserve colors
|
||||||
|
|
||||||
|
horiz_scroll_left:
|
||||||
|
|
||||||
|
scroll_left_loop:
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta COUNT
|
||||||
|
|
||||||
|
scroll_left_outer_outer_loop:
|
||||||
|
|
||||||
|
ldx #191 ; end is 191
|
||||||
|
|
||||||
|
scroll_left_outer_loop:
|
||||||
|
|
||||||
|
; high
|
||||||
|
|
||||||
|
lda hposn_high,X
|
||||||
|
clc
|
||||||
|
adc DRAW_PAGE
|
||||||
|
sta hsl_smc1+2 ; SMC1 = $2000+2
|
||||||
|
sta hsl_smc2+2 ; SMC2 = $2000
|
||||||
|
sta hsl_smc4+2 ; SMC4 = $2000
|
||||||
|
sta hsl_smc6+2 ; SMC6 = $2000
|
||||||
|
|
||||||
|
ora #$40 ; convert to $6000 range
|
||||||
|
sta hsl_smc3+2 ; SMC3 = $6000+COUNT
|
||||||
|
sta hsl_smc5+2 ; SMC5 = $6000+COUNT+1
|
||||||
|
|
||||||
|
;=========================
|
||||||
|
; low
|
||||||
|
|
||||||
|
lda hposn_low,X
|
||||||
|
sta hsl_smc2+1 ; SMC2 = $2000
|
||||||
|
sta hsl_smc4+1 ; SMC4 = $2000
|
||||||
|
sta hsl_smc6+1 ; SMC6 = $2000
|
||||||
|
|
||||||
|
sta hsl_smc1+1 ; SMC1 = $2000+2
|
||||||
|
inc hsl_smc1+1
|
||||||
|
inc hsl_smc1+1
|
||||||
|
|
||||||
|
clc
|
||||||
|
adc COUNT
|
||||||
|
|
||||||
|
sta hsl_smc3+1 ; SMC3 = $6000+COUNT
|
||||||
|
|
||||||
|
sta hsl_smc5+1 ; SMC5 = $6000+COUNT+1
|
||||||
|
inc hsl_smc5+1
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
scroll_left_inner_loop:
|
||||||
|
|
||||||
|
hsl_smc1:
|
||||||
|
lda $2000+2,Y
|
||||||
|
hsl_smc2:
|
||||||
|
sta $2000,Y
|
||||||
|
|
||||||
|
iny
|
||||||
|
cpy #38
|
||||||
|
bne scroll_left_inner_loop
|
||||||
|
|
||||||
|
; get new data to scroll in
|
||||||
|
|
||||||
|
hsl_smc3:
|
||||||
|
lda $6000 ; 6000+COUNT
|
||||||
|
|
||||||
|
hsl_smc4:
|
||||||
|
sta $2000,Y ; Y=38
|
||||||
|
|
||||||
|
iny
|
||||||
|
|
||||||
|
hsl_smc5:
|
||||||
|
lda $6000+1 ; 6000+COUNT+1
|
||||||
|
|
||||||
|
hsl_smc6:
|
||||||
|
sta $2000,Y ; Y=39
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dex
|
||||||
|
cpx #$FF ; end at top of screen
|
||||||
|
|
||||||
|
bne scroll_left_outer_loop
|
||||||
|
|
||||||
|
; jsr hgr_page_flip
|
||||||
|
|
||||||
|
inc COUNT
|
||||||
|
inc COUNT
|
||||||
|
lda COUNT
|
||||||
|
cmp #40
|
||||||
|
bne scroll_left_outer_outer_loop
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user