ootw: c1: more lzsa conversion

This commit is contained in:
Vince Weaver 2021-03-23 01:57:49 -04:00
parent b4d80a0c23
commit 1b018f327b
12 changed files with 96 additions and 261 deletions

View File

@ -0,0 +1,16 @@
all:
cd l1caves && make
cd l1end && make
cd l1end_scenes && make
cd l1pool && make
cd l1rope && make
cd l1underwater && make
clean:
cd l1caves && make clean
cd l1end && make clean
cd l1end_scenes && make clean
cd l1pool && make clean
cd l1rope && make clean
cd l1underwater && make clean

View File

@ -1,23 +1,31 @@
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_cavern.inc ootw_cavern2.inc ootw_cavern3.inc
#####
ootw_cavern.inc: $(PNG2RLE) another_cave.png
$(PNG2RLE) asm another_cave.png cavern_rle > ootw_cavern.inc
ootw_cavern.inc: another_cave.lzsa
echo "cavern_lzsa: .incbin \"another_cave.lzsa\"" > ootw_cavern.inc
ootw_cavern2.inc: $(PNG2RLE) another_cave2.png
$(PNG2RLE) asm another_cave2.png cavern2_rle > ootw_cavern2.inc
ootw_cavern2.inc: another_cave2.lzsa
echo "cavern2_lzsa: .incbin \"another_cave2.lzsa\"" > ootw_cavern2.inc
ootw_cavern3.inc: $(PNG2RLE) another_cave3.png
$(PNG2RLE) asm another_cave3.png cavern3_rle > ootw_cavern3.inc
ootw_cavern3.inc: another_cave3.lzsa
echo "cavern3_lzsa: .incbin \"another_cave3.lzsa\"" > ootw_cavern3.inc
#####
%.gr: %.png
$(PNG2GR) $< $@
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
clean:
rm -f *~ *.o *.lst *.lzz *.inc
rm -f *~ *.o *.lst *.gr *.inc *.lzsa

View File

@ -1,44 +0,0 @@
cavern_rle: .byte $28 ; ysize=48
.byte $A0,$39,$22, $A7,$62, $65, $A3,$55, $F5, $25, $A9,$22
.byte $62, $22,$22, $62, $A6,$22, $62,$62, $A3,$22, $62
.byte $AB,$66, $55, $6F, $FF, $F6, $66,$66, $62,$62
.byte $A4,$22, $66,$66, $62, $66,$66, $62, $A3,$22, $62
.byte $66, $6F,$6F, $F2, $22,$22, $AC,$66, $55, $66,$66
.byte $6F, $FF, $F6, $A3,$66, $62, $66, $22
.byte $A6,$66, $22,$22, $A6,$66, $22,$22, $6F, $F6,$F6, $AE,$66
.byte $6F, $F6, $A4,$66, $22, $66,$66, $6F,$6F, $F6,$F6
.byte $22,$22, $66, $26, $A4,$66, $22,$22, $A3,$66, $6F,$6F
.byte $F6,$F6, $AC,$66, $6F, $F6, $66,$66, $22, $A6,$66
.byte $22,$22, $6F, $2F, $7A, $A3,$F6, $22,$22, $A7,$66
.byte $6F,$6F, $F6,$F6, $AA,$66, $6F, $F6, $A3,$66, $26
.byte $56, $76, $66, $22,$22, $26, $52, $57
.byte $76,$76, $66, $22,$22, $A3,$6F, $A3,$F6, $A5,$66, $6F,$6F
.byte $F6,$F6, $A7,$66, $6F, $F6, $66,$66, $22, $A3,$55
.byte $22,$22, $A4,$55, $27, $76, $22,$22, $66,$66, $26
.byte $A3,$66, $A3,$6F, $A3,$F6, $A3,$66, $6F,$6F, $F6,$F6, $A5,$66
.byte $6F, $F6, $22, $25, $55,$55, $22,$22, $A3,$55
.byte $22, $55,$55, $22,$22, $56, $22, $77, $A0,$17,$66
.byte $22,$22, $52, $55, $22,$22, $55,$55, $52, $A3,$55
.byte $22,$22, $A4,$55, $76, $A0,$15,$66, $22, $25, $55,$55
.byte $22,$22, $A6,$55, $22,$22, $55, $52, $22, $55
.byte $77, $7F, $6F,$6F, $7F, $6F,$6F, $88, $A3,$6F
.byte $7F,$7F, $76, $77, $76, $A6,$66, $22, $55
.byte $25, $55, $22,$22, $25, $A5,$55, $22,$22, $A5,$55
.byte $77, $A5,$87, $88, $87, $88, $A3,$87, $A3,$77
.byte $A6,$87, $22, $25, $22, $55, $A3,$22, $A5,$55
.byte $22,$22, $55,$55, $25, $52, $A3,$57, $58,$58, $78
.byte $58, $AA,$88, $58, $78, $A3,$88, $A4,$72, $A3,$22
.byte $A5,$55, $22,$22, $55, $25, $22, $A8,$55, $58,$58
.byte $88,$88, $22, $88,$88, $58,$58, $A4,$55, $58, $22
.byte $55,$55, $75,$75, $A3,$22, $27, $55, $25, $55,$55
.byte $A3,$22, $55, $57, $AC,$55, $22, $A4,$55, $25
.byte $A4,$55, $22, $27, $57, $55, $A5,$22, $55
.byte $22, $55, $25, $A4,$22, $25, $AC,$55, $22
.byte $A3,$55, $25, $22, $A3,$55, $A3,$22, $25, $85
.byte $A5,$22, $55, $A9,$22, $A7,$82, $A3,$85, $25, $22,$22
.byte $25, $85, $22,$22, $85,$85, $A3,$82, $A5,$88, $82
.byte $88,$88, $28, $88,$88, $28, $88,$88, $28, $88
.byte $28, $A3,$88, $82, $A5,$88, $82,$82, $AC,$88, $A8,$28
.byte $A0,$1B,$88, $28,$28, $A6,$88, $28, $22, $28, $88
.byte $A3,$82, $A0,$1E,$88, $A0,$78,$00
.byte $A1

