2020-12-28 06:11:54 +00:00
|
|
|
; Display the TFV title screen
|
|
|
|
;
|
|
|
|
; this is the opener, title screen, new game creation, and load game code
|
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
.include "common_defines.inc"
|
|
|
|
|
|
|
|
;================================
|
|
|
|
; Clear screen and setup graphics
|
|
|
|
;================================
|
|
|
|
|
|
|
|
jsr HOME
|
|
|
|
bit PAGE0 ; set page 0
|
|
|
|
bit LORES ; Lo-res graphics
|
|
|
|
bit TEXTGR ; mixed gr/text mode
|
|
|
|
bit SET_GR ; set graphics
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta DISP_PAGE
|
|
|
|
lda #4
|
|
|
|
sta DRAW_PAGE
|
|
|
|
|
|
|
|
;===================================
|
|
|
|
; Clear top/bottom of page 0 and 1
|
|
|
|
;===================================
|
|
|
|
|
|
|
|
jsr clear_screens
|
|
|
|
|
|
|
|
;==========================
|
|
|
|
; Do Opening
|
|
|
|
;==========================
|
|
|
|
|
|
|
|
jsr opening
|
|
|
|
|
|
|
|
;======================
|
|
|
|
; show the title screen
|
|
|
|
;======================
|
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
; Title Screen
|
|
|
|
|
|
|
|
title_screen:
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; Clear both bottoms
|
|
|
|
|
2020-09-28 02:03:01 +00:00
|
|
|
jsr clear_bottoms
|
2017-08-17 03:18:59 +00:00
|
|
|
|
|
|
|
;=============================
|
2020-09-28 02:03:01 +00:00
|
|
|
; Load title
|
|
|
|
|
|
|
|
lda #<(title_lzsa)
|
|
|
|
sta getsrc_smc+1
|
|
|
|
lda #>(title_lzsa)
|
|
|
|
sta getsrc_smc+2
|
2017-08-17 03:18:59 +00:00
|
|
|
|
|
|
|
lda #$0c
|
2020-09-28 02:03:01 +00:00
|
|
|
|
|
|
|
jsr decompress_lzsa2_fast
|
2017-08-17 03:18:59 +00:00
|
|
|
|
|
|
|
;=================================
|
|
|
|
; copy to both pages
|
|
|
|
|
|
|
|
jsr gr_copy_to_current
|
|
|
|
jsr page_flip
|
|
|
|
jsr gr_copy_to_current
|
|
|
|
|
|
|
|
lda #20
|
|
|
|
sta YPOS
|
|
|
|
lda #20
|
|
|
|
sta XPOS
|
|
|
|
|
|
|
|
;=================================
|
|
|
|
; wait for keypress
|
|
|
|
|
|
|
|
jsr wait_until_keypressed
|
|
|
|
|
2020-12-28 06:11:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
;=================================
|
|
|
|
; enter name
|
|
|
|
|
|
|
|
; jsr enter_name
|
|
|
|
|
|
|
|
;=================================
|
|
|
|
; move on to flying
|
|
|
|
|
|
|
|
lda #LOAD_FLYING
|
|
|
|
sta WHICH_LOAD
|
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
rts
|
2020-12-28 06:11:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
;===============================================
|
|
|
|
; External modules
|
|
|
|
;===============================================
|
|
|
|
|
|
|
|
.include "tfv_opener.s"
|
|
|
|
|
|
|
|
.include "gr_pageflip.s"
|
|
|
|
.include "text_print.s"
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_vlin.s"
|
|
|
|
.include "gr_copy.s"
|
|
|
|
.include "decompress_fast_v2.s"
|
|
|
|
.include "gr_offsets.s"
|
|
|
|
.include "wait_keypressed.s"
|
|
|
|
|
|
|
|
;===============================================
|
|
|
|
; Variables
|
|
|
|
;===============================================
|
|
|
|
|
|
|
|
enter_name_string:
|
|
|
|
.asciiz "PLEASE ENTER A NAME:"
|
|
|
|
|
|
|
|
name:
|
|
|
|
.byte $0,$0,$0,$0,$0,$0,$0,$0
|
|
|
|
|
|
|
|
.include "graphics_title/tfv_title.inc"
|