riven_hgr: add back title text

This commit is contained in:
Vince Weaver 2024-05-28 17:18:36 -04:00
parent e1f10efbbb
commit 5936f4d921
3 changed files with 171 additions and 6 deletions

View File

@ -0,0 +1,5 @@
gr_offsets:
.word $400,$480,$500,$580,$600,$680,$700,$780
.word $428,$4a8,$528,$5a8,$628,$6a8,$728,$7a8
.word $450,$4d0,$550,$5d0,$650,$6d0,$750,$7d0

View File

@ -0,0 +1,93 @@
;================================
; move_and_print
;================================
; get X,Y from OUTL/OUTH
; then print following string to that address
; stop at NUL
; convert to APPLE ASCII (or with 0x80)
; leave OUTL/OUTH pointing to next string
move_and_print:
ldy #0
lda (OUTL),Y
sta CH
iny
lda (OUTL),Y
asl
tay
lda gr_offsets,Y ; lookup low-res memory address
clc
adc CH ; add in xpos
sta BASL ; store out low byte of addy
lda gr_offsets+1,Y ; look up high byte
adc DRAW_PAGE ;
sta BASH ; and store it out
; BASH:BASL now points at right place
clc
lda OUTL
adc #2
sta OUTL
lda OUTH
adc #0
sta OUTH
;================================
; print_string
;================================
print_string:
ldy #0
print_string_loop:
lda (OUTL),Y
beq done_print_string
ps_smc1:
and #$3f ; make sure we are inverse
sta (BASL),Y
iny
bne print_string_loop
done_print_string:
iny
clc
tya
adc OUTL
sta OUTL
lda OUTH
adc #0
sta OUTH
rts
; set normal text
set_normal:
lda #$80
sta ps_smc1+1
lda #09 ; ora
sta ps_smc1
rts
; restore inverse text
set_inverse:
lda #$29
sta ps_smc1
lda #$3f
sta ps_smc1+1
rts
;================================
; move and print a list of lines
;================================
; look for negative X meaning done
move_and_print_list:
jsr move_and_print
ldy #0
lda (OUTL),Y
bpl move_and_print_list
rts

View File

@ -9,6 +9,46 @@
riven_title:
;===========================
; print the title message that used to be
; in hello.bas
;===================
; init screen
;===================
jsr TEXT
jsr HOME
bit KEYRESET
; clear text screen
; jsr clear_all
lda #0
sta DRAW_PAGE
; print non-inverse
jsr set_normal
; print messages
lda #<title_text
sta OUTL
lda #>title_text
sta OUTH
; print the text
ldx #7
title_loop:
jsr move_and_print
dex
bne title_loop
loader_start:
@ -40,13 +80,20 @@ print_model:
jmp print_model
print_model_done:
;===================
; init screen
;===================
jsr TEXT
jsr HOME
bit KEYRESET
;==========================
; wait a bit
;==========================
lda #50
jsr wait_a_bit
;==========================
; start graphics
;==========================
bit SET_GR
bit PAGE1
@ -276,6 +323,10 @@ clear_loop:
.include "hardware_detect.s"
.include "text_print.s"
.include "gr_offsets.s"
; .include "lc_detect.s"
model_string:
@ -286,3 +337,19 @@ model_string:
riven_title_image:
.incbin "graphics_title/riven_title.hgr.zx02"
title_text:
.byte 0, 0,"LOADING RIVEN SUBSET V0.03",0
;
;
.byte 0, 3,"BASED ON RIVEN BY CYAN",0
;
;
.byte 0, 6,"APPLE II PORT: VINCE WEAVER",0
.byte 0, 7,"DISK CODE : QKUMBA",0
;
.byte 0, 9," ______",0
.byte 0,10," A \/\/\/ SOFTWARE PRODUCTION",0
;
.byte 0,11," HTTP://WWW.DEATER.NET/WEAVE/VMWPROD",0