peasant: convert to zx02 compression from lzsa

makes a noticable improvement in file sizes
This commit is contained in:
Vince Weaver 2022-08-02 00:46:54 -04:00
parent 5dde1f4baa
commit b85da4bc1a
42 changed files with 1106 additions and 1252 deletions

View File

@ -5,7 +5,8 @@ DOS33_RAW = ../../utils/dos33fs-utils/dos33_raw
TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft
LINKER_SCRIPTS = ../../linker_scripts
EMPTY_DISK = ../../empty_disk
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: peasant.dsk peasant_side2.dsk
@ -13,8 +14,8 @@ zip: peasant.dsk peasant_side2.dsk
zip peasant.zip peasant.dsk peasant_side2.dsk
peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO \
PEASANT1 PEASANT2 PEASANT3 PEASANT4 ENDING TROGDOR \
SAVE1 SAVE2 SAVE3 MUSIC INVENTORY PARSE_INPUT.LZSA
PEASANT1 PEASANT2 PEASANT3 PEASANT4 \
SAVE1 SAVE2 SAVE3 MUSIC INVENTORY PARSE_INPUT.ZX02
cp $(EMPTY_DISK)/empty.dsk peasant.dsk
$(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) peasant.dsk 0 2 QBOOT 1 1
@ -27,7 +28,7 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO \
$(DOS33_RAW) peasant.dsk 4 0 VID_LOGO 0 0
$(DOS33_RAW) peasant.dsk 6 0 TITLE 0 0
$(DOS33_RAW) peasant.dsk 9 0 INTRO 0 0
$(DOS33_RAW) peasant.dsk 13 0 PARSE_INPUT.LZSA 0 0
$(DOS33_RAW) peasant.dsk 13 0 PARSE_INPUT.ZX02 0 0
$(DOS33_RAW) peasant.dsk 14 0 INVENTORY 0 0
$(DOS33_RAW) peasant.dsk 15 0 PEASANT1 0 0
$(DOS33_RAW) peasant.dsk 20 0 PEASANT2 0 0
@ -65,7 +66,7 @@ QLOAD: qload.o
ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_b00.inc
qload.o: qload.s qboot.inc \
decompress_fast_v2.s \
zx02_optim.s \
hgr_font.s \
draw_box.s \
hgr_rectangle.s \
@ -133,8 +134,11 @@ qload.inc: generate_common QLOAD
./generate_common -a 0xb00 -s sector_write qload.lst >> qload.inc
./generate_common -a 0xb00 -s check_floppy_in_drive2 qload.lst >> qload.inc
./generate_common -a 0xb00 -s requested_sector qload.lst >> qload.inc
./generate_common -a 0xb00 -s decompress_lzsa2_fast qload.lst >> qload.inc
./generate_common -a 0xb00 -s getsrc_smc qload.lst >> qload.inc
# ./generate_common -a 0xb00 -s decompress_lzsa2_fast qload.lst >> qload.inc
# ./generate_common -a 0xb00 -s getsrc_smc qload.lst >> qload.inc
./generate_common -a 0xb00 -s zx02_full_decomp qload.lst >> qload.inc
./generate_common -a 0xb00 -s zx_src_l qload.lst >> qload.inc
./generate_common -a 0xb00 -s zx_src_h qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr2 qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_make_tables qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_put_string qload.lst >> qload.inc
@ -205,7 +209,7 @@ VID_LOGO: vid_logo.o
ld65 -o VID_LOGO vid_logo.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
vid_logo.o: vid_logo.s qload.inc \
decompress_fast_v2.s hgr_overlay.s speaker_beeps.s \
hgr_overlay.s speaker_beeps.s \
graphics_vid/vid_graphics.inc
ca65 -o vid_logo.o vid_logo.s -l vid_logo.lst
@ -270,7 +274,7 @@ CLIFF: cliff.o
cliff.o: cliff.s zp.inc inventory.inc \
parse_input.inc \
cliff_actions.s DIALOG_CLIFF.LZSA dialog_cliff.inc \
cliff_actions.s DIALOG_CLIFF.ZX02 dialog_cliff.inc \
graphics_cliff/cliff_graphics.inc sprites/peasant_sprites.inc \
graphics_cliff/priority_cliff.inc \
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
@ -338,7 +342,7 @@ PEASANT1: peasant1.o
peasant1.o: peasant1.s zp.inc inventory.inc \
parse_input.inc \
peasant1_actions.s DIALOG_PEASANT1.LZSA dialog_peasant1.inc \
peasant1_actions.s DIALOG_PEASANT1.ZX02 dialog_peasant1.inc \
text/peasant1.inc text/kerrek.inc \
kerrek_actions.s peasant_common.s \
sprites/peasant_sprites.inc sprites/inventory_sprites.inc \
@ -360,7 +364,7 @@ PEASANT2: peasant2.o
peasant2.o: peasant2.s zp.inc inventory.inc \
parse_input.inc \
peasant2_actions.s DIALOG_PEASANT2.LZSA dialog_peasant2.inc \
peasant2_actions.s DIALOG_PEASANT2.ZX02 dialog_peasant2.inc \
graphics_peasantry/graphics_peasant2.inc sprites/peasant_sprites.inc \
graphics_peasantry/priority_peasant2.inc \
sprites/river_bubble_sprites.inc \
@ -380,7 +384,7 @@ PEASANT3: peasant3.o
peasant3.o: peasant3.s zp.inc inventory.inc \
parse_input.inc \
peasant3_actions.s DIALOG_PEASANT3.LZSA dialog_peasant3.inc \
peasant3_actions.s DIALOG_PEASANT3.ZX02 dialog_peasant3.inc \
graphics_peasantry/graphics_peasant3.inc sprites/peasant_sprites.inc \
graphics_peasantry/priority_peasant3.inc \
peasant_common.s \
@ -400,7 +404,7 @@ PEASANT4: peasant4.o
peasant4.o: peasant4.s zp.inc inventory.inc \
parse_input.inc \
sprites/ned_sprites.inc \
peasant4_actions.s DIALOG_PEASANT4.LZSA dialog_peasant4.inc \
peasant4_actions.s DIALOG_PEASANT4.ZX02 dialog_peasant4.inc \
kerrek_actions.s peasant_common.s \
text/peasant4.inc text/kerrek.inc \
graphics_peasantry/graphics_peasant4.inc sprites/peasant_sprites.inc \
@ -420,7 +424,7 @@ TROGDOR: trogdor.o
trogdor.o: trogdor.s zp.inc \
graphics_trogdor/trogdor_graphics.inc sprites/trogdor_sprites.inc \
sprites/inventory_sprites.inc \
DIALOG_TROGDOR.LZSA dialog_trogdor.inc \
DIALOG_TROGDOR.ZX02 dialog_trogdor.inc \
ssi263_simple_speech.s \
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
hgr_save_restore.s \
@ -468,7 +472,7 @@ INSIDE: inside.o
inside.o: inside.s zp.inc inventory.inc \
parse_input.inc \
inside_actions.s DIALOG_INSIDE.LZSA dialog_inside.inc \
inside_actions.s DIALOG_INSIDE.ZX02 dialog_inside.inc \
graphics_inside/graphics_inside.inc sprites/peasant_sprites.inc \
graphics_inside/priority_inside.inc \
sprites/inventory_sprites.inc \
@ -486,7 +490,7 @@ INN: inn.o
inn.o: inn.s zp.inc inventory.inc \
parse_input.inc \
inn_actions.s DIALOG_INN.LZSA dialog_inn.inc \
inn_actions.s DIALOG_INN.ZX02 dialog_inn.inc \
graphics_inn/graphics_inn.inc sprites/peasant_sprites.inc \
graphics_inn/priority_inn.inc \
sprites/inventory_sprites.inc \
@ -549,8 +553,8 @@ parse_input.inc: generate_common parse_input
###
PARSE_INPUT.LZSA: parse_input
$(LZSA) -r -f2 parse_input PARSE_INPUT.LZSA
PARSE_INPUT.ZX02: parse_input
$(ZX02) -f parse_input PARSE_INPUT.ZX02
parse_input: parse_input.o
ld65 -o parse_input parse_input.o -C ../../linker_scripts/apple2_ee00.inc
@ -561,8 +565,8 @@ parse_input.o: parse_input.s tokens.inc text/common.inc.lookup
###
DIALOG_PEASANT1.LZSA: dialog_peasant1
$(LZSA) -r -f2 dialog_peasant1 DIALOG_PEASANT1.LZSA
DIALOG_PEASANT1.ZX02: dialog_peasant1
$(ZX02) -f dialog_peasant1 DIALOG_PEASANT1.ZX02
dialog_peasant1: dialog_peasant1.o
ld65 -o dialog_peasant1 dialog_peasant1.o -C ../../linker_scripts/apple2_d000.inc
@ -577,8 +581,8 @@ dialog_peasant1.inc: generate_all_symbols dialog_peasant1
###
DIALOG_PEASANT2.LZSA: dialog_peasant2
$(LZSA) -r -f2 dialog_peasant2 DIALOG_PEASANT2.LZSA
DIALOG_PEASANT2.ZX02: dialog_peasant2
$(ZX02) -f dialog_peasant2 DIALOG_PEASANT2.ZX02
dialog_peasant2: dialog_peasant2.o
ld65 -o dialog_peasant2 dialog_peasant2.o -C ../../linker_scripts/apple2_d000.inc
@ -593,8 +597,8 @@ dialog_peasant2.inc: generate_all_symbols dialog_peasant2
####
DIALOG_PEASANT3.LZSA: dialog_peasant3
$(LZSA) -r -f2 dialog_peasant3 DIALOG_PEASANT3.LZSA
DIALOG_PEASANT3.ZX02: dialog_peasant3
$(ZX02) -f dialog_peasant3 DIALOG_PEASANT3.ZX02
dialog_peasant3: dialog_peasant3.o
ld65 -o dialog_peasant3 dialog_peasant3.o -C ../../linker_scripts/apple2_d000.inc
@ -608,8 +612,8 @@ dialog_peasant3.inc: generate_all_symbols dialog_peasant3
./generate_all_symbols -a 0xd000 dialog_peasant3.lst > dialog_peasant3.inc
####
DIALOG_PEASANT4.LZSA: dialog_peasant4
$(LZSA) -r -f2 dialog_peasant4 DIALOG_PEASANT4.LZSA
DIALOG_PEASANT4.ZX02: dialog_peasant4
$(ZX02) -f dialog_peasant4 DIALOG_PEASANT4.ZX02
dialog_peasant4: dialog_peasant4.o
ld65 -o dialog_peasant4 dialog_peasant4.o -C ../../linker_scripts/apple2_d000.inc
@ -624,8 +628,8 @@ dialog_peasant4.inc: generate_all_symbols dialog_peasant4
####
DIALOG_INSIDE.LZSA: dialog_inside
$(LZSA) -r -f2 dialog_inside DIALOG_INSIDE.LZSA
DIALOG_INSIDE.ZX02: dialog_inside
$(ZX02) -f dialog_inside DIALOG_INSIDE.ZX02
dialog_inside: dialog_inside.o
ld65 -o dialog_inside dialog_inside.o -C ../../linker_scripts/apple2_d000.inc
@ -640,8 +644,8 @@ dialog_inside.inc: generate_all_symbols dialog_inside
####
DIALOG_INN.LZSA: dialog_inn
$(LZSA) -r -f2 dialog_inn DIALOG_INN.LZSA
DIALOG_INN.ZX02: dialog_inn
$(ZX02) -f dialog_inn DIALOG_INN.ZX02
dialog_inn: dialog_inn.o
ld65 -o dialog_inn dialog_inn.o -C ../../linker_scripts/apple2_d000.inc
@ -656,8 +660,8 @@ dialog_inn.inc: generate_all_symbols dialog_inn
####
DIALOG_CLIFF.LZSA: dialog_cliff
$(LZSA) -r -f2 dialog_cliff DIALOG_CLIFF.LZSA
DIALOG_CLIFF.ZX02: dialog_cliff
$(ZX02) -f dialog_cliff DIALOG_CLIFF.ZX02
dialog_cliff: dialog_cliff.o
ld65 -o dialog_cliff dialog_cliff.o -C ../../linker_scripts/apple2_d000.inc
@ -672,8 +676,8 @@ dialog_cliff.inc: generate_all_symbols dialog_cliff
####
DIALOG_TROGDOR.LZSA: dialog_trogdor
$(LZSA) -r -f2 dialog_trogdor DIALOG_TROGDOR.LZSA
DIALOG_TROGDOR.ZX02: dialog_trogdor
$(ZX02) -f dialog_trogdor DIALOG_TROGDOR.ZX02
dialog_trogdor: dialog_trogdor.o
ld65 -o dialog_trogdor dialog_trogdor.o -C ../../linker_scripts/apple2_d000.inc
@ -778,4 +782,4 @@ clean:
rm -f *~ *.o *.lst HELLO VID_LOGO TITLE INTRO COPY_CHECK \
PEASANT1 PEASANT2 PEASANT3 PEASANT4 \
TROGDOR ENDING MUSIC GAME_OVER \
dialog_peasant2
*.ZX02 dialog_peasant2

View File

@ -42,6 +42,8 @@ peasant2 18302
17929 -- after redoing so background is always in PAGE1
18132 -- add in river animation code
18181 -- forgot the "climb fence" message
17497 -- use ZX02 compression instead of LZSA
partial save, can we fit in 4k?
102 lines ; inventory was 115?
@ -224,3 +226,30 @@ deaths/endings implemented
+6 walk on range (while Dongolev shooting)
+7 walk too close to Kerrek
+8 say "yes" when Jhonka asks if you stole riches
v0.84 sizes: lzsa zx02
============= ====== =====
QLOAD 5239 5122
MUSIC 4045 4045
VID_LOGO 7678 7370
TITLE 8950 8466
INTRO 13583 12871
PARSE_INPUT 3510 3249
INVENTORY 3122 3122
PEASANT1 19150 18208
PEASANT2 18254 17497
PEASANT3 18880 17927
PEASANT4 17610 16701
COPY_CHECK 2942 2834
GAME_OVER 2113 2074
MAP 2703 2556
ARCHERY 2112 2016
INSIDE 14157 13460
INN 9342 8938
TROGDOR 15657 14774
ENDING 17642 17038
CLIFF 13418 12648

View File

@ -39,14 +39,14 @@ new_location:
sbc #LOCATION_BASE
tax
lda #<target_lzsa
sta getsrc_smc+1
lda #>target_lzsa
sta getsrc_smc+2
lda #<target_zx02
sta zx_src_l+1
lda #>target_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; put peasant text

View File

@ -25,14 +25,14 @@ cliff_base:
; decompress dialog to $D000
lda #<cliff_text_lzsa
sta getsrc_smc+1
lda #>cliff_text_lzsa
sta getsrc_smc+2
lda #<cliff_text_zx02
sta zx_src_l+1
lda #>cliff_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -79,13 +79,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -101,13 +101,13 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -259,24 +259,24 @@ exiting_cliff:
.include "graphics_cliff/priority_cliff.inc"
map_backgrounds_low:
.byte <cliff_base_lzsa
.byte <cliff_heights_lzsa
.byte <outer_lzsa
.byte <cliff_base_zx02
.byte <cliff_heights_zx02
.byte <outer_zx02
map_backgrounds_hi:
.byte >cliff_base_lzsa
.byte >cliff_heights_lzsa
.byte >outer_lzsa
.byte >cliff_base_zx02
.byte >cliff_heights_zx02
.byte >outer_zx02
map_priority_low:
.byte <cliff_base_priority_lzsa
.byte <cliff_heights_priority_lzsa
.byte <outer_priority_lzsa
.byte <cliff_base_priority_zx02
.byte <cliff_heights_priority_zx02
.byte <outer_priority_zx02
map_priority_hi:
.byte >cliff_base_priority_lzsa
.byte >cliff_heights_priority_lzsa
.byte >outer_priority_lzsa
.byte >cliff_base_priority_zx02
.byte >cliff_heights_priority_zx02
.byte >outer_priority_zx02
verb_tables_low:
.byte <cliff_base_verb_table
@ -290,7 +290,7 @@ verb_tables_hi:
cliff_text_lzsa:
.incbin "DIALOG_CLIFF.LZSA"
cliff_text_zx02:
.incbin "DIALOG_CLIFF.ZX02"
.include "cliff_actions.s"

View File

@ -26,14 +26,14 @@ copy_check:
trogdor_question:
lda #<(trogdor_lzsa)
sta getsrc_smc+1
lda #>(trogdor_lzsa)
sta getsrc_smc+2
lda #<(trogdor_zx02)
sta zx_src_l+1
lda #>(trogdor_zx02)
sta zx_src_h+2
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
lda #<copy_protection_text
sta OUTL
@ -85,14 +85,14 @@ wrong:
game_over:
lda #<(game_over_lzsa)
sta getsrc_smc+1
lda #>(game_over_lzsa)
sta getsrc_smc+2
lda #<(game_over_zx02)
sta zx_src_l+1
lda #>(game_over_zx02)
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
lda #<peasant_text
sta OUTL

View File

