ootw: intro: success!

This commit is contained in:
Vince Weaver 2019-03-02 13:37:17 -05:00
parent 45b8ffff04
commit 5da6946bdf
9 changed files with 372 additions and 17 deletions

View File

@ -0,0 +1,12 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $1700, size = $7900, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = ro, align=$100;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}

View File

@ -59,7 +59,7 @@ ootw_c2.o: ootw_c2.s \
####
INTRO: intro.o
ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700_8000.inc
ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700_9000.inc
intro.o: intro.s \
gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \
@ -94,7 +94,9 @@ intro.o: intro.s \
intro_graphics/10_gone/intro_gone.inc \
intro_data_01.lz4 \
intro_data_04.lz4 \
intro_data_06.lz4
intro_data_06.lz4 \
intro_data_08.lz4 \
intro_data_09.lz4
ca65 -o intro.o intro.s -l intro.lst
####
@ -104,7 +106,7 @@ intro_data_01.lz4: intro_data_01
truncate -s-8 intro_data_01.lz4
intro_data_01: intro_data_01.o
ld65 -o intro_data_01 intro_data_01.o -C ../linker_scripts/apple2_8000.inc
ld65 -o intro_data_01 intro_data_01.o -C ../linker_scripts/apple2_9000.inc
intro_data_01.o: intro_data_01.s
ca65 -o intro_data_01.o intro_data_01.s -l intro_data_01.lst
@ -115,7 +117,7 @@ intro_data_04.lz4: intro_data_04
truncate -s-8 intro_data_04.lz4
intro_data_04: intro_data_04.o
ld65 -o intro_data_04 intro_data_04.o -C ../linker_scripts/apple2_8000.inc
ld65 -o intro_data_04 intro_data_04.o -C ../linker_scripts/apple2_9000.inc
intro_data_04.o: intro_data_04.s
ca65 -o intro_data_04.o intro_data_04.s -l intro_data_04.lst
@ -126,12 +128,35 @@ intro_data_06.lz4: intro_data_06
truncate -s-8 intro_data_06.lz4
intro_data_06: intro_data_06.o
ld65 -o intro_data_06 intro_data_06.o -C ../linker_scripts/apple2_8000.inc
ld65 -o intro_data_06 intro_data_06.o -C ../linker_scripts/apple2_9000.inc
intro_data_06.o: intro_data_06.s
ca65 -o intro_data_06.o intro_data_06.s -l intro_data_06.lst
intro_data_08.lz4: intro_data_08
lz4 -f -16 intro_data_08
truncate -s-8 intro_data_08.lz4
intro_data_08: intro_data_08.o
ld65 -o intro_data_08 intro_data_08.o -C ../linker_scripts/apple2_9000.inc
intro_data_08.o: intro_data_08.s
ca65 -o intro_data_08.o intro_data_08.s -l intro_data_08.lst
intro_data_09.lz4: intro_data_09
lz4 -f -16 intro_data_09
truncate -s-8 intro_data_09.lz4
intro_data_09: intro_data_09.o
ld65 -o intro_data_09 intro_data_09.o -C ../linker_scripts/apple2_9000.inc
intro_data_09.o: intro_data_09.s
ca65 -o intro_data_09.o intro_data_09.s -l intro_data_09.lst
####

View File

@ -65,8 +65,8 @@ Memory squeeze!
20000+2000=
Let's take a 10k region of memory = $3000
$C000 - $4000 = starting at $8000
Let's take a 12k region of memory = $3000
$C000 - $3000 = starting at $9000
ID1 = 1461 2143\

View File

