diff --git a/games/peasant/Makefile b/games/peasant/Makefile index 36c66a37..8f4acf0e 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -127,6 +127,11 @@ qload.inc: generate_common QLOAD ./generate_common -a 0xb00 -s hgr_put_char_cursor qload.lst >> qload.inc ./generate_common -a 0xb00 -s vgi_simple_rectangle qload.lst >> qload.inc ./generate_common -a 0xb00 -s peasant_text qload.lst >> qload.inc + ./generate_common -a 0xb00 -s save_menu qload.lst >> qload.inc + ./generate_common -a 0xb00 -s load_menu qload.lst >> qload.inc + ./generate_common -a 0xb00 -s location_names_l qload.lst >> qload.inc + ./generate_common -a 0xb00 -s location_names_h qload.lst >> qload.inc + ./generate_common -a 0xb00 -s wait_until_keypress qload.lst >> qload.inc echo "hposn_high = \$$BA00" >> qload.inc echo "hposn_low = \$$BB00" >> qload.inc echo "driveoff = \$$A22" >> qload.inc @@ -388,6 +393,18 @@ save3.o: save3.s ### +PARSE_INPUT.LZSA: parse_input + $(LZSA) -r -f2 parse_input PARSE_INPUT.LZSA + +parse_input: parse_input.o + ld65 -o parse_input parse_input.o -C ../../linker_scripts/apple2_d000.inc + +parse_input.o: parse_input.s tokens.inc + ca65 -o parse_input.o parse_input.s -l parse_input.lst + + +### + DIALOG_PEASANT1.LZSA: dialog_peasant1 $(LZSA) -r -f2 dialog_peasant1 DIALOG_PEASANT1.LZSA diff --git a/games/peasant/NOTES b/games/peasant/NOTES index d2eac91f..bbeb10e8 100644 --- a/games/peasant/NOTES +++ b/games/peasant/NOTES @@ -12,7 +12,7 @@ Inventory: 3CEE - 4a5f = D71 = 3441 bytes Common parser: 4ac - 11af = D03 3331 bytes - + 4c2 - 156e = 10ac 4268 bytes @@ -30,6 +30,7 @@ peasant2 18302 17122 -- add all verbs in (+), optimize text box drawing (-) 17918 -- text parsing nearing completion 18208 -- mountain pass parsing working + 18780 -- most dialog hooked up partial save, can we fit in 4k? 102 lines ; inventory was 115? @@ -62,7 +63,7 @@ $02 Disk Lookup $03 Disk Lookup, IRQ vectors $04-$07 Text/GR page 1 (priority map) $08-$0B Text/GR page 2. $08=boot, $09-$0A = qboot stage2 -$0B-$1F QLOAD disk routines and HGR drawing routines +$0B-$1F QLOAD disk routines and HGR drawing routines (5120 bytes) $20-$3F HGR Page 1 $40-$5f HGR Page 2 $60-$AF Programs (roughly 22k available?) (we max at 20k on disk) diff --git a/games/peasant/cliff.s b/games/peasant/cliff.s index 4c841a71..d1af9142 100644 --- a/games/peasant/cliff.s +++ b/games/peasant/cliff.s @@ -139,7 +139,7 @@ game_over: rts -.include "wait_keypress.s" + .include "draw_peasant.s" @@ -161,7 +161,7 @@ game_over: .include "wait_a_bit.s" .include "version.inc" -.include "loadsave_menu.s" + ; Moved to qload @@ -177,8 +177,8 @@ game_over: ;.include "hgr_text_box.s" ;.include "clear_bottom.s" ;.include "hgr_hgr2.s" - - +;.include "loadsave_menu.s" +;.include "wait_keypress.s" .include "graphics_cliff/cliff_graphics.inc" diff --git a/games/peasant/ending.s b/games/peasant/ending.s index 4735c47a..d93e7227 100644 --- a/games/peasant/ending.s +++ b/games/peasant/ending.s @@ -538,9 +538,10 @@ game_over: jmp boat -;.include "decompress_fast_v2.s" -.include "wait_keypress.s" +; moved to qload + +;.include "decompress_fast_v2.s" ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" @@ -549,10 +550,12 @@ game_over: ;.include "hgr_input.s" ;.include "hgr_tables.s" ;.include "hgr_text_box.s" +;.include "wait_keypress.s" +;.include "hgr_hgr2.s" .include "hgr_2x14_sprite_mask.s" .include "hgr_sprite.s" -;.include "hgr_hgr2.s" + .include "score.s" diff --git a/games/peasant/game_over.s b/games/peasant/game_over.s index eeedb75c..8288892e 100644 --- a/games/peasant/game_over.s +++ b/games/peasant/game_over.s @@ -157,14 +157,14 @@ done_beep: .include "hgr_sprite.s" .include "speaker_beeps.s" -.include "wait_keypress.s" +;.include "wait_keypress.s" .include "score.s" .include "wait.s" .include "wait_a_bit.s" +;.include "loadsave_menu.s" -.include "loadsave_menu.s" .include "graphics_over/game_over_graphics.inc" diff --git a/games/peasant/intro.s b/games/peasant/intro.s index 10f8921e..7d6a056e 100644 --- a/games/peasant/intro.s +++ b/games/peasant/intro.s @@ -120,7 +120,7 @@ mockingboard_notfound2: .include "new_game.s" -.include "wait_keypress.s" +;.include "wait_keypress.s" .include "intro_cottage.s" .include "intro_lake_w.s" diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index b3b458e2..f21a6544 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -1,5 +1,13 @@ +;.include "zp.inc" +;.include "hardware.inc" +;.include "qload.inc" + +;.include "version.inc" +;.include "inventory.inc" + .include "tokens.inc" + ;========================== ; parse input ;========================== @@ -545,13 +553,6 @@ restore_parse_message: jsr hgr_partial_restore -; lda last_bg_l -; sta getsrc_smc+1 -; lda last_bg_h -; sta getsrc_smc+2 -; lda #$40 -; jsr decompress_lzsa2_fast - done_parse_message: diff --git a/games/peasant/peasant1.s b/games/peasant/peasant1.s index 9a62ac11..81a8fc6a 100644 --- a/games/peasant/peasant1.s +++ b/games/peasant/peasant1.s @@ -142,7 +142,8 @@ game_over: rts -.include "wait_keypress.s" + +;.include "inventory.s" .include "draw_peasant.s" @@ -154,7 +155,7 @@ game_over: .include "parse_input.s" -;.include "inventory.s" + .include "score.s" @@ -164,7 +165,7 @@ game_over: .include "wait_a_bit.s" .include "version.inc" -.include "loadsave_menu.s" + ; Moved to qload @@ -180,6 +181,8 @@ game_over: ;.include "hgr_text_box.s" ;.include "clear_bottom.s" ;.include "hgr_hgr2.s" +;.include "wait_keypress.s" +;.include "loadsave_menu.s" ;.include "text/peasant1.inc" diff --git a/games/peasant/peasant2.s b/games/peasant/peasant2.s index d7481d1a..242cc0a7 100644 --- a/games/peasant/peasant2.s +++ b/games/peasant/peasant2.s @@ -188,8 +188,6 @@ to_left: rts -.include "wait_keypress.s" - .include "draw_peasant.s" .include "gr_copy.s" @@ -213,7 +211,7 @@ to_left: ;.include "inventory.s" -.include "loadsave_menu.s" + ; moved to QLOAD @@ -230,6 +228,8 @@ to_left: ;.include "hgr_text_box.s" ;.include "clear_bottom.s" ;.include "hgr_hgr2.s" +;.include "wait_keypress.s" +;.include "loadsave_menu.s" diff --git a/games/peasant/peasant3.s b/games/peasant/peasant3.s index 674d3cfd..df4cbfd9 100644 --- a/games/peasant/peasant3.s +++ b/games/peasant/peasant3.s @@ -140,11 +140,12 @@ game_over: rts -;.include "decompress_fast_v2.s" -.include "wait_keypress.s" + .include "draw_peasant.s" +; Moved to qload +;.include "decompress_fast_v2.s" ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" @@ -156,6 +157,8 @@ game_over: ;.include "hgr_text_box.s" ;.include "clear_bottom.s" ;.include "hgr_hgr2.s" +;.include "loadsave_menu.s" +;.include "wait_keypress.s" .include "gr_copy.s" @@ -174,22 +177,7 @@ game_over: .include "wait_a_bit.s" .include "version.inc" -.include "loadsave_menu.s" -;help_message: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"I don't understand. Type",13 -;.byte "HELP for assistances.",0 - -;fake_error1: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"?SYNTAX ERROR IN 1020",13 -;.byte "]",127,0 - -;fake_error2: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"?UNDEF'D STATEMENT ERROR",13 -;.byte "]",127,0 .include "graphics_peasantry/graphics_peasant3.inc" diff --git a/games/peasant/peasant4.s b/games/peasant/peasant4.s index 7b65a663..4f5dfe25 100644 --- a/games/peasant/peasant4.s +++ b/games/peasant/peasant4.s @@ -147,11 +147,13 @@ game_over: -;.include "decompress_fast_v2.s" -.include "wait_keypress.s" + .include "draw_peasant.s" +; moved to qload + +;.include "decompress_fast_v2.s" ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" @@ -163,6 +165,8 @@ game_over: ;.include "hgr_text_box.s" ;.include "clear_bottom.s" ;.include "hgr_hgr2.s" +;.include "wait_keypress.s" +;.include "loadsave_menu.s" .include "gr_copy.s" @@ -185,22 +189,8 @@ game_over: .include "graphics_peasantry/priority_peasant4.inc" .include "version.inc" -.include "loadsave_menu.s" -;help_message: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"I don't understand. Type",13 -;.byte "HELP for assistances.",0 -;fake_error1: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"?SYNTAX ERROR IN 1020",13 -;.byte "]",127,0 - -;fake_error2: -;.byte 0,43,24, 0,253,82 -;.byte 8,41,"?UNDEF'D STATEMENT ERROR",13 -;.byte "]",127,0 map_backgrounds_low: diff --git a/games/peasant/qload.inc b/games/peasant/qload.inc index d2aead95..a89453a0 100644 --- a/games/peasant/qload.inc +++ b/games/peasant/qload.inc @@ -23,7 +23,12 @@ invert_smc1 =$0f61 disp_put_string_cursor =$1696 hgr_put_char_cursor =$0f15 vgi_simple_rectangle =$12ec -peasant_text =$17a5 +peasant_text =$1d0f +save_menu =$17b0 +load_menu =$17a5 +location_names_l =$1adc +location_names_h =$1af9 +wait_until_keypress =$1d06 hposn_high = $BA00 hposn_low = $BB00 driveoff = $A22 diff --git a/games/peasant/qload.s b/games/peasant/qload.s index cc17c7aa..68628e6b 100644 --- a/games/peasant/qload.s +++ b/games/peasant/qload.s @@ -254,6 +254,8 @@ length_array: .include "clear_bottom.s" .include "hgr_hgr2.s" ; this one is maybe only needed once? .include "gr_offsets.s" +.include "loadsave_menu.s" +.include "wait_keypress.s" peasant_text: .byte 25,2,"Peasant's Quest",0 diff --git a/games/peasant/title.s b/games/peasant/title.s index 29d3ba1e..1d64f362 100644 --- a/games/peasant/title.s +++ b/games/peasant/title.s @@ -302,7 +302,7 @@ duet_finished: ;.include "decompress_fast_v2.s" -.include "wait_keypress.s" +;.include "wait_keypress.s" .include "directions.s" diff --git a/games/peasant/trogdor.s b/games/peasant/trogdor.s index 4233ff78..119460e0 100644 --- a/games/peasant/trogdor.s +++ b/games/peasant/trogdor.s @@ -313,7 +313,7 @@ game_over: ;.include "decompress_fast_v2.s" -.include "wait_keypress.s" +;.include "wait_keypress.s"