Poking at the C64 save format

Discussions and help for Bard's Tale II: The Destiny Knight
Post Reply
jrodman
Posts: 42
Joined: Sat Dec 07, 2013 7:30 pm

Poking at the C64 save format

Post by jrodman »

Some *very* trivial investigation on my part trying to edit my characters to bring my amiga BT1 characters to c64 BT2.

I found the layout looks overall similar to BT1, starting with the name for 16 bytes, 0xFF padded.

However, the name is xored with a rolling value, beginning with 0x7f, decreasing by one for every subsequent byte. Am I actually making a very basic foray into figuring out PirateSlayer here? I couldn't find much meat about how that stores data on disk.

Decoding gives the "BT text" format described by ZeroZero which is largely just ASCII with the high bit set.

After this I started trying to figure out the character stats format, but I couldn't find any way to interpret the data that resulted in things making sense. Added to this the checksum is still present and the bt1 bug where the checksum isn't checked on party load seems ineffective.

Another attack vector would be to modify the party in memory and save differrent versions out, but my vice monitor skills are pretty nonexistent. So I stopped here, and just decided to play the game from level 1.
IcePic
Posts: 1
Joined: Thu Jul 31, 2014 5:53 pm

Re: Poking at the C64 save format

Post by IcePic »

Don't know if it relates to BT2 also, but a friend of mine spent ages hacking the BT1 saves in the old days and from what I remember of his attempts, stuff like STR/INT stats were stored as 5-bit entities spread over a few bytes since they would only go from 0-31 in any case, presumably to save a bit of space, so you need to be on the lookout for data that isn't nicely stored and aligned as bytes in the save files. So if you try to look for 22 if that is your characters strength, you might not find it since the byte holding the strength value would be sharing 3 bits with the next stat.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: Poking at the C64 save format

Post by Darendor »

IcePic wrote: Thu Aug 12, 2021 9:52 am Don't know if it relates to BT2 also, but a friend of mine spent ages hacking the BT1 saves in the old days and from what I remember of his attempts, stuff like STR/INT stats were stored as 5-bit entities spread over a few bytes since they would only go from 0-31 in any case, presumably to save a bit of space, so you need to be on the lookout for data that isn't nicely stored and aligned as bytes in the save files. So if you try to look for 22 if that is your characters strength, you might not find it since the byte holding the strength value would be sharing 3 bits with the next stat.
My investigations into the character files seems to confirm this.

I posted it somewhere in this subforum. I believe the 5 stats along with the invisible "initiative" value for each character are represented as such.

Edit: See here - viewtopic.php?f=17&t=1693
Post Reply