peasant: re-write loading code

now all saves in one sector
This commit is contained in:
Vince Weaver 2024-10-09 14:13:48 -04:00
parent 5885d6fb76
commit c484948c91
25 changed files with 221 additions and 318 deletions

View File

@ -16,14 +16,12 @@ all: peasant_disk1.dsk peasant_disk2.dsk peasant_disk3.dsk peasant.2mg
peasant_disk1.dsk: QBOOT QLOAD \
./vid_logo/VID_LOGO ./title/TITLE ./intro/INTRO \
./music/MUSIC ./copy/COPY_CHECK ./inventory/INVENTORY \
SAVE1 SAVE2 SAVE3 PARSE_INPUT.ZX02 ./game_over/GAME_OVER
./saves/SAVE_DATA PARSE_INPUT.ZX02 ./game_over/GAME_OVER
cp $(EMPTY_DISK)/empty.dsk peasant_disk1.dsk
$(DOS33_RAW) peasant_disk1.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) peasant_disk1.dsk 0 2 QBOOT 1 1
$(DOS33_RAW) peasant_disk1.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) peasant_disk1.dsk 0 11 SAVE1 0 1
$(DOS33_RAW) peasant_disk1.dsk 0 12 SAVE2 0 1
$(DOS33_RAW) peasant_disk1.dsk 0 13 SAVE3 0 1
$(DOS33_RAW) peasant_disk1.dsk 0 12 ./saves/SAVE_DATA 0 1
$(DOS33_RAW) peasant_disk1.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) peasant_disk1.dsk 3 0 ./music/MUSIC 0 0
$(DOS33_RAW) peasant_disk1.dsk 4 0 ./vid_logo/VID_LOGO 0 0
@ -69,13 +67,11 @@ peasant.2mg: dts_block PROBOOTHD QLOAD_HD \
./trogdor/TROGDOR ./ending/ENDING ./cliff_base/CLIFF_BASE \
./climb/CLIMB \
./cliff_heights/CLIFF_HEIGHTS \
SAVE1 SAVE2 SAVE3 PARSE_INPUT.ZX02 ./game_over/GAME_OVER
./saves/SAVE_DATA PARSE_INPUT.ZX02 ./game_over/GAME_OVER
$(PRODOSDIR)/mkprodosfs peasant.2mg -n PeasantsQ -b 2800 -2
$(PRODOS_RAW) peasant.2mg 0 PROBOOTHD 0 0
$(PRODOS_RAW) peasant.2mg `./dts_block 0 1 0` QLOAD_HD 0 0
$(PRODOS_RAW) peasant.2mg `./dts_block 1 0 11` SAVE1 0 1
$(PRODOS_RAW) peasant.2mg `./dts_block 1 0 12` SAVE2 0 1
$(PRODOS_RAW) peasant.2mg `./dts_block 1 0 13` SAVE3 0 1
$(PRODOS_RAW) peasant.2mg `./dts_block 1 0 12` ./saves/SAVE_DATA 0 1
$(PRODOS_RAW) peasant.2mg `./dts_block 1 3 0` ./music/MUSIC 0 0
$(PRODOS_RAW) peasant.2mg `./dts_block 1 4 0` ./vid_logo/VID_LOGO 0 0
$(PRODOS_RAW) peasant.2mg `./dts_block 1 6 0` ./title/TITLE 0 0
@ -418,27 +414,8 @@ peasant4.o: peasant4.s zp.inc ./inventory/inventory.inc \
###
SAVE1: save1.o
ld65 -o SAVE1 save1.o -C ../../linker_scripts/apple2_e00.inc
save1.o: save1.s
ca65 -o save1.o save1.s -l save1.lst
###
SAVE2: save2.o
ld65 -o SAVE2 save2.o -C ../../linker_scripts/apple2_e00.inc
save2.o: save2.s
ca65 -o save2.o save2.s -l save2.lst
###
SAVE3: save3.o
ld65 -o SAVE3 save3.o -C ../../linker_scripts/apple2_e00.inc
save3.o: save3.s
ca65 -o save3.o save3.s -l save3.lst
./saves/SAVE_DATA:
cd saves && make
###
@ -562,6 +539,7 @@ distclean:
cd inside && make distclean
cd intro && make distclean
cd map && make distclean
cd saves && make distclean
cd text && make distclean
cd trogdor && make distclean
cd vid_logo && make distclean
@ -586,6 +564,7 @@ clean:
cd intro && make clean
cd map && make clean
cd music && make clean
cd saves && make clean
cd text && make clean
cd title && make clean
cd trogdor && make clean

