driven: more work on smooth scroll

This commit is contained in:
Vince Weaver 2024-11-02 21:32:27 -04:00
parent 75a09a4e92
commit 7b62ff8f47
2 changed files with 32 additions and 1 deletions

View File

@ -63,6 +63,8 @@ load_loop:
scroll_loop:
jsr hgr_vertical_scroll
;============================================
; clear lines to get rid of stray old chars
@ -162,7 +164,7 @@ skip_next_text:
; do the scroll
;=============================
jsr hgr_vertical_scroll
jsr wait_vblank
jsr hgr_page_flip
@ -183,8 +185,11 @@ skip_next_text:
.include "../irq_wait.s"
.include "../hgr_page_flip.s"
.include "../vblank.s"
final_credits:
.byte 20," ",0
.byte 16,"DRI\/EN",0
.byte 20," ",0
.byte 15,"by Desire",0

26
demos/driven/vblank.s Normal file
View File

@ -0,0 +1,26 @@
; wait for VBLANK
; no way to do this on II/II+ short of vapor lock / floating bus
; IIe you can read $C019 (in VBLANK when top bit 0)
; IIc you can also read $C019 (also can setup interrupt)
; IIgs you can read $C019 but reverse of IIe (in VBLANK when top bit 1)
VBLANK = $C019 ;
; wait for vblank on IIe
; positive? during vblank
wait_vblank:
lda APPLEII_MODEL
cmp #'e'
bne no_vblank
wait_vblank_iie:
lda VBLANK
bmi wait_vblank_iie ; wait for positive (in vblank)
wait_vblank_done_iie:
lda VBLANK ; wait for negative (vlank done)
bpl wait_vblank_done_iie
no_vblank:
rts