@ -1,370 +0,0 @@
; note -- modified by Vince Weaver to assemble with ca65
; in this case, A = page to decompress to
; getsrc_smc+1, getsrc_smc+2 is src location
; -----------------------------------------------------------------------------
; Decompress raw LZSA2 block.
; Create one with lzsa -r -f2 <original_file> <compressed_file>
;
; in:
; * LZSA_SRC_LO and LZSA_SRC_HI contain the compressed raw block address
; * LZSA_DST_LO and LZSA_DST_HI contain the destination buffer address
;
; out:
; * LZSA_DST_LO and LZSA_DST_HI contain the last decompressed byte address, +1
;
; -----------------------------------------------------------------------------
; Backward decompression is also supported, use lzsa -r -b -f2 <original_file> <compressed_file>
; To use it, also define BACKWARD_DECOMPRESS=1 before including this code!
;
; in:
; * LZSA_SRC_LO/LZSA_SRC_HI must contain the address of the last byte of compressed data
; * LZSA_DST_LO/LZSA_DST_HI must contain the address of the last byte of the destination buffer
;
; out:
; * LZSA_DST_LO/LZSA_DST_HI contain the last decompressed byte address, -1
;
; -----------------------------------------------------------------------------
;
; Copyright (C) 2019 Emmanuel Marty, Peter Ferrie
;
; This software is provided 'as-is', without any express or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
; claim that you wrote the original software. If you use this software
; in a product, an acknowledgment in the product documentation would be
; appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not be
; misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source distribution.
; -----------------------------------------------------------------------------
;NIBCOUNT = $FC ; zero-page location for temp offset
decompress_lzsa2_fast:
sta LZSA_DST_HI
ldy #$00
sty LZSA_DST_LO
sty NIBCOUNT
decode_token:
jsr getsrc ; read token byte: XYZ|LL|MMM
pha ; preserve token on stack
and #$18 ; isolate literals count (LL)
beq no_literals ; skip if no literals to copy
cmp #$18 ; LITERALS_RUN_LEN_V2?
bcc prepare_copy_literals ; if less, count is directly embedded in token
jsr getnibble ; get extra literals length nibble
; add nibble to len from token
adc #$02 ; (LITERALS_RUN_LEN_V2) minus carry
cmp #$12 ; LITERALS_RUN_LEN_V2 + 15 ?
bcc prepare_copy_literals_direct ; if less, literals count is complete
jsr getsrc ; get extra byte of variable literals count
; the carry is always set by the CMP above
; GETSRC doesn't change it
sbc #$EE ; overflow?
jmp prepare_copy_literals_direct
prepare_copy_literals_large:
; handle 16 bits literals count
; literals count = directly these 16 bits
jsr getlargesrc ; grab low 8 bits in X, high 8 bits in A
tay ; put high 8 bits in Y
bcs prepare_copy_literals_high ; (*same as JMP PREPARE_COPY_LITERALS_HIGH but shorter)
prepare_copy_literals:
lsr ; shift literals count into place
lsr
lsr
prepare_copy_literals_direct:
tax
bcs prepare_copy_literals_large ; if so, literals count is large
prepare_copy_literals_high:
txa
beq copy_literals
iny
copy_literals:
jsr getput ; copy one byte of literals
dex
bne copy_literals
dey
bne copy_literals
no_literals:
pla ; retrieve token from stack
pha ; preserve token again
asl
bcs repmatch_or_large_offset ; 1YZ: rep-match or 13/16 bit offset
asl ; 0YZ: 5 or 9 bit offset
bcs offset_9_bit
; 00Z: 5 bit offset
ldx #$FF ; set offset bits 15-8 to 1
jsr getcombinedbits ; rotate Z bit into bit 0, read nibble for bits 4-1
ora #$E0 ; set bits 7-5 to 1
bne got_offset_lo ; go store low byte of match offset and prepare match
offset_9_bit: ; 01Z: 9 bit offset
;;asl ; shift Z (offset bit 8) in place
rol
rol
and #$01
eor #$FF ; set offset bits 15-9 to 1
bne got_offset_hi ; go store high byte, read low byte of match offset and prepare match
; (*same as JMP GOT_OFFSET_HI but shorter)
repmatch_or_large_offset:
asl ; 13 bit offset?
bcs repmatch_or_16bit ; handle rep-match or 16-bit offset if not
; 10Z: 13 bit offset
jsr getcombinedbits ; rotate Z bit into bit 8, read nibble for bits 12-9
adc #$DE ; set bits 15-13 to 1 and substract 2 (to substract 512)
bne got_offset_hi ; go store high byte, read low byte of match offset and prepare match
; (*same as JMP GOT_OFFSET_HI but shorter)
repmatch_or_16bit: ; rep-match or 16 bit offset
;;ASL ; XYZ=111?
bmi rep_match ; reuse previous offset if so (rep-match)
; 110: handle 16 bit offset
jsr getsrc ; grab high 8 bits
got_offset_hi:
tax
jsr getsrc ; grab low 8 bits
got_offset_lo:
sta OFFSLO ; store low byte of match offset
stx OFFSHI ; store high byte of match offset
rep_match:
.ifdef BACKWARD_DECOMPRESS
; Backward decompression - substract match offset
sec ; add dest + match offset
lda putdst+1 ; low 8 bits
OFFSLO = *+1
sbc #$AA
sta copy_match_loop+1 ; store back reference address
lda putdst+2
OFFSHI = *+1
sbc #$AA ; high 8 bits
sta copy_match_loop+2 ; store high 8 bits of address
sec
.else
; Forward decompression - add match offset
clc ; add dest + match offset
lda putdst+1 ; low 8 bits
OFFSLO = *+1
adc #$AA
sta copy_match_loop+1 ; store back reference address
OFFSHI = *+1
lda #$AA ; high 8 bits
adc putdst+2
sta copy_match_loop+2 ; store high 8 bits of address
.endif
pla ; retrieve token from stack again
and #$07 ; isolate match len (MMM)
adc #$01 ; add MIN_MATCH_SIZE_V2 and carry
cmp #$09 ; MIN_MATCH_SIZE_V2 + MATCH_RUN_LEN_V2?
bcc prepare_copy_match ; if less, length is directly embedded in token
jsr getnibble ; get extra match length nibble
; add nibble to len from token
adc #$08 ; (MIN_MATCH_SIZE_V2 + MATCH_RUN_LEN_V2) minus carry
cmp #$18 ; MIN_MATCH_SIZE_V2 + MATCH_RUN_LEN_V2 + 15?
bcc prepare_copy_match ; if less, match length is complete
jsr getsrc ; get extra byte of variable match length
; the carry is always set by the CMP above
; GETSRC doesn't change it
sbc #$E8 ; overflow?
prepare_copy_match:
tax
bcc prepare_copy_match_y ; if not, the match length is complete
beq decompression_done ; if EOD code, bail
; Handle 16 bits match length
jsr getlargesrc ; grab low 8 bits in X, high 8 bits in A
tay ; put high 8 bits in Y
prepare_copy_match_y:
txa
beq copy_match_loop
iny
copy_match_loop:
lda $AAAA ; get one byte of backreference
jsr putdst ; copy to destination
.ifdef BACKWARD_DECOMPRESS
; Backward decompression -- put backreference bytes backward
lda copy_match_loop+1
beq getmatch_adj_hi
getmatch_done:
dec copy_match_loop+1
.else
; Forward decompression -- put backreference bytes forward
inc copy_match_loop+1
beq getmatch_adj_hi
getmatch_done:
.endif
dex
bne copy_match_loop
dey
bne copy_match_loop
jmp decode_token
.ifdef BACKWARD_DECOMPRESS
getmatch_adj_hi:
dec copy_match_loop+2
jmp getmatch_done
.else
getmatch_adj_hi:
inc copy_match_loop+2
jmp getmatch_done
.endif
getcombinedbits:
eor #$80
asl
php
jsr getnibble ; get nibble into bits 0-3 (for offset bits 1-4)
plp ; merge Z bit as the carry bit (for offset bit 0)
combinedbitz:
rol ; nibble -> bits 1-4; carry(!Z bit) -> bit 0 ; carry cleared
decompression_done:
rts
getnibble:
NIBBLES = *+1
lda #$AA
lsr NIBCOUNT
bcc need_nibbles
and #$0F ; isolate low 4 bits of nibble
rts
need_nibbles:
inc NIBCOUNT
jsr getsrc ; get 2 nibbles
sta NIBBLES
lsr
lsr
lsr
lsr
sec
rts
.ifdef BACKWARD_DECOMPRESS
; Backward decompression -- get and put bytes backward
getput:
jsr getsrc
putdst:
LZSA_DST_LO = *+1
LZSA_DST_HI = *+2
sta $AAAA
lda putdst+1
beq putdst_adj_hi
dec putdst+1
rts
putdst_adj_hi:
dec putdst+2
dec putdst+1
rts
getlargesrc:
jsr getsrc ; grab low 8 bits
tax ; move to X
; fall through grab high 8 bits
getsrc:
LZSA_SRC_LO = *+1
LZSA_SRC_HI = *+2
lda $AAAA
pha
lda getsrc+1
beq getsrc_adj_hi
dec getsrc+1
pla
rts
getsrc_adj_hi:
dec getsrc+2
dec getsrc+1
pla
rts
.else
; Forward decompression -- get and put bytes forward
getput:
jsr getsrc
putdst:
LZSA_DST_LO = *+1
LZSA_DST_HI = *+2
sta $AAAA
inc putdst+1
beq putdst_adj_hi
rts
putdst_adj_hi:
inc putdst+2
rts
getlargesrc:
jsr getsrc ; grab low 8 bits
tax ; move to X
; fall through grab high 8 bits
getsrc:
getsrc_smc:
LZSA_SRC_LO = *+1
LZSA_SRC_HI = *+2
lda $AAAA
inc getsrc+1
beq getsrc_adj_hi
rts
getsrc_adj_hi:
inc getsrc+2
rts
.endif

View File

@ -3,14 +3,14 @@
; Tips
;************************
directions:
lda #<(tips_lzsa)
sta getsrc_smc+1
lda #>(tips_lzsa)
sta getsrc_smc+2
lda #<(tips_zx02)
sta zx_src_l+1
lda #>(tips_zx02)
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
lda #<directions_text
sta OUTL

View File

@ -77,14 +77,14 @@ skip_end_music:
;=====================
boat:
lda #<lake_e_boat_lzsa
sta getsrc_smc+1
lda #>lake_e_boat_lzsa
sta getsrc_smc+2
lda #<lake_e_boat_zx02
sta zx_src_l+1
lda #>lake_e_boat_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top
@ -218,14 +218,14 @@ waterfall:
lda #0
sta FRAME
lda #<waterfall_lzsa
sta getsrc_smc+1
lda #>waterfall_lzsa
sta getsrc_smc+2
lda #<waterfall_zx02
sta zx_src_l+1
lda #>waterfall_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top
@ -374,14 +374,14 @@ done_baby:
jhonka:
lda #<jhonka_lzsa
sta getsrc_smc+1
lda #>jhonka_lzsa
sta getsrc_smc+2
lda #<jhonka_zx02
sta zx_src_l+1
lda #>jhonka_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top
@ -455,14 +455,14 @@ animation_loop:
cottage:
lda #<cottage_lzsa
sta getsrc_smc+1
lda #>cottage_lzsa
sta getsrc_smc+2
lda #<cottage_zx02
sta zx_src_l+1
lda #>cottage_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top
@ -535,14 +535,14 @@ cottage:
;========================
final_screen:
lda #<the_end_lzsa
sta getsrc_smc+1
lda #>the_end_lzsa
sta getsrc_smc+2
lda #<the_end_zx02
sta zx_src_l+1
lda #>the_end_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top

View File

@ -30,14 +30,14 @@ game_over:
; draw game over background
;===========================
lda #<game_over_lzsa
sta getsrc_smc+1
lda #>game_over_lzsa
sta getsrc_smc+2
lda #<game_over_zx02
sta zx_src_l+1
lda #>game_over_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; put peasant text
@ -123,14 +123,14 @@ done_beep:
;=====================
; draw videlectrix
lda #<videlectrix_lzsa
sta getsrc_smc+1
lda #>videlectrix_lzsa
sta getsrc_smc+2
lda #<videlectrix_zx02
sta zx_src_l+1
lda #>videlectrix_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
lda #<game_over_text
sta OUTL

View File

@ -2,8 +2,9 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: archery_graphics.inc
@ -11,13 +12,13 @@ all: archery_graphics.inc
###
archery_graphics.inc: \
target.lzsa
echo "target_lzsa: .incbin \"target.lzsa\"" > archery_graphics.inc
target.zx02
echo "target_zx02: .incbin \"target.zx02\"" > archery_graphics.inc
###
target.lzsa: target.hgr
$(LZSA) -r -f2 target.hgr target.lzsa
target.zx02: target.hgr
$(ZX02) -f target.hgr target.zx02
target.hgr: target.png
$(PNG2HGR) target.png > target.hgr
@ -27,5 +28,5 @@ target.hgr: target.png
clean:
rm -f *~ archery_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ archery_graphics.inc *.zx02 *.gr *.hgr

View File

@ -2,8 +2,9 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: cliff_graphics.inc \
priority_cliff.inc
@ -11,31 +12,31 @@ all: cliff_graphics.inc \
###
cliff_graphics.inc: \
cliff_base.lzsa cliff_heights.lzsa outer.lzsa
echo "cliff_base_lzsa: .incbin \"cliff_base.lzsa\"" > cliff_graphics.inc
echo "cliff_heights_lzsa: .incbin \"cliff_heights.lzsa\"" >> cliff_graphics.inc
echo "outer_lzsa: .incbin \"outer.lzsa\"" >> cliff_graphics.inc
cliff_base.zx02 cliff_heights.zx02 outer.zx02
echo "cliff_base_zx02: .incbin \"cliff_base.zx02\"" > cliff_graphics.inc
echo "cliff_heights_zx02: .incbin \"cliff_heights.zx02\"" >> cliff_graphics.inc
echo "outer_zx02: .incbin \"outer.zx02\"" >> cliff_graphics.inc
###
cliff_base.lzsa: cliff_base.hgr
$(LZSA) -r -f2 cliff_base.hgr cliff_base.lzsa
cliff_base.zx02: cliff_base.hgr
$(ZX02) -f cliff_base.hgr cliff_base.zx02
cliff_base.hgr: cliff_base.png
$(PNG2HGR) cliff_base.png > cliff_base.hgr
###
cliff_heights.lzsa: cliff_heights.hgr
$(LZSA) -r -f2 cliff_heights.hgr cliff_heights.lzsa
cliff_heights.zx02: cliff_heights.hgr
$(ZX02) -f cliff_heights.hgr cliff_heights.zx02
cliff_heights.hgr: cliff_heights.png
$(PNG2HGR) cliff_heights.png > cliff_heights.hgr
###
outer.lzsa: outer.hgr
$(LZSA) -r -f2 outer.hgr outer.lzsa
outer.zx02: outer.hgr
$(ZX02) -f outer.hgr outer.zx02
outer.hgr: outer.png
$(PNG2HGR) outer.png > outer.hgr
@ -45,34 +46,34 @@ outer.hgr: outer.png
###
priority_cliff.inc: \
outer_priority.lzsa \
cliff_base_priority.lzsa \
cliff_heights_priority.lzsa
echo "cliff_base_priority_lzsa: .incbin \"cliff_base_priority.lzsa\"" > priority_cliff.inc
echo "cliff_heights_priority_lzsa: .incbin \"cliff_heights_priority.lzsa\"" >> priority_cliff.inc
echo "outer_priority_lzsa: .incbin \"outer_priority.lzsa\"" >> priority_cliff.inc
outer_priority.zx02 \
cliff_base_priority.zx02 \
cliff_heights_priority.zx02
echo "cliff_base_priority_zx02: .incbin \"cliff_base_priority.zx02\"" > priority_cliff.inc
echo "cliff_heights_priority_zx02: .incbin \"cliff_heights_priority.zx02\"" >> priority_cliff.inc
echo "outer_priority_zx02: .incbin \"outer_priority.zx02\"" >> priority_cliff.inc
####
outer_priority.lzsa: outer_priority.gr
$(LZSA) -r -f2 outer_priority.gr outer_priority.lzsa
outer_priority.zx02: outer_priority.gr
$(ZX02) -f outer_priority.gr outer_priority.zx02
outer_priority.gr: outer_priority.png
$(PNG2GR) outer_priority.png outer_priority.gr
####
cliff_base_priority.lzsa: cliff_base_priority.gr
$(LZSA) -r -f2 cliff_base_priority.gr cliff_base_priority.lzsa
cliff_base_priority.zx02: cliff_base_priority.gr
$(ZX02) -f cliff_base_priority.gr cliff_base_priority.zx02
cliff_base_priority.gr: cliff_base_priority.png
$(PNG2GR) cliff_base_priority.png cliff_base_priority.gr
####
cliff_heights_priority.lzsa: cliff_heights_priority.gr
$(LZSA) -r -f2 cliff_heights_priority.gr cliff_heights_priority.lzsa
cliff_heights_priority.zx02: cliff_heights_priority.gr
$(ZX02) -f cliff_heights_priority.gr cliff_heights_priority.zx02
cliff_heights_priority.gr: cliff_heights_priority.png
$(PNG2GR) cliff_heights_priority.png cliff_heights_priority.gr
@ -82,5 +83,5 @@ cliff_heights_priority.gr: cliff_heights_priority.png
clean:
rm -f *~ cliff_graphics.inc priority_cliff.inc *.lzsa *.gr *.hgr
rm -f *~ cliff_graphics.inc priority_cliff.inc *.zx02 *.gr *.hgr