View File

@ -4,6 +4,13 @@
; FIXME: we can share some of the code here a bit more
; we load one sector (256 or 512 bytes depending) to $BC00 currently
; SAVE1 is at $00, SAVE2 at $20, SAVE3 at $40
load_buffer = $BC00
;=====================
; load_menu
;=====================
@ -474,21 +481,32 @@ load_game:
bcs done_load
; actually load it
lda INVENTORY_Y
clc
adc #LOAD_SAVE1
sta WHICH_LOAD
; lda INVENTORY_Y ; this is the pointer?
; clc
; adc #LOAD_SAVE1
; sta WHICH_LOAD
jsr load_file
lda #LOAD_SAVE1 ; should already be loaded?
jsr load_file ; is this necessary?
; copy to zero page
lda INVENTORY_Y ; this is pointer 0/1/2
asl
asl
asl
asl
asl ; multiply by 32
sta load_buffer_smc+1
ldx #0
load_loop:
lda $BC00,X
sta WHICH_LOAD,X
load_buffer_smc:
lda load_buffer,X
sta LOAD_START,X
inx
cpx #(END_OF_SAVE-WHICH_LOAD+1)
cpx #(END_OF_SAVE-LOAD_START+1)
bne load_loop
lda #NEW_FROM_LOAD ; load whole level from disk
@ -545,12 +563,12 @@ actually_save:
sta WHICH_LOAD
; copy save data to $BC00
; copy save data to load_buffer
ldx #0
copy_loop:
lda WHICH_LOAD,X
sta $BC00,X
sta load_buffer,X
inx
cpx #(END_OF_SAVE-WHICH_LOAD+1)
bne copy_loop
@ -628,34 +646,44 @@ are_you_sure:
;=========================
update_save_info:
lda WHICH_LOAD
pha
lda WHICH_LOAD ; save our current disk location
pha ; on stack
ldx #0
update_save_info_loop:
clc
txa
pha
adc #LOAD_SAVE1
; ldx #0
;update_save_info_loop:
; clc
; txa
; pha
lda #LOAD_SAVE1 ; load it into memory
sta WHICH_LOAD
jsr load_file
pla
tax
; pla
; tax
lda $BC06 ; MAP_LOCATION
ldx #0
ldy #0
update_save_info_loop:
lda load_buffer+(MAP_LOCATION-LOAD_START),Y ; MAP_LOCATION
sta load_slot_levels,X
lda $BC0E ; SCORE_HUNDREDS
lda load_buffer+(SCORE_HUNDREDS-LOAD_START),Y ; SCORE_HUNDREDS
sta load_slot_pts_high,X
lda $BC0F ; SCORE_HUNDREDS
lda load_buffer+(SCORE_TENSONES-LOAD_START),Y ; SCORE_TENSONES
sta load_slot_pts_low,X
tya ; info at 32 byte offsets
clc
adc #$20
tay
inx
cpx #3
bne update_save_info_loop
pla
pla ; restore load info
sta WHICH_LOAD
rts

View File

@ -34,7 +34,7 @@ which_disk_array:
.byte 3,3,3,3 ; INSIDE, ARCHERY, MAP, CLIMB
.byte 3 ; HEIGHTS
.byte 1,1,1 ; SAVE1, SAVE2, SAVE3
.byte 1,1,1 ; SAVE_DATA, ?, ?
.byte $f ; disk detect
load_address_array:
@ -45,7 +45,7 @@ load_address_array:
.byte $60,$60,$60,$60 ; INSIDE, ARCHERY, MAP, CLIMB
.byte $60 ; HEIGHTS
.byte $BC,$BC,$BC ; SAVE1, SAVE2, SAVE3
.byte $BC,$BC,$BC ; SAVE_DATA,? , ?
.byte $BC ; disk detect
track_array:
@ -56,7 +56,7 @@ track_array:
.byte 7,3,1,26 ; INSIDE, ARCHERY, MAP, CLIMB
.byte 30 ; HEIGHTS
.byte 0, 0, 0 ; SAVE1, SAVE2, SAVE3
.byte 0, 0, 0 ; SAVE_DATA, ?, ?
.byte 0 ; disk detect
sector_array:
@ -67,7 +67,7 @@ sector_array:
.byte 0, 0, 0, 0 ; INSIDE, ARCHERY, MAP, CLIMB
.byte 0 ; HEIGHTS
.byte 11,12,13 ; SAVE1, SAVE2, SAVE3
.byte 12,0,0 ; SAVE_DATA, ?, ?
.byte 0 ; disk detect
length_array:
@ -78,7 +78,7 @@ length_array:
.byte 64, 64, 32, 64 ; INSIDE, ARCHERY, MAP, CLIMB
.byte 64 ; HEIGHTS
.byte 1,1,1 ; SAVE1, SAVE2, SAVE3
.byte 1,1,1 ; SAVE_DATA, ? , ?
.byte 1 ; disk detect
@ -111,7 +111,3 @@ qload_end:
;.assert (>qload_end - >qload_start) < $e , error, "loader too big"
.assert (>qload_end - >qload_start) < $15 , error, "loader too big"