View File

@ -1,37 +0,0 @@
cavern2_rle: .byte $28 ; ysize=48
.byte $A8,$22, $A3,$82, $22,$22, $82, $A5,$88, $82,$82, $A5,$22
.byte $A5,$88, $68, $A8,$66, $88, $22, $62,$62, $A3,$22
.byte $68,$68, $88, $F8, $62, $22, $A3,$88, $68,$68
.byte $A3,$66, $22,$22, $A4,$66, $68,$68, $FF,$FF, $A9,$66, $88
.byte $22, $66,$66, $A3,$22, $66,$66, $88, $66, $6F
.byte $22, $F8, $88, $AF,$66, $FF, $F6, $A8,$66
.byte $88, $22, $66,$66, $22,$22, $A3,$66, $68, $66,$66
.byte $22, $66, $68, $6F, $F6, $AE,$66, $FF
.byte $F6, $A8,$66, $22, $66,$66, $22,$22, $A6,$66, $22
.byte $A4,$66, $6F,$6F, $F6, $AC,$66, $FF, $F6, $A6,$56
.byte $66, $22, $66,$66, $22,$22, $AE,$66, $6F,$6F, $F6,$F6
.byte $A9,$66, $6F, $A6,$55, $F6,$F6, $66,$66, $22,$22, $A0,$12,$66
.byte $6F, $F6,$F6, $A7,$66, $A6,$55, $66, $A3,$6F, $22,$22
.byte $A4,$F6, $A0,$11,$66, $6F,$6F, $F6,$F6, $A3,$66, $A6,$55, $A4,$66
.byte $22,$22, $A3,$66, $A4,$6F, $FF, $A4,$F6, $AD,$66, $6F,$6F
.byte $F6, $A6,$55, $A4,$66, $22,$22, $AB,$66, $A4,$6F, $FF
.byte $A4,$F6, $A8,$66, $A6,$55, $2F, $A3,$6F, $22,$22, $A4,$F6
.byte $88, $55, $A4,$F6, $A0,$12,$66, $A6,$55, $22, $A3,$66
.byte $22,$22, $A4,$66, $88, $55, $66,$66, $86, $AA,$6F
.byte $A3,$66, $76, $86,$86, $87, $88, $A7,$55, $22
.byte $76,$76, $77, $22,$22, $77, $A3,$76, $88, $57
.byte $56, $76, $88, $A5,$76, $77,$77, $76, $77
.byte $87,$87, $A7,$88, $A7,$55, $22, $88,$88, $87, $22,$22
.byte $87, $A6,$88, $85, $88,$88, $57,$57, $58, $A5,$88
.byte $58,$58, $78,$78, $A5,$88, $A7,$55, $22, $88, $58,$58
.byte $22,$22, $78,$78, $88, $28, $A5,$88, $58, $A3,$55
.byte $77, $A3,$88, $A5,$55, $58, $A3,$88, $A8,$55, $22
.byte $A3,$55, $22,$22, $55, $57,$57, $22, $A0,$1E,$55, $22,$22
.byte $55,$55, $22,$22, $A3,$55, $22, $AA,$55, $A0,$01,$AA, $A0,$13,$55
.byte $22,$22, $55,$55, $A3,$22, $25, $55, $22, $AA,$55
.byte $5A, $A0,$13,$55, $22, $82, $85, $22, $A7,$82
.byte $88,$88, $A0,$12,$85, $A0,$1C,$88, $A8,$28, $A4,$88, $28, $AA,$88
.byte $22, $A3,$88, $28, $A3,$22, $28, $88, $22
.byte $88,$88, $28, $A3,$52, $A8,$55, $52,$52, $28,$28, $A9,$88
.byte $A0,$78,$00
.byte $A1