View File

@ -2,31 +2,32 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: copy_graphics.inc
copy_graphics.inc: \
trogdor.lzsa \
game_over.lzsa
echo "trogdor_lzsa: .incbin \"trogdor.lzsa\"" > copy_graphics.inc
echo "game_over_lzsa: .incbin \"game_over.lzsa\"" >> copy_graphics.inc
trogdor.zx02 \
game_over.zx02
echo "trogdor_zx02: .incbin \"trogdor.zx02\"" > copy_graphics.inc
echo "game_over_zx02: .incbin \"game_over.zx02\"" >> copy_graphics.inc
###
trogdor.lzsa: trogdor.hgr
$(LZSA) -r -f2 trogdor.hgr trogdor.lzsa
trogdor.zx02: trogdor.hgr
$(ZX02) -f trogdor.hgr trogdor.zx02
trogdor.hgr: trogdor.png
$(PNG2HGR) trogdor.png > trogdor.hgr
###
game_over.lzsa: game_over.hgr
$(LZSA) -r -f2 game_over.hgr game_over.lzsa
game_over.zx02: game_over.hgr
$(ZX02) -f game_over.hgr game_over.zx02
game_over.hgr: game_over.png
$(PNG2HGR) game_over.png > game_over.hgr
@ -38,5 +39,5 @@ game_over.hgr: game_over.png
clean:
rm -f *~ copy_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ copy_graphics.inc *.zx02 *.gr *.hgr

View File

@ -2,52 +2,53 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: ending_graphics.inc
ending_graphics.inc: \
lake_e_boat.lzsa \
waterfall.lzsa \
jhonka.lzsa \
cottage.lzsa \
the_end.lzsa
echo "lake_e_boat_lzsa: .incbin \"lake_e_boat.lzsa\"" > ending_graphics.inc
echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> ending_graphics.inc
echo "jhonka_lzsa: .incbin \"jhonka.lzsa\"" >> ending_graphics.inc
echo "cottage_lzsa: .incbin \"cottage.lzsa\"" >> ending_graphics.inc
echo "the_end_lzsa: .incbin \"the_end.lzsa\"" >> ending_graphics.inc
lake_e_boat.zx02 \
waterfall.zx02 \
jhonka.zx02 \
cottage.zx02 \
the_end.zx02
echo "lake_e_boat_zx02: .incbin \"lake_e_boat.zx02\"" > ending_graphics.inc
echo "waterfall_zx02: .incbin \"waterfall.zx02\"" >> ending_graphics.inc
echo "jhonka_zx02: .incbin \"jhonka.zx02\"" >> ending_graphics.inc
echo "cottage_zx02: .incbin \"cottage.zx02\"" >> ending_graphics.inc
echo "the_end_zx02: .incbin \"the_end.zx02\"" >> ending_graphics.inc
###
lake_e_boat.lzsa: lake_e_boat.hgr
$(LZSA) -r -f2 lake_e_boat.hgr lake_e_boat.lzsa
lake_e_boat.zx02: lake_e_boat.hgr
$(ZX02) -f lake_e_boat.hgr lake_e_boat.zx02
lake_e_boat.hgr: lake_e_boat.png
$(PNG2HGR) lake_e_boat.png > lake_e_boat.hgr
###
waterfall.lzsa: waterfall.hgr
$(LZSA) -r -f2 waterfall.hgr waterfall.lzsa
waterfall.zx02: waterfall.hgr
$(ZX02) -f waterfall.hgr waterfall.zx02
waterfall.hgr: waterfall.png
$(PNG2HGR) waterfall.png > waterfall.hgr
###
jhonka.lzsa: jhonka.hgr
$(LZSA) -r -f2 jhonka.hgr jhonka.lzsa
jhonka.zx02: jhonka.hgr
$(ZX02) -f jhonka.hgr jhonka.zx02
jhonka.hgr: jhonka.png
$(PNG2HGR) jhonka.png > jhonka.hgr
###
cottage.lzsa: cottage.hgr
$(LZSA) -r -f2 cottage.hgr cottage.lzsa
cottage.zx02: cottage.hgr
$(ZX02) -f cottage.hgr cottage.zx02
cottage.hgr: cottage.png
$(PNG2HGR) cottage.png > cottage.hgr
@ -55,8 +56,8 @@ cottage.hgr: cottage.png
###
the_end.lzsa: the_end.hgr
$(LZSA) -r -f2 the_end.hgr the_end.lzsa
the_end.zx02: the_end.hgr
$(ZX02) -f the_end.hgr the_end.zx02
the_end.hgr: the_end.png
$(PNG2HGR) the_end.png > the_end.hgr
@ -68,5 +69,5 @@ the_end.hgr: the_end.png
clean:
rm -f *~ ending_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ ending_graphics.inc *.zx02 *.gr *.hgr

View File

@ -2,8 +2,9 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: graphics_inn.inc \
priority_inn.inc
@ -11,22 +12,22 @@ all: graphics_inn.inc \
###
graphics_inn.inc: \
inside_inn.lzsa inside_inn_night.lzsa
echo "inside_inn_lzsa: .incbin \"inside_inn.lzsa\"" > graphics_inn.inc
echo "inside_inn_night_lzsa: .incbin \"inside_inn_night.lzsa\"" >> graphics_inn.inc
inside_inn.zx02 inside_inn_night.zx02
echo "inside_inn_zx02: .incbin \"inside_inn.zx02\"" > graphics_inn.inc
echo "inside_inn_night_zx02: .incbin \"inside_inn_night.zx02\"" >> graphics_inn.inc
###
inside_inn.lzsa: inside_inn.hgr
$(LZSA) -r -f2 inside_inn.hgr inside_inn.lzsa
inside_inn.zx02: inside_inn.hgr
$(ZX02) -f inside_inn.hgr inside_inn.zx02
inside_inn.hgr: inside_inn.png
$(PNG2HGR) inside_inn.png > inside_inn.hgr
###
inside_inn_night.lzsa: inside_inn_night.hgr
$(LZSA) -r -f2 inside_inn_night.hgr inside_inn_night.lzsa
inside_inn_night.zx02: inside_inn_night.hgr
$(ZX02) -f inside_inn_night.hgr inside_inn_night.zx02
inside_inn_night.hgr: inside_inn_night.png
$(PNG2HGR) inside_inn_night.png > inside_inn_night.hgr
@ -35,13 +36,13 @@ inside_inn_night.hgr: inside_inn_night.png
###
priority_inn.inc: \
inside_inn_priority.lzsa
echo "inside_inn_priority_lzsa: .incbin \"inside_inn_priority.lzsa\"" > priority_inn.inc
inside_inn_priority.zx02
echo "inside_inn_priority_zx02: .incbin \"inside_inn_priority.zx02\"" > priority_inn.inc
####
inside_inn_priority.lzsa: inside_inn_priority.gr
$(LZSA) -r -f2 inside_inn_priority.gr inside_inn_priority.lzsa
inside_inn_priority.zx02: inside_inn_priority.gr
$(ZX02) -f inside_inn_priority.gr inside_inn_priority.zx02
inside_inn_priority.gr: inside_inn_priority.png
$(PNG2GR) inside_inn_priority.png inside_inn_priority.gr
@ -49,5 +50,5 @@ inside_inn_priority.gr: inside_inn_priority.png
####
clean:
rm -f *~ graphics_inn.inc priority_inn.inc *.lzsa *.gr *.hgr
rm -f *~ graphics_inn.inc priority_inn.inc *.zx02 *.gr *.hgr

View File

@ -2,8 +2,9 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: graphics_inside.inc \
priority_inside.inc
@ -11,31 +12,31 @@ all: graphics_inside.inc \
###
graphics_inside.inc: \
hidden_glen.lzsa inside_cottage.lzsa inside_nn.lzsa
echo "hidden_glen_lzsa: .incbin \"hidden_glen.lzsa\"" > graphics_inside.inc
echo "inside_cottage_lzsa: .incbin \"inside_cottage.lzsa\"" >> graphics_inside.inc
echo "inside_nn_lzsa: .incbin \"inside_nn.lzsa\"" >> graphics_inside.inc
hidden_glen.zx02 inside_cottage.zx02 inside_nn.zx02
echo "hidden_glen_zx02: .incbin \"hidden_glen.zx02\"" > graphics_inside.inc
echo "inside_cottage_zx02: .incbin \"inside_cottage.zx02\"" >> graphics_inside.inc
echo "inside_nn_zx02: .incbin \"inside_nn.zx02\"" >> graphics_inside.inc
###
hidden_glen.lzsa: hidden_glen.hgr
$(LZSA) -r -f2 hidden_glen.hgr hidden_glen.lzsa
hidden_glen.zx02: hidden_glen.hgr
$(ZX02) -f hidden_glen.hgr hidden_glen.zx02
hidden_glen.hgr: hidden_glen.png
$(PNG2HGR) hidden_glen.png > hidden_glen.hgr
###
inside_cottage.lzsa: inside_cottage.hgr
$(LZSA) -r -f2 inside_cottage.hgr inside_cottage.lzsa
inside_cottage.zx02: inside_cottage.hgr
$(ZX02) -f inside_cottage.hgr inside_cottage.zx02
inside_cottage.hgr: inside_cottage.png
$(PNG2HGR) inside_cottage.png > inside_cottage.hgr
###
inside_nn.lzsa: inside_nn.hgr
$(LZSA) -r -f2 inside_nn.hgr inside_nn.lzsa
inside_nn.zx02: inside_nn.hgr
$(ZX02) -f inside_nn.hgr inside_nn.zx02
inside_nn.hgr: inside_nn.png
$(PNG2HGR) inside_nn.png > inside_nn.hgr
@ -45,33 +46,33 @@ inside_nn.hgr: inside_nn.png
###
priority_inside.inc: \
inside_nn_priority.lzsa \
hidden_glen_priority.lzsa \
inside_cottage_priority.lzsa
echo "hidden_glen_priority_lzsa: .incbin \"hidden_glen_priority.lzsa\"" > priority_inside.inc
echo "inside_cottage_priority_lzsa: .incbin \"inside_cottage_priority.lzsa\"" >> priority_inside.inc
echo "inside_nn_priority_lzsa: .incbin \"inside_nn_priority.lzsa\"" >> priority_inside.inc
inside_nn_priority.zx02 \
hidden_glen_priority.zx02 \
inside_cottage_priority.zx02
echo "hidden_glen_priority_zx02: .incbin \"hidden_glen_priority.zx02\"" > priority_inside.inc
echo "inside_cottage_priority_zx02: .incbin \"inside_cottage_priority.zx02\"" >> priority_inside.inc
echo "inside_nn_priority_zx02: .incbin \"inside_nn_priority.zx02\"" >> priority_inside.inc
####
inside_cottage_priority.lzsa: inside_cottage_priority.gr
$(LZSA) -r -f2 inside_cottage_priority.gr inside_cottage_priority.lzsa
inside_cottage_priority.zx02: inside_cottage_priority.gr
$(ZX02) -f inside_cottage_priority.gr inside_cottage_priority.zx02
inside_cottage_priority.gr: inside_cottage_priority.png
$(PNG2GR) inside_cottage_priority.png inside_cottage_priority.gr
####
inside_nn_priority.lzsa: inside_nn_priority.gr
$(LZSA) -r -f2 inside_nn_priority.gr inside_nn_priority.lzsa
inside_nn_priority.zx02: inside_nn_priority.gr
$(ZX02) -f inside_nn_priority.gr inside_nn_priority.zx02
inside_nn_priority.gr: inside_nn_priority.png
$(PNG2GR) inside_nn_priority.png inside_nn_priority.gr
####
hidden_glen_priority.lzsa: hidden_glen_priority.gr
$(LZSA) -r -f2 hidden_glen_priority.gr hidden_glen_priority.lzsa
hidden_glen_priority.zx02: hidden_glen_priority.gr
$(ZX02) -f hidden_glen_priority.gr hidden_glen_priority.zx02
hidden_glen_priority.gr: hidden_glen_priority.png
$(PNG2GR) hidden_glen_priority.png hidden_glen_priority.gr
@ -82,5 +83,5 @@ hidden_glen_priority.gr: hidden_glen_priority.png
clean:
rm -f *~ graphics_inside.inc priority_inside.inc *.lzsa *.gr *.hgr
rm -f *~ graphics_inside.inc priority_inside.inc *.zx02 *.gr *.hgr

View File

@ -2,8 +2,9 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: map_graphics.inc
@ -11,13 +12,13 @@ all: map_graphics.inc
###
map_graphics.inc: \
map.lzsa
echo "map_lzsa: .incbin \"map.lzsa\"" > map_graphics.inc
map.zx02
echo "map_zx02: .incbin \"map.zx02\"" > map_graphics.inc
###
map.lzsa: map.hgr
$(LZSA) -r -f2 map.hgr map.lzsa
map.zx02: map.hgr
$(ZX02) -f map.hgr map.zx02
map.hgr: map.png
$(PNG2HGR) map.png > map.hgr
@ -27,5 +28,5 @@ map.hgr: map.png
clean:
rm -f *~ map_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ map_graphics.inc *.zx02 *.gr *.hgr

View File

@ -2,9 +2,10 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: game_over_graphics.inc game_over_animation.inc
@ -23,24 +24,24 @@ game_over_animation.inc: progression.png
$(HGR_SPRITE) -s -l over_anim11 progression.png 175 36 188 65 >> game_over_animation.inc
game_over_graphics.inc: \
game_over.lzsa \
videlectrix.lzsa
echo "game_over_lzsa: .incbin \"game_over.lzsa\"" > game_over_graphics.inc
echo "videlectrix_lzsa: .incbin \"videlectrix.lzsa\"" >> game_over_graphics.inc
game_over.zx02 \
videlectrix.zx02
echo "game_over_zx02: .incbin \"game_over.zx02\"" > game_over_graphics.inc
echo "videlectrix_zx02: .incbin \"videlectrix.zx02\"" >> game_over_graphics.inc
###
videlectrix.lzsa: videlectrix.hgr
$(LZSA) -r -f2 videlectrix.hgr videlectrix.lzsa
videlectrix.zx02: videlectrix.hgr
$(ZX02) -f videlectrix.hgr videlectrix.zx02
videlectrix.hgr: videlectrix.png
$(PNG2HGR) videlectrix.png > videlectrix.hgr
###
game_over.lzsa: game_over.hgr
$(LZSA) -r -f2 game_over.hgr game_over.lzsa
game_over.zx02: game_over.hgr
$(ZX02) -f game_over.hgr game_over.zx02
game_over.hgr: game_over.png
$(PNG2HGR) game_over.png > game_over.hgr
@ -52,5 +53,5 @@ game_over.hgr: game_over.png
clean:
rm -f *~ game_over_graphics.inc game_over_animation.inc *.lzsa *.gr *.hgr
rm -f *~ game_over_graphics.inc game_over_animation.inc *.zx02 *.gr *.hgr

View File