View File

@ -1,34 +0,0 @@
; SAVE1 -- cliffland heights
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_HEIGHTS ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte LOCATION_CLIFF_HEIGHTS ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte $00 ; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT|ON_FIRE
; GAME_STATE_2 = $98
.byte CLIFF_CLIMBED
; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C
.byte $00 ; ARROW_SCORE = $9D
.byte $00 ; SCORE_HUNDREDS= $9E
.byte $20 ; SCORE_TENSONES= $9F
.byte INV1_MONSTER_MASK|INV1_PEBBLES
; INVENTORY_1 = $A0
.byte $00 ; INVENTORY_2 = $A1
.byte INV3_SHIRT|INV3_MAP
; INVENTORY_3 = $A2
.byte INV1_PEBBLES
; INVENTORY_1_GONE = $A3
.byte $00 ; INVENTORY_2_GONE_= $A4
.byte $00 ; INVENTORY_3_GONE = $A5

View File

@ -1,29 +0,0 @@
; SAVE2 -- ??
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_INN ; WHICH_LOAD = $90
.byte 15 ; PEASANT_X = $91
.byte 128 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 0 ; MAP_Y = $95
.byte LOCATION_INSIDE_INN; MAP_LOCATION = $96
.byte $00 ; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C
.byte $00 ; ARROW_SCORE = $9D
.byte $01 ; SCORE_HUNDREDS= $9E
.byte $09 ; SCORE_TENSONES= $9F
.byte $00 ; INVENTORY_1 = $A0
.byte $00 ; INVENTORY_2 = $A1
.byte $00 ; INVENTORY_3 = $A2
.byte $00 ; INVENTORY_1_GONE = $A3
.byte $00 ; INVENTORY_2_GONE_= $A4
.byte $00 ; INVENTORY_3_GONE = $A5

View File

@ -1,29 +0,0 @@
; SAVE3 -- ??
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_TROGDOR ; WHICH_LOAD = $90
.byte 1 ; PEASANT_X = $91
.byte 80 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_TROGDOR_LAIR ; MAP_LOCATION = $96
.byte $ff ; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C
.byte $00 ; ARROW_SCORE = $9D
.byte $01 ; SCORE_HUNDREDS= $9E
.byte $39 ; SCORE_TENSONES= $9F
.byte $FF ; INVENTORY_1 = $A0
.byte $FF ; INVENTORY_2 = $A1
.byte $FF ; INVENTORY_3 = $A2
.byte $00 ; INVENTORY_1_GONE = $A3
.byte $00 ; INVENTORY_2_GONE_= $A4
.byte $00 ; INVENTORY_3_GONE = $A5

View File

@ -0,0 +1,23 @@
include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
all: SAVE_DATA
###
SAVE_DATA: save_data.o
ld65 -o SAVE_DATA save_data.o -C $(LINKER_SCRIPTS)/apple2_bc00.inc
save_data.o: save_data.s ../zp.inc # fixme, should be all of them listed
ca65 -o save_data.o save_data.s -l save_data.lst
###
distclean:
make clean
###
clean:
rm -f *~ *.o *.lst save_data SAVE_DATA

View File

@ -1,20 +1,16 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- start
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $96
.byte $00 ; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte $00 ; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte $00 ; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C

View File

@ -1,22 +1,18 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- with Mask
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $96
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte GARY_SCARED
; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C

View File