View File

@ -1,31 +0,0 @@
cavern3_rle: .byte $28 ; ysize=48
.byte $A5,$66, $6F, $F6,$F6, $66,$66, $A4,$22, $62, $AD,$66
.byte $A6,$22, $AE,$66, $6F,$6F, $F6, $F2, $22, $62
.byte $AE,$66, $A7,$22, $26, $A4,$66, $A3,$26, $56, $26
.byte $56, $76, $A5,$66, $6F,$6F, $F6,$F6, $AD,$66, $A0,$11,$22
.byte $77, $A9,$66, $6F, $F6,$F6, $AA,$66, $A0,$10,$22, $75
.byte $77, $66, $A3,$86, $A8,$66, $6F,$6F, $F6,$F6, $A6,$66
.byte $A0,$10,$22, $57, $66, $A4,$88, $56, $AB,$66, $6F,$6F
.byte $F6,$F6, $66,$66, $A0,$10,$22, $77, $66, $A4,$88, $55
.byte $AF,$66, $6F, $A0,$11,$22, $77, $66, $A4,$88, $55
.byte $A3,$6F, $A4,$F6, $A9,$66, $A0,$10,$22, $55, $22, $77
.byte $A4,$88, $55, $A0,$01,$A6, $A6,$66, $A5,$6F, $A3,$F6, $A7,$22
.byte $A6,$55, $A4,$22, $55, $22, $77, $A5,$88, $5A
.byte $AA,$66, $46, $66,$66, $A8,$22, $A6,$55, $A4,$22, $55
.byte $22, $77, $78, $A3,$88, $85,$85, $55, $6F,$6F
.byte $A4,$F6, $66,$66, $A3,$44, $26, $A7,$22, $52, $55,$55
.byte $85, $A3,$55, $A4,$22, $55, $22, $25, $77
.byte $A7,$88, $8F, $A0,$02,$AF, $A4,$6F, $88,$88, $28, $A8,$22
.byte $55,$55, $88, $A4,$55, $A4,$22, $55, $22, $25
.byte $57, $78, $A8,$88, $85, $8A, $7A,$7A, $78,$78
.byte $28, $A9,$22, $55, $85, $58, $A4,$55, $A4,$22
.byte $55, $22,$22, $52, $77, $A5,$88, $28, $22
.byte $27, $77, $88,$88, $28, $AB,$22, $55,$55, $88
.byte $A5,$55, $A5,$22, $25, $22,$22, $27,$27, $A4,$28, $A4,$22
.byte $28, $AD,$22, $55, $88, $A6,$55, $A0,$1E,$22, $52
.byte $55,$55, $88, $A5,$55, $88, $A7,$22, $02,$02, $A0,$12,$22
.byte $52,$52, $A3,$55, $58, $A6,$55, $88, $52,$52, $02
.byte $00, $52,$52, $A5,$50, $AE,$52, $A0,$3F,$55, $A3,$05, $A3,$00
.byte $05, $A4,$55, $50, $A9,$55, $00,$00, $05, $A8,$55
.byte $A0,$A0,$00
.byte $A1

