2017-12-15 21:19:01 +00:00
|
|
|
.include "zp.inc"
|
|
|
|
|
|
|
|
;================================
|
|
|
|
; Clear screen and setup graphics
|
|
|
|
;================================
|
|
|
|
|
|
|
|
jsr set_gr_page0
|
|
|
|
|
2017-12-18 03:03:20 +00:00
|
|
|
lda #$4
|
2017-12-17 05:35:32 +00:00
|
|
|
sta DRAW_PAGE
|
|
|
|
|
2017-12-21 19:59:06 +00:00
|
|
|
; Initialize the 2kB of multiply lookup tables
|
|
|
|
jsr init_multiply_tables
|
|
|
|
|
|
|
|
;================================
|
|
|
|
; Main Loop
|
|
|
|
;================================
|
|
|
|
|
|
|
|
main_loop:
|
|
|
|
jsr title_routine
|
|
|
|
|
|
|
|
jsr checkerboard_demo
|
|
|
|
jsr island_demo
|
|
|
|
jsr star_demo
|
|
|
|
|
|
|
|
jmp main_loop
|
|
|
|
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; Checkerboard Demo
|
|
|
|
;===========================
|
|
|
|
checkerboard_demo:
|
|
|
|
; initialize
|
|
|
|
lda #>sky_background
|
|
|
|
sta INH
|
|
|
|
lda #<sky_background
|
|
|
|
sta INL
|
|
|
|
jsr decompress_scroll
|
|
|
|
|
2017-12-22 02:56:57 +00:00
|
|
|
lda #0
|
|
|
|
sta DRAW_BLUE_SKY
|
|
|
|
|
|
|
|
|
|
|
|
lda #$20
|
|
|
|
sta nomatch
|
|
|
|
lda #<lookup_checkerboard_map
|
|
|
|
sta nomatch+1
|
|
|
|
lda #>lookup_checkerboard_map
|
|
|
|
sta nomatch+2
|
|
|
|
lda #$4c
|
|
|
|
sta nomatch+3
|
|
|
|
lda #<match
|
|
|
|
sta nomatch+4
|
|
|
|
lda #>match
|
|
|
|
sta nomatch+5
|
|
|
|
|
2017-12-21 19:59:06 +00:00
|
|
|
jsr mode7_flying
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; Island Demo
|
|
|
|
;===========================
|
|
|
|
island_demo:
|
|
|
|
; initialize
|
|
|
|
|
2017-12-22 02:56:57 +00:00
|
|
|
lda #1
|
|
|
|
sta DRAW_BLUE_SKY
|
|
|
|
|
|
|
|
lda #$A5 ; fix the code that was self-modified
|
|
|
|
sta nomatch ; away in checkerboard code
|
|
|
|
lda #$6A
|
|
|
|
sta nomatch+1
|
|
|
|
lda #$8D
|
|
|
|
sta nomatch+2
|
|
|
|
lda #<(spacex_label+1)
|
|
|
|
sta nomatch+3
|
|
|
|
lda #>(spacex_label+1)
|
|
|
|
sta nomatch+4
|
|
|
|
lda #$29
|
|
|
|
sta nomatch+5
|
|
|
|
|
2017-12-21 19:59:06 +00:00
|
|
|
jsr mode7_flying
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; Star Demo
|
|
|
|
;===========================
|
|
|
|
star_demo:
|
|
|
|
; initialize
|
|
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; Title routine
|
|
|
|
;===========================
|
|
|
|
|
|
|
|
title_routine:
|
|
|
|
bit FULLGR
|
|
|
|
jsr clear_screens_notext ; clear top/bottom of page 0/1
|
|
|
|
|
2017-12-15 21:19:01 +00:00
|
|
|
lda #<demo_rle
|
|
|
|
sta GBASL
|
|
|
|
lda #>demo_rle
|
|
|
|
sta GBASH
|
|
|
|
|
2017-12-17 05:35:32 +00:00
|
|
|
; Load offscreen
|
|
|
|
lda #<$c00
|
2017-12-15 21:19:01 +00:00
|
|
|
sta BASL
|
2017-12-17 05:35:32 +00:00
|
|
|
lda #>$c00
|
2017-12-15 21:19:01 +00:00
|
|
|
sta BASH
|
|
|
|
|
|
|
|
jsr load_rle_gr
|
|
|
|
|
2017-12-18 04:06:49 +00:00
|
|
|
;==========
|
|
|
|
; Fade in
|
|
|
|
;==========
|
|
|
|
|
2017-12-18 03:18:24 +00:00
|
|
|
jsr fade_in
|
|
|
|
|
2017-12-18 04:06:49 +00:00
|
|
|
;==========================================
|
|
|
|
; Make sure page0 and page1 show same image
|
|
|
|
;==========================================
|
|
|
|
|
|
|
|
jsr gr_copy_to_current
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; Scroll the message
|
|
|
|
;===================
|
2017-12-18 03:18:24 +00:00
|
|
|
|
2017-12-18 06:05:05 +00:00
|
|
|
; Scroll "BY DEATER... A VMW PRODUCTION"
|
2017-12-18 04:40:52 +00:00
|
|
|
|
|
|
|
lda #>deater_scroll
|
|
|
|
sta INH
|
|
|
|
lda #<deater_scroll
|
|
|
|
sta INL
|
|
|
|
|
2017-12-18 06:05:05 +00:00
|
|
|
lda #40 ; scroll at bottom of screen
|
2017-12-18 04:40:52 +00:00
|
|
|
sta CV
|
|
|
|
|
2017-12-18 06:05:05 +00:00
|
|
|
jsr gr_scroll
|
|
|
|
|
|
|
|
; Scroll "* APPLE ][ FOREVER *"
|
|
|
|
|
|
|
|
lda #>a2_scroll
|
|
|
|
sta INH
|
|
|
|
lda #<a2_scroll
|
|
|
|
sta INL
|
2017-12-18 04:40:52 +00:00
|
|
|
|
|
|
|
jsr gr_scroll
|
2017-12-18 04:06:49 +00:00
|
|
|
|
|
|
|
;=============
|
|
|
|
; Fade out
|
|
|
|
;=============
|
2017-12-18 03:18:24 +00:00
|
|
|
jsr fade_out
|
|
|
|
|
2017-12-21 19:59:06 +00:00
|
|
|
rts
|
2017-12-18 03:18:24 +00:00
|
|
|
|
|
|
|
|
2017-12-15 21:19:01 +00:00
|
|
|
;===============================================
|
|
|
|
; External modules
|
|
|
|
;===============================================
|
|
|
|
|
2017-12-17 05:35:32 +00:00
|
|
|
.include "../asm_routines/gr_unrle.s"
|
2017-12-31 20:22:38 +00:00
|
|
|
.include "../asm_routines/gr_fast_clear.s"
|
|
|
|
.include "../asm_routines/gr_hlin.s"
|
2017-12-16 18:52:00 +00:00
|
|
|
.include "../asm_routines/gr_setpage.s"
|
2017-12-18 03:03:20 +00:00
|
|
|
.include "../asm_routines/pageflip.s"
|
2017-12-18 03:35:21 +00:00
|
|
|
.include "../asm_routines/gr_fade.s"
|
2017-12-18 04:06:49 +00:00
|
|
|
.include "../asm_routines/gr_copy.s"
|
2017-12-18 05:40:13 +00:00
|
|
|
.include "../asm_routines/gr_scroll.s"
|
2017-12-31 20:22:38 +00:00
|
|
|
.include "../asm_routines/gr_offsets.s"
|
2017-12-15 21:19:01 +00:00
|
|
|
|
2017-12-21 19:59:06 +00:00
|
|
|
.include "mode7.s"
|
|
|
|
|
2017-12-15 21:19:01 +00:00
|
|
|
.include "mode7_demo_backgrounds.inc"
|
2017-12-18 04:06:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
;===============================================
|
|
|
|
; Variables
|
|
|
|
;===============================================
|
|
|
|
|
2017-12-18 06:05:05 +00:00
|
|
|
.include "deater.scrolltext"
|
|
|
|
.include "a2.scrolltext"
|
2017-12-18 04:06:49 +00:00
|
|
|
|
|
|
|
|