@ -38,7 +38,7 @@ intro:
lda #>intro1_data_lz4
sta LZ4_SRC+1
lda #$80 ; load to $8000
lda #$90 ; load to $9000
jsr lz4_decode
@ -521,7 +521,7 @@ keypad:
lda #>intro4_data_lz4
sta LZ4_SRC+1
lda #$80 ; load to $8000
lda #$90 ; load to $9000
jsr lz4_decode
@ -707,7 +707,7 @@ spin_on_key:
lda #>intro6_data_lz4
sta LZ4_SRC+1
lda #$80 ; load to $8000
lda #$90 ; load to $9000
jsr lz4_decode
@ -1435,7 +1435,6 @@ particle_loop2:
; bit KEYRESET
.if 0
;===============================
;===============================
@ -1445,6 +1444,20 @@ particle_loop2:
thunderstorm:
;==================================
; Uncompress the data
;==================================
lda #<intro8_data_lz4
sta LZ4_SRC
lda #>intro8_data_lz4
sta LZ4_SRC+1
lda #$90 ; load to $9000
jsr lz4_decode
lda #>(building_car_rle)
sta GBASH
lda #<(building_car_rle)
@ -1483,6 +1496,20 @@ thunderstorm:
;===============================
tunnel1:
;==================================
; Uncompress the data
;==================================
lda #<intro9_data_lz4
sta LZ4_SRC
lda #>intro9_data_lz4
sta LZ4_SRC+1
lda #$90 ; load to $9000
jsr lz4_decode
lda #>(tunnel1_rle)
sta GBASH
lda #<(tunnel1_rle)
@ -1590,8 +1617,6 @@ tunnel1:
jsr run_sequence
.endif
gone_loop:
lda KEYPRESS
bpl gone_loop
@ -1956,7 +1981,7 @@ plot_particle:
;.include "intro_data.s"
DATA_LOCATION = $8000
DATA_LOCATION = $9000
; intro1,intro2,intro3
building_sequence = (DATA_LOCATION+$0840)
@ -2032,6 +2057,33 @@ intro6_data_lz4:
.incbin "intro_data_06.lz4",11
intro6_data_lz4_end:
; intro8
bolt_sequence = (DATA_LOCATION+$1488)
lightning_sequence = (DATA_LOCATION+$13D6)
building_car_rle = (DATA_LOCATION+$1259)
intro8_data_lz4:
.word (intro8_data_lz4_end-intro8_data_lz4)
.incbin "intro_data_08.lz4",11
intro8_data_lz4_end:
; intro9, intro10
gone_sequence = (DATA_LOCATION+$2C66)
gone_rle = (DATA_LOCATION+$2039)
zappo_sequence = (DATA_LOCATION+$2C1B)
blue_zappo_rle = (DATA_LOCATION+$1737)
tunnel2_sequence = (DATA_LOCATION+$1718)
tunnel2_rle = (DATA_LOCATION+$0B0F)
tunnel1_sequence = (DATA_LOCATION+$16F2)
tunnel1_rle = (DATA_LOCATION+$0000)
intro9_data_lz4:
.word (intro9_data_lz4_end-intro9_data_lz4)
.incbin "intro_data_09.lz4",11
intro9_data_lz4_end:

View File

@ -1,7 +1,11 @@
; background graphics
;=================================
;=================================
; Intro Segment 08 Data (Lightning)
;=================================
;=================================
.include "intro_graphics/08_lightning/lightning.inc"
.include "intro_graphics/01_building/intro_building_car.inc"
; Lightning sequence
lightning_sequence:

View File

@ -1,7 +1,17 @@
;=================================
;=================================
; Intro Segment 09 Data (Tunnel)
;=================================
;=================================
; background graphics
.include "intro_graphics/09_tunnel/intro_tunnel1.inc"
.include "intro_graphics/09_tunnel/intro_tunnel2.inc"
.include "intro_graphics/08_lightning/nothing.inc"
.include "intro_graphics/08_lightning/whiteblack.inc"
;=======================
; Tunnel1 Sequence
@ -78,3 +88,228 @@ tunnel2_sequence:
.byte 0
;=================================
;=================================
; Intro Segment 10 Data (Zappo)
;=================================
;=================================
.include "intro_graphics/10_gone/intro_zappo.inc"
.include "intro_graphics/10_gone/intro_gone.inc"
;=======================
; Zappo Sequence
;=======================
zappo_sequence:
.byte 50
.word white_rle
.byte 2
.word zappo01_rle ; B
.byte 128+2 ; .word zappo02_rle ; B
.byte 128+2 ; .word zappo03_rle ; A
.byte 128+2 ; .word zappo04_rle ; B
.byte 128+2 ; .word zappo05_rle ; B
.byte 255
.word zappo03_rle ; load A
.byte 2
.word zappo06_rle ; A
.byte 255
.word blue_zappo_rle ; load b
.byte 2
.word zappo07_rle ; B
.byte 2
.word zappo08_rle ; B
.byte 255
.word zappo03_rle ; load A
.byte 2
.word zappo09_rle ; A
.byte 255
.word blue_zappo_rle ; load b
.byte 2
.word zappo10_rle ; B
.byte 255
.word zappo03_rle ; load A
.byte 2
.word zappo11_rle ; A
.byte 255
.word blue_zappo_rle ; load b
.byte 2
.word zappo12_rle ; B
.byte 128+2 ; .word zappo13_rle ; B
.byte 128+2 ; .word zappo14_rle ; B
.byte 255
.word zappo03_rle ; load A
.byte 2
.word zappo15_rle ; A
.byte 255
.word blue_zappo_rle ; load b
.byte 2
.word zappo16_rle ; B
.byte 128+2 ; .word zappo17_rle ; B
.byte 2
.word white_rle
.byte 128+5 ; .word black_rle
.byte 5
.word white_rle
.byte 128+5 ; .word black_rle
; .byte 5
; .word white_rle
; .byte 1
; .word black_rle
; .byte 1
; .word white_rle
; .byte 1
; .word black_rle
; .byte 1
; .word white_rle
; .byte 1
; .word black_rle
.byte 0
.word nothing_rle
;=======================
; Gone Sequence
;=======================
gone_sequence:
.byte 50
.word white_rle
.byte 7
.word gone01_rle ; B
.byte 128+7 ; .word gone02_rle ; B
.byte 128+7 ; .word gone03_rle ; B
.byte 128+7 ; .word gone04_rle ; B
.byte 128+7 ; .word gone05_rle ; B
.byte 128+7 ; .word gone06_rle ; B
.byte 128+7 ; .word gone07_rle ; B
.byte 128+7 ; .word gone08_rle ; B
.byte 128+7 ; .word gone09_rle ; LB
.byte 128+7 ; .word gone10_rle ; CY
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone11_rle ; LB
.byte 255
.word gone_rle ; B back into $c00
.byte 7
.word gone02_rle ; B (12 is dupe of 2)
.byte 7
.word gone13_rle ; B
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone14_rle ; LB
.byte 255
.word gone_rle ; B back into $c00 + plain
.byte 7
.word nothing_rle
.byte 7
.word gone16_rle ; B
.byte 7
.word nothing_rle ; B (plain?)
.byte 7
.word gone18_rle ; B
.byte 128+7 ; .word gone19_rle ; B
.byte 128+7 ; .word gone20_rle ; B
.byte 128+7 ; .word gone21_rle ; B
.byte 7
.word nothing_rle ; B (plain?)
.byte 7
.word gone23_rle ; B
.byte 128+7 ; .word gone24_rle ; B
.byte 128+7 ; .word gone25_rle ; B
.byte 128+7 ; .word gone26_rle ; B
.byte 128+7 ; .word gone27_rle ; B
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone28_rle ; LB
; .byte 255
; .word gone10_rle ; CY into $c00
.byte 7
.word gone10_rle ; CY (same as 10)
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone28_rle ; LB (30 same as 28)
.byte 255
.word gone_rle ; B back into $c00 + plain
.byte 7
.word gone31_rle ; B
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone32_rle ; LB
.byte 255
.word gone_rle ; B back into $c00 + plain
.byte 7
.word nothing_rle ; B (plain?)
.byte 7
.word gone34_rle ; B
.byte 128+7 ; .word gone35_rle ; B
.byte 128+7 ; .word gone36_rle ; B
.byte 128+7 ; .word gone37_rle ; B
.byte 128+7 ; .word gone38_rle ; B
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone39_rle ; LB
.byte 255
.word gone10_rle ; CY into $c00
.byte 7
.word gone40_rle ; CY
.byte 7
.word gone10_rle ; CY (same as 10)
.byte 255
.word gone09_rle ; LB into $c00
.byte 7
.word gone42_rle ; LB
.byte 255
.word gone_rle ; B back into $c00 + plain
.byte 7
.word gone43_rle ; B
.byte 7
.word nothing_rle
.byte 0