@ -1,22 +1,18 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- arrows
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $96
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte GARY_SCARED|TALKED_TO_MENDELEV
; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C

View File

@ -1,22 +1,18 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- trinket
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_ARCHERY ; MAP_LOCATION = $96
.byte LOCATION_ARCHERY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte GARY_SCARED|TALKED_TO_MENDELEV|HALDO_TO_DONGOLEV
; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C

View File

@ -1,22 +1,18 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- bow
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_ARCHERY ; MAP_LOCATION = $96
.byte LOCATION_ARCHERY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte GARY_SCARED|TALKED_TO_MENDELEV|HALDO_TO_DONGOLEV|ARROW_BEATEN|TRINKET_GIVEN
; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
; GAME_STATE_0 = $96
.byte $00 ; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte $00 ; BUSH_STATUS = $9B
.byte $00 ; KERREK_STATE = $9C

View File

@ -1,28 +1,24 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- kerrek dead
;
.byte LOAD_PEASANT1 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_KERREK_1 ; MAP_LOCATION = $96
.byte LOCATION_KERREK_1 ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN
; BABY_IN_WELL | BUCKET_DOWN_WELL
;LADY_GONE
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte PUDDLE_WET|RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE -- Riches
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN
; BABY_IN_WELL | BUCKET_DOWN_WELL
;LADY_GONE
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte PUDDLE_WET|RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,27 +1,23 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
; SAVE -- baby
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte PUDDLE_WET|RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,25 @@
; SAVE1 -- After getting the sub
.include "zp.inc"
; want to load this to address $90
; SAVE -- After getting the sub
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte PUDDLE_WET
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- After getting the pills
.include "zp.inc"
; want to load this to address $90
; SAVE -- After getting the pills
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- After getting the pills
.include "zp.inc"
; want to load this to address $90
; SAVE1 -- After getting the soda
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,25 @@
; SAVE1 -- After opening NN's cottage
; SAVE -- After opening NN's cottage
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_NN ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_NN ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte COTTAGE_ROCK_MOVED | TALKED_TO_KNIGHT | GOT_MUDDY_ALREADY
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- Wearing robe
.include "zp.inc"
; want to load this to address $90
; SAVE -- Wearing robe
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $94
.byte $00 ; ?? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET | WEARING_ROBE
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte COTTAGE_ROCK_MOVED | TALKED_TO_KNIGHT | GOT_MUDDY_ALREADY
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- On Fire
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_MOUNTAIN_PASS ; MAP_LOCATION = $96
.byte LOCATION_MOUNTAIN_PASS ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET | WEARING_ROBE
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte COTTAGE_ROCK_MOVED | TALKED_TO_KNIGHT | GOT_MUDDY_ALREADY | ON_FIRE
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte $00 ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -1,28 +1,24 @@
; SAVE1 -- Cliffland Heights
.include "zp.inc"
; want to load this to address $90
; SAVE -- Cliffland Heights
;
.byte LOAD_CLIFF ; WHICH_LOAD = $90
.byte LOAD_HEIGHTS ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_CLIFF_HEIGHTS ; MAP_LOCATION = $96
.byte LOCATION_CLIFF_HEIGHTS ; MAP_LOCATION = $94
.byte $00 ; ??? = $95
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
; GAME_STATE_0 = $96
.byte FISH_FED | PUDDLE_WET | WEARING_ROBE
; RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD
; GAME_STATE_1 = $98
; GAME_STATE_1 = $97
.byte COTTAGE_ROCK_MOVED | TALKED_TO_KNIGHT | GOT_MUDDY_ALREADY | ON_FIRE
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
; GAME_STATE_2 = $98
.byte CLIFF_CLIMBED ; GAME_STATE_3 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B

View File

@ -0,0 +1,13 @@
.include "../zp.inc"
; Note, all three saves fit in 256 bytes
; We actually handle being in 512 bytes as Prodos loasd in 512 byte chunks
.align $20
.include "save1_30_heights.s"
.align $20
.include "save1_18_nn_cottage.s"
.align $20
.include "save1_04_mask.s"

View File

@ -150,6 +150,8 @@ PREVIOUS_LOCATION= $8D
; savegame state
;=======================
LOAD_START = $90
WHICH_LOAD = $90
PEASANT_X = $91
PEASANT_Y = $92

View File

@ -0,0 +1,12 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $BC00, size = $400, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = ro, align=$100;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}