diff --git a/games/peasant/Makefile b/games/peasant/Makefile index 9908632c..1b0aa4cd 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -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 diff --git a/games/peasant/NOTES b/games/peasant/NOTES index 5a91af54..d6501701 100644 --- a/games/peasant/NOTES +++ b/games/peasant/NOTES @@ -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 + diff --git a/games/peasant/archery.s b/games/peasant/archery.s index 6a1b63dc..8b39a9ee 100644 --- a/games/peasant/archery.s +++ b/games/peasant/archery.s @@ -39,14 +39,14 @@ new_location: sbc #LOCATION_BASE tax - lda #target_lzsa - sta getsrc_smc+2 + lda #target_zx02 + sta zx_src_h+1 lda #$40 - jsr decompress_lzsa2_fast + jsr zx02_full_decomp ; put peasant text diff --git a/games/peasant/cliff.s b/games/peasant/cliff.s index 50acd27d..ba02569c 100644 --- a/games/peasant/cliff.s +++ b/games/peasant/cliff.s @@ -25,14 +25,14 @@ cliff_base: ; decompress dialog to $D000 - lda #cliff_text_lzsa - sta getsrc_smc+2 + 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_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 verb_tables_low: .byte (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 #(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 # -; -; 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 -; 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 - diff --git a/games/peasant/directions.s b/games/peasant/directions.s index 8ace5d5c..fd457b5b 100644 --- a/games/peasant/directions.s +++ b/games/peasant/directions.s @@ -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 #lake_e_boat_lzsa - sta getsrc_smc+2 + 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+2 + 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+2 + 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+2 + 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+2 + lda #the_end_zx02 + sta zx_src_h+1 lda #$40 - jsr decompress_lzsa2_fast + jsr zx02_full_decomp jsr update_top diff --git a/games/peasant/game_over.s b/games/peasant/game_over.s index 3b3c1328..305abfaf 100644 --- a/games/peasant/game_over.s +++ b/games/peasant/game_over.s @@ -30,14 +30,14 @@ game_over: ; draw game over background ;=========================== - lda #game_over_lzsa - sta getsrc_smc+2 + 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+2 + lda #videlectrix_zx02 + sta zx_src_h+1 lda #$40 - jsr decompress_lzsa2_fast + jsr zx02_full_decomp lda # 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 diff --git a/games/peasant/graphics_cliff/Makefile b/games/peasant/graphics_cliff/Makefile index 6c5a341e..efd14342 100644 --- a/games/peasant/graphics_cliff/Makefile +++ b/games/peasant/graphics_cliff/Makefile @@ -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 diff --git a/games/peasant/graphics_copy/Makefile b/games/peasant/graphics_copy/Makefile index 01272808..2a4a8404 100644 --- a/games/peasant/graphics_copy/Makefile +++ b/games/peasant/graphics_copy/Makefile @@ -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 diff --git a/games/peasant/graphics_end/Makefile b/games/peasant/graphics_end/Makefile index 5cf7fdcb..5618e5ad 100644 --- a/games/peasant/graphics_end/Makefile +++ b/games/peasant/graphics_end/Makefile @@ -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 diff --git a/games/peasant/graphics_inn/Makefile b/games/peasant/graphics_inn/Makefile index df1811a5..9d523042 100644 --- a/games/peasant/graphics_inn/Makefile +++ b/games/peasant/graphics_inn/Makefile @@ -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 diff --git a/games/peasant/graphics_inside/Makefile b/games/peasant/graphics_inside/Makefile index 03be5bb6..77c4000f 100644 --- a/games/peasant/graphics_inside/Makefile +++ b/games/peasant/graphics_inside/Makefile @@ -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 diff --git a/games/peasant/graphics_map/Makefile b/games/peasant/graphics_map/Makefile index 37a8247b..44f20626 100644 --- a/games/peasant/graphics_map/Makefile +++ b/games/peasant/graphics_map/Makefile @@ -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 diff --git a/games/peasant/graphics_over/Makefile b/games/peasant/graphics_over/Makefile index 61a71403..c642eb64 100644 --- a/games/peasant/graphics_over/Makefile +++ b/games/peasant/graphics_over/Makefile @@ -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 diff --git a/games/peasant/graphics_peasantry/Makefile b/games/peasant/graphics_peasantry/Makefile index 0a3e12cf..26a33022 100644 --- a/games/peasant/graphics_peasantry/Makefile +++ b/games/peasant/graphics_peasantry/Makefile @@ -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 diff --git a/games/peasant/graphics_title/Makefile b/games/peasant/graphics_title/Makefile index 7eb9d834..af4ba7aa 100644 --- a/games/peasant/graphics_title/Makefile +++ b/games/peasant/graphics_title/Makefile @@ -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 diff --git a/games/peasant/graphics_trogdor/Makefile b/games/peasant/graphics_trogdor/Makefile index 2b9575c8..a47f1319 100644 --- a/games/peasant/graphics_trogdor/Makefile +++ b/games/peasant/graphics_trogdor/Makefile @@ -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 diff --git a/games/peasant/graphics_vid/Makefile b/games/peasant/graphics_vid/Makefile index 2ba82948..ee6e8e92 100644 --- a/games/peasant/graphics_vid/Makefile +++ b/games/peasant/graphics_vid/Makefile @@ -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 diff --git a/games/peasant/inn.s b/games/peasant/inn.s index 6b1ecb8b..c06ae9b5 100644 --- a/games/peasant/inn.s +++ b/games/peasant/inn.s @@ -28,14 +28,14 @@ inside_inn: ; decompress dialog to $D000 - lda #inn_text_lzsa - sta getsrc_smc+2 + 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_priority_low: - .byte inside_inn_priority_lzsa + .byte >inside_inn_priority_zx02 verb_tables_low: .byte inside_text_lzsa - sta getsrc_smc+2 + 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