View File

@ -1,19 +1,28 @@
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_underwater.inc
#####
ootw_underwater.inc: $(PNG2RLE) another_uboot.png
$(PNG2RLE) asm ootw_uboot_bg.png underwater_rle > ootw_underwater.inc
$(PNG2RLE) asm ootw_uboot_flash1.png uboot_flash1_rle >> ootw_underwater.inc
$(PNG2RLE) asm ootw_uboot_flash2.png uboot_flash2_rle >> ootw_underwater.inc
ootw_underwater.inc: another_uboot.lzsa ootw_uboot_bg.lzsa \
ootw_uboot_flash1.lzsa ootw_uboot_flash2.lzsa
echo "underwater_lzsa: .incbin \"ootw_uboot_bg.lzsa\"" > ootw_underwater.inc
echo "uboot_flash1_lzsa: .incbin \"ootw_uboot_flash1.lzsa\"" >> ootw_underwater.inc
echo "uboot_flash2_lzsa: .incbin \"ootw_uboot_flash2.lzsa\"" >> ootw_underwater.inc
#####
%.gr: %.png
$(PNG2GR) $< $@
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
clean:
rm -f *~ *.o *.lst *.lzz *.inc
rm -f *~ *.o *.lst *.inc *.gr *.lzsa

View File

