Skip to content

Commit

Permalink
ootw: intro: this might just work
Browse files Browse the repository at this point in the history
  • Loading branch information
deater committed Mar 2, 2019
1 parent 7587668 commit 7acf18c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 3 deletions.
12 changes: 12 additions & 0 deletions linker_scripts/apple2_9000.inc
Original file line number Diff line number Diff line change
@@ -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;
}
17 changes: 16 additions & 1 deletion ootw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions ootw/README
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
23 changes: 22 additions & 1 deletion ootw/intro.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand 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:
1 change: 0 additions & 1 deletion ootw/zp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
;; LZ4 addresses

LZ4_SRC = $00
;LZ4_SRC = $26
LZ4_DST = $02
LZ4_END = $04
WHICH_LOAD = $05
Expand Down

0 comments on commit 7acf18c

Please sign in to comment.