@ -2,7 +2,7 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
B2D = ../../../utils/bmp2dhr/b2d
all: graphics_intro.inc \
@ -20,174 +20,174 @@ all: graphics_intro.inc \
###
graphics_intro.inc: \
cottage.lzsa \
lake_e.lzsa \
lake_w.lzsa \
river.lzsa \
knight.lzsa
echo "cottage_lzsa: .incbin \"cottage.lzsa\"" > graphics_intro.inc
echo "lake_w_lzsa: .incbin \"lake_w.lzsa\"" >> graphics_intro.inc
echo "lake_e_lzsa: .incbin \"lake_e.lzsa\"" >> graphics_intro.inc
echo "river_lzsa: .incbin \"river.lzsa\"" >> graphics_intro.inc
echo "knight_lzsa: .incbin \"knight.lzsa\"" >> graphics_intro.inc
cottage.zx02 \
lake_e.zx02 \
lake_w.zx02 \
river.zx02 \
knight.zx02
echo "cottage_zx02: .incbin \"cottage.zx02\"" > graphics_intro.inc
echo "lake_w_zx02: .incbin \"lake_w.zx02\"" >> graphics_intro.inc
echo "lake_e_zx02: .incbin \"lake_e.zx02\"" >> graphics_intro.inc
echo "river_zx02: .incbin \"river.zx02\"" >> graphics_intro.inc
echo "knight_zx02: .incbin \"knight.zx02\"" >> graphics_intro.inc
###
graphics_peasant1.inc: \
gary.lzsa \
top_prints.lzsa \
wishing_well.lzsa \
leaning_tree.lzsa \
waterfall.lzsa
echo "gary_lzsa: .incbin \"gary.lzsa\"" > graphics_peasant1.inc
echo "top_prints_lzsa: .incbin \"top_prints.lzsa\"" >> graphics_peasant1.inc
echo "wishing_well_lzsa: .incbin \"wishing_well.lzsa\"" >> graphics_peasant1.inc
echo "leaning_tree_lzsa: .incbin \"leaning_tree.lzsa\"" >> graphics_peasant1.inc
echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> graphics_peasant1.inc
gary.zx02 \
top_prints.zx02 \
wishing_well.zx02 \
leaning_tree.zx02 \
waterfall.zx02
echo "gary_zx02: .incbin \"gary.zx02\"" > graphics_peasant1.inc
echo "top_prints_zx02: .incbin \"top_prints.zx02\"" >> graphics_peasant1.inc
echo "wishing_well_zx02: .incbin \"wishing_well.zx02\"" >> graphics_peasant1.inc
echo "leaning_tree_zx02: .incbin \"leaning_tree.zx02\"" >> graphics_peasant1.inc
echo "waterfall_zx02: .incbin \"waterfall.zx02\"" >> graphics_peasant1.inc
###
graphics_peasant2.inc: \
haystack.lzsa \
puddle.lzsa \
archery.lzsa \
river.lzsa \
knight.lzsa
echo "haystack_lzsa: .incbin \"haystack.lzsa\"" > graphics_peasant2.inc
echo "puddle_lzsa: .incbin \"puddle.lzsa\"" >> graphics_peasant2.inc
echo "archery_lzsa: .incbin \"archery.lzsa\"" >> graphics_peasant2.inc
echo "river_lzsa: .incbin \"river.lzsa\"" >> graphics_peasant2.inc
echo "knight_lzsa: .incbin \"knight.lzsa\"" >> graphics_peasant2.inc
haystack.zx02 \
puddle.zx02 \
archery.zx02 \
river.zx02 \
knight.zx02
echo "haystack_zx02: .incbin \"haystack.zx02\"" > graphics_peasant2.inc
echo "puddle_zx02: .incbin \"puddle.zx02\"" >> graphics_peasant2.inc
echo "archery_zx02: .incbin \"archery.zx02\"" >> graphics_peasant2.inc
echo "river_zx02: .incbin \"river.zx02\"" >> graphics_peasant2.inc
echo "knight_zx02: .incbin \"knight.zx02\"" >> graphics_peasant2.inc
###
graphics_peasant3.inc: \
jhonka.lzsa \
cottage.lzsa \
lake_e.lzsa \
lake_e_boat.lzsa \
lake_w.lzsa \
inn.lzsa
echo "jhonka_lzsa: .incbin \"jhonka.lzsa\"" > graphics_peasant3.inc
echo "cottage_lzsa: .incbin \"cottage.lzsa\"" >> graphics_peasant3.inc
echo "lake_w_lzsa: .incbin \"lake_w.lzsa\"" >> graphics_peasant3.inc
echo "lake_e_lzsa: .incbin \"lake_e.lzsa\"" >> graphics_peasant3.inc
# echo "lake_e_lzsa: .incbin \"lake_e_boat.lzsa\"" >> graphics_peasant3.inc
# echo "lake_e_boat_lzsa: .incbin \"lake_e_boat.lzsa\"" >> graphics_peasant3.inc
echo "inn_lzsa: .incbin \"inn.lzsa\"" >> graphics_peasant3.inc
jhonka.zx02 \
cottage.zx02 \
lake_e.zx02 \
lake_e_boat.zx02 \
lake_w.zx02 \
inn.zx02
echo "jhonka_zx02: .incbin \"jhonka.zx02\"" > graphics_peasant3.inc
echo "cottage_zx02: .incbin \"cottage.zx02\"" >> graphics_peasant3.inc
echo "lake_w_zx02: .incbin \"lake_w.zx02\"" >> graphics_peasant3.inc
echo "lake_e_zx02: .incbin \"lake_e.zx02\"" >> graphics_peasant3.inc
# echo "lake_e_zx02: .incbin \"lake_e_boat.zx02\"" >> graphics_peasant3.inc
# echo "lake_e_boat_zx02: .incbin \"lake_e_boat.zx02\"" >> graphics_peasant3.inc
echo "inn_zx02: .incbin \"inn.zx02\"" >> graphics_peasant3.inc
###
graphics_peasant4.inc: \
empty_hut.lzsa \
ned.lzsa \
bottom_prints.lzsa \
lady_cottage.lzsa \
crooked_tree.lzsa
echo "empty_hut_lzsa: .incbin \"empty_hut.lzsa\"" > graphics_peasant4.inc
echo "ned_lzsa: .incbin \"ned.lzsa\"" >> graphics_peasant4.inc
echo "bottom_prints_lzsa: .incbin \"bottom_prints.lzsa\"" >> graphics_peasant4.inc
echo "lady_cottage_lzsa: .incbin \"lady_cottage.lzsa\"" >> graphics_peasant4.inc
echo "crooked_tree_lzsa: .incbin \"crooked_tree.lzsa\"" >> graphics_peasant4.inc
empty_hut.zx02 \
ned.zx02 \
bottom_prints.zx02 \
lady_cottage.zx02 \
crooked_tree.zx02
echo "empty_hut_zx02: .incbin \"empty_hut.zx02\"" > graphics_peasant4.inc
echo "ned_zx02: .incbin \"ned.zx02\"" >> graphics_peasant4.inc
echo "bottom_prints_zx02: .incbin \"bottom_prints.zx02\"" >> graphics_peasant4.inc
echo "lady_cottage_zx02: .incbin \"lady_cottage.zx02\"" >> graphics_peasant4.inc
echo "crooked_tree_zx02: .incbin \"crooked_tree.zx02\"" >> graphics_peasant4.inc
###########
priority_intro.inc: \
cottage_priority.lzsa \
lake_w_priority.lzsa lake_e_priority.lzsa \
river_priority.lzsa knight_priority.lzsa
echo "cottage_priority_lzsa: .incbin \"cottage_priority.lzsa\"" > priority_intro.inc
echo "lake_w_priority_lzsa: .incbin \"lake_w_priority.lzsa\"" >> priority_intro.inc
echo "lake_e_priority_lzsa: .incbin \"lake_e_priority.lzsa\"" >> priority_intro.inc
echo "river_priority_lzsa: .incbin \"river_priority.lzsa\"" >> priority_intro.inc
echo "knight_priority_lzsa: .incbin \"knight_priority.lzsa\"" >> priority_intro.inc
cottage_priority.zx02 \
lake_w_priority.zx02 lake_e_priority.zx02 \
river_priority.zx02 knight_priority.zx02
echo "cottage_priority_zx02: .incbin \"cottage_priority.zx02\"" > priority_intro.inc
echo "lake_w_priority_zx02: .incbin \"lake_w_priority.zx02\"" >> priority_intro.inc
echo "lake_e_priority_zx02: .incbin \"lake_e_priority.zx02\"" >> priority_intro.inc
echo "river_priority_zx02: .incbin \"river_priority.zx02\"" >> priority_intro.inc
echo "knight_priority_zx02: .incbin \"knight_priority.zx02\"" >> priority_intro.inc
priority_peasant1.inc: \
gary_priority.lzsa top_prints_priority.lzsa \
wishing_well_priority.lzsa leaning_tree_priority.lzsa \
waterfall_priority.lzsa
echo "gary_priority_lzsa: .incbin \"gary_priority.lzsa\"" > priority_peasant1.inc
echo "top_prints_priority_lzsa: .incbin \"top_prints_priority.lzsa\"" >> priority_peasant1.inc
echo "wishing_well_priority_lzsa: .incbin \"wishing_well_priority.lzsa\"" >> priority_peasant1.inc
echo "leaning_tree_priority_lzsa: .incbin \"leaning_tree_priority.lzsa\"" >> priority_peasant1.inc
echo "waterfall_priority_lzsa: .incbin \"waterfall_priority.lzsa\"" >> priority_peasant1.inc
gary_priority.zx02 top_prints_priority.zx02 \
wishing_well_priority.zx02 leaning_tree_priority.zx02 \
waterfall_priority.zx02
echo "gary_priority_zx02: .incbin \"gary_priority.zx02\"" > priority_peasant1.inc
echo "top_prints_priority_zx02: .incbin \"top_prints_priority.zx02\"" >> priority_peasant1.inc
echo "wishing_well_priority_zx02: .incbin \"wishing_well_priority.zx02\"" >> priority_peasant1.inc
echo "leaning_tree_priority_zx02: .incbin \"leaning_tree_priority.zx02\"" >> priority_peasant1.inc
echo "waterfall_priority_zx02: .incbin \"waterfall_priority.zx02\"" >> priority_peasant1.inc
###
priority_peasant2.inc: \
haystack_priority.lzsa puddle_priority.lzsa \
archery_priority.lzsa \
river_priority.lzsa knight_priority.lzsa
echo "haystack_priority_lzsa: .incbin \"haystack_priority.lzsa\"" > priority_peasant2.inc
echo "puddle_priority_lzsa: .incbin \"puddle_priority.lzsa\"" >> priority_peasant2.inc
echo "archery_priority_lzsa: .incbin \"archery_priority.lzsa\"" >> priority_peasant2.inc
echo "river_priority_lzsa: .incbin \"river_priority.lzsa\"" >> priority_peasant2.inc
echo "knight_priority_lzsa: .incbin \"knight_priority.lzsa\"" >> priority_peasant2.inc
haystack_priority.zx02 puddle_priority.zx02 \
archery_priority.zx02 \
river_priority.zx02 knight_priority.zx02
echo "haystack_priority_zx02: .incbin \"haystack_priority.zx02\"" > priority_peasant2.inc
echo "puddle_priority_zx02: .incbin \"puddle_priority.zx02\"" >> priority_peasant2.inc
echo "archery_priority_zx02: .incbin \"archery_priority.zx02\"" >> priority_peasant2.inc
echo "river_priority_zx02: .incbin \"river_priority.zx02\"" >> priority_peasant2.inc
echo "knight_priority_zx02: .incbin \"knight_priority.zx02\"" >> priority_peasant2.inc
###
priority_peasant3.inc: \
jhonka_priority.lzsa \
cottage_priority.lzsa \
lake_w_priority.lzsa lake_e_priority.lzsa inn_priority.lzsa
echo "jhonka_priority_lzsa: .incbin \"jhonka_priority.lzsa\"" > priority_peasant3.inc
echo "cottage_priority_lzsa: .incbin \"cottage_priority.lzsa\"" >> priority_peasant3.inc
echo "lake_w_priority_lzsa: .incbin \"lake_w_priority.lzsa\"" >> priority_peasant3.inc
echo "lake_e_priority_lzsa: .incbin \"lake_e_priority.lzsa\"" >> priority_peasant3.inc
echo "inn_priority_lzsa: .incbin \"inn_priority.lzsa\"" >> priority_peasant3.inc
jhonka_priority.zx02 \
cottage_priority.zx02 \
lake_w_priority.zx02 lake_e_priority.zx02 inn_priority.zx02
echo "jhonka_priority_zx02: .incbin \"jhonka_priority.zx02\"" > priority_peasant3.inc
echo "cottage_priority_zx02: .incbin \"cottage_priority.zx02\"" >> priority_peasant3.inc
echo "lake_w_priority_zx02: .incbin \"lake_w_priority.zx02\"" >> priority_peasant3.inc
echo "lake_e_priority_zx02: .incbin \"lake_e_priority.zx02\"" >> priority_peasant3.inc
echo "inn_priority_zx02: .incbin \"inn_priority.zx02\"" >> priority_peasant3.inc
###
priority_peasant4.inc: \
empty_hut_priority.lzsa \
ned_priority.lzsa \
bottom_prints_priority.lzsa \
lady_cottage_priority.lzsa \
crooked_tree_priority.lzsa
echo "empty_hut_priority_lzsa: .incbin \"empty_hut_priority.lzsa\"" > priority_peasant4.inc
echo "ned_priority_lzsa: .incbin \"ned_priority.lzsa\"" >> priority_peasant4.inc
echo "bottom_prints_priority_lzsa: .incbin \"bottom_prints_priority.lzsa\"" >> priority_peasant4.inc
echo "lady_cottage_priority_lzsa: .incbin \"lady_cottage_priority.lzsa\"" >> priority_peasant4.inc
echo "crooked_tree_priority_lzsa: .incbin \"crooked_tree_priority.lzsa\"" >> priority_peasant4.inc
empty_hut_priority.zx02 \
ned_priority.zx02 \
bottom_prints_priority.zx02 \
lady_cottage_priority.zx02 \
crooked_tree_priority.zx02
echo "empty_hut_priority_zx02: .incbin \"empty_hut_priority.zx02\"" > priority_peasant4.inc
echo "ned_priority_zx02: .incbin \"ned_priority.zx02\"" >> priority_peasant4.inc
echo "bottom_prints_priority_zx02: .incbin \"bottom_prints_priority.zx02\"" >> priority_peasant4.inc
echo "lady_cottage_priority_zx02: .incbin \"lady_cottage_priority.zx02\"" >> priority_peasant4.inc
echo "crooked_tree_priority_zx02: .incbin \"crooked_tree_priority.zx02\"" >> priority_peasant4.inc
###
archery.lzsa: archery.hgr
$(LZSA) -r -f2 archery.hgr archery.lzsa
archery.zx02: archery.hgr
$(ZX02) archery.hgr archery.zx02
archery.hgr: archery.png
$(PNG2HGR) archery.png > archery.hgr
###
bottom_prints.lzsa: bottom_prints.hgr
$(LZSA) -r -f2 bottom_prints.hgr bottom_prints.lzsa
bottom_prints.zx02: bottom_prints.hgr
$(ZX02) bottom_prints.hgr bottom_prints.zx02
bottom_prints.hgr: bottom_prints.png
$(PNG2HGR) bottom_prints.png > bottom_prints.hgr
###
cottage.lzsa: cottage.hgr
$(LZSA) -r -f2 cottage.hgr cottage.lzsa
cottage.zx02: cottage.hgr
$(ZX02) cottage.hgr cottage.zx02
cottage.hgr: cottage.png
$(PNG2HGR) cottage.png > cottage.hgr
###
crooked_tree.lzsa: crooked_tree.hgr
$(LZSA) -r -f2 crooked_tree.hgr crooked_tree.lzsa
crooked_tree.zx02: crooked_tree.hgr
$(ZX02) crooked_tree.hgr crooked_tree.zx02
crooked_tree.hgr: crooked_tree.png
$(PNG2HGR) crooked_tree.png > crooked_tree.hgr
###
empty_hut.lzsa: empty_hut.hgr
$(LZSA) -r -f2 empty_hut.hgr empty_hut.lzsa
empty_hut.zx02: empty_hut.hgr
$(ZX02) empty_hut.hgr empty_hut.zx02
empty_hut.hgr: empty_hut.png
$(PNG2HGR) empty_hut.png > empty_hut.hgr
@ -195,32 +195,32 @@ empty_hut.hgr: empty_hut.png
###
gary.lzsa: gary.hgr
$(LZSA) -r -f2 gary.hgr gary.lzsa
gary.zx02: gary.hgr
$(ZX02) gary.hgr gary.zx02
gary.hgr: gary.png
$(PNG2HGR) gary.png > gary.hgr
###
haystack.lzsa: haystack.hgr
$(LZSA) -r -f2 haystack.hgr haystack.lzsa
haystack.zx02: haystack.hgr
$(ZX02) haystack.hgr haystack.zx02
haystack.hgr: haystack.png
$(PNG2HGR) haystack.png > haystack.hgr
###
jhonka.lzsa: jhonka.hgr
$(LZSA) -r -f2 jhonka.hgr jhonka.lzsa
jhonka.zx02: jhonka.hgr
$(ZX02) jhonka.hgr jhonka.zx02
jhonka.hgr: jhonka.png
$(PNG2HGR) jhonka.png > jhonka.hgr
###
knight.lzsa: knight.hgr
$(LZSA) -r -f2 knight.hgr knight.lzsa
knight.zx02: knight.hgr
$(ZX02) knight.hgr knight.zx02
knight.hgr: knight.png
$(PNG2HGR) knight.png > knight.hgr
@ -228,8 +228,8 @@ knight.hgr: knight.png
###
lady_cottage.lzsa: lady_cottage.hgr
$(LZSA) -r -f2 lady_cottage.hgr lady_cottage.lzsa
lady_cottage.zx02: lady_cottage.hgr
$(ZX02) lady_cottage.hgr lady_cottage.zx02
lady_cottage.hgr: lady_cottage.png
$(PNG2HGR) lady_cottage.png > lady_cottage.hgr
@ -237,8 +237,8 @@ lady_cottage.hgr: lady_cottage.png
###
lake_e.lzsa: lake_e.hgr
$(LZSA) -r -f2 lake_e.hgr lake_e.lzsa
lake_e.zx02: lake_e.hgr
$(ZX02) lake_e.hgr lake_e.zx02
lake_e.hgr: lake_e.png
$(PNG2HGR) lake_e.png > lake_e.hgr
@ -246,8 +246,8 @@ lake_e.hgr: lake_e.png
###
lake_e_boat.lzsa: lake_e_boat.hgr
$(LZSA) -r -f2 lake_e_boat.hgr lake_e_boat.lzsa
lake_e_boat.zx02: lake_e_boat.hgr
$(ZX02) lake_e_boat.hgr lake_e_boat.zx02
lake_e_boat.hgr: lake_e_boat.png
$(PNG2HGR) lake_e_boat.png > lake_e_boat.hgr
@ -255,8 +255,8 @@ lake_e_boat.hgr: lake_e_boat.png
###
lake_w.lzsa: lake_w.hgr
$(LZSA) -r -f2 lake_w.hgr lake_w.lzsa
lake_w.zx02: lake_w.hgr
$(ZX02) lake_w.hgr lake_w.zx02
lake_w.hgr: lake_w.png
$(PNG2HGR) lake_w.png > lake_w.hgr
@ -264,40 +264,40 @@ lake_w.hgr: lake_w.png
###
leaning_tree.lzsa: leaning_tree.hgr
$(LZSA) -r -f2 leaning_tree.hgr leaning_tree.lzsa
leaning_tree.zx02: leaning_tree.hgr
$(ZX02) leaning_tree.hgr leaning_tree.zx02
leaning_tree.hgr: leaning_tree.png
$(PNG2HGR) leaning_tree.png > leaning_tree.hgr
###
ned.lzsa: ned.hgr
$(LZSA) -r -f2 ned.hgr ned.lzsa
ned.zx02: ned.hgr
$(ZX02) ned.hgr ned.zx02
ned.hgr: ned.png
$(PNG2HGR) ned.png > ned.hgr
###
puddle.lzsa: puddle.hgr
$(LZSA) -r -f2 puddle.hgr puddle.lzsa
puddle.zx02: puddle.hgr
$(ZX02) puddle.hgr puddle.zx02
puddle.hgr: puddle.png
$(PNG2HGR) puddle.png > puddle.hgr
###
river.lzsa: river.hgr
$(LZSA) -r -f2 river.hgr river.lzsa
river.zx02: river.hgr
$(ZX02) river.hgr river.zx02
river.hgr: river.png
$(PNG2HGR) river.png > river.hgr
###
top_prints.lzsa: top_prints.hgr
$(LZSA) -r -f2 top_prints.hgr top_prints.lzsa
top_prints.zx02: top_prints.hgr
$(ZX02) top_prints.hgr top_prints.zx02
top_prints.hgr: top_prints.png
$(PNG2HGR) top_prints.png > top_prints.hgr
@ -305,32 +305,32 @@ top_prints.hgr: top_prints.png
###
waterfall.lzsa: waterfall.hgr
$(LZSA) -r -f2 waterfall.hgr waterfall.lzsa
waterfall.zx02: waterfall.hgr
$(ZX02) waterfall.hgr waterfall.zx02
waterfall.hgr: waterfall.png
$(PNG2HGR) waterfall.png > waterfall.hgr
###
wishing_well.lzsa: wishing_well.hgr
$(LZSA) -r -f2 wishing_well.hgr wishing_well.lzsa
wishing_well.zx02: wishing_well.hgr
$(ZX02) wishing_well.hgr wishing_well.zx02
wishing_well.hgr: wishing_well.png
$(PNG2HGR) wishing_well.png > wishing_well.hgr
###
inn.lzsa: inn.hgr
$(LZSA) -r -f2 inn.hgr inn.lzsa
inn.zx02: inn.hgr
$(ZX02) inn.hgr inn.zx02
inn.hgr: inn.png
$(PNG2HGR) inn.png > inn.hgr
###
todo.lzsa: todo.hgr
$(LZSA) -r -f2 todo.hgr todo.lzsa
todo.zx02: todo.hgr
$(ZX02) todo.hgr todo.zx02
todo.hgr: todo.png
$(PNG2HGR) todo.png > todo.hgr
@ -341,136 +341,136 @@ todo.hgr: todo.png
###
archery_priority.lzsa: archery_priority.hgr
$(LZSA) -r -f2 archery_priority.hgr archery_priority.lzsa
archery_priority.zx02: archery_priority.hgr
$(ZX02) archery_priority.hgr archery_priority.zx02
archery_priority.hgr: archery_priority.png
$(PNG2GR) archery_priority.png archery_priority.hgr
###
bottom_prints_priority.lzsa: bottom_prints_priority.hgr
$(LZSA) -r -f2 bottom_prints_priority.hgr bottom_prints_priority.lzsa
bottom_prints_priority.zx02: bottom_prints_priority.hgr
$(ZX02) bottom_prints_priority.hgr bottom_prints_priority.zx02
bottom_prints_priority.hgr: bottom_prints_priority.png
$(PNG2GR) bottom_prints_priority.png bottom_prints_priority.hgr
###
cottage_priority.lzsa: cottage_priority.hgr
$(LZSA) -r -f2 cottage_priority.hgr cottage_priority.lzsa
cottage_priority.zx02: cottage_priority.hgr
$(ZX02) cottage_priority.hgr cottage_priority.zx02
cottage_priority.hgr: cottage_priority.png
$(PNG2GR) cottage_priority.png cottage_priority.hgr
###
crooked_tree_priority.lzsa: crooked_tree_priority.hgr
$(LZSA) -r -f2 crooked_tree_priority.hgr crooked_tree_priority.lzsa
crooked_tree_priority.zx02: crooked_tree_priority.hgr
$(ZX02) crooked_tree_priority.hgr crooked_tree_priority.zx02
crooked_tree_priority.hgr: crooked_tree_priority.png
$(PNG2GR) crooked_tree_priority.png crooked_tree_priority.hgr
###
empty_hut_priority.lzsa: empty_hut_priority.hgr
$(LZSA) -r -f2 empty_hut_priority.hgr empty_hut_priority.lzsa
empty_hut_priority.zx02: empty_hut_priority.hgr
$(ZX02) empty_hut_priority.hgr empty_hut_priority.zx02
empty_hut_priority.hgr: empty_hut_priority.png
$(PNG2GR) empty_hut_priority.png empty_hut_priority.hgr
###
gary_priority.lzsa: gary_priority.hgr
$(LZSA) -r -f2 gary_priority.hgr gary_priority.lzsa
gary_priority.zx02: gary_priority.hgr
$(ZX02) gary_priority.hgr gary_priority.zx02
gary_priority.hgr: gary_priority.png
$(PNG2GR) gary_priority.png gary_priority.hgr
###
haystack_priority.lzsa: haystack_priority.hgr
$(LZSA) -r -f2 haystack_priority.hgr haystack_priority.lzsa
haystack_priority.zx02: haystack_priority.hgr
$(ZX02) haystack_priority.hgr haystack_priority.zx02
haystack_priority.hgr: haystack_priority.png
$(PNG2GR) haystack_priority.png haystack_priority.hgr
###
inn_priority.lzsa: inn_priority.hgr
$(LZSA) -r -f2 inn_priority.hgr inn_priority.lzsa
inn_priority.zx02: inn_priority.hgr
$(ZX02) inn_priority.hgr inn_priority.zx02
inn_priority.hgr: inn_priority.png
$(PNG2GR) inn_priority.png inn_priority.hgr
###
jhonka_priority.lzsa: jhonka_priority.hgr
$(LZSA) -r -f2 jhonka_priority.hgr jhonka_priority.lzsa
jhonka_priority.zx02: jhonka_priority.hgr
$(ZX02) jhonka_priority.hgr jhonka_priority.zx02
jhonka_priority.hgr: jhonka_priority.png
$(PNG2GR) jhonka_priority.png jhonka_priority.hgr
###
lady_cottage_priority.lzsa: lady_cottage_priority.hgr
$(LZSA) -r -f2 lady_cottage_priority.hgr lady_cottage_priority.lzsa
lady_cottage_priority.zx02: lady_cottage_priority.hgr
$(ZX02) lady_cottage_priority.hgr lady_cottage_priority.zx02
lady_cottage_priority.hgr: lady_cottage_priority.png
$(PNG2GR) lady_cottage_priority.png lady_cottage_priority.hgr
###
leaning_tree_priority.lzsa: leaning_tree_priority.hgr
$(LZSA) -r -f2 leaning_tree_priority.hgr leaning_tree_priority.lzsa
leaning_tree_priority.zx02: leaning_tree_priority.hgr
$(ZX02) leaning_tree_priority.hgr leaning_tree_priority.zx02
leaning_tree_priority.hgr: leaning_tree_priority.png
$(PNG2GR) leaning_tree_priority.png leaning_tree_priority.hgr
###
ned_priority.lzsa: ned_priority.hgr
$(LZSA) -r -f2 ned_priority.hgr ned_priority.lzsa
ned_priority.zx02: ned_priority.hgr
$(ZX02) ned_priority.hgr ned_priority.zx02
ned_priority.hgr: ned_priority.png
$(PNG2GR) ned_priority.png ned_priority.hgr
###
puddle_priority.lzsa: puddle_priority.hgr
$(LZSA) -r -f2 puddle_priority.hgr puddle_priority.lzsa
puddle_priority.zx02: puddle_priority.hgr
$(ZX02) puddle_priority.hgr puddle_priority.zx02
puddle_priority.hgr: puddle_priority.png
$(PNG2GR) puddle_priority.png puddle_priority.hgr
###
river_priority.lzsa: river_priority.hgr
$(LZSA) -r -f2 river_priority.hgr river_priority.lzsa
river_priority.zx02: river_priority.hgr
$(ZX02) river_priority.hgr river_priority.zx02
river_priority.hgr: river_priority.png
$(PNG2GR) river_priority.png river_priority.hgr
###
knight_priority.lzsa: knight_priority.hgr
$(LZSA) -r -f2 knight_priority.hgr knight_priority.lzsa
knight_priority.zx02: knight_priority.hgr
$(ZX02) knight_priority.hgr knight_priority.zx02
knight_priority.hgr: knight_priority.png
$(PNG2GR) knight_priority.png knight_priority.hgr
###
lake_e_priority.lzsa: lake_e_priority.hgr
$(LZSA) -r -f2 lake_e_priority.hgr lake_e_priority.lzsa
lake_e_priority.zx02: lake_e_priority.hgr
$(ZX02) lake_e_priority.hgr lake_e_priority.zx02
lake_e_priority.hgr: lake_e_priority.png
$(PNG2GR) lake_e_priority.png lake_e_priority.hgr
###
lake_w_priority.lzsa: lake_w_priority.hgr
$(LZSA) -r -f2 lake_w_priority.hgr lake_w_priority.lzsa
lake_w_priority.zx02: lake_w_priority.hgr
$(ZX02) lake_w_priority.hgr lake_w_priority.zx02
lake_w_priority.hgr: lake_w_priority.png
$(PNG2GR) lake_w_priority.png lake_w_priority.hgr
@ -478,32 +478,32 @@ lake_w_priority.hgr: lake_w_priority.png
####
todo_priority.lzsa: todo_priority.gr
$(LZSA) -r -f2 todo_priority.gr todo_priority.lzsa
todo_priority.zx02: todo_priority.gr
$(ZX02) todo_priority.gr todo_priority.zx02
todo_priority.gr: todo_priority.png
$(PNG2GR) todo_priority.png todo_priority.gr
###
top_prints_priority.lzsa: top_prints_priority.hgr
$(LZSA) -r -f2 top_prints_priority.hgr top_prints_priority.lzsa
top_prints_priority.zx02: top_prints_priority.hgr
$(ZX02) top_prints_priority.hgr top_prints_priority.zx02
top_prints_priority.hgr: top_prints_priority.png
$(PNG2GR) top_prints_priority.png top_prints_priority.hgr
####
waterfall_priority.lzsa: waterfall_priority.gr
$(LZSA) -r -f2 waterfall_priority.gr waterfall_priority.lzsa
waterfall_priority.zx02: waterfall_priority.gr
$(ZX02) waterfall_priority.gr waterfall_priority.zx02
waterfall_priority.gr: waterfall_priority.png
$(PNG2GR) waterfall_priority.png waterfall_priority.gr
####
wishing_well_priority.lzsa: wishing_well_priority.hgr
$(LZSA) -r -f2 wishing_well_priority.hgr wishing_well_priority.lzsa
wishing_well_priority.zx02: wishing_well_priority.hgr
$(ZX02) wishing_well_priority.hgr wishing_well_priority.zx02
wishing_well_priority.hgr: wishing_well_priority.png
$(PNG2GR) wishing_well_priority.png wishing_well_priority.hgr
@ -518,5 +518,5 @@ clean:
priority_intro.inc \
priority_peasant1.inc priority_peasant2.inc \
priority_peasant3.inc priority_peasant4.inc \
*.lzsa *.gr *.hgr
*.zx02 *.gr *.hgr