@ -1,94 +0,0 @@
underwater_rle: .byte $28 ; ysize=48
.byte $22,$22, $A3,$00, $A3,$22, $26, $22, $66, $6E
.byte $2E, $6E, $25,$25, $66, $6E,$6E, $A4,$66, $5E
.byte $2F,$2F, $6F, $A3,$66, $26,$26, $02, $A7,$00, $22,$22
.byte $A3,$00, $22,$22, $02,$02, $22, $00, $22, $A4,$00
.byte $50, $20, $A3,$00, $22, $A8,$00, $22, $A9,$00
.byte $02, $22, $A3,$00, $22, $00,$00, $A3,$22, $00,$00
.byte $02, $00,$00, $02,$02, $AC,$00, $22, $AA,$00, $22
.byte $A3,$00, $22, $00, $02, $00,$00, $22, $A7,$00
.byte $02, $A3,$00, $22, $A7,$00, $22, $A9,$00, $20
.byte $22, $20, $00,$00, $22, $A4,$00, $22, $A4,$00
.byte $60,$60, $A7,$00, $20,$20, $A4,$00, $22, $A6,$00, $A3,$20
.byte $00,$00, $02,$02, $06,$06, $60, $20, $00,$00, $22
.byte $A4,$00, $02, $05, $A7,$00, $02,$02, $A4,$00, $22
.byte $00, $20,$20, $A4,$22, $02,$02, $AA,$00, $22, $A5,$00
.byte $20,$20, $A3,$00, $20, $A8,$00, $22, $02,$02, $A0,$11,$00
.byte $22, $A6,$00, $02, $AC,$00, $22, $A0,$13,$00, $22
.byte $A9,$00, $20, $00,$00, $22,$22, $A5,$00, $22, $A9,$00
.byte $A3,$20, $A7,$00, $22, $A3,$00, $02, $A3,$00, $02
.byte $A7,$00, $20, $00,$00, $20, $02, $A9,$00, $A3,$22
.byte $A3,$20, $A4,$00, $22, $A7,$00, $02, $A4,$00, $20
.byte $00,$00, $02, $00,$00, $22, $AA,$00, $A6,$22, $A4,$00
.byte $22, $A4,$00, $22, $A3,$00, $20, $A3,$00, $02
.byte $A5,$00, $22, $AA,$00, $02,$02, $A4,$22, $A4,$00, $22
.byte $A8,$00, $02, $A3,$00, $25, $A5,$00, $22, $AC,$00
.byte $A4,$02, $A4,$00, $22, $A0,$12,$00, $22, $A0,$12,$00, $20
.byte $22,$22, $20, $A4,$00, $22, $AC,$00, $22, $02
.byte $20,$20, $AD,$00, $20, $22, $02, $00,$00, $22
.byte $A0,$11,$00, $22, $00,$00, $02, $22, $20, $A9,$00
.byte $20, $22, $02, $A4,$00, $22, $A0,$11,$00, $22
.byte $A4,$00, $02, $22, $20, $A5,$00, $20, $22
.byte $02, $22, $A5,$00, $22,$22, $A5,$00, $02, $AA,$00
.byte $22, $A6,$00, $02, $22, $20, $00, $20
.byte $22, $02, $00,$00, $22, $A5,$00, $22, $AF,$00
.byte $20, $00, $22, $A8,$00, $A3,$22, $A3,$00, $20
.byte $02, $A5,$00, $22, $AF,$00, $02, $00, $22
.byte $A9,$00, $02, $A3,$00, $22, $02, $A3,$00, $20
.byte $22, $00, $22, $A0,$10,$00, $20, $22, $A0,$11,$00
.byte $20, $22,$22, $00, $22, $A0,$10,$00, $22, $00
.byte $22, $A0,$10,$00, $22, $02, $00, $22,$22, $AC,$00
.byte $20, $A3,$00, $22, $00, $02, $20, $AF,$00
.byte $02, $00, $22, $00, $22, $AC,$00, $02
.byte $A3,$00, $22, $00,$00, $22, $A8,$00
.byte $A1
uboot_flash1_rle: .byte $28 ; ysize=48
.byte $A0,$FF,$EE, $A0,$A3,$EE, $FE, $FF, $FE, $A0,$13,$EE, $A0,$11,$FE
.byte $A5,$FF, $A0,$12,$FE, $A0,$28,$FF, $A0,$11,$EE, $EF, $A3,$FF, $EF
.byte $A0,$24,$EE, $EF,$EF, $A0,$FF,$EE, $A0,$7D,$EE
.byte $A1
uboot_flash2_rle: .byte $28 ; ysize=48
.byte $55,$55, $A3,$22, $66, $56, $66,$66, $65, $66
.byte $A3,$6F, $A3,$66, $6F,$6F, $A4,$66, $A4,$6F, $A3,$66, $56,$56
.byte $A8,$22, $55,$55, $A3,$22, $66, $55, $25,$25, $66
.byte $A6,$22, $62,$62, $A3,$22, $56, $A8,$22, $55, $A9,$22
.byte $25, $55, $A3,$22, $66, $22,$22, $55, $66,$66
.byte $A5,$22, $26,$26, $AC,$22, $55, $AA,$22, $55, $A3,$22
.byte $66, $A4,$22, $66, $A7,$22, $25, $A3,$22, $56
.byte $A7,$22, $55, $A9,$22, $62, $65, $62, $22,$22
.byte $66, $A4,$22, $56, $A4,$22, $F2,$F2, $A7,$22, $52
.byte $62, $A4,$22, $55, $A6,$22, $A3,$62, $22,$22, $A4,$26
.byte $A3,$62, $22, $55, $A4,$22, $26,$26, $A7,$22, $25,$25
.byte $A4,$22, $55, $22, $52,$52, $A3,$56, $55, $25,$25
.byte $A9,$22, $26, $55, $A5,$22, $52, $62, $A3,$22
.byte $52, $A8,$22, $55, $25,$25, $A0,$11,$22, $55, $A6,$22
.byte $25, $AC,$22, $55, $A0,$13,$22, $55, $A9,$22, $52
.byte $22,$22, $55, $56, $A5,$22, $55, $A9,$22, $A3,$62
.byte $A7,$22, $55, $A3,$22, $25, $A3,$22, $E5, $EE,$EE
.byte $E2, $A4,$22, $52, $22,$22, $52, $25, $A9,$22
.byte $A3,$66, $A3,$52, $A4,$22, $55, $A6,$22, $E2, $A4,$EE
.byte $E2, $52, $22,$22, $25, $22,$22, $55, $AA,$22
.byte $A3,$66, $A3,$55, $A4,$22, $55, $A4,$22, $55, $22
.byte $EE,$EE, $FE,$FE, $EE,$EE, $25, $A5,$22, $55, $AA,$22
.byte $26,$26, $56, $A3,$55, $A4,$22, $55, $A6,$22, $A3,$EE
.byte $EF, $EE,$EE, $65, $A5,$22, $55, $AC,$22, $A4,$25
.byte $A4,$22, $55, $A6,$22, $2E, $A4,$EE, $2E, $A6,$22
.byte $55, $A0,$12,$22, $52, $55,$55, $52, $A4,$22, $55
.byte $22, $A4,$2E, $A7,$22, $55, $25, $52,$52, $AD,$22
.byte $52, $65, $25, $22,$22, $55, $A0,$11,$22, $55
.byte $22,$22, $25, $55, $52, $A9,$22, $52, $55
.byte $25, $A4,$22, $55, $A0,$11,$22, $55, $A4,$22, $25
.byte $55, $52, $A5,$22, $52, $55, $25, $66
.byte $A5,$22, $55,$55, $A5,$22, $25, $AA,$22, $55, $A6,$22
.byte $25, $55, $52, $22, $52, $55, $25
.byte $22,$22, $66, $A5,$22, $55, $AF,$22, $52, $22
.byte $55, $A8,$22, $A3,$55, $A3,$22, $62, $26, $A5,$22
.byte $55, $AF,$22, $25, $22, $55, $A9,$22, $25
.byte $A3,$22, $66, $26, $A3,$22, $52, $55, $22
.byte $55, $A0,$10,$22, $52, $55, $A0,$11,$22, $52, $55,$55
.byte $22, $55, $A0,$10,$22, $55, $22, $55, $A0,$10,$22
.byte $55, $25, $22, $55,$55, $AC,$22, $52, $A3,$22
.byte $55, $22, $25, $52, $AF,$22, $25, $22
.byte $55, $22, $55, $AC,$22, $25, $A3,$22, $55
.byte $22,$22, $55, $A8,$22
.byte $A1

