sb: fix up scroll intro

This commit is contained in:
Vince Weaver 2023-05-31 17:06:35 -04:00
parent 5d4e0b066b
commit 960339242d
5 changed files with 106 additions and 14 deletions

View File

@ -78,7 +78,7 @@ TITLE: title.o
title.o: title.s zx02_optim.s \
zp.inc hardware.inc \
hgr_vscroll.s audio.s \
hgr_logo_scroll.s audio.s \
purple.s lc_detect.s \
sound/purple.btc.zx02 \
graphics/czmg4ap_title.hgr.zx02 \

View File

@ -23,12 +23,13 @@ PADDLE_BUTTON0 = $C061
PADDL0 = $C064
PTRIG = $C070
;; BASIC ROUTINES
NORMAL = $F273
;; MONITOR ROUTINES
;=================
; ROM ROUTINES
;=================
; note we can't use these if language card RAM switched in
NORMAL = $F273
HGR = $F3E2
HLINE = $F819 ;; HLINE Y,$2C at A
VLINE = $F828 ;; VLINE A,$2D at Y
CLRSCR = $F832 ;; Clear low-res screen

View File

@ -0,0 +1,88 @@
;================================
; HGR vscroll
;================================
; image to scroll in is in $4000
;
hgr_vscroll:
ldx #191 ; 2
stx SCROLL ; SCROLL = 0 ; 3
vscroll_loop:
;====================
; draw bottom part
lda #0 ; 2
sta SCROLL_OFFSET ; offset in logo ; 3
ldx SCROLL ; offset in screen ; 3
vscroll_bottom:
cpx #192 ; 2
bcc regular_scroll ; 2/3
lda #$20
sta vscroll_in_smc+2
sta vscroll_out_smc+2
lda #$00
sta vscroll_in_smc+1
sta vscroll_out_smc+1
beq done_scroll_setup
regular_scroll:
ldy SCROLL_OFFSET ; 3
lda hposn_high,Y ; 4
eor #$60 ; $20->$40 ; 2
sta vscroll_in_smc+2 ; INH ; 4
lda hposn_low,Y ; 4
sta vscroll_in_smc+1 ; INL ; 4
;====
; 21
lda hposn_high,X ; 4
sta vscroll_out_smc+2 ; OUTH ; 4
lda hposn_low,X ; 4
sta vscroll_out_smc+1 ; OUTL ; 4
;====
; 21
done_scroll_setup:
inc SCROLL_OFFSET ; 5
ldy #39 ; 2
vscroll_bottom_line:
vscroll_in_smc:
lda $A000,Y ; 4
vscroll_out_smc:
sta $2000,Y ; 5
dey ; 2
bpl vscroll_bottom_line ; 2/3
;=====
; 2+40*(14)-1
; 561
inx ; 2
txa
sec
sbc SCROLL
cmp #58
bcc vscroll_bottom
;==========
;5+96*(42+561+7)-1
; 58564
done_scroll:
;=====================
; scroll whole screen
dec SCROLL
bne vscroll_loop
rts

View File

@ -25,10 +25,9 @@ play_purple:
ldx #PURPLE_LENGTH ; 28 pages long???
jsr play_audio
; read/write RAM, $d000 bank 2
; read ROM/no-write
bit $c08B
bit $c08B
bit $c082
done_play_purple:
rts

View File

@ -14,10 +14,11 @@ hires_start:
;===================
jsr HOME
bit HIRES
jsr HGR
; bit HIRES
bit FULLGR
bit SET_GR
bit PAGE1
; bit SET_GR
; bit PAGE1
;====================
; set up tables
@ -64,6 +65,9 @@ yes_language_card:
jsr full_decomp
; read ROM/no-write
bit $C082
no_language_card:
@ -86,7 +90,7 @@ scroll_logo:
sta ZX0_src+1
lda #$A0
lda #$40
jsr full_decomp
@ -152,7 +156,7 @@ done:
.include "zx02_optim.s"
.include "hgr_tables.s"
.include "hgr_vscroll.s"
.include "hgr_logo_scroll.s"
.include "audio.s"
.include "purple.s"
.include "lc_detect.s"