View File

@ -2,32 +2,33 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
B2D = ../../../utils/bmp2dhr/b2d
all: title_graphics.inc
title_graphics.inc: \
peasant_title.lzsa \
peasant_title_trogfree.lzsa \
tips.lzsa
echo "title_lzsa: .incbin \"peasant_title.lzsa\"" > title_graphics.inc
echo "title_trogfree_lzsa: .incbin \"peasant_title_trogfree.lzsa\"" >> title_graphics.inc
echo "tips_lzsa: .incbin \"tips.lzsa\"" >> title_graphics.inc
peasant_title.zx02 \
peasant_title_trogfree.zx02 \
tips.zx02
echo "title_zx02: .incbin \"peasant_title.zx02\"" > title_graphics.inc
echo "title_trogfree_zx02: .incbin \"peasant_title_trogfree.zx02\"" >> title_graphics.inc
echo "tips_zx02: .incbin \"tips.zx02\"" >> title_graphics.inc
###
peasant_title.lzsa: peasant_title.hgr
$(LZSA) -r -f2 peasant_title.hgr peasant_title.lzsa
peasant_title.zx02: peasant_title.hgr
$(ZX02) peasant_title.hgr peasant_title.zx02
peasant_title.hgr: peasant_title.png
$(PNG2HGR) peasant_title.png > peasant_title.hgr
###
peasant_title_trogfree.lzsa: peasant_title_trogfree.hgr
$(LZSA) -r -f2 peasant_title_trogfree.hgr peasant_title_trogfree.lzsa
peasant_title_trogfree.zx02: peasant_title_trogfree.hgr
$(ZX02) peasant_title_trogfree.hgr peasant_title_trogfree.zx02
peasant_title_trogfree.hgr: peasant_title_trogfree.png
$(PNG2HGR) peasant_title_trogfree.png > peasant_title_trogfree.hgr
@ -35,8 +36,8 @@ peasant_title_trogfree.hgr: peasant_title_trogfree.png
###
tips.lzsa: tips.hgr
$(LZSA) -r -f2 tips.hgr tips.lzsa
tips.zx02: tips.hgr
$(ZX02) tips.hgr tips.zx02
tips.hgr: tips.png
$(PNG2HGR) tips.png > tips.hgr
@ -45,5 +46,5 @@ tips.hgr: tips.png
clean:
rm -f *~ title_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ title_graphics.inc *.zx02 *.gr *.hgr

View File

@ -2,61 +2,62 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
B2D = ../../../utils/bmp2dhr/b2d
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: trogdor_graphics.inc \
priority_trogdor.inc
trogdor_graphics.inc: \
trogdor_cave.lzsa \
trogdor_open.lzsa \
trogdor_flame1.lzsa \
trogdor_flame2.lzsa \
trogdor_sleep.lzsa
echo "trogdor_cave_lzsa: .incbin \"trogdor_cave.lzsa\"" > trogdor_graphics.inc
echo "trogdor_open_lzsa: .incbin \"trogdor_open.lzsa\"" >> trogdor_graphics.inc
echo "trogdor_flame1_lzsa: .incbin \"trogdor_flame1.lzsa\"" >> trogdor_graphics.inc
echo "trogdor_flame2_lzsa: .incbin \"trogdor_flame2.lzsa\"" >> trogdor_graphics.inc
echo "trogdor_sleep_lzsa: .incbin \"trogdor_sleep.lzsa\"" >> trogdor_graphics.inc
trogdor_cave.zx02 \
trogdor_open.zx02 \
trogdor_flame1.zx02 \
trogdor_flame2.zx02 \
trogdor_sleep.zx02
echo "trogdor_cave_zx02: .incbin \"trogdor_cave.zx02\"" > trogdor_graphics.inc
echo "trogdor_open_zx02: .incbin \"trogdor_open.zx02\"" >> trogdor_graphics.inc
echo "trogdor_flame1_zx02: .incbin \"trogdor_flame1.zx02\"" >> trogdor_graphics.inc
echo "trogdor_flame2_zx02: .incbin \"trogdor_flame2.zx02\"" >> trogdor_graphics.inc
echo "trogdor_sleep_zx02: .incbin \"trogdor_sleep.zx02\"" >> trogdor_graphics.inc
###
trogdor_cave.lzsa: trogdor_cave.hgr
$(LZSA) -r -f2 trogdor_cave.hgr trogdor_cave.lzsa
trogdor_cave.zx02: trogdor_cave.hgr
$(ZX02) -f trogdor_cave.hgr trogdor_cave.zx02
trogdor_cave.hgr: trogdor_cave.png
$(PNG2HGR) trogdor_cave.png > trogdor_cave.hgr
###
trogdor_open.lzsa: trogdor_open.hgr
$(LZSA) -r -f2 trogdor_open.hgr trogdor_open.lzsa
trogdor_open.zx02: trogdor_open.hgr
$(ZX02) -f trogdor_open.hgr trogdor_open.zx02
trogdor_open.hgr: trogdor_open.png
$(PNG2HGR) trogdor_open.png > trogdor_open.hgr
###
trogdor_flame1.lzsa: trogdor_flame1.hgr
$(LZSA) -r -f2 trogdor_flame1.hgr trogdor_flame1.lzsa
trogdor_flame1.zx02: trogdor_flame1.hgr
$(ZX02) -f trogdor_flame1.hgr trogdor_flame1.zx02
trogdor_flame1.hgr: trogdor_flame1.png
$(PNG2HGR) trogdor_flame1.png > trogdor_flame1.hgr
###
trogdor_flame2.lzsa: trogdor_flame2.hgr
$(LZSA) -r -f2 trogdor_flame2.hgr trogdor_flame2.lzsa
trogdor_flame2.zx02: trogdor_flame2.hgr
$(ZX02) -f trogdor_flame2.hgr trogdor_flame2.zx02
trogdor_flame2.hgr: trogdor_flame2.png
$(PNG2HGR) trogdor_flame2.png > trogdor_flame2.hgr
###
trogdor_sleep.lzsa: trogdor_sleep.hgr
$(LZSA) -r -f2 trogdor_sleep.hgr trogdor_sleep.lzsa
trogdor_sleep.zx02: trogdor_sleep.hgr
$(ZX02) -f trogdor_sleep.hgr trogdor_sleep.zx02
trogdor_sleep.hgr: trogdor_sleep.png
$(PNG2HGR) trogdor_sleep.png > trogdor_sleep.hgr
@ -64,13 +65,13 @@ trogdor_sleep.hgr: trogdor_sleep.png
####
priority_trogdor.inc: \
trogdor_priority.lzsa
echo "trogdor_priority_lzsa: .incbin \"trogdor_priority.lzsa\"" > priority_trogdor.inc
trogdor_priority.zx02
echo "trogdor_priority_zx02: .incbin \"trogdor_priority.zx02\"" > priority_trogdor.inc
####
trogdor_priority.lzsa: trogdor_priority.gr
$(LZSA) -r -f2 trogdor_priority.gr trogdor_priority.lzsa
trogdor_priority.zx02: trogdor_priority.gr
$(ZX02) -f trogdor_priority.gr trogdor_priority.zx02
trogdor_priority.gr: trogdor_priority.png
$(PNG2GR) trogdor_priority.png trogdor_priority.gr
@ -79,5 +80,5 @@ trogdor_priority.gr: trogdor_priority.png
clean:
rm -f *~ trogdor_graphics.inc priority_trogdor.inc *.lzsa *.gr *.hgr
rm -f *~ trogdor_graphics.inc priority_trogdor.inc *.zx02 *.gr *.hgr