View File

@ -141,6 +141,7 @@ end_message:
.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_make_quake.s"

View File

@ -19,12 +19,13 @@ ootw_c1_arrival:
;=============================
; Load background to $c00
lda #>(underwater_rle)
sta GBASH
lda #<(underwater_rle)
sta GBASL
lda #<(underwater_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(underwater_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load image off-screen $c00
jsr load_rle_gr
jsr decompress_lzsa2_fast
;=================================
@ -470,12 +471,13 @@ first_flash:
; Load background to $1000
lda #>(uboot_flash1_rle)
sta GBASH
lda #<(uboot_flash1_rle)
sta GBASL
lda #<(uboot_flash1_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(uboot_flash1_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$10 ; load image off-screen $c00
jsr load_rle_gr
jsr decompress_lzsa2_fast
jsr gr_overlay
@ -484,12 +486,13 @@ second_flash:
; Load background to $1000
lda #>(uboot_flash2_rle)
sta GBASH
lda #<(uboot_flash2_rle)
sta GBASL
lda #<(uboot_flash2_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(uboot_flash2_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$10 ; load image off-screen $c00
jsr load_rle_gr
jsr decompress_lzsa2_fast
jsr gr_overlay

View File

@ -370,10 +370,11 @@ beast_end:
;=============================
; Restore background to $c00
lda #>(cavern3_rle)
sta GBASH
lda #<(cavern3_rle)
sta GBASL
lda #<(cavern3_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(cavern3_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load image off-screen $c00
jmp load_rle_gr

View File

@ -252,18 +252,20 @@ cavern_load_background:
cave_bg0:
; load background
lda #>(cavern_rle)
sta GBASH
lda #<(cavern_rle)
sta GBASL
lda #<(cavern_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(cavern_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
jmp cave_bg_done
cave_bg1:
; load background
lda #>(cavern2_rle)
sta GBASH
lda #<(cavern2_rle)
sta GBASL
lda #<(cavern2_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(cavern2_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
cave_bg_done:
lda #$c ; load image off-screen $c00
jmp load_rle_gr ; tail call
jmp decompress_lzsa2_fast ; tail call

View File

@ -41,12 +41,13 @@ mesa_left:
;=============================
; Load background to $c00
lda #>(cavern3_rle)
sta GBASH
lda #<(cavern3_rle)
sta GBASL
lda #<(cavern3_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(cavern3_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load image off-screen $c00
jsr load_rle_gr
jsr decompress_lzsa2_fast
;=================================
@ -334,11 +335,11 @@ check_if_first:
cmp #MAX_PROGRESSION ; only load background on first frame
bne levelend_not_first
lda #<cavern3_rle
sta GBASL
lda #>cavern3_rle
lda #<cavern3_lzsa
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>cavern3_lzsa
sta getsrc_smc+2 ; LZSA_SRC_HI
sta GBASH
lda #$C ; load image off-screen $C00
jsr load_rle_gr