2017-08-23 17:09:52 +00:00
|
|
|
.include "tfv_zp.inc"
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-08-17 03:09:49 +00:00
|
|
|
;================================
|
|
|
|
; Clear screen and setup graphics
|
|
|
|
;================================
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
jsr HOME
|
|
|
|
jsr set_gr_page0
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-11-17 21:29:33 +00:00
|
|
|
lda #0
|
|
|
|
sta DISP_PAGE ; Forgot to set initially
|
|
|
|
; real hardware and AppleWin default
|
|
|
|
; to different values
|
|
|
|
|
2017-08-17 03:09:49 +00:00
|
|
|
;===================================
|
|
|
|
; zero out the zero page that we use
|
|
|
|
;===================================
|
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
; memset()
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-08-17 03:09:49 +00:00
|
|
|
;===================================
|
2017-09-11 18:52:32 +00:00
|
|
|
; Clear top/bottom of page 0 and 1
|
2017-08-17 03:09:49 +00:00
|
|
|
;===================================
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-09-11 18:52:32 +00:00
|
|
|
jsr clear_screens
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
;==========================
|
|
|
|
; Do Opening
|
|
|
|
;==========================
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
jsr opening
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-06-27 04:55:41 +00:00
|
|
|
;======================
|
|
|
|
; show the title screen
|
|
|
|
;======================
|
|
|
|
|
2017-08-17 03:09:49 +00:00
|
|
|
jsr title_screen
|
2017-06-25 04:00:16 +00:00
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
;======================
|
|
|
|
; get name
|
|
|
|
;======================
|
2017-06-25 04:00:16 +00:00
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
jsr enter_name
|
2017-06-25 04:00:16 +00:00
|
|
|
|
2017-06-27 04:55:41 +00:00
|
|
|
;=====================
|
2017-08-17 03:18:59 +00:00
|
|
|
; Flying
|
2017-06-27 04:55:41 +00:00
|
|
|
;=====================
|
2017-06-25 04:00:16 +00:00
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
jsr flying_start
|
2017-05-12 20:35:52 +00:00
|
|
|
|
2017-09-13 01:56:11 +00:00
|
|
|
;=====================
|
|
|
|
; World Map
|
|
|
|
;=====================
|
|
|
|
|
|
|
|
jsr world_map
|
|
|
|
|
|
|
|
;=====================
|
|
|
|
; Game Over
|
|
|
|
;=====================
|
|
|
|
|
|
|
|
jsr game_over
|
2017-05-12 20:35:52 +00:00
|
|
|
|
2017-08-17 03:18:59 +00:00
|
|
|
;=====================
|
|
|
|
; All finished
|
|
|
|
;=====================
|
2017-05-12 20:35:52 +00:00
|
|
|
exit:
|
|
|
|
|
2017-05-06 23:29:19 +00:00
|
|
|
lda #$4
|
|
|
|
sta BASH
|
|
|
|
lda #$0
|
2017-05-12 18:29:21 +00:00
|
|
|
sta BASL ; restore to 0x400 (page 0)
|
|
|
|
; copy to 0x400 (page 0)
|
|
|
|
|
2017-05-12 20:35:52 +00:00
|
|
|
; call home
|
|
|
|
jsr HOME
|
|
|
|
|
2017-05-06 23:29:19 +00:00
|
|
|
|
|
|
|
; Return to BASIC?
|
|
|
|
rts
|
|
|
|
|
2017-05-12 18:29:21 +00:00
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
;===============================================
|
|
|
|
; External modules
|
|
|
|
;===============================================
|
2017-06-27 04:55:41 +00:00
|
|
|
|
2017-08-23 17:09:52 +00:00
|
|
|
.include "tfv_opener.s"
|
|
|
|
.include "tfv_title.s"
|
|
|
|
.include "tfv_textentry.s"
|
|
|
|
.include "tfv_flying.s"
|
2017-09-13 01:56:11 +00:00
|
|
|
.include "tfv_worldmap.s"
|
2017-11-18 21:08:46 +00:00
|
|
|
.include "tfv_info.s"
|
2017-06-25 05:00:57 +00:00
|
|
|
|
2017-12-31 20:22:38 +00:00
|
|
|
.include "../asm_routines/gr_fast_clear.s"
|
|
|
|
.include "../asm_routines/gr_hlin.s"
|
2017-12-16 19:11:46 +00:00
|
|
|
.include "../asm_routines/pageflip.s"
|
|
|
|
.include "../asm_routines/gr_setpage.s"
|
|
|
|
.include "../asm_routines/keypress.s"
|
|
|
|
.include "../asm_routines/gr_putsprite.s"
|
|
|
|
.include "../asm_routines/text_print.s"
|
|
|
|
.include "../asm_routines/memset.s"
|
|
|
|
.include "../asm_routines/gr_vlin.s"
|
|
|
|
.include "../asm_routines/gr_copy.s"
|
|
|
|
.include "../asm_routines/gr_unrle.s"
|
2017-12-31 20:22:38 +00:00
|
|
|
.include "../asm_routines/gr_offsets.s"
|
2017-12-16 19:11:46 +00:00
|
|
|
|
2017-08-16 22:59:08 +00:00
|
|
|
;===============================================
|
|
|
|
; Variables
|
|
|
|
;===============================================
|
2017-06-25 04:00:16 +00:00
|
|
|
|
|
|
|
enter_name_string:
|
|
|
|
.asciiz "PLEASE ENTER A NAME:"
|
|
|
|
|
|
|
|
name:
|
|
|
|
.byte $0,$0,$0,$0,$0,$0,$0,$0
|
|
|
|
|
2017-05-12 20:35:52 +00:00
|
|
|
|
2017-08-23 17:25:44 +00:00
|
|
|
.include "tfv_sprites.inc"
|
2017-08-23 17:09:52 +00:00
|
|
|
.include "tfv_backgrounds.inc"
|