View File

@ -2,69 +2,73 @@
PNG2RLE = ../../../utils/gr-utils/png2rle
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2HGR = ../../../utils/hgr-utils/png2hgr
LZSA = ~/research/lzsa/lzsa/lzsa
#LZSA = ~/research/lzsa/lzsa/lzsa
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
B2D = ../../../utils/bmp2dhr/b2d
all: vid_graphics.inc
vid_graphics.inc: \
videlectrix.lzsa \
title_anim01.lzsa title_anim02.lzsa title_anim03.lzsa \
title_anim04.lzsa title_anim05.lzsa title_anim06.lzsa \
title_anim07.lzsa title_anim08.lzsa title_anim09.lzsa \
title_anim10.lzsa title_anim11.lzsa title_anim12.lzsa \
title_anim13.lzsa title_anim14.lzsa title_anim15.lzsa \
title_anim16.lzsa title_anim17.lzsa title_anim18.lzsa \
title_anim19.lzsa title_anim20.lzsa title_anim21.lzsa \
title_anim22.lzsa title_anim23.lzsa title_anim24.lzsa \
title_anim25.lzsa title_anim26.lzsa title_anim27.lzsa \
title_anim28.lzsa title_anim29.lzsa title_anim30.lzsa \
title_anim31.lzsa title_anim32.lzsa title_anim33.lzsa \
title_anim34.lzsa
echo "videlectrix_lzsa: .incbin \"videlectrix.lzsa\"" > vid_graphics.inc
# echo "title_anim01_lzsa: .incbin \"title_anim01.lzsa\"" >> vid_graphics.inc
echo "title_anim02_lzsa: .incbin \"title_anim02.lzsa\"" >> vid_graphics.inc
echo "title_anim03_lzsa: .incbin \"title_anim03.lzsa\"" >> vid_graphics.inc
# echo "title_anim04_lzsa: .incbin \"title_anim04.lzsa\"" >> vid_graphics.inc
echo "title_anim05_lzsa: .incbin \"title_anim05.lzsa\"" >> vid_graphics.inc
# echo "title_anim06_lzsa: .incbin \"title_anim06.lzsa\"" >> vid_graphics.inc
echo "title_anim07_lzsa: .incbin \"title_anim07.lzsa\"" >> vid_graphics.inc
# echo "title_anim08_lzsa: .incbin \"title_anim08.lzsa\"" >> vid_graphics.inc
echo "title_anim09_lzsa: .incbin \"title_anim09.lzsa\"" >> vid_graphics.inc
# echo "title_anim10_lzsa: .incbin \"title_anim10.lzsa\"" >> vid_graphics.inc
echo "title_anim11_lzsa: .incbin \"title_anim11.lzsa\"" >> vid_graphics.inc
# echo "title_anim12_lzsa: .incbin \"title_anim12.lzsa\"" >> vid_graphics.inc
echo "title_anim13_lzsa: .incbin \"title_anim13.lzsa\"" >> vid_graphics.inc
# echo "title_anim14_lzsa: .incbin \"title_anim14.lzsa\"" >> vid_graphics.inc
echo "title_anim15_lzsa: .incbin \"title_anim15.lzsa\"" >> vid_graphics.inc
# echo "title_anim16_lzsa: .incbin \"title_anim16.lzsa\"" >> vid_graphics.inc
echo "title_anim17_lzsa: .incbin \"title_anim17.lzsa\"" >> vid_graphics.inc
# echo "title_anim18_lzsa: .incbin \"title_anim18.lzsa\"" >> vid_graphics.inc
echo "title_anim19_lzsa: .incbin \"title_anim19.lzsa\"" >> vid_graphics.inc
# echo "title_anim20_lzsa: .incbin \"title_anim20.lzsa\"" >> vid_graphics.inc
echo "title_anim21_lzsa: .incbin \"title_anim21.lzsa\"" >> vid_graphics.inc
# echo "title_anim22_lzsa: .incbin \"title_anim22.lzsa\"" >> vid_graphics.inc
echo "title_anim23_lzsa: .incbin \"title_anim23.lzsa\"" >> vid_graphics.inc
# echo "title_anim24_lzsa: .incbin \"title_anim24.lzsa\"" >> vid_graphics.inc
echo "title_anim25_lzsa: .incbin \"title_anim25.lzsa\"" >> vid_graphics.inc
# echo "title_anim26_lzsa: .incbin \"title_anim26.lzsa\"" >> vid_graphics.inc
echo "title_anim27_lzsa: .incbin \"title_anim27.lzsa\"" >> vid_graphics.inc
# echo "title_anim28_lzsa: .incbin \"title_anim28.lzsa\"" >> vid_graphics.inc
echo "title_anim29_lzsa: .incbin \"title_anim29.lzsa\"" >> vid_graphics.inc
echo "title_anim30_lzsa: .incbin \"title_anim30.lzsa\"" >> vid_graphics.inc
echo "title_anim31_lzsa: .incbin \"title_anim31.lzsa\"" >> vid_graphics.inc
echo "title_anim32_lzsa: .incbin \"title_anim32.lzsa\"" >> vid_graphics.inc
echo "title_anim33_lzsa: .incbin \"title_anim33.lzsa\"" >> vid_graphics.inc
echo "title_anim34_lzsa: .incbin \"title_anim34.lzsa\"" >> vid_graphics.inc
videlectrix.zx02 \
title_anim01.zx02 title_anim02.zx02 title_anim03.zx02 \
title_anim04.zx02 title_anim05.zx02 title_anim06.zx02 \
title_anim07.zx02 title_anim08.zx02 title_anim09.zx02 \
title_anim10.zx02 title_anim11.zx02 title_anim12.zx02 \
title_anim13.zx02 title_anim14.zx02 title_anim15.zx02 \
title_anim16.zx02 title_anim17.zx02 title_anim18.zx02 \
title_anim19.zx02 title_anim20.zx02 title_anim21.zx02 \
title_anim22.zx02 title_anim23.zx02 title_anim24.zx02 \
title_anim25.zx02 title_anim26.zx02 title_anim27.zx02 \
title_anim28.zx02 title_anim29.zx02 title_anim30.zx02 \
title_anim31.zx02 title_anim32.zx02 title_anim33.zx02 \
title_anim34.zx02
echo "videlectrix_zx02: .incbin \"videlectrix.zx02\"" > vid_graphics.inc
# echo "title_anim01_zx02: .incbin \"title_anim01.zx02\"" >> vid_graphics.inc
echo "title_anim02_zx02: .incbin \"title_anim02.zx02\"" >> vid_graphics.inc
echo "title_anim03_zx02: .incbin \"title_anim03.zx02\"" >> vid_graphics.inc
# echo "title_anim04_zx02: .incbin \"title_anim04.zx02\"" >> vid_graphics.inc
echo "title_anim05_zx02: .incbin \"title_anim05.zx02\"" >> vid_graphics.inc
# echo "title_anim06_zx02: .incbin \"title_anim06.zx02\"" >> vid_graphics.inc
echo "title_anim07_zx02: .incbin \"title_anim07.zx02\"" >> vid_graphics.inc
# echo "title_anim08_zx02: .incbin \"title_anim08.zx02\"" >> vid_graphics.inc
echo "title_anim09_zx02: .incbin \"title_anim09.zx02\"" >> vid_graphics.inc
# echo "title_anim10_zx02: .incbin \"title_anim10.zx02\"" >> vid_graphics.inc
echo "title_anim11_zx02: .incbin \"title_anim11.zx02\"" >> vid_graphics.inc
# echo "title_anim12_zx02: .incbin \"title_anim12.zx02\"" >> vid_graphics.inc
echo "title_anim13_zx02: .incbin \"title_anim13.zx02\"" >> vid_graphics.inc
# echo "title_anim14_zx02: .incbin \"title_anim14.zx02\"" >> vid_graphics.inc
echo "title_anim15_zx02: .incbin \"title_anim15.zx02\"" >> vid_graphics.inc
# echo "title_anim16_zx02: .incbin \"title_anim16.zx02\"" >> vid_graphics.inc
echo "title_anim17_zx02: .incbin \"title_anim17.zx02\"" >> vid_graphics.inc
# echo "title_anim18_zx02: .incbin \"title_anim18.zx02\"" >> vid_graphics.inc
echo "title_anim19_zx02: .incbin \"title_anim19.zx02\"" >> vid_graphics.inc
# echo "title_anim20_zx02: .incbin \"title_anim20.zx02\"" >> vid_graphics.inc
echo "title_anim21_zx02: .incbin \"title_anim21.zx02\"" >> vid_graphics.inc
# echo "title_anim22_zx02: .incbin \"title_anim22.zx02\"" >> vid_graphics.inc
echo "title_anim23_zx02: .incbin \"title_anim23.zx02\"" >> vid_graphics.inc
# echo "title_anim24_zx02: .incbin \"title_anim24.zx02\"" >> vid_graphics.inc
echo "title_anim25_zx02: .incbin \"title_anim25.zx02\"" >> vid_graphics.inc
# echo "title_anim26_zx02: .incbin \"title_anim26.zx02\"" >> vid_graphics.inc
echo "title_anim27_zx02: .incbin \"title_anim27.zx02\"" >> vid_graphics.inc
# echo "title_anim28_zx02: .incbin \"title_anim28.zx02\"" >> vid_graphics.inc
echo "title_anim29_zx02: .incbin \"title_anim29.zx02\"" >> vid_graphics.inc
echo "title_anim30_zx02: .incbin \"title_anim30.zx02\"" >> vid_graphics.inc
echo "title_anim31_zx02: .incbin \"title_anim31.zx02\"" >> vid_graphics.inc
echo "title_anim32_zx02: .incbin \"title_anim32.zx02\"" >> vid_graphics.inc
echo "title_anim33_zx02: .incbin \"title_anim33.zx02\"" >> vid_graphics.inc
echo "title_anim34_zx02: .incbin \"title_anim34.zx02\"" >> vid_graphics.inc
%.hgr: %.png
$(PNG2HGR) $< > $@
%.lzsa: %.hgr
$(LZSA) -r -f2 $< $@
%.zx02: %.hgr
$(ZX02) $< $@
#%.lzsa: %.hgr
# $(LZSA) -r -f2 $< $@
###
clean:
rm -f *~ vid_graphics.inc *.lzsa *.gr *.hgr
rm -f *~ vid_graphics.inc *.zx02 *.gr *.hgr

View File

@ -28,14 +28,14 @@ inside_inn:
; decompress dialog to $D000
lda #<inn_text_lzsa
sta getsrc_smc+1
lda #>inn_text_lzsa
sta getsrc_smc+2
lda #<inn_text_zx02
sta zx_src_l+1
lda #>inn_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -83,13 +83,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr gr_copy_to_page1
@ -104,14 +104,14 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -282,16 +282,16 @@ level_over:
map_backgrounds_low:
.byte <inside_inn_lzsa
.byte <inside_inn_zx02
map_backgrounds_hi:
.byte >inside_inn_lzsa
.byte >inside_inn_zx02
map_priority_low:
.byte <inside_inn_priority_lzsa
.byte <inside_inn_priority_zx02
map_priority_hi:
.byte >inside_inn_priority_lzsa
.byte >inside_inn_priority_zx02
verb_tables_low:
.byte <inside_inn_verb_table
@ -301,7 +301,7 @@ verb_tables_hi:
inn_text_lzsa:
.incbin "DIALOG_INN.LZSA"
inn_text_zx02:
.incbin "DIALOG_INN.ZX02"
.include "inn_actions.s"

View File

@ -28,14 +28,14 @@ inside:
; decompress dialog to $D000
lda #<inside_text_lzsa
sta getsrc_smc+1
lda #>inside_text_lzsa
sta getsrc_smc+2
lda #<inside_text_zx02
sta zx_src_l+1
lda #>inside_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -84,13 +84,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr gr_copy_to_page1
@ -106,14 +106,14 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -384,24 +384,24 @@ to_left:
map_backgrounds_low:
.byte <hidden_glen_lzsa ; 24 -- hidden glen
.byte <inside_cottage_lzsa ; 25 -- inside lady cottage
.byte <inside_nn_lzsa ; 26 -- inside ned cottage
.byte <hidden_glen_zx02 ; 24 -- hidden glen
.byte <inside_cottage_zx02 ; 25 -- inside lady cottage
.byte <inside_nn_zx02 ; 26 -- inside ned cottage
map_backgrounds_hi:
.byte >hidden_glen_lzsa ; 24 -- hidden glen
.byte >inside_cottage_lzsa ; 25 -- inside lady cottage
.byte >inside_nn_lzsa ; 26 -- inside ned cottage
.byte >hidden_glen_zx02 ; 24 -- hidden glen
.byte >inside_cottage_zx02 ; 25 -- inside lady cottage
.byte >inside_nn_zx02 ; 26 -- inside ned cottage
map_priority_low:
.byte <hidden_glen_priority_lzsa ; 24 -- hidden glen
.byte <inside_cottage_priority_lzsa ; 25 -- inside lady cottage
.byte <inside_nn_priority_lzsa ; 26 -- inside ned cottage
.byte <hidden_glen_priority_zx02 ; 24 -- hidden glen
.byte <inside_cottage_priority_zx02 ; 25 -- inside lady cottage
.byte <inside_nn_priority_zx02 ; 26 -- inside ned cottage
map_priority_hi:
.byte >hidden_glen_priority_lzsa ; 24 -- hidden glen
.byte >inside_cottage_priority_lzsa ; 25 -- inside lady cottage
.byte >inside_nn_priority_lzsa ; 26 -- inside ned cottage
.byte >hidden_glen_priority_zx02 ; 24 -- hidden glen
.byte >inside_cottage_priority_zx02 ; 25 -- inside lady cottage
.byte >inside_nn_priority_zx02 ; 26 -- inside ned cottage
verb_tables_low:
@ -417,7 +417,7 @@ verb_tables_hi:
inside_text_lzsa:
.incbin "DIALOG_INSIDE.LZSA"
inside_text_zx02:
.incbin "DIALOG_INSIDE.ZX02"
.include "inside_actions.s"

View File

@ -27,14 +27,14 @@ intro_cottage:
; load priority to $400
; indirectly as we can't trash screen holes
lda #<cottage_priority_lzsa
sta getsrc_smc+1
lda #>cottage_priority_lzsa
sta getsrc_smc+2
lda #<cottage_priority_zx02
sta zx_src_l+1
lda #>cottage_priority_zx02
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -45,14 +45,14 @@ intro_cottage:
;==========================
; load background to $2000 (PAGE1)
lda #<(cottage_lzsa)
sta getsrc_smc+1
lda #>(cottage_lzsa)
sta getsrc_smc+2
lda #<(cottage_zx02)
sta zx_src_l+1
lda #>(cottage_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy

View File

@ -24,14 +24,14 @@ intro_knight:
; load priority to $400
; indirectly as we can't trash screen holes
lda #<knight_priority_lzsa
sta getsrc_smc+1
lda #>knight_priority_lzsa
sta getsrc_smc+2
lda #<knight_priority_zx02
sta zx_src_l+1
lda #>knight_priority_zx02
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -41,14 +41,14 @@ intro_knight:
;=====================
; load bg
lda #<(knight_lzsa)
sta getsrc_smc+1
lda #>(knight_lzsa)
sta getsrc_smc+2
lda #<(knight_zx02)
sta zx_src_l+1
lda #>(knight_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy

View File

