ootw: intro: this might just work

This commit is contained in:
Vince Weaver 2019-03-02 10:55:32 -05:00
parent 7587668011
commit 7acf18caa9
5 changed files with 53 additions and 3 deletions

View File

@ -0,0 +1,12 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $9000, size = $3000, 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

@ -91,11 +91,26 @@ intro.o: intro.s \
intro_graphics/09_tunnel/intro_tunnel1.inc \
intro_graphics/09_tunnel/intro_tunnel2.inc \
intro_graphics/10_gone/intro_zappo.inc \
intro_graphics/10_gone/intro_gone.inc
intro_graphics/10_gone/intro_gone.inc \
intro_data_01.lz4
ca65 -o intro.o intro.s -l intro.lst
####
intro_data_01.lz4: intro_data_01
lz4 -f -16 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_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
####
LOADER: loader.o
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_1400.inc

View File

@ -65,6 +65,9 @@ Memory squeeze!
20000+2000=
Let's take a 10k region of memory = $3000
$C000 - $3000 = starting at $9000
ID1 = 1461 2143\
ID2 = 1759 2687|

View File

@ -32,6 +32,17 @@ intro:
;===============================
;===============================
;==================================
; Uncompress the data
;==================================
lda #<intro1_data_lz4
sta LZ4_SRC
lda #>intro1_data_lz4
sta LZ4_SRC+1
lda #$90 ; load to $9000
jsr lz4_decode
;==================================
; draw the car driving up
@ -1923,4 +1934,14 @@ plot_particle:
.endif
.include "intro_data.s"
;.include "intro_data.s"
DATA_LOCATION = $9000
; intro1
building_sequence = $9840
intro1_data_lz4:
.word (intro1_data_lz4_end-intro1_data_lz4)
.incbin "intro_data_01.lz4",11
intro1_data_lz4_end:

View File

@ -3,7 +3,6 @@
;; LZ4 addresses
LZ4_SRC = $00
;LZ4_SRC = $26
LZ4_DST = $02
LZ4_END = $04
WHICH_LOAD = $05