View File

@ -4,13 +4,19 @@ PNG2RLE = ../../../gr-utils/png2rle
PNG2LZ4 = ../../../gr-utils/png2lz4
all: nothing.inc lightning.inc nothing_lz4.inc lightning_lz4.inc
all: nothing.inc lightning.inc whiteblack.inc \
nothing_lz4.inc lightning_lz4.inc whiteblack_lz4.inc
#####
nothing.inc: nothing.png $(PNG2RLE)
$(PNG2RLE) asm nothing.png nothing_rle > nothing.inc
#####
whiteblack.inc: white.png black.png $(PNG2RLE)
$(PNG2RLE) asm white.png white_rle > whiteblack.inc
$(PNG2RLE) asm black.png black_rle >> whiteblack.inc
#####
lightning.inc: $(PNG2RLE) \
@ -69,6 +75,13 @@ nothing_lz4.inc: $(PNG2LZ4)
$(PNG2LZ4) asm nothing.png nothing_rle > nothing_lz4.inc
#####
whiteblack_lz4.inc: white.png black.png $(PNG2L4)
$(PNG2LZ4) asm white.png white_rle > whiteblack_lz4.inc
$(PNG2LZ4) asm black.png black_rle >> whiteblack_lz4.inc
lightning_lz4.inc: $(PNG2LZ4) \
bolt1.png bolt2.png bolt3.png bolt4.png bolt5.png bolt6.png bolt7.png \
flash.png white.png black.png \

View File

@ -0,0 +1,6 @@
white_rle: .byte $28 ; ysize=48
.byte $A0,$FF,$FF, $A0,$FF,$FF, $A0,$FF,$FF, $A0,$C3,$FF
.byte $A1
black_rle: .byte $28 ; ysize=48
.byte $A0,$FF,$00, $A0,$FF,$00, $A0,$FF,$00, $A0,$C3,$00
.byte $A1

View File

@ -0,0 +1,8 @@
white_rle:
.byte $17,$00
.byte $1F,$FF,$01,$00,$E4,$13,$00,$01,$00,$0F,$00,$01,$FF,$FF,$EA,$50
.byte $00,$00,$00,$00,$00
black_rle:
.byte $10,$00
.byte $1F,$00,$01,$00,$FF,$FF,$FF,$EA,$50,$00,$00,$00,$00,$00