@ -23,14 +23,14 @@ intro_lake_east:
; load priority to $400
; indirectly as we can't trash screen holes
lda #<lake_e_priority_lzsa
sta getsrc_smc+1
lda #>lake_e_priority_lzsa
sta getsrc_smc+2
lda #<lake_e_priority_zx02
sta zx_src_l+1
lda #>lake_e_priority_zx02
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -40,14 +40,14 @@ intro_lake_east:
;=====================
; load bg
lda #<(lake_e_lzsa)
sta getsrc_smc+1
lda #>(lake_e_lzsa)
sta getsrc_smc+2
lda #<(lake_e_zx02)
sta zx_src_l+1
lda #>(lake_e_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy

View File

@ -26,14 +26,14 @@ intro_lake_west:
; load priority to $400
; indirectly as we can't trash screen holes
lda #<lake_w_priority_lzsa
sta getsrc_smc+1
lda #>lake_w_priority_lzsa
sta getsrc_smc+2
lda #<lake_w_priority_zx02
sta zx_src_l+1
lda #>lake_w_priority_zx02
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -43,14 +43,14 @@ intro_lake_west:
;==================
; load background
lda #<(lake_w_lzsa)
sta getsrc_smc+1
lda #>(lake_w_lzsa)
sta getsrc_smc+2
lda #<(lake_w_zx02)
sta zx_src_l+1
lda #>(lake_w_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy

View File

@ -23,14 +23,14 @@ intro_river:
; load priority to $400
; indirectly as we can't trash screen holes
lda #<river_priority_lzsa
sta getsrc_smc+1
lda #>river_priority_lzsa
sta getsrc_smc+2
lda #<river_priority_zx02
sta zx_src_l+1
lda #>river_priority_zx02
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -41,14 +41,14 @@ intro_river:
; load bg
lda #<(river_lzsa)
sta getsrc_smc+1
lda #>(river_lzsa)
sta getsrc_smc+2
lda #<(river_zx02)
sta zx_src_l+1
lda #>(river_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy

View File

@ -38,14 +38,14 @@ the_map:
sbc #LOCATION_BASE
tax
lda #<map_lzsa
sta getsrc_smc+1
lda #>map_lzsa
sta getsrc_smc+2
lda #<map_zx02
sta zx_src_l+1
lda #>map_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
game_loop:

View File

@ -39,13 +39,13 @@ start_new_game:
; decompress to $EE00
lda #$00
sta getsrc_smc+1
sta zx_src_l+1
lda #$20
sta getsrc_smc+2
sta zx_src_h+1
lda #$EE
jsr decompress_lzsa2_fast
jsr zx02_full_decomp

View File

@ -28,14 +28,14 @@ peasantry1:
; decompress dialog to $d000
lda #<peasant1_text_lzsa
sta getsrc_smc+1
lda #>peasant1_text_lzsa
sta getsrc_smc+2
lda #<peasant1_text_zx02
sta zx_src_l+1
lda #>peasant1_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -79,13 +79,13 @@ new_location:
ldx MAP_LOCATION
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -100,13 +100,13 @@ new_location:
ldx MAP_LOCATION
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
;=========================
; update bg based on gary
@ -509,35 +509,35 @@ level_over:
.include "sprites/gary_sprites.inc"
map_backgrounds_low:
.byte <gary_lzsa ; 0 -- gary the horse
.byte <top_prints_lzsa ; 1 -- top footprints
.byte <wishing_well_lzsa ; 2 -- wishing well
.byte <leaning_tree_lzsa ; 3 -- leaning tree
.byte <waterfall_lzsa ; 4 -- waterfall
.byte <gary_zx02 ; 0 -- gary the horse
.byte <top_prints_zx02 ; 1 -- top footprints
.byte <wishing_well_zx02 ; 2 -- wishing well
.byte <leaning_tree_zx02 ; 3 -- leaning tree
.byte <waterfall_zx02 ; 4 -- waterfall
map_backgrounds_hi:
.byte >gary_lzsa ; 0 -- gary the horse
.byte >top_prints_lzsa ; 1 -- top footprints
.byte >wishing_well_lzsa ; 2 -- wishing well
.byte >leaning_tree_lzsa ; 3 -- leaning tree
.byte >waterfall_lzsa ; 4 -- waterfall
.byte >gary_zx02 ; 0 -- gary the horse
.byte >top_prints_zx02 ; 1 -- top footprints
.byte >wishing_well_zx02 ; 2 -- wishing well
.byte >leaning_tree_zx02 ; 3 -- leaning tree
.byte >waterfall_zx02 ; 4 -- waterfall
.include "graphics_peasantry/priority_peasant1.inc"
map_priority_low:
.byte <gary_priority_lzsa ; 0 -- gary the horse
.byte <top_prints_priority_lzsa ; 1 -- top footprints
.byte <wishing_well_priority_lzsa ; 2 -- wishing well
.byte <leaning_tree_priority_lzsa ; 3 -- leaning tree
.byte <waterfall_priority_lzsa ; 4 -- waterfall
.byte <gary_priority_zx02 ; 0 -- gary the horse
.byte <top_prints_priority_zx02 ; 1 -- top footprints
.byte <wishing_well_priority_zx02 ; 2 -- wishing well
.byte <leaning_tree_priority_zx02 ; 3 -- leaning tree
.byte <waterfall_priority_zx02 ; 4 -- waterfall
map_priority_hi:
.byte >gary_priority_lzsa ; 0 -- gary the horse
.byte >top_prints_priority_lzsa ; 1 -- top footprints
.byte >wishing_well_priority_lzsa ; 2 -- wishing well
.byte >leaning_tree_priority_lzsa ; 3 -- leaning tree
.byte >waterfall_priority_lzsa ; 4 -- waterfall
.byte >gary_priority_zx02 ; 0 -- gary the horse
.byte >top_prints_priority_zx02 ; 1 -- top footprints
.byte >wishing_well_priority_zx02 ; 2 -- wishing well
.byte >leaning_tree_priority_zx02 ; 3 -- leaning tree
.byte >waterfall_priority_zx02 ; 4 -- waterfall
verb_tables_low:
@ -557,7 +557,7 @@ verb_tables_hi:
peasant1_text_lzsa:
.incbin "DIALOG_PEASANT1.LZSA"
peasant1_text_zx02:
.incbin "DIALOG_PEASANT1.ZX02"
.include "peasant1_actions.s"

View File

@ -29,14 +29,14 @@ peasantry2:
; decompress dialog to $D000
lda #<peasant2_text_lzsa
sta getsrc_smc+1
lda #>peasant2_text_lzsa
sta getsrc_smc+2
lda #<peasant2_text_zx02
sta zx_src_l+1
lda #>peasant2_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -85,13 +85,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr gr_copy_to_page1
@ -106,13 +106,13 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $4000
@ -478,32 +478,32 @@ mendelev_arm_moved:
.include "sprites/archery_sprites.inc"
map_backgrounds_low:
.byte <haystack_lzsa ; 5 -- haystack
.byte <puddle_lzsa ; 6 -- puddle
.byte <archery_lzsa ; 7 -- archery
.byte <river_lzsa ; 8 -- river
.byte <knight_lzsa ; 9 -- knight
.byte <haystack_zx02 ; 5 -- haystack
.byte <puddle_zx02 ; 6 -- puddle
.byte <archery_zx02 ; 7 -- archery
.byte <river_zx02 ; 8 -- river
.byte <knight_zx02 ; 9 -- knight
map_backgrounds_hi:
.byte >haystack_lzsa ; 5 -- haystack
.byte >puddle_lzsa ; 6 -- puddle
.byte >archery_lzsa ; 7 -- archery
.byte >river_lzsa ; 8 -- river
.byte >knight_lzsa ; 9 -- knight
.byte >haystack_zx02 ; 5 -- haystack
.byte >puddle_zx02 ; 6 -- puddle
.byte >archery_zx02 ; 7 -- archery
.byte >river_zx02 ; 8 -- river
.byte >knight_zx02 ; 9 -- knight
map_priority_low:
.byte <haystack_priority_lzsa ; 5 -- haystack
.byte <puddle_priority_lzsa ; 6 -- puddle
.byte <archery_priority_lzsa ; 7 -- archery
.byte <river_priority_lzsa ; 8 -- river
.byte <knight_priority_lzsa ; 9 -- knight
.byte <haystack_priority_zx02 ; 5 -- haystack
.byte <puddle_priority_zx02 ; 6 -- puddle
.byte <archery_priority_zx02 ; 7 -- archery
.byte <river_priority_zx02 ; 8 -- river
.byte <knight_priority_zx02 ; 9 -- knight
map_priority_hi:
.byte >haystack_priority_lzsa ; 5 -- haystack
.byte >puddle_priority_lzsa ; 6 -- puddle
.byte >archery_priority_lzsa ; 7 -- archery
.byte >river_priority_lzsa ; 8 -- river
.byte >knight_priority_lzsa ; 9 -- knight
.byte >haystack_priority_zx02 ; 5 -- haystack
.byte >puddle_priority_zx02 ; 6 -- puddle
.byte >archery_priority_zx02 ; 7 -- archery
.byte >river_priority_zx02 ; 8 -- river
.byte >knight_priority_zx02 ; 9 -- knight
verb_tables_low:
.byte <hay_bale_verb_table ; 5 -- haystack
@ -522,7 +522,7 @@ verb_tables_hi:
peasant2_text_lzsa:
.incbin "DIALOG_PEASANT2.LZSA"
peasant2_text_zx02:
.incbin "DIALOG_PEASANT2.ZX02"
.include "peasant2_actions.s"

View File

@ -28,14 +28,14 @@ peasantry3:
; decompress dialog to $D000
lda #<peasant3_text_lzsa
sta getsrc_smc+1
lda #>peasant3_text_lzsa
sta getsrc_smc+2
lda #<peasant3_text_zx02
sta zx_src_l+1
lda #>peasant3_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -85,13 +85,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr gr_copy_to_page1
@ -107,13 +107,13 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -340,34 +340,34 @@ level_over:
.include "sprites/boat_sprites.inc"
map_backgrounds_low:
.byte <jhonka_lzsa ; 10 -- jhonka
.byte <cottage_lzsa ; 11 -- cottage
.byte <lake_w_lzsa ; 12 -- lake west
.byte <lake_e_lzsa ; 13 -- lake east
.byte <inn_lzsa ; 14 -- inn
.byte <jhonka_zx02 ; 10 -- jhonka
.byte <cottage_zx02 ; 11 -- cottage
.byte <lake_w_zx02 ; 12 -- lake west
.byte <lake_e_zx02 ; 13 -- lake east
.byte <inn_zx02 ; 14 -- inn
map_backgrounds_hi:
.byte >jhonka_lzsa ; 10 -- jhonka
.byte >cottage_lzsa ; 11 -- cottage
.byte >lake_w_lzsa ; 12 -- lake west
.byte >lake_e_lzsa ; 13 -- lake east
.byte >inn_lzsa ; 14 -- inn
.byte >jhonka_zx02 ; 10 -- jhonka
.byte >cottage_zx02 ; 11 -- cottage
.byte >lake_w_zx02 ; 12 -- lake west
.byte >lake_e_zx02 ; 13 -- lake east
.byte >inn_zx02 ; 14 -- inn
.include "graphics_peasantry/priority_peasant3.inc"
map_priority_low:
.byte <jhonka_priority_lzsa ; 10 -- jhonka
.byte <cottage_priority_lzsa ; 11 -- cottage
.byte <lake_w_priority_lzsa ; 12 -- lake west
.byte <lake_e_priority_lzsa ; 13 -- lake east
.byte <inn_priority_lzsa ; 14 -- inn
.byte <jhonka_priority_zx02 ; 10 -- jhonka
.byte <cottage_priority_zx02 ; 11 -- cottage
.byte <lake_w_priority_zx02 ; 12 -- lake west
.byte <lake_e_priority_zx02 ; 13 -- lake east
.byte <inn_priority_zx02 ; 14 -- inn
map_priority_hi:
.byte >jhonka_priority_lzsa ; 10 -- jhonka
.byte >cottage_priority_lzsa ; 11 -- cottage
.byte >lake_w_priority_lzsa ; 12 -- lake west
.byte >lake_e_priority_lzsa ; 13 -- lake east
.byte >inn_priority_lzsa ; 14 -- inn
.byte >jhonka_priority_zx02 ; 10 -- jhonka
.byte >cottage_priority_zx02 ; 11 -- cottage
.byte >lake_w_priority_zx02 ; 12 -- lake west
.byte >lake_e_priority_zx02 ; 13 -- lake east
.byte >inn_priority_zx02 ; 14 -- inn
verb_tables_low:
.byte <jhonka_cave_verb_table ; 10 -- jhonka
@ -384,8 +384,8 @@ verb_tables_hi:
.byte >inn_verb_table ; 14 -- inn
peasant3_text_lzsa:
.incbin "DIALOG_PEASANT3.LZSA"
peasant3_text_zx02:
.incbin "DIALOG_PEASANT3.ZX02"
.include "peasant3_actions.s"

View File

@ -28,14 +28,14 @@ peasantry4:
; decompress dialog to $D000
lda #<peasant4_text_lzsa
sta getsrc_smc+1
lda #>peasant4_text_lzsa
sta getsrc_smc+2
lda #<peasant4_text_zx02
sta zx_src_l+1
lda #>peasant4_text_zx02
sta zx_src_h+1
lda #$D0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -82,13 +82,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr gr_copy_to_page1
@ -104,13 +104,13 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -506,34 +506,34 @@ no_draw_ned:
map_backgrounds_low:
.byte <empty_hut_lzsa ; 15 -- empty hut
.byte <ned_lzsa ; 16 -- ned
.byte <bottom_prints_lzsa ; 17 -- bottom footprints
.byte <lady_cottage_lzsa ; 18 -- cottage lady
.byte <crooked_tree_lzsa ; 19 -- crooked tree
.byte <empty_hut_zx02 ; 15 -- empty hut
.byte <ned_zx02 ; 16 -- ned
.byte <bottom_prints_zx02 ; 17 -- bottom footprints
.byte <lady_cottage_zx02 ; 18 -- cottage lady
.byte <crooked_tree_zx02 ; 19 -- crooked tree
map_backgrounds_hi:
.byte >empty_hut_lzsa ; 15 -- empty hut
.byte >ned_lzsa ; 16 -- ned
.byte >bottom_prints_lzsa ; 17 -- bottom footprints
.byte >lady_cottage_lzsa ; 18 -- cottage lady
.byte >crooked_tree_lzsa ; 19 -- crooked tree
.byte >empty_hut_zx02 ; 15 -- empty hut
.byte >ned_zx02 ; 16 -- ned
.byte >bottom_prints_zx02 ; 17 -- bottom footprints
.byte >lady_cottage_zx02 ; 18 -- cottage lady
.byte >crooked_tree_zx02 ; 19 -- crooked tree
map_priority_low:
.byte <empty_hut_priority_lzsa ; 15 -- empty hut
.byte <ned_priority_lzsa ; 16 -- ned
.byte <bottom_prints_priority_lzsa ; 17 -- bottom footprints
.byte <lady_cottage_priority_lzsa ; 18 -- cottage lady
.byte <crooked_tree_priority_lzsa ; 19 -- crooked tree
.byte <empty_hut_priority_zx02 ; 15 -- empty hut
.byte <ned_priority_zx02 ; 16 -- ned
.byte <bottom_prints_priority_zx02 ; 17 -- bottom footprints
.byte <lady_cottage_priority_zx02 ; 18 -- cottage lady
.byte <crooked_tree_priority_zx02 ; 19 -- crooked tree
map_priority_hi:
.byte >empty_hut_priority_lzsa ; 15 -- empty hut
.byte >ned_priority_lzsa ; 16 -- ned
.byte >bottom_prints_priority_lzsa ; 17 -- bottom footprints
.byte >lady_cottage_priority_lzsa ; 18 -- cottage lady
.byte >crooked_tree_priority_lzsa ; 19 -- crooked tree
.byte >empty_hut_priority_zx02 ; 15 -- empty hut
.byte >ned_priority_zx02 ; 16 -- ned
.byte >bottom_prints_priority_zx02 ; 17 -- bottom footprints
.byte >lady_cottage_priority_zx02 ; 18 -- cottage lady
.byte >crooked_tree_priority_zx02 ; 19 -- crooked tree
@ -552,8 +552,8 @@ verb_tables_hi:
.byte >crooked_tree_verb_table ; 19 -- crooked tree
peasant4_text_lzsa:
.incbin "DIALOG_PEASANT4.LZSA"
peasant4_text_zx02:
.incbin "DIALOG_PEASANT4.ZX02"
.include "peasant4_actions.s"

View File

