From 88b1989f87bd97f8b8c949fa7c74347323cbea64 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 17 Oct 2021 22:56:46 -0400 Subject: [PATCH] peasant: default to language card bank1 when not showing inventory --- games/peasant/NOTES | 15 +++++++++------ games/peasant/hardware.inc | 3 +++ games/peasant/new_game.s | 8 ++++++-- games/peasant/parse_input.s | 10 ++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/games/peasant/NOTES b/games/peasant/NOTES index a4f4ebc4..d5e9aaa2 100644 --- a/games/peasant/NOTES +++ b/games/peasant/NOTES @@ -25,7 +25,8 @@ peasant2 18302 19577 -- at release 0.75 19944 -- after all priorities added 20050 -- parse lookup table - 20493 -- more parse code + 20493 -- more parse code (release 0.76) + 16995 -- move inventory to language card partial save, can we fit in 4k? 102 lines ; inventory was 115? @@ -78,18 +79,20 @@ T 1 = QLOAD 4813 bytes 19S = 1T3S T 3 = MUSIC 4045 bytes 16S = 1T0S T 4 = VID_LOGO 6911 bytes 27S = 1T11S T 6 = TITLE 9662 bytes 38S = 2T6S -T 9 = INTRO 16040 bytes 63S = 3T15S -T 13 = PEASANT1 22501 bytes 79S = 4T15S ; 88 is max? -T 19 = PEASANT2 ; 79 = 20224 -T 24 = PEASANT3 +T 9 = INTRO 13436 bytes 52S = 3T4S +T 14 = INVENTORY 3498 bytes = 1T0S +T 15 = PEASANT1 22501 bytes 79S = 4T15S ; 88 is max? +T 20 = PEASANT2 16995 bytes 67s = 4T3S ; 79 = 20224 +T 25 = PEASANT3 T 30 = PEASANT4 Disk2 Map (disk has 35 tracks, each 4k in size) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ T 1 = COPY_CHECK 4922 bytes 20S = 1T4S +T 3 = GAME_OVER T 19 = TROGDOR 13673 bytes T 24 = ENDING 19690 bytes 77S = 4T13S - +T 29 = CLIFF 238, to 280 (6) diff --git a/games/peasant/hardware.inc b/games/peasant/hardware.inc index ba2518a6..97d6d13b 100644 --- a/games/peasant/hardware.inc +++ b/games/peasant/hardware.inc @@ -26,6 +26,9 @@ PADDLE_BUTTON0 = $C061 PADDL0 = $C064 PTRIG = $C070 +LCBANK2 = $C083 +LCBANK1 = $C08B + ; APPLESOFT BASIC ROUTINES ;NORMAL = $F273 diff --git a/games/peasant/new_game.s b/games/peasant/new_game.s index 97b6ffdc..23992c73 100644 --- a/games/peasant/new_game.s +++ b/games/peasant/new_game.s @@ -15,8 +15,8 @@ start_new_game: ; switch in language card ; read/write RAM, $d000 bank 2 - lda $C083 - lda $C083 + lda LCBANK2 + lda LCBANK2 ; actually load it lda #LOAD_INVENTORY @@ -24,6 +24,10 @@ start_new_game: jsr load_file + ; read/write RAM, $d000 bank 1 + + lda LCBANK1 + lda LCBANK1 ; start in PEASANT2 file diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index 17d5c8d4..e5e58274 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -278,8 +278,18 @@ parse_drink: parse_inventory: + ; switch in LC bank2 + + lda LCBANK2 + lda LCBANK2 + jsr show_inventory + ; switch back LC bank1 + + lda LCBANK1 + lda LCBANK1 + jmp restore_parse_message ;=====================