146 lines
2.5 KiB
ArmAsm
Raw Normal View History

2021-03-22 22:05:03 -04:00
;==========================
; OOTW -- The Famous Intro
;==========================
2019-01-26 21:27:20 -05:00
.include "../zp.inc"
.include "../hardware.inc"
2019-01-26 21:52:00 -05:00
2019-01-26 21:27:20 -05:00
intro:
2019-03-03 14:05:00 -05:00
lda #0
sta INTRO_REPEAT ; by default, don't repeat
bit KEYRESET ; clear keyboard buffer
2019-01-26 21:27:20 -05:00
2019-03-03 14:05:00 -05:00
repeat_intro:
2019-01-26 21:52:00 -05:00
;===========================
; Enable graphics
bit LORES ; 40x40 lo-res
2019-01-26 21:52:00 -05:00
bit SET_GR
bit FULLGR ; full screen
2019-01-26 21:52:00 -05:00
;===========================
; Setup pages
2019-01-26 21:52:00 -05:00
lda #4 ; page to draw
2019-01-26 21:52:00 -05:00
sta DRAW_PAGE
lda #0 ; page to display
2019-01-26 21:52:00 -05:00
sta DISP_PAGE
; jmp tunnel1 ; debug, skip ahead
2019-02-05 23:46:31 -05:00
2021-03-22 22:05:03 -04:00
;===============================
; Opening scene with car
2021-03-22 22:05:03 -04:00
jsr intro_01_building
2021-03-22 22:26:56 -04:00
;===============================
; Walking to door
2019-02-06 00:32:54 -05:00
2021-03-22 22:26:56 -04:00
jsr intro_02_outer_door
2019-02-06 00:32:54 -05:00
2021-03-22 22:26:56 -04:00
;===============================
; Elevator
2019-03-02 11:42:59 -05:00
2021-03-22 22:26:56 -04:00
jsr intro_03_elevator
2019-01-27 00:20:20 -05:00
2021-03-22 22:39:48 -04:00
;===============================
; Keypad
2019-02-12 23:19:49 -05:00
2021-03-22 22:39:48 -04:00
jsr intro_04_keypad
2019-02-12 23:19:49 -05:00
2021-03-22 22:48:39 -04:00
;===============================
; Scanner
2019-02-12 23:19:49 -05:00
2021-03-22 22:48:39 -04:00
jsr intro_05_scanner
2019-03-02 11:42:59 -05:00
2021-03-22 22:58:32 -04:00
;===============================
; Nuclear Physics, part 1
2019-01-26 21:52:00 -05:00
2021-03-22 22:58:32 -04:00
jsr intro_06_console_part1
2021-03-22 23:02:27 -04:00
;===============================
; Drinking some Soda
2019-01-26 21:52:00 -05:00
2021-03-22 23:02:27 -04:00
jsr intro_07_soda
2021-03-22 22:58:32 -04:00
;===============================
; Nuclear Physics, part 2
2021-03-22 22:58:32 -04:00
jsr intro_06_console_part2
2019-01-27 12:42:52 -05:00
2021-03-22 23:06:58 -04:00
;===============================
; Lightning outside
2021-03-22 23:06:58 -04:00
jsr intro_08_lightning
2021-03-22 23:12:51 -04:00
;===============================
; Down in the tunnels
2021-03-22 23:12:51 -04:00
jsr intro_09_tunnel
2019-01-27 00:20:20 -05:00
2021-03-22 23:16:36 -04:00
;===============================
; Zapped
2021-03-22 23:16:36 -04:00
jsr intro_10_gone
2019-03-03 14:05:00 -05:00
; see if R pressed, if so, repeat
; otherwise, return and indicate we want to start the game
2019-01-27 00:20:20 -05:00
lda KEYPRESS
2019-03-03 14:05:00 -05:00
bpl check_repeat ; if no keypress, jump ahead
and #$7f ; clear high bit
cmp #'R'
bne check_repeat
lda INTRO_REPEAT
eor #$1
sta INTRO_REPEAT
check_repeat:
bit KEYRESET ; reset keyboard strobe
lda INTRO_REPEAT
beq done_intro
jmp repeat_intro
2019-03-03 14:05:00 -05:00
done_intro:
lda #1 ; start game
sta WHICH_LOAD
2019-01-26 21:52:00 -05:00
2019-01-26 21:27:20 -05:00
rts
.include "../gr_pageflip.s"
;.include "../gr_unrle.s"
;.include "../lz4_decode.s"
.include "../decompress_fast_v2.s"
.include "../gr_copy.s"
.include "../gr_offsets.s"
.include "../gr_overlay.s"
.include "../gr_vlin.s"
.include "../gr_plot.s"
.include "../gr_fast_clear.s"
.include "../gr_putsprite.s"
.include "../text_print.s"
.include "../gr_run_sequence.s"
2019-02-18 13:04:02 -05:00
2021-03-22 22:05:03 -04:00
;========================
; load all the sub-parts
;========================
.include "intro_01_building.s"
2021-03-22 22:26:56 -04:00
.include "intro_02_outer_door.s"
.include "intro_03_elevator.s"
2021-03-22 22:39:48 -04:00
.include "intro_04_keypad.s"
2021-03-22 22:48:39 -04:00
.include "intro_05_scanner.s"
2021-03-22 22:58:32 -04:00
.include "intro_06_console.s"
2021-03-22 23:02:27 -04:00
.include "intro_07_soda.s"
2021-03-22 23:06:58 -04:00
.include "intro_08_lightning.s"
2021-03-22 23:12:51 -04:00
.include "intro_09_tunnel.s"
2021-03-22 23:16:36 -04:00
.include "intro_10_gone.s"