2017-08-23 13:09:52 -04:00
|
|
|
.include "tfv_zp.inc"
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 23:09:49 -04:00
|
|
|
;================================
|
|
|
|
; Clear screen and setup graphics
|
|
|
|
;================================
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
jsr HOME
|
|
|
|
jsr set_gr_page0
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 23:09:49 -04:00
|
|
|
;===================================
|
|
|
|
; zero out the zero page that we use
|
|
|
|
;===================================
|
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
; memset()
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 23:09:49 -04:00
|
|
|
;===================================
|
2017-09-11 14:52:32 -04:00
|
|
|
; Clear top/bottom of page 0 and 1
|
2017-08-16 23:09:49 -04:00
|
|
|
;===================================
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-09-11 14:52:32 -04:00
|
|
|
jsr clear_screens
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
;==========================
|
|
|
|
; Do Opening
|
|
|
|
;==========================
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
jsr opening
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-06-27 00:55:41 -04:00
|
|
|
;======================
|
|
|
|
; show the title screen
|
|
|
|
;======================
|
|
|
|
|
2017-08-16 23:09:49 -04:00
|
|
|
jsr title_screen
|
2017-06-25 00:00:16 -04:00
|
|
|
|
2017-08-16 23:18:59 -04:00
|
|
|
;======================
|
|
|
|
; get name
|
|
|
|
;======================
|
2017-06-25 00:00:16 -04:00
|
|
|
|
2017-08-16 23:18:59 -04:00
|
|
|
jsr enter_name
|
2017-06-25 00:00:16 -04:00
|
|
|
|
2017-06-27 00:55:41 -04:00
|
|
|
;=====================
|
2017-08-16 23:18:59 -04:00
|
|
|
; Flying
|
2017-06-27 00:55:41 -04:00
|
|
|
;=====================
|
2017-06-25 00:00:16 -04:00
|
|
|
|
2017-08-16 23:18:59 -04:00
|
|
|
jsr flying_start
|
2017-05-12 16:35:52 -04:00
|
|
|
|
2017-09-12 21:56:11 -04:00
|
|
|
;=====================
|
|
|
|
; World Map
|
|
|
|
;=====================
|
|
|
|
|
|
|
|
jsr world_map
|
|
|
|
|
|
|
|
;=====================
|
|
|
|
; Game Over
|
|
|
|
;=====================
|
|
|
|
|
|
|
|
jsr game_over
|
2017-05-12 16:35:52 -04:00
|
|
|
|
2017-08-16 23:18:59 -04:00
|
|
|
;=====================
|
|
|
|
; All finished
|
|
|
|
;=====================
|
2017-05-12 16:35:52 -04:00
|
|
|
exit:
|
|
|
|
|
2017-05-06 19:29:19 -04:00
|
|
|
lda #$4
|
|
|
|
sta BASH
|
|
|
|
lda #$0
|
2017-05-12 14:29:21 -04:00
|
|
|
sta BASL ; restore to 0x400 (page 0)
|
|
|
|
; copy to 0x400 (page 0)
|
|
|
|
|
2017-05-12 16:35:52 -04:00
|
|
|
; call home
|
|
|
|
jsr HOME
|
|
|
|
|
2017-05-06 19:29:19 -04:00
|
|
|
|
|
|
|
; Return to BASIC?
|
|
|
|
rts
|
|
|
|
|
2017-05-12 14:29:21 -04:00
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
;===============================================
|
|
|
|
; External modules
|
|
|
|
;===============================================
|
2017-06-27 00:55:41 -04:00
|
|
|
|
2017-08-23 13:09:52 -04:00
|
|
|
.include "tfv_opener.s"
|
|
|
|
.include "tfv_utils.s"
|
|
|
|
.include "tfv_title.s"
|
|
|
|
.include "tfv_textentry.s"
|
2017-09-12 21:56:11 -04:00
|
|
|
.include "tfv_info.s"
|
2017-08-23 13:09:52 -04:00
|
|
|
.include "tfv_flying.s"
|
2017-09-12 21:56:11 -04:00
|
|
|
.include "tfv_worldmap.s"
|
2017-06-25 01:00:57 -04:00
|
|
|
|
2017-08-16 18:59:08 -04:00
|
|
|
;===============================================
|
|
|
|
; Variables
|
|
|
|
;===============================================
|
2017-06-25 00:00:16 -04:00
|
|
|
|
|
|
|
enter_name_string:
|
|
|
|
.asciiz "PLEASE ENTER A NAME:"
|
|
|
|
|
|
|
|
name:
|
|
|
|
.byte $0,$0,$0,$0,$0,$0,$0,$0
|
|
|
|
|
2017-05-12 16:35:52 -04:00
|
|
|
|
2017-05-12 14:29:21 -04:00
|
|
|
; waste memory with a lookup table
|
|
|
|
; maybe faster than using GBASCALC?
|
2017-06-25 00:00:16 -04:00
|
|
|
|
2017-05-12 14:29:21 -04:00
|
|
|
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
|
|
|
|
|
2017-08-23 13:25:44 -04:00
|
|
|
.include "tfv_sprites.inc"
|
2017-08-23 13:09:52 -04:00
|
|
|
.include "tfv_backgrounds.inc"
|