ootw: update c5 to lzsa

This commit is contained in:
Vince Weaver 2021-03-23 16:33:27 -04:00
parent 6a89e4a4a2
commit 30a058884a
4 changed files with 21 additions and 36 deletions

View File

@ -1,18 +1,26 @@
include ../../../Makefile.inc
include ../../../../../Makefile.inc
PNG2RLE = ../../../gr-utils/png2rle
PNG2LZ4 = ../../../gr-utils/png2lz4
PNG2GR = ../../../../../utils/gr-utils/png2gr
LZSA = ~/research/lzsa/lzsa/lzsa
all: ootw_c5_cave.inc
#####
ootw_c5_cave.inc: $(PNG2RLE) \
entrance_cave.png
$(PNG2RLE) asm entrance_cave.png entrance_rle > ootw_c5_cave.inc
ootw_c5_cave.inc: entrance_cave.lzsa
echo "entrance_lzsa: .incbin \"entrance_cave.lzsa\"" > ootw_c5_cave.inc
#####
%.gr: %.png
$(PNG2GR) $< $@
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
clean:
rm -f *~ *.o *.lst *.lzz *.inc
rm -f *~ *.o *.lst *.lzsa *.gr *.inc

View File

@ -1,23 +0,0 @@
entrance_rle: .byte $28 ; ysize=48
.byte $A0,$17,$00, $20, $A0,$26,$00, $02, $A6,$00, $02, $20,$20
.byte $AA,$00, $20, $A0,$12,$00, $22, $AA,$00, $06,$06, $A3,$20
.byte $A3,$00, $20, $00, $22, $A0,$11,$00, $22, $A0,$13,$00
.byte $22, $00, $22, $20, $00,$00, $A3,$20, $26
.byte $06, $02,$02, $20,$20, $A3,$00, $20, $02, $A0,$14,$00
.byte $22, $00, $02, $22, $AB,$00, $A4,$02, $A0,$15,$00
.byte $22, $00,$00, $02, $A0,$24,$00, $22, $A0,$20,$00, $02,$02
.byte $66, $60, $A4,$00, $22, $A0,$21,$00, $20, $22
.byte $A4,$00, $22, $AA,$00, $60, $A0,$16,$00, $62, $60
.byte $A4,$00, $22, $AB,$00, $66, $A0,$11,$00, $20, $22
.byte $00,$00, $06, $66, $60, $A3,$00, $22, $A9,$00
.byte $20,$20, $06, $A0,$15,$00, $22, $02, $06, $A3,$00
.byte $22, $AB,$00, $02, $22, $A0,$14,$00, $02, $60
.byte $62, $60,$60, $00,$00, $02, $20, $AA,$00, $22
.byte $AA,$00, $A3,$20, $22, $02,$02, $06, $00,$00, $02
.byte $A7,$00, $20, $02, $00,$00, $A5,$20, $00,$00, $02
.byte $20, $A4,$00, $A4,$26, $06, $02,$02, $A0,$10,$00, $02
.byte $00, $A3,$02, $A7,$00, $22, $A0,$27,$00, $02, $20
.byte $A0,$27,$00, $22, $A0,$27,$00, $22, $A0,$27,$00, $22, $A0,$27,$00
.byte $22, $A0,$27,$00, $62, $A0,$27,$00, $66, $A0,$27,$00, $66
.byte $A0,$18,$00
.byte $A1

View File

@ -82,7 +82,7 @@ end_message:
.include "ootw_c5_cave.s"
.include "../text_print.s"
.include "../gr_pageflip.s"
.include "../gr_unrle.s"
.include "../decompress_fast_v2.s"
.include "../gr_fast_clear.s"
.include "../gr_copy.s"
.include "../gr_copy_offset.s"

View File

@ -69,9 +69,9 @@ not_falling_in:
falling_in:
; load background
lda #>(entrance_rle)
sta GBASH
lda #<(entrance_rle)
lda #>(entrance_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #<(entrance_lzsa)
jmp cave_setup_done
@ -105,9 +105,9 @@ cave1:
cave_setup_done:
sta GBASL
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jsr decompress_lzsa2_fast ; tail call
;=====================
; setup walk collision