dos33fsprogs/ootw/intro.s

1891 lines
28 KiB
ArmAsm
Raw Normal View History

2019-01-27 02:27:20 +00:00
;=====================================
; Intro
2019-01-27 02:52:00 +00:00
.include "zp.inc"
.include "hardware.inc"
2019-01-27 02:27:20 +00:00
intro:
2019-01-27 02:52:00 +00:00
;===========================
; Enable graphics
bit LORES
bit SET_GR
bit FULLGR
;===========================
; Setup pages
2019-01-27 02:52:00 +00:00
lda #4
2019-01-27 02:52:00 +00:00
sta DRAW_PAGE
lda #0
2019-01-27 02:52:00 +00:00
sta DISP_PAGE
2019-02-17 20:13:13 +00:00
jmp scanner2
2019-02-06 04:46:31 +00:00
2019-01-27 02:52:00 +00:00
;===============================
;===============================
; Opening scene with car
;===============================
;===============================
;=============================
; Load background to $c00
lda #>(building_rle)
sta GBASH
lda #<(building_rle)
sta GBASL
lda #$0c ; load to $c00
2019-01-27 02:52:00 +00:00
jsr load_rle_gr
;=================================
; copy $c00 to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip
2019-02-03 17:06:45 +00:00
;==================================
; draw the car driving up
2019-02-03 17:06:45 +00:00
lda #<building_sequence
sta INTRO_LOOPL
lda #>building_sequence
sta INTRO_LOOPH
2019-02-03 17:06:45 +00:00
jsr run_sequence
2019-02-03 17:06:45 +00:00
;==================================
; Load building with car background
lda #>(building_car_rle)
sta GBASH
lda #<(building_car_rle)
sta GBASL
lda #$0c ; load to $c00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
2019-02-03 17:06:45 +00:00
;==================================
; draw getting out of the car
2019-02-03 17:06:45 +00:00
lda #<outtacar_sequence
sta INTRO_LOOPL
lda #>outtacar_sequence
sta INTRO_LOOPH
2019-02-03 17:06:45 +00:00
jsr run_sequence
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Walk into door
;===============================
;===============================
2019-01-27 02:52:00 +00:00
2019-02-04 06:08:04 +00:00
;=============================
; Load background to $c00
lda #>(outer_door_rle)
sta GBASH
lda #<(outer_door_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
2019-02-05 04:26:55 +00:00
;==================================
; draw feet going into door
lda #<feet_sequence
sta INTRO_LOOPL
lda #>feet_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Elevator going down
;===============================
;===============================
2019-02-06 04:46:31 +00:00
elevator:
2019-01-27 05:20:20 +00:00
;=============================
2019-02-06 04:46:31 +00:00
; Load background to $c00 and $1000
2019-01-27 05:20:20 +00:00
lda #>(elevator_rle)
sta GBASH
lda #<(elevator_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 05:20:20 +00:00
jsr load_rle_gr
2019-02-06 04:46:31 +00:00
lda #>(elevator_rle)
sta GBASH
lda #<(elevator_rle)
sta GBASL
lda #$10 ; load to off-screen $c00
jsr load_rle_gr
2019-01-27 05:20:20 +00:00
jsr gr_copy_to_current
2019-02-06 04:46:31 +00:00
lda #$66
sta COLOR
; elevator outer door
ldx #39
stx V2
ldx #4
ldy #14
jsr vlin ; X, V2 at Y
ldx #35
stx V2
ldx #7
ldy #18
jsr vlin ; X, V2 at Y
; elevator inner door
ldx #2
stx ELEVATOR_COUNT
elevator_middle:
ldx #38
stx V2
ldx #5
ldy #15
jsr vlin ; X, V2 at Y
ldx #36
stx V2
ldx #6
ldy #17
jsr vlin ; X, V2 at Y
elevator_inner:
ldx #37
stx V2
ldx #5
ldy #16
jsr vlin ; X, V2 at Y
2019-01-27 05:20:20 +00:00
jsr page_flip
2019-02-06 04:46:31 +00:00
2019-01-27 05:20:20 +00:00
jsr gr_copy_to_current
2019-02-06 04:46:31 +00:00
ldx #50
jsr long_wait
dec ELEVATOR_COUNT
lda ELEVATOR_COUNT
beq elevator_inner
cmp #1
beq elevator_middle
; door closed
jsr page_flip
ldx #100
jsr long_wait
;======================
; yellow line goes down
;======================
lda #0
sta COLOR
lda #5
sta V2
yellow_line_down:
jsr gr_copy_to_current
ldx #5
ldy #16
jsr vlin ; X, V2 at Y
jsr page_flip
ldx #12
jsr long_wait
inc V2
lda V2
cmp #38
bne yellow_line_down
lda DRAW_PAGE
pha
lda #$c ; erase yellow line
sta DRAW_PAGE ; on page $1000 version
ldx #5
ldy #16
jsr vlin ; X, V2 at Y
pla
sta DRAW_PAGE
;========================
; change floor indicators
;========================
lda #$33
sta COLOR
lda #5
sta V2
; 16,1
jsr gr_copy_to_current_1000
ldx #16
lda #1
jsr plot
jsr page_flip
ldx #150
jsr long_wait
; 18,2
jsr gr_copy_to_current_1000
ldx #18
lda #2
jsr plot
jsr page_flip
ldx #150
jsr long_wait
; 14,2
jsr gr_copy_to_current_1000
ldx #14
lda #2
jsr plot
jsr page_flip
ldx #150
jsr long_wait
; 16,3
jsr gr_copy_to_current_1000
ldx #16
lda #3
jsr plot
jsr page_flip
ldx #150
jsr long_wait
; 18,4
jsr gr_copy_to_current_1000
ldx #18
lda #4
jsr plot
jsr page_flip
ldx #150
jsr long_wait
;====================
; dark elevator
;====================
; clear $c00 to black
2019-01-27 05:20:20 +00:00
2019-02-06 04:46:31 +00:00
lda DRAW_PAGE
pha
lda #$8
sta DRAW_PAGE
jsr clear_all
pla
sta DRAW_PAGE
; blue from 20, 30 - 20,34 and yellow (brown?) from 20,0 to 20,30
; scrolls down until all yellow
lda #30
sta ELEVATOR_COUNT
going_down_loop:
jsr gr_copy_to_current ; copy black screen in
; draw the yellow part
lda #$DD
sta COLOR
lda ELEVATOR_COUNT
sta V2
ldx #0
ldy #20
jsr vlin ; X, V2 at Y
lda #$22 ; draw the blue part
sta COLOR
lda ELEVATOR_COUNT
clc
adc #4
cmp #40
bmi not_too_big
lda #40
not_too_big:
sta V2
ldx ELEVATOR_COUNT
ldy #20
jsr vlin ; X, V2 at Y
jsr page_flip
2019-02-07 03:01:59 +00:00
ldx #8 ; pause
2019-02-06 04:46:31 +00:00
jsr long_wait
inc ELEVATOR_COUNT
lda ELEVATOR_COUNT
cmp #40
bne going_down_loop
;=====================
; all yellow for a bit
;=====================
jsr gr_copy_to_current ; copy black screen in
lda #$DD
sta COLOR
lda #40
sta V2
ldx #0
ldy #20
jsr vlin ; X, V2 at Y
jsr page_flip
ldx #100 ; wait a bit
jsr long_wait
; single blue dot
; solid blue line 10 later
lda #2
sta ELEVATOR_CYCLE
going_down_repeat:
lda #1
sta ELEVATOR_COUNT
going_down_blue:
jsr gr_copy_to_current ; copy black screen in
; draw the blue part
lda #$22
sta COLOR
lda ELEVATOR_COUNT
sta V2
ldx #0
ldy #20
jsr vlin ; X, V2 at Y
gdb_smc:
lda #$dd ; draw the blue part
sta COLOR
lda #40
sta V2
ldx ELEVATOR_COUNT
ldy #20
jsr vlin ; X, V2 at Y
jsr page_flip
2019-02-07 03:01:59 +00:00
ldx #8 ; pause
2019-02-06 04:46:31 +00:00
jsr long_wait
inc ELEVATOR_COUNT
lda ELEVATOR_COUNT
cmp #40
bne going_down_blue
dec ELEVATOR_CYCLE
beq elevator_exit
lda #1
sta ELEVATOR_COUNT
going_down_black:
jsr gr_copy_to_current ; copy black screen in
; draw the blue part
lda #$00
sta COLOR
lda ELEVATOR_COUNT
sta V2
ldx #0
ldy #20
jsr vlin ; X, V2 at Y
lda #$22 ; draw the blue part
sta COLOR
lda #40
sta V2
ldx ELEVATOR_COUNT
ldy #20
jsr vlin ; X, V2 at Y
jsr page_flip
2019-02-07 03:01:59 +00:00
ldx #8 ; pause
2019-02-06 04:46:31 +00:00
jsr long_wait
inc ELEVATOR_COUNT
lda ELEVATOR_COUNT
cmp #40
bne going_down_black
lda #$00
sta gdb_smc+1
jmp going_down_repeat
; black, 2, blue, black about 20
; blue until hit bottom, doors open
2019-02-07 03:01:59 +00:00
2019-02-06 04:46:31 +00:00
elevator_exit:
ldx #100 ; pause
jsr long_wait
2019-01-27 05:20:20 +00:00
2019-02-07 03:01:59 +00:00
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Getting out of Elevator
;===============================
;===============================
;=============================
; Load background to $c00
lda #>(off_elevator_rle)
sta GBASH
lda #<(off_elevator_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 05:20:20 +00:00
jsr load_rle_gr
2019-02-07 03:01:59 +00:00
lda #>(walking00_rle)
sta GBASH
lda #<(walking00_rle)
sta GBASL
lda #$10 ; load to off-screen $1000
jsr load_rle_gr
2019-02-06 05:32:54 +00:00
lda #10
sta ELEVATOR_COUNT
elevator_open_loop:
2019-02-07 03:01:59 +00:00
jsr gr_overlay ; note: overwrites color
lda #$00
sta COLOR
2019-02-06 05:32:54 +00:00
2019-02-07 03:01:59 +00:00
; Would have liked to have a central purple stripe, but not easy
2019-02-06 05:32:54 +00:00
; 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
lda ELEVATOR_COUNT
sta ELEVATOR_CYCLE
elevator_inner_loop:
lda #9
clc
adc ELEVATOR_CYCLE
tay
lda #40
sta V2
ldx #0
jsr vlin ; X, V2 at Y
sec
lda #30
sbc ELEVATOR_CYCLE
tay
lda #40
sta V2
ldx #0
jsr vlin ; X, V2 at Y
dec ELEVATOR_CYCLE
bne elevator_inner_loop
2019-02-06 04:46:31 +00:00
2019-01-27 05:20:20 +00:00
jsr page_flip
2019-02-06 04:46:31 +00:00
2019-02-07 04:08:04 +00:00
ldx #25
jsr long_wait ; pause
2019-02-06 05:32:54 +00:00
dec ELEVATOR_COUNT
bne elevator_open_loop
2019-02-07 03:01:59 +00:00
;==================================
; draw walking off the elevator
2019-02-06 05:32:54 +00:00
2019-02-07 03:01:59 +00:00
lda #<walking_sequence
sta INTRO_LOOPL
lda #>walking_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-02-06 05:32:54 +00:00
2019-02-07 04:08:04 +00:00
;======================================
; make background black and pause a bit
2019-02-06 05:32:54 +00:00
2019-02-07 04:08:04 +00:00
jsr clear_all
jsr page_flip
2019-02-06 05:32:54 +00:00
2019-02-07 04:08:04 +00:00
ldx #80
jsr long_wait
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Keycode
;===============================
;===============================
2019-02-08 03:02:56 +00:00
keypad:
2019-02-07 04:08:04 +00:00
;=============================
; Load background to $c00
lda #>(scanner_door_rle)
sta GBASH
lda #<(scanner_door_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
lda #<approach_sequence
sta INTRO_LOOPL
lda #>approach_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-01-27 20:30:00 +00:00
;=============================
; Load background to $c00
lda #>(keypad_rle)
sta GBASH
lda #<(keypad_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 20:30:00 +00:00
jsr load_rle_gr
2019-02-08 03:02:56 +00:00
;==================================
; draw walking off the elevator
2019-01-27 20:30:00 +00:00
2019-02-08 03:02:56 +00:00
lda #<keypad_sequence
sta INTRO_LOOPL
lda #>keypad_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-02-07 04:08:04 +00:00
2019-01-27 20:30:00 +00:00
2019-02-13 04:19:49 +00:00
;==================================
; doop opening sequence
lda #>(scanner_door_rle)
sta GBASH
lda #<(scanner_door_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
lda #<opening_sequence
sta INTRO_LOOPL
lda #>opening_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Scanner
;===============================
;===============================
2019-02-17 03:00:06 +00:00
scanner:
2019-01-27 20:30:00 +00:00
lda #>(scanner_rle)
sta GBASH
lda #<(scanner_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 20:30:00 +00:00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
2019-02-13 05:46:11 +00:00
lda #<scanning_sequence
sta INTRO_LOOPL
lda #>scanning_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-01-27 20:30:00 +00:00
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Spinny DNA / Key
;===============================
;===============================
2019-01-27 02:52:00 +00:00
2019-02-17 20:13:13 +00:00
scanner2:
2019-02-15 03:00:00 +00:00
lda #>(ai_bg_rle)
sta GBASH
lda #<(ai_bg_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
2019-02-17 16:04:16 +00:00
jsr clear_bottom
bit TEXTGR ; split graphics/text
jsr gr_copy_to_current_40x40
2019-02-15 03:00:00 +00:00
jsr page_flip
jsr clear_bottom
2019-02-17 18:37:24 +00:00
;=============================
2019-02-15 06:10:17 +00:00
; Identification (nothing)
2019-02-17 18:37:24 +00:00
;=============================
2019-02-15 06:10:17 +00:00
2019-02-17 18:37:24 +00:00
lda #0
sta DNA_OUT
sta DNA_PROGRESS
2019-02-15 06:10:17 +00:00
lda #<ai_sequence
sta INTRO_LOOPL
lda #>ai_sequence
sta INTRO_LOOPH
jsr run_sequence_static
; slices / | - / nothing (pause)
; more slices / | - / nothing (pause)
; small circle / | - / nothing (pause)
; big circle / | - / nothing (pause)
2019-02-17 18:37:24 +00:00
2019-02-17 19:15:15 +00:00
; jsr gr_copy_to_current_40x40
; jsr draw_dna
; jsr page_flip
2019-02-17 18:37:24 +00:00
; approx one rotation until "Good evening"
; two rotation, then switch to key + Ferrari
; three rotations, then done
; - !!! DNA START 1 line
; / !!! DNA start 1 line
; !!! DNA 2 lines
2019-02-15 06:10:17 +00:00
; DNA 5 lines
; Good evening professor.
; DNA all lines
2019-02-17 18:37:24 +00:00
; Triggers:
; + DNA starts midway through big circle
; + Good evening printed at DNA_OUT=5
; + Switch to key, print ferrari
; Key |
2019-02-15 06:10:17 +00:00
; I see you have driven here in your \ Ferrari.
; Key - / nothing (pause)
2019-02-15 06:10:17 +00:00
2019-02-17 20:13:13 +00:00
ldx #35
spin_on_key:
txa
pha
jsr draw_dna
jsr page_flip
pla
tax
lda #250
jsr WAIT
dex
bne spin_on_key
;uz_loop:
; lda KEYPRESS
; bpl uz_loop
; bit KEYRESET
2019-01-27 02:52:00 +00:00
2019-01-27 20:30:00 +00:00
;===============================
; Sitting at Desk
;===============================
2019-01-27 02:52:00 +00:00
2019-02-16 05:24:24 +00:00
lda #>(desktop_rle)
2019-01-27 20:30:00 +00:00
sta GBASH
2019-02-16 05:24:24 +00:00
lda #<(desktop_rle)
2019-01-27 20:30:00 +00:00
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 20:30:00 +00:00
jsr load_rle_gr
jsr gr_copy_to_current
2019-02-17 16:04:16 +00:00
bit FULLGR ; back to full graphics
2019-01-27 20:30:00 +00:00
jsr page_flip
;=================================
2019-02-15 06:10:17 +00:00
; Display rises up
;=================================
2019-02-16 19:11:50 +00:00
lda #<powerup_sequence
sta INTRO_LOOPL
lda #>powerup_sequence
sta INTRO_LOOPH
2019-02-15 06:10:17 +00:00
2019-02-16 19:11:50 +00:00
jsr run_sequence
2019-02-17 20:13:13 +00:00
ldx #80 ; pause a bit
jsr long_wait
;=================================
2019-02-15 06:10:17 +00:00
; Zoom in, mouse move
;=================================
; FIXME: shimmery edges to display?
lda #>(desktop_bg_rle)
sta GBASH
lda #<(desktop_bg_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
lda #<cursor_sequence
sta INTRO_LOOPL
lda #>cursor_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-02-15 06:10:17 +00:00
2019-02-17 20:13:13 +00:00
ldx #40 ; pause a bit
jsr long_wait
2019-02-15 06:10:17 +00:00
2019-01-27 20:30:00 +00:00
;===============================
; Peanut OS
;===============================
; 1 2 3
; 0123456789012345678901234567890123456789
;
; Copyright (c) 1977 Peanut Computer, Inc.
2019-02-15 06:10:17 +00:00
; All rights reserved.
;
; CDOS Version 5.01
;
; > #
lda #$a0
jsr clear_top_a
jsr clear_bottom
lda #<peanut
sta OUTL
lda #>peanut
sta OUTH
2019-02-16 23:11:47 +00:00
jsr move_and_print_list
jsr page_flip
bit SET_TEXT
2019-02-16 23:00:02 +00:00
; RUN PROJECT 23# (typed)
; #
peanut_loop:
lda KEYPRESS
bpl peanut_loop
bit KEYRESET
2019-02-16 23:11:47 +00:00
2019-01-27 20:30:00 +00:00
;===============================
; Particle Accelerator Screen
;===============================
2019-01-27 02:52:00 +00:00
2019-02-15 06:10:17 +00:00
; MODIFICATION OF PARAMETERS
; RELATING TO PARTICLE
; ACCELERATOR (SYNCHOTRON).
2019-02-17 03:00:06 +00:00
;____________ E: 23%
; ROOM 3 X:\ g: .005
; : :
; : : RK: 77.2L
; : :
;___________:_: opt: g+
; ROOM 1 X: :
; : : Shield:
; : : 1: OFF
; : : 2: ON
; : : 3: ON
; : :
; : : P^: 1
; __________: :
;/__________|/
2019-02-16 23:11:47 +00:00
lda #$a0
jsr clear_top_a
jsr clear_bottom
lda #<accelerator
sta OUTL
lda #>accelerator
sta OUTH
jsr move_and_print_list
jsr page_flip
2019-02-15 06:10:17 +00:00
; cursor down, change g+ to g-
; FLASH: RUN EXPERIMENT ?
; Y
2019-02-17 03:00:06 +00:00
;======================
; Accelerate
;======================
2019-02-17 16:04:16 +00:00
bit SET_GR
2019-02-17 03:00:06 +00:00
lda #>(collider_ui_rle)
sta GBASH
lda #<(collider_ui_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
2019-02-15 06:10:17 +00:00
; --- Theoretical study ---
;
; - Phase 0:
; INJECTION of particles
; into synchrotron
; dark blue going around
; - Phase 1:
; Particle ACCELERATION.
;
; 5 times around?
; - Phase 2:
; EJECTION of particles
; on the shield.
; smash on shield
; A N A L Y S I S
; - RESULT:
; Probability of creating:
; ANTIMATTER: 91.V %
; NEUTRINO 27: 0.04 %
; NEUTRINO 424: 18 %
; Practical verification Y/N ?
; THE EXPERIMENT WILL BEGIN IN 20 SECONDS
; 19, 18, 17
2019-02-16 23:11:47 +00:00
peanut_loop2:
lda KEYPRESS
bpl peanut_loop2
bit KEYRESET
2019-02-15 06:10:17 +00:00
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Opening Soda
;===============================
;===============================
2019-02-17 16:04:16 +00:00
lda #>(soda_bg_rle)
2019-01-27 20:30:00 +00:00
sta GBASH
2019-02-17 16:04:16 +00:00
lda #<(soda_bg_rle)
2019-01-27 20:30:00 +00:00
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 20:30:00 +00:00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
2019-02-17 16:04:16 +00:00
lda #<soda_sequence
sta INTRO_LOOPL
lda #>soda_sequence
sta INTRO_LOOPH
jsr run_sequence
2019-01-27 20:30:00 +00:00
open_soda_loop:
lda KEYPRESS
bpl open_soda_loop
bit KEYRESET
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Drinking Soda
;===============================
;===============================
;=============================
; Load background to $c00
lda #>(drinking_rle)
sta GBASH
lda #<(drinking_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 05:20:20 +00:00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
drinking_loop:
lda KEYPRESS
bpl drinking_loop
bit KEYRESET
2019-01-27 02:52:00 +00:00
2019-01-27 17:42:52 +00:00
;===============================
;===============================
; More crazy screen
;===============================
;===============================
2019-01-27 02:52:00 +00:00
2019-02-15 06:10:17 +00:00
; THE EXPERIMENT WILL BEGIN IN 5 SECONDS
; Shield 9A.5F Ok
; Flux % 5.0177 Ok
; CDI Vector ok
; %%%ddd ok
; Race-Track ok
; -----REPEAT
; 4 SECONDS
; Shield "
; -----REPEAT
; 3 SECONDS
; Sheild "
; -----REPEAT
; 2 SECONDS
; 1 SECONDS (at CDI Vector)
; 0 SECONDS (at %%%)
; EXPERIMENT LINES GOES AWAY
; Stop printing at race track
; dark blue going around track
2019-01-27 17:42:52 +00:00
lda #>(collider_ui_rle)
sta GBASH
lda #<(collider_ui_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 17:42:52 +00:00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
collider_ui_loop:
lda KEYPRESS
bpl collider_ui_loop
bit KEYRESET
;===============================
;===============================
; Thunderstorm Outside
;===============================
;===============================
2019-02-16 23:00:02 +00:00
lda #>(building_car_rle)
sta GBASH
2019-02-16 23:00:02 +00:00
lda #<(building_car_rle)
sta GBASL
lda #$c ; load to off-screen $c00
jsr load_rle_gr
jsr gr_copy_to_current
jsr page_flip
outside_loop:
lda KEYPRESS
bpl outside_loop
bit KEYRESET
2019-01-27 17:42:52 +00:00
;===============================
;===============================
; Tunnel 1
;===============================
;===============================
lda #>(tunnel1_rle)
sta GBASH
lda #<(tunnel1_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 17:42:52 +00:00
jsr load_rle_gr
;=================================
; copy $c00 to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
tunnel1_loop:
lda KEYPRESS
bpl tunnel1_loop
bit KEYRESET
2019-01-27 02:52:00 +00:00
2019-01-27 05:20:20 +00:00
;===============================
;===============================
; Tunnel 2
;===============================
;===============================
;=============================
; Load background to $c00
lda #>(tunnel2_rle)
sta GBASH
lda #<(tunnel2_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 05:20:20 +00:00
jsr load_rle_gr
;=================================
; copy $c00 to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
tunnel2_loop:
lda KEYPRESS
bpl tunnel2_loop
bit KEYRESET
;===============================
;===============================
; Zappo / Gone
;===============================
;===============================
2019-01-27 02:52:00 +00:00
2019-01-27 05:20:20 +00:00
;=============================
; Load background to $c00
2019-01-27 02:52:00 +00:00
2019-01-27 05:20:20 +00:00
lda #>(gone_rle)
sta GBASH
lda #<(gone_rle)
sta GBASL
lda #$c ; load to off-screen $c00
2019-01-27 05:20:20 +00:00
jsr load_rle_gr
;=================================
; copy $c00 to both pages $400/$800
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
gone_loop:
lda KEYPRESS
bpl gone_loop
bit KEYRESET
2019-01-27 02:52:00 +00:00
2019-01-27 02:27:20 +00:00
rts
2019-01-27 02:52:00 +00:00
.include "gr_pageflip.s"
.include "gr_unrle.s"
.include "gr_copy.s"
.include "gr_offsets.s"
.include "gr_overlay.s"
2019-02-06 04:46:31 +00:00
.include "gr_vlin.s"
.include "gr_plot.s"
.include "gr_fast_clear.s"
2019-02-17 18:37:24 +00:00
.include "gr_putsprite.s"
.include "text_print.s"
2019-01-27 02:27:20 +00:00
2019-01-27 05:20:20 +00:00
; background graphics
.include "intro_graphics/01_building/intro_building.inc"
.include "intro_graphics/01_building/intro_building_car.inc"
.include "intro_graphics/01_building/intro_car.inc"
2019-02-03 17:06:45 +00:00
.include "intro_graphics/02_outer_door/outer_door.inc"
2019-02-05 04:26:55 +00:00
.include "intro_graphics/02_outer_door/feet.inc"
2019-02-03 17:06:45 +00:00
2019-02-05 04:33:16 +00:00
.include "intro_graphics/03_elevator/intro_elevator.inc"
2019-02-06 05:32:54 +00:00
.include "intro_graphics/03_elevator/intro_off_elevator.inc"
2019-02-07 03:01:59 +00:00
.include "intro_graphics/03_elevator/intro_walking.inc"
2019-02-06 05:32:54 +00:00
.include "intro_graphics/04_keypad/intro_scanner_door.inc"
2019-02-07 04:08:04 +00:00
.include "intro_graphics/04_keypad/intro_approach.inc"
2019-02-08 03:02:56 +00:00
.include "intro_graphics/04_keypad/intro_keypad_bg.inc"
.include "intro_graphics/04_keypad/intro_hands.inc"
2019-02-13 04:19:49 +00:00
.include "intro_graphics/04_keypad/intro_opening.inc"
2019-02-08 03:02:56 +00:00
2019-02-13 04:43:31 +00:00
.include "intro_graphics/05_scanner/intro_scanner.inc"
2019-02-13 05:46:11 +00:00
.include "intro_graphics/05_scanner/intro_scanning.inc"
2019-02-15 03:00:00 +00:00
.include "intro_graphics/05_scanner/intro_ai_bg.inc"
.include "intro_graphics/05_scanner/intro_ai.inc"
2019-02-16 05:24:24 +00:00
.include "intro_graphics/06_console/intro_desktop.inc"
.include "intro_graphics/06_console/intro_cursor.inc"
2019-02-17 03:00:06 +00:00
.include "intro_graphics/06_console/intro_collider_ui.inc"
2019-02-16 05:24:24 +00:00
.include "intro_graphics/07_soda/intro_open_soda.inc"
.include "intro_graphics/07_soda/intro_drinking.inc"
2019-02-17 03:00:06 +00:00
2019-01-27 17:42:52 +00:00
.include "intro_tunnel1.inc"
2019-01-27 05:20:20 +00:00
.include "intro_tunnel2.inc"
.include "intro_gone.inc"
2019-02-03 17:06:45 +00:00
;=================================
; Display a sequence of images
run_sequence:
ldy #0
run_sequence_loop:
lda (INTRO_LOOPL),Y ; get time
beq run_sequence_done
tax
2019-02-06 04:46:31 +00:00
jsr long_wait
2019-02-03 17:06:45 +00:00
iny
lda (INTRO_LOOPL),Y
sta GBASL
iny
lda (INTRO_LOOPL),Y
sta GBASH
iny
sty INTRO_LOOPER ; save for later
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
ldy INTRO_LOOPER
jmp run_sequence_loop
run_sequence_done:
rts
2019-02-06 04:46:31 +00:00
2019-02-15 06:10:17 +00:00
;=================================
; Display a sequence of images
; with /-|/ static overlay
2019-02-15 06:10:17 +00:00
run_sequence_static:
ldy #0 ; init
run_sequence_static_loop:
2019-02-17 19:15:15 +00:00
lda (INTRO_LOOPL),Y ; draw DNA
sta DNA_OUT
iny
2019-02-15 06:10:17 +00:00
lda (INTRO_LOOPL),Y ; pause for time
beq run_sequence_static_done
tax
2019-02-17 20:13:13 +00:00
lda DNA_OUT
bne pause_draw_dna
2019-02-15 06:10:17 +00:00
jsr long_wait
2019-02-17 20:13:13 +00:00
jmp done_pause_dna
pause_draw_dna:
txa
pha
tya
pha
jsr draw_dna
jsr page_flip
pla
tay
pla
tax
lda #250
jsr WAIT
dex
bne pause_draw_dna
done_pause_dna:
2019-02-15 06:10:17 +00:00
iny ; point to overlay
2019-02-17 20:13:13 +00:00
lda #10 ; set up static loop
2019-02-15 06:10:17 +00:00
sta STATIC_LOOPER
2019-02-17 19:15:15 +00:00
sty INTRO_LOOPER ; save for later
2019-02-15 06:10:17 +00:00
static_loop:
lda (INTRO_LOOPL),Y
sta GBASL
iny
lda (INTRO_LOOPL),Y
sta GBASH
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay_40x40
2019-02-15 06:10:17 +00:00
ldy STATIC_LOOPER
lda static_pattern,Y
sta GBASL
lda static_pattern+1,Y
sta GBASH
lda #$10 ; load to $1000
jsr load_rle_gr
; force 40x40 overlay
2019-02-15 06:10:17 +00:00
jsr gr_overlay_40x40_noload
2019-02-15 06:10:17 +00:00
2019-02-17 19:15:15 +00:00
lda DNA_OUT
beq no_dna
jsr draw_dna
no_dna:
2019-02-15 06:10:17 +00:00
jsr page_flip
ldy INTRO_LOOPER
ldx #3
2019-02-15 06:10:17 +00:00
jsr long_wait
dec STATIC_LOOPER
dec STATIC_LOOPER
bpl static_loop
2019-02-15 06:10:17 +00:00
iny
iny
jmp run_sequence_static_loop
run_sequence_static_done:
rts
2019-02-06 04:46:31 +00:00
;=====================
; long(er) wait
; waits approximately ?? ms
long_wait:
lda #64
jsr WAIT ; delay
dex
bne long_wait
rts
2019-02-03 17:06:45 +00:00
;========================
; Car driving up sequence
building_sequence:
.byte 128
.word intro_car1
.byte 2
.word intro_car2
.byte 2
.word intro_car3
.byte 2
.word intro_car4
.byte 2
.word intro_car5
.byte 2
.word intro_car6
.byte 2
.word intro_car7
.byte 2
.word intro_car8
.byte 2
.word intro_car9
.byte 128
.word intro_car10
.byte 0
;========================
; Getting out of car sequence
outtacar_sequence:
2019-02-04 06:08:04 +00:00
.byte 100
2019-02-03 17:06:45 +00:00
.word intro_car12
2019-02-04 06:08:04 +00:00
.byte 50
2019-02-03 17:06:45 +00:00
.word intro_car13
2019-02-04 06:08:04 +00:00
.byte 50
2019-02-03 17:06:45 +00:00
.word intro_car14
.byte 200
.word intro_car14
.byte 0
2019-02-05 04:26:55 +00:00
; Getting out of car sequence
feet_sequence:
.byte 100
.word feet01_rle
.byte 10
.word feet02_rle
.byte 10
.word feet03_rle
.byte 10
.word feet04_rle
.byte 10
.word feet05_rle
.byte 10
.word feet06_rle
.byte 10
.word feet07_rle
.byte 10
.word feet08_rle
.byte 30
.word feet09_rle
.byte 10
.word feet10_rle
.byte 10
.word feet11_rle
.byte 10
.word feet12_rle
.byte 10
.word feet13_rle
.byte 10
.word feet14_rle
.byte 10
.word feet15_rle
.byte 10
.word blank_rle
.byte 100
.word blank_rle
.byte 0
2019-02-07 03:01:59 +00:00
; Walking off elevator sequence
walking_sequence:
.byte 20
.word walking01_rle
.byte 20
.word walking02_rle
.byte 20
.word walking03_rle
.byte 20
.word walking04_rle
.byte 20
.word walking05_rle
.byte 20
.word walking06_rle
.byte 20
.word walking07_rle
.byte 20
.word walking08_rle
2019-02-07 04:08:04 +00:00
.byte 20
.word walking08_rle
2019-02-07 03:01:59 +00:00
.byte 0
2019-02-07 04:08:04 +00:00
; Approaching keypad sequence
approach_sequence:
.byte 20
.word approach01_rle
.byte 20
.word approach02_rle
.byte 20
.word approach03_rle
.byte 20
.word approach04_rle
.byte 20
.word approach05_rle
.byte 20
.word approach06_rle
.byte 20
.word approach07_rle
.byte 80
.word approach07_rle
.byte 0
2019-02-08 03:02:56 +00:00
; Using keypad sequence
keypad_sequence:
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 03:02:56 +00:00
.word hand04_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 03:02:56 +00:00
.word hand04_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 03:02:56 +00:00
.word hand04_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 03:02:56 +00:00
.word hand04_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand05_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand05_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand05_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand05_04_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand01_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand01_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand01_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand04_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand01_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand01_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 03:02:56 +00:00
.word hand04_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand09_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand09_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand09_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand09_04_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand09_05_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand03_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand03_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand03_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand03_04_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand02_01_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand02_02_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand02_03_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand02_04_rle
2019-02-15 03:00:00 +00:00
.byte 9
2019-02-08 05:18:34 +00:00
.word hand02_05_rle
.byte 12
2019-02-08 05:18:34 +00:00
.word hand02_05_rle
2019-02-08 03:02:56 +00:00
.byte 0
2019-02-07 04:08:04 +00:00
2019-02-13 04:19:49 +00:00
; Door opening sequence
2019-02-07 04:08:04 +00:00
2019-02-13 04:19:49 +00:00
opening_sequence:
.byte 15
.word opening01_rle
.byte 15
.word opening02_rle
.byte 15
.word opening03_rle
.byte 15
.word opening04_rle
.byte 15
.word opening05_rle
.byte 15
.word opening06_rle
.byte 15
.word opening07_rle
.byte 15
.word opening08_rle
.byte 15
.word opening09_rle
.byte 15
.word opening10_rle
.byte 15
.word opening11_rle
.byte 15
.word opening12_rle
.byte 15
.word blank_rle
.byte 100
.word blank_rle
.byte 0
2019-02-13 05:46:11 +00:00
; Scanning sequence
scanning_sequence:
.byte 15
.word scan01_rle
.byte 15
.word scan02_rle
.byte 15
.word scan03_rle
.byte 15
.word scan04_rle
.byte 15
.word scan05_rle
.byte 15
.word scan06_rle
.byte 15
.word scan07_rle
.byte 15
.word scan08_rle
.byte 15
.word scan09_rle
.byte 15
2019-02-13 05:46:11 +00:00
.word scan10_rle
.byte 20
2019-02-13 05:46:11 +00:00
.word scan11_rle
.byte 20
2019-02-13 05:46:11 +00:00
.word scan12_rle
.byte 20
2019-02-13 05:46:11 +00:00
.word scan13_rle
.byte 20
.word scan14_rle
.byte 20
2019-02-13 05:46:11 +00:00
.word scan15_rle
.byte 20
2019-02-13 05:46:11 +00:00
.word scan16_rle
.byte 40
2019-02-13 05:46:11 +00:00
.word scan17_rle
.byte 40
2019-02-13 05:46:11 +00:00
.word scan18_rle
.byte 40
2019-02-13 05:46:11 +00:00
.word scan19_rle
.byte 40
2019-02-13 05:46:11 +00:00
.word scan19_rle
.byte 0
2019-02-15 06:10:17 +00:00
; AI sequence
ai_sequence:
2019-02-17 19:15:15 +00:00
.byte 0,50 ; pause at start, no dna
2019-02-17 18:37:24 +00:00
.word ai01_rle ; slices
2019-02-17 19:15:15 +00:00
.byte 0,50 ; pause at start, no dna
2019-02-17 18:37:24 +00:00
.word ai02_rle ; slices_zoom
2019-02-17 19:15:15 +00:00
.byte 0,50 ; pasue as start, no dna
2019-02-17 18:37:24 +00:00
.word ai03_rle ; little circle
2019-02-17 19:15:15 +00:00
.byte 0,50 ; pause at start, no dna
2019-02-17 18:37:24 +00:00
.word ai04_rle ; big circle
2019-02-15 06:10:17 +00:00
2019-02-17 20:13:13 +00:00
.byte 1,20 ; pause longer, yes dna
2019-02-17 19:15:15 +00:00
.word ai05_rle ; key
.byte 0,0
2019-02-17 18:37:24 +00:00
; .word ai05_rle ; key
; .byte 0
2019-02-15 06:10:17 +00:00
static_pattern:
.word blank_rle ; 0
2019-02-17 20:13:13 +00:00
.word blank_rle ; 2
.word static01_rle ; 4
.word static03_rle ; 6
.word static02_rle ; 8
.word static01_rle ; 10
2019-02-16 19:11:50 +00:00
; Power-up sequence
powerup_sequence:
.byte 20
2019-02-17 20:13:13 +00:00
.word powerup01_rle
.byte 60
2019-02-16 19:11:50 +00:00
.word powerup02_rle
.byte 20
.word powerup03_rle
2019-02-17 20:13:13 +00:00
.byte 20
2019-02-16 19:11:50 +00:00
.word powerup03_rle
.byte 0
; Cursor sequence
cursor_sequence:
2019-02-17 16:04:16 +00:00
.byte 60
.word cursor01_rle
2019-02-17 20:13:13 +00:00
.byte 40
.word cursor02_rle
.byte 20
.word cursor03_rle
.byte 20
.word cursor04_rle
.byte 20
.word cursor05_rle
.byte 20
.word cursor06_rle
.byte 20
.word cursor07_rle
2019-02-16 23:00:02 +00:00
.byte 20
.word cursor08_rle
2019-02-16 23:00:02 +00:00
.byte 60
.word cursor08_rle
.byte 0
2019-02-15 06:10:17 +00:00
peanut:
.byte 0,2,"COPYRIGHT (C) 1977 PEANUT COMPUTER, INC.",0
.byte 0,3,"ALL RIGHTS RESERVED.",0
.byte 0,5,"CDOS VERSION 5.01",0
.byte 0,18,"> ",0
2019-02-16 23:11:47 +00:00
.byte 255
2019-02-16 23:00:02 +00:00
accelerator:
2019-02-17 03:00:06 +00:00
.byte 0,0, "MODIFICATION OF PARAMETERS",0
.byte 0,1, "RELATING TO PARTICLE",0
.byte 0,2, "ACCELERATOR (SYNCHOTRON).",0
.byte 0,3, " ___________",0
.byte 0,4, ":ROOM 3 ",('+'|$80),":\ E: 23%",0
.byte 0,5, ": : : G: .005",0
.byte 0,6, ": : : RK: 77.2L",0
.byte 0,7, ": : :",0
.byte 0,8, ": : : OPT: G+",0
.byte 0,9, ": : :",0
.byte 0,10, ":__________:_: SHIELD:",0
.byte 0,11, ":ROOM 1 ",('+'|$80),": : 1: OFF",0
.byte 0,12, ": : : 2: ON",0
.byte 0,13, ": : : 3: ON",0
.byte 0,14, ": : :",0
.byte 0,15, ": : : P^: 1",0
.byte 0,16, ": : :",0
.byte 0,17, ": _________:_:",0
.byte 0,18, ":/_________:/",0
2019-02-16 23:11:47 +00:00
.byte 255
2019-02-17 16:04:16 +00:00
; Power-up sequence
soda_sequence:
.byte 20
.word soda01_rle
.byte 20
.word soda02_rle
.byte 20
.word soda03_rle
.byte 20
.word soda04_rle
.byte 20
.word soda05_rle
.byte 20
.word soda06_rle
.byte 20
.word soda07_rle
.byte 20
.word soda08_rle
.byte 20
.word soda09_rle
.byte 20
.word soda09_rle
.byte 0
2019-02-17 18:37:24 +00:00
; Scanning text
good_evening:
.byte 2,21,"GOOD EVENING PROFESSOR.",0
ferrari:
.byte 2,21,"I SEE YOU HAVE DRIVEN HERE IN YOUR",0
.byte 2,22,"FERRARI.",0
;====================================
; Draw DNA
;====================================
draw_dna:
lda #0 ; count
sta DNA_COUNT
draw_dna_loop:
clc
lda DNA_COUNT
adc #10
sta YPOS
lda #26
sta XPOS
2019-02-17 19:15:15 +00:00
lda DNA_COUNT ; 0, 4, 8, 12, 16....
lsr
clc
adc DNA_PROGRESS ; 0,2,4,6,8,...
2019-02-17 18:37:24 +00:00
and #$e
tax
lda dna_list,X
sta INL
lda dna_list+1,X
sta INH
2019-02-17 19:15:15 +00:00
jsr put_sprite
2019-02-17 18:37:24 +00:00
lda DNA_COUNT
clc
adc #4
sta DNA_COUNT
cmp #28
bne draw_dna_loop
2019-02-17 19:15:15 +00:00
inc DNA_PROGRESS
inc DNA_PROGRESS
2019-02-17 20:13:13 +00:00
; see if printing message
lda DNA_PROGRESS
cmp #10
bne no_good_message
lda #<good_evening
sta OUTL
lda #>good_evening
sta OUTH
jsr print_both_pages
jmp no_ferrari_message
no_good_message:
cmp #$30
bne no_ferrari_message
lda #<ferrari
sta OUTL
lda #>ferrari
sta OUTH
jsr print_both_pages
jsr print_both_pages
no_ferrari_message:
2019-02-17 18:37:24 +00:00
rts
dna_list:
.word dna0_sprite
.word dna1_sprite
.word dna2_sprite
.word dna3_sprite
.word dna4_sprite
.word dna5_sprite
.word dna6_sprite
2019-02-17 19:15:15 +00:00
.word dna7_sprite
2019-02-17 18:37:24 +00:00
dna0_sprite:
.byte $7,$2
.byte $66,$40,$40,$40,$40,$40,$cc
.byte $06,$00,$00,$00,$00,$00,$0c
dna1_sprite:
.byte $7,$2
.byte $00,$66,$40,$40,$40,$cc,$00
.byte $00,$06,$00,$00,$00,$0c,$00
dna2_sprite:
.byte $7,$2
.byte $00,$00,$66,$40,$cc,$00,$00
.byte $00,$00,$06,$00,$0c,$00,$00
dna3_sprite:
.byte $7,$2
.byte $00,$00,$00,$66,$00,$00,$00
.byte $00,$00,$00,$06,$00,$00,$00
dna4_sprite:
.byte $7,$2
.byte $00,$00,$CC,$40,$66,$00,$00
.byte $00,$00,$0C,$00,$06,$00,$00
dna5_sprite:
.byte $7,$2
.byte $00,$CC,$40,$40,$40,$66,$00
.byte $00,$0C,$00,$00,$00,$06,$00
dna6_sprite:
.byte $7,$2
.byte $CC,$40,$40,$40,$40,$40,$66
.byte $0C,$00,$00,$00,$00,$00,$06
2019-02-17 19:15:15 +00:00
dna7_sprite:
.byte $7,$2
.byte $66,$40,$40,$40,$40,$40,$cc
.byte $06,$00,$00,$00,$00,$00,$0c