ootw: lzsa for c3

This commit is contained in:
Vince Weaver 2021-03-23 16:49:25 -04:00
parent ef9ea1a5bb
commit 7f05a4dfa1
4 changed files with 20 additions and 49 deletions

View File

@ -1,18 +1,25 @@
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_c3_vent.inc
#####
ootw_c3_vent.inc: $(PNG2RLE) \
vent.png
$(PNG2RLE) asm vent.png vent_rle > ootw_c3_vent.inc
ootw_c3_vent.inc: vent.lzsa
echo "vent_lzsa: .incbin \"vent.lzsa\"" > ootw_c3_vent.inc
#####
%.gr: %.png
$(PNG2GR) $< $@
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
clean:
rm -f *~ *.o *.lst *.lzz *.inc
rm -f *~ *.o *.lst *.lzsa *.gr

View File

@ -1,36 +0,0 @@
vent_rle: .byte $28 ; ysize=48
.byte $00, $AC,$20, $70, $A5,$20, $22, $00,$00, $22
.byte $A0,$11,$20, $00, $22, $A0,$25,$00, $22, $00, $22
.byte $00,$00, $A0,$21,$20, $00,$00, $22, $00, $22, $00,$00
.byte $22, $A0,$1F,$00, $22, $00,$00, $22, $00, $22
.byte $00,$00, $22, $A0,$1F,$00, $22, $00,$00, $22, $00
.byte $22, $00,$00, $A3,$02, $22, $20,$20, $70, $20,$20
.byte $A0,$17,$00, $22, $00,$00, $22, $00, $22, $AA,$00
.byte $A5,$02, $22, $A5,$20, $A6,$00, $88,$88, $8F, $FF
.byte $A3,$00, $22, $00,$00, $22, $00, $A4,$02, $22
.byte $A5,$20, $AB,$00, $22, $A6,$00, $2B, $00, $0B
.byte $22, $A3,$00, $22, $00,$00, $22, $AA,$00, $A5,$02
.byte $22, $A4,$20, $00,$00, $22, $A6,$00, $22, $00,$00
.byte $22, $A3,$00, $22, $00,$00, $22, $A0,$13,$00, $22
.byte $00,$00, $22, $A6,$00, $22, $00,$00, $22, $A3,$00
.byte $22, $00,$00, $22, $A4,$00, $AE,$20, $70, $22
.byte $00,$00, $22, $70, $A5,$20, $22, $00,$00, $22
.byte $A3,$00, $22, $00,$00, $22, $A4,$00, $22, $A0,$1B,$00
.byte $22, $A3,$00, $22, $A7,$00, $22, $00,$00, $A0,$17,$20
.byte $00,$00, $22, $A3,$00, $22, $A7,$00, $22, $00,$00
.byte $22, $A0,$15,$00, $22, $00,$00, $22, $A3,$00, $22
.byte $00,$00, $22, $A4,$00, $22, $00,$00, $22, $A0,$15,$00
.byte $22, $00,$00, $22, $A3,$00, $22, $00,$00, $22
.byte $A4,$20, $22, $00,$00, $22, $A7,$00, $AE,$20, $22
.byte $00,$00, $22, $A3,$20, $22, $00,$00, $22, $A7,$00
.byte $22, $A7,$00, $22, $A0,$17,$00, $22, $A5,$20, $00,$00
.byte $22, $A7,$00, $22, $00,$00, $A0,$13,$20, $00,$00, $22
.byte $A4,$00, $22, $00,$00, $22, $A7,$00, $22, $00,$00
.byte $22, $A0,$11,$00, $22, $00,$00, $22, $A4,$00, $22
.byte $00,$00, $22, $A7,$00, $22, $00,$00, $22, $A0,$11,$00
.byte $22, $00,$00, $22, $A4,$00, $22, $00,$00, $22
.byte $A7,$20, $22, $00,$00, $22, $A0,$11,$20, $22, $00,$00
.byte $22, $A4,$00, $22, $A0,$22,$00, $22, $A4,$00, $22
.byte $A0,$10,$20, $00,$00, $A0,$10,$20, $22, $A0,$14,$00, $22, $00,$00
.byte $22, $A0,$10,$00
.byte $A1

View File

@ -82,7 +82,7 @@ end_message:
.include "ootw_c3_vent.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_putsprite.s"

View File

@ -54,12 +54,12 @@ ootw_vent:
;============================
; load background
lda #>(vent_rle)
sta GBASH
lda #<(vent_rle)
sta GBASL
lda #<(vent_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(vent_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to page $c00
jsr load_rle_gr ; tail call
jsr decompress_lzsa2_fast ; tail call