@ -2,38 +2,39 @@ load_file =$0b2a
sector_write =$0c85
check_floppy_in_drive2 =$0de6
requested_sector =$0d17
decompress_lzsa2_fast =$0e35
getsrc_smc =$0f2b
hgr2 =$1831
hgr_make_tables =$15a5
hgr_put_string =$0f38
restore_bg_1x28 =$1470
hgr_draw_sprite_1x28 =$1409
input_buffer =$157d
hgr_text_box =$161b
hgr_text_box_nosave =$16b2
hgr_partial_restore =$14f3
clear_bottom =$1806
hgr_input =$1523
draw_box =$12ba
disp_put_string =$1656
disp_one_line =$166a
invert_smc1 =$0fb0
disp_put_string_cursor =$1666
hgr_put_char_cursor =$0f64
vgi_simple_rectangle =$133b
peasant_text =$1f65
save_menu =$18e4
load_menu =$18d9
location_names_l =$1c11
location_names_h =$1c30
wait_until_keypress =$1e50
random16 =$1e59
score_points =$1ede
print_score =$1e8e
update_score =$1e99
speaker_beep =$1f4c
speaker_duration =$1f63
speaker_frequency =$1f64
zx02_full_decomp =$0e35
zx_src_l =$0e37
zx_src_h =$0e3b
hgr2 =$17bc
hgr_make_tables =$1530
hgr_put_string =$0ec3
restore_bg_1x28 =$13fb
hgr_draw_sprite_1x28 =$1394
input_buffer =$1508
hgr_text_box =$15a6
hgr_text_box_nosave =$163d
hgr_partial_restore =$147e
clear_bottom =$1791
hgr_input =$14ae
draw_box =$1245
disp_put_string =$15e1
disp_one_line =$15f5
invert_smc1 =$0f3b
disp_put_string_cursor =$15f1
hgr_put_char_cursor =$0eef
vgi_simple_rectangle =$12c6
peasant_text =$1ef0
save_menu =$186f
load_menu =$1864
location_names_l =$1b9c
location_names_h =$1bbb
wait_until_keypress =$1ddb
random16 =$1de4
score_points =$1e69
print_score =$1e19
update_score =$1e24
speaker_beep =$1ed7
speaker_duration =$1eee
speaker_frequency =$1eef
hposn_high = $BA00
hposn_low = $BB00

View File

@ -296,7 +296,8 @@ length_array:
.include "drive2.s"
.include "decompress_fast_v2.s"
.include "zx02_optim.s"
;.include "decompress_fast_v2.s"
.include "hgr_font.s"
.include "draw_box.s"

View File

@ -32,28 +32,29 @@ do_title:
;================================
; load regular title image to $40
lda #<(title_trogfree_lzsa)
sta getsrc_smc+1
lda #>(title_trogfree_lzsa)
sta getsrc_smc+2
lda #<(title_trogfree_zx02)
sta zx_src_l+1
lda #>(title_trogfree_zx02)
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
; jsr decompress_lzsa2_fast
jsr zx02_full_decomp
;=================================
; load trogdor title image to $20
lda #<(title_lzsa)
sta getsrc_smc+1
lda #>(title_lzsa)
sta getsrc_smc+2
lda #<(title_zx02)
sta zx_src_l+1
lda #>(title_zx02)
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
; jsr decompress_lzsa2_fast
jsr zx02_full_decomp
bit KEYRESET

View File

@ -23,13 +23,13 @@ trogdor:
; decompress dialog to $D000
lda #<trogdor_text_lzsa
sta getsrc_smc+1
lda #>trogdor_text_lzsa
sta getsrc_smc+2
lda #<trogdor_text_zx02
sta zx_src_l+1
lda #>trogdor_text_zx02
sta zx_src_h+1
lda #$d0
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; update score
@ -78,13 +78,13 @@ new_location:
tax
lda map_priority_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_priority_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20 ; temporarily load to $2000
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; copy to $400
@ -100,13 +100,13 @@ new_location:
tax
lda map_backgrounds_low,X
sta getsrc_smc+1
sta zx_src_l+1
lda map_backgrounds_hi,X
sta getsrc_smc+2
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr hgr_copy
@ -342,16 +342,16 @@ update_top:
map_backgrounds_low:
.byte <trogdor_sleep_lzsa
.byte <trogdor_sleep_zx02
map_backgrounds_hi:
.byte >trogdor_sleep_lzsa
.byte >trogdor_sleep_zx02
map_priority_low:
.byte <trogdor_priority_lzsa
.byte <trogdor_priority_zx02
map_priority_hi:
.byte >trogdor_priority_lzsa
.byte >trogdor_priority_zx02
verb_tables_low:
.byte <trogdor_inner_verb_table
@ -360,7 +360,7 @@ verb_tables_hi:
.byte >trogdor_inner_verb_table
trogdor_text_lzsa:
.incbin "DIALOG_TROGDOR.LZSA"
trogdor_text_zx02:
.incbin "DIALOG_TROGDOR.ZX02"
.include "trogdor_actions.s"

View File

@ -179,14 +179,14 @@ awake_no_keypress:
awake_talk_trogdor:
lda #<trogdor_cave_lzsa
sta getsrc_smc+1
lda #>trogdor_cave_lzsa
sta getsrc_smc+2
lda #<trogdor_cave_zx02
sta zx_src_l+1
lda #>trogdor_cave_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
;======================
; draw rather dashing
@ -289,14 +289,14 @@ burninate_rather_dashing:
trogdor_open:
lda #<trogdor_open_lzsa
sta getsrc_smc+1
lda #>trogdor_open_lzsa
sta getsrc_smc+2
lda #<trogdor_open_zx02
sta zx_src_l+1
lda #>trogdor_open_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
;======================
; draw rather dashing
@ -320,25 +320,25 @@ trogdor_open:
trogdor_flame1:
lda #<trogdor_flame1_lzsa
sta getsrc_smc+1
lda #>trogdor_flame1_lzsa
sta getsrc_smc+2
lda #<trogdor_flame1_zx02
sta zx_src_l+1
lda #>trogdor_flame1_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
trogdor_flame2:
lda #<trogdor_flame2_lzsa
sta getsrc_smc+1
lda #>trogdor_flame2_lzsa
sta getsrc_smc+2
lda #<trogdor_flame2_zx02
sta zx_src_l+1
lda #>trogdor_flame2_zx02
sta zx_src_h+1
lda #$20
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
ldx #32
@ -372,14 +372,14 @@ burninate_loop:
; charred
; smoke
lda #<trogdor_cave_lzsa
sta getsrc_smc+1
lda #>trogdor_cave_lzsa
sta getsrc_smc+2
lda #<trogdor_cave_zx02
sta zx_src_l+1
lda #>trogdor_cave_zx02
sta zx_src_h+1
lda #$40
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
jsr update_top

View File

@ -280,14 +280,18 @@ videlectrix_intro:
; Load logo offscreen at $9000
lda #<(videlectrix_lzsa)
sta getsrc_smc+1
lda #>(videlectrix_lzsa)
sta getsrc_smc+2
lda #<(videlectrix_zx02)
sta zx_src_l+1
; sta getsrc_smc+1
lda #>(videlectrix_zx02)
sta zx_src_h+1
; sta getsrc_smc+2
lda #$90
jsr decompress_lzsa2_fast
; jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; jsr wait_until_keypress
@ -322,16 +326,19 @@ done_page:
bmi done_loop
lda animation_low,Y
sta getsrc_smc+1
; sta getsrc_smc+1
sta zx_src_l+1
lda animation_high,Y
sta getsrc_smc+2
; sta getsrc_smc+2
sta zx_src_h+1
tya
pha
lda DRAW_PAGE
jsr decompress_lzsa2_fast
jsr zx02_full_decomp
; jsr decompress_lzsa2_fast
jsr hgr_overlay
@ -371,56 +378,56 @@ done_loop:
; jmp forever
animation_low:
.byte <videlectrix_lzsa ; .byte <title_anim01_lzsa
.byte <title_anim02_lzsa
.byte <title_anim03_lzsa ; .byte <title_anim04_lzsa
.byte <title_anim05_lzsa ; .byte <title_anim06_lzsa
.byte <title_anim07_lzsa ; .byte <title_anim08_lzsa
.byte <title_anim09_lzsa ; .byte <title_anim10_lzsa
.byte <title_anim11_lzsa ; .byte <title_anim12_lzsa
.byte <title_anim13_lzsa ; .byte <title_anim14_lzsa
.byte <title_anim15_lzsa ; .byte <title_anim16_lzsa
.byte <title_anim17_lzsa ; .byte <title_anim18_lzsa
.byte <title_anim19_lzsa ; .byte <title_anim20_lzsa
.byte <title_anim21_lzsa ; .byte <title_anim22_lzsa
.byte <title_anim23_lzsa ; .byte <title_anim24_lzsa
.byte <title_anim25_lzsa ; .byte <title_anim26_lzsa
.byte <title_anim27_lzsa ; .byte <title_anim28_lzsa
.byte <title_anim29_lzsa
.byte <title_anim30_lzsa
.byte <title_anim31_lzsa
.byte <title_anim32_lzsa
.byte <title_anim33_lzsa
.byte <title_anim33_lzsa
.byte <title_anim33_lzsa
.byte <title_anim34_lzsa
.byte <title_anim34_lzsa
.byte <videlectrix_zx02 ; .byte <title_anim01_zx02
.byte <title_anim02_zx02
.byte <title_anim03_zx02 ; .byte <title_anim04_zx02
.byte <title_anim05_zx02 ; .byte <title_anim06_zx02
.byte <title_anim07_zx02 ; .byte <title_anim08_zx02
.byte <title_anim09_zx02 ; .byte <title_anim10_zx02
.byte <title_anim11_zx02 ; .byte <title_anim12_zx02
.byte <title_anim13_zx02 ; .byte <title_anim14_zx02
.byte <title_anim15_zx02 ; .byte <title_anim16_zx02
.byte <title_anim17_zx02 ; .byte <title_anim18_zx02
.byte <title_anim19_zx02 ; .byte <title_anim20_zx02
.byte <title_anim21_zx02 ; .byte <title_anim22_zx02
.byte <title_anim23_zx02 ; .byte <title_anim24_zx02
.byte <title_anim25_zx02 ; .byte <title_anim26_zx02
.byte <title_anim27_zx02 ; .byte <title_anim28_zx02
.byte <title_anim29_zx02
.byte <title_anim30_zx02
.byte <title_anim31_zx02
.byte <title_anim32_zx02
.byte <title_anim33_zx02
.byte <title_anim33_zx02
.byte <title_anim33_zx02
.byte <title_anim34_zx02
.byte <title_anim34_zx02
animation_high:
.byte >videlectrix_lzsa ; .byte >title_anim01_lzsa
.byte >title_anim02_lzsa
.byte >title_anim03_lzsa ; .byte >title_anim04_lzsa
.byte >title_anim05_lzsa ; .byte >title_anim06_lzsa
.byte >title_anim07_lzsa ; .byte >title_anim08_lzsa
.byte >title_anim09_lzsa ; .byte >title_anim10_lzsa
.byte >title_anim11_lzsa ; .byte >title_anim12_lzsa
.byte >title_anim13_lzsa ; .byte >title_anim14_lzsa
.byte >title_anim15_lzsa ; .byte >title_anim16_lzsa
.byte >title_anim17_lzsa ; .byte >title_anim18_lzsa
.byte >title_anim19_lzsa ; .byte >title_anim20_lzsa
.byte >title_anim21_lzsa ; .byte >title_anim22_lzsa
.byte >title_anim23_lzsa ; .byte >title_anim24_lzsa
.byte >title_anim25_lzsa ; .byte >title_anim26_lzsa
.byte >title_anim27_lzsa ; .byte >title_anim28_lzsa
.byte >title_anim29_lzsa
.byte >title_anim30_lzsa
.byte >title_anim31_lzsa
.byte >title_anim32_lzsa
.byte >title_anim33_lzsa
.byte >title_anim33_lzsa
.byte >title_anim33_lzsa
.byte >title_anim34_lzsa
.byte >title_anim34_lzsa
.byte >videlectrix_zx02 ; .byte >title_anim01_zx02
.byte >title_anim02_zx02
.byte >title_anim03_zx02 ; .byte >title_anim04_zx02
.byte >title_anim05_zx02 ; .byte >title_anim06_zx02
.byte >title_anim07_zx02 ; .byte >title_anim08_zx02
.byte >title_anim09_zx02 ; .byte >title_anim10_zx02
.byte >title_anim11_zx02 ; .byte >title_anim12_zx02
.byte >title_anim13_zx02 ; .byte >title_anim14_zx02
.byte >title_anim15_zx02 ; .byte >title_anim16_zx02
.byte >title_anim17_zx02 ; .byte >title_anim18_zx02
.byte >title_anim19_zx02 ; .byte >title_anim20_zx02
.byte >title_anim21_zx02 ; .byte >title_anim22_zx02
.byte >title_anim23_zx02 ; .byte >title_anim24_zx02
.byte >title_anim25_zx02 ; .byte >title_anim26_zx02
.byte >title_anim27_zx02 ; .byte >title_anim28_zx02
.byte >title_anim29_zx02
.byte >title_anim30_zx02
.byte >title_anim31_zx02
.byte >title_anim32_zx02
.byte >title_anim33_zx02
.byte >title_anim33_zx02
.byte >title_anim33_zx02
.byte >title_anim34_zx02
.byte >title_anim34_zx02
notes:
@ -480,7 +487,6 @@ delays:
;.include "decompress_fast_v2.s"
.include "hgr_overlay.s"
.include "speaker_beeps.inc"
@ -512,7 +518,7 @@ boot_message:
.byte 0,3,"ORIGINAL BY VIDELECTRIX",0
.byte 0,5,"APPLE II PORT: VINCE WEAVER",0
.byte 0,6,"DISK CODE : QKUMBA",0
.byte 0,7,"LZSA CODE : EMMANUEL MARTY",0
.byte 0,7,"ZX02 CODE : DMSC",0
.byte 0,8,"ELECTRIC DUET: PAUL LUTUS",0
.byte 7,18,"______",0
.byte 5,19,"A \/\/\/ SOFTWARE PRODUCTION",0

View File

@ -23,6 +23,15 @@ TEMP3 = $13
TEMP4 = $14
TEMP5 = $15
; zx02 code
offset = $10
offseth = $11
ZX0_src = $12
ZX0_dst = $14
ZX0_srch= $15
bitr = $16
pntr = $17
pntrh = $18
; electric duet
FREQ1 = $10
FREQ2 = $11

159
games/peasant/zx02_optim.s Normal file
View File

@ -0,0 +1,159 @@
; De-compressor for ZX02 files
; ----------------------------
;
; Decompress ZX02 data (6502 optimized format), optimized for speed and size
; 138 bytes code, 58.0 cycles/byte in test file.
;
; Compress with:
; zx02 input.bin output.zx0
;
; (c) 2022 DMSC
; Code under MIT license, see LICENSE file.
;ZP=$80
;offset = ZP+0
;ZX0_src = ZP+2
;ZX0_dst = ZP+4
;bitr = ZP+6
;pntr = ZP+7
; Initial values for offset, source, destination and bitr
;zx0_ini_block:
; .byte $00, $00, <comp_data, >comp_data, <out_addr, >out_addr, $80
;--------------------------------------------------
; Decompress ZX0 data (6502 optimized format)
zx02_full_decomp:
; ; Get initialization block
; ldy #7
;
;copy_init: lda zx0_ini_block-1, y
; sta offset-1, y
; dey
; bne copy_init
sta ZX0_dst+1 ; page to output to in A
zx_src_l:
ldy #$dd
sty ZX0_src
zx_src_h:
ldy #$dd
sty ZX0_src+1
ldy #$80
sty bitr
ldy #0
sty offset
sty offset+1
sty ZX0_dst ; always on even page
; Decode literal: Ccopy next N bytes from compressed file
; Elias(length) byte[1] byte[2] ... byte[N]
decode_literal:
jsr get_elias
cop0: lda (ZX0_src), y
inc ZX0_src
bne plus1
inc ZX0_src+1
plus1: sta (ZX0_dst),y
inc ZX0_dst
bne plus2
inc ZX0_dst+1
plus2: dex
bne cop0
asl bitr
bcs dzx0s_new_offset
; Copy from last offset (repeat N bytes from last offset)
; Elias(length)
jsr get_elias
dzx0s_copy:
lda ZX0_dst
sbc offset ; C=0 from get_elias
sta pntr
lda ZX0_dst+1
sbc offset+1
sta pntr+1
cop1:
lda (pntr), y
inc pntr
bne plus3
inc pntr+1
plus3: sta (ZX0_dst),y
inc ZX0_dst
bne plus4
inc ZX0_dst+1
plus4: dex
bne cop1
asl bitr
bcc decode_literal
; Copy from new offset (repeat N bytes from new offset)
; Elias(MSB(offset)) LSB(offset) Elias(length-1)
dzx0s_new_offset:
; Read elias code for high part of offset
jsr get_elias
beq exit ; Read a 0, signals the end
; Decrease and divide by 2
dex
txa
lsr ; @
sta offset+1
; Get low part of offset, a literal 7 bits
lda (ZX0_src), y
inc ZX0_src
bne plus5
inc ZX0_src+1
plus5:
; Divide by 2
ror ; @
sta offset
; And get the copy length.
; Start elias reading with the bit already in carry:
ldx #1
jsr elias_skip1
inx
bcc dzx0s_copy
; Read an elias-gamma interlaced code.
; ------------------------------------
get_elias:
; Initialize return value to #1
ldx #1
bne elias_start
elias_get: ; Read next data bit to result
asl bitr
rol ; @
tax
elias_start:
; Get one bit
asl bitr
bne elias_skip1
; Read new bit from stream
lda (ZX0_src), y
inc ZX0_src
bne plus6
inc ZX0_src+1
plus6: ;sec ; not needed, C=1 guaranteed from last bit
rol ;@
sta bitr
elias_skip1:
txa
bcs elias_get
; Got ending bit, stop reading
exit:
rts