BT 1 CBM64 roster file format

Discussions and help for the Bard's Tale Construction Set
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

BT 1 CBM64 roster file format

Post by ZeroZero »

 
Here is the roster file decoded as far as I came yet. Anyone can fill in the missing things, marked by ????

Code: Select all

Roster entries

each entry is 128 bytes, two files are used, NM00 and NM01, each 
file can carry 16 entries

--------------------------------------------------------------
1) parties
--------------------------------------------------------------
Byte		Value		Meaning
--------------------------------------------------------------
00		AA		is a party
01 - 0e		BT Text		name of party
0f		FF		sorta end marker
10 - 1f		BT txt & FF	Name of char 1 in party
20 - 2f		BT txt & FF	Name of char 2 in party
30 - 3f		BT txt & FF	Name of char 3 in party
40 - 4f		BT txt & FF	Name of char 4 in party
50 - 5f		BT txt & FF	Name of char 5 in party
60 - 6f		BT txt & FF	Name of char 6 in party
70 - 7f		00		unused


--------------------------------------------------------------
2) characters
--------------------------------------------------------------
Byte		Value		Meaning
--------------------------------------------------------------
00 - 0f		BT txt & FF	character's name, padded by ff's
10 - 13		bit packed	char values:
				0000-0|000 00|0|0-0000| 0000-0|000 00|0|0-0000
				  ST     IQ   ?   DX      CN     LK   ? ?-????
14 - 1f		bytes		Experience, every byte represents one decimal 
				digit: 01 02 03 04 05 06 06 05 04 03 02 01 ==>
				123,456,654,321	experience points
20 - 21		hi, lo byte	natural level
22 - 23		hi, lo byte	current level, like being dropped by monsters
24 - 2f		like XP		gold, same coding as XP
30 - 31		hi, lo byte	max HP
32 - 33		hi, lo byte	cur HP, condition
34 - 35		hi, lo byte	max SP
36 - 37		hi, lo byte	cur SP
38		byte		class:	0 Warrior	5 Rogue
					1 Wizard	6 Bard
					2 Sorcerer	7 Paladin
					3 Conjurer	8 Hunter
					4 Magician	9 Monk
39		byte		race:	0 Human		4 Half-Elf
					1 Elf		5 Half-Orc
					2 Dwarf		6 Gnome
					3 Hobbit
3a - 3c		????		????
3d		byte		???? seems to be set
3e		byte		status: 0:ok, 1:pois, 2:old, 3:dead, 4:ston, 5:para, 6:poss, 7:nuts
3f		byte		natural armor class
40 - 43		byte		level of magic classes, Sorcerer, Conjurer, Magician, Wizard
44 - 46		byte		rogue values: HIDE, DETECT TRAP, DISARM TRAP, sequence????
47 - 48		????		????
49				remaining Bard songs before he needs a drink
4a - 4f 	????  		????
50 - 5f		byte pairs	equipment
				1. byte: 0 = unequpd, 1 = eqp, 2 = unusable, 3 = unknown
				2. byte: item no
60 - 7e		????		????
7f		byte		[i]EDIT: acc to Apple sources, see post below, a checksum. On C64 likely not used[/i]
Missing is in particular the remaining item uses left. The last byte is annoying me, since I cannot see what it is for. I dunno if attacks per round should be found here or is calculated.
 
Last edited by ZeroZero on Fri Apr 10, 2009 11:16 am, edited 1 time in total.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh heh. Megatron will be pleased.
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Zerozero:

The last byte is the generated checksum. :-9

How do I know? First of all I recall that it was mentioned elsewhere in some thread here, but I got it confirmed when I found an outrageously good source of information. Have it ever occured to you that people did almost the same thing we are doing when these games were all the rage? And that people have started to put things online?

Just check out http://mirrors.apple2.org.za/tarnover.o ... age-16.jpg and on the following pages for a complete description of how a character editor for BT I was made. This was done in 1986. You just got to love it.

All articles are indexed and searchable aswell. Through the issues are essential information on the format of all three games. Need I mention what a goldmine this is?
/Twoflower
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Twoflower wrote:Zerozero:

The last byte is the generated checksum. :-9

How do I know? First of all I recall that it was mentioned elsewhere in some thread here, but I got it confirmed when I found an outrageously good source of information. Have it ever occured to you that people did almost the same thing we are doing when these games were all the rage? And that people have started to put things online?

Just check out http://mirrors.apple2.org.za/tarnover.o ... age-16.jpg and on the following pages for a complete description of how a character editor for BT I was made. This was done in 1986. You just got to love it.

All articles are indexed and searchable aswell. Through the issues are essential information on the format of all three games. Need I mention what a goldmine this is?
It did occur to me that back in the 80s when these games were hot off the shelf people would want to hack them and whatnot. This is the reason why things like Pirateslayer and whatnot were made after all, to prevent people in the 80s from doing what we're after today.

However, since Michael Cranford, EA and everyone have made their money on the series I would suspect that there's no longer an objection to us doing this. Sadly, the protection/encryption schemes don't conveniently disappear after 20+ years. :?

Anyways.

The article mentions Apple DOS. How different is that from the CBM DOS exactly?

In any case, good find. I notice that the BTIII Character Editor I used briefly loaded characters two at a time, so I suspect all 3 games keep the 2 character per sector scheme...
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Hmmm I do not see anything new in this article, in fact we know more about the character files used by BT1 and BT2 than that article. See the list above.
On the other hand I got it straight from the horses mouth, that BT3 in fact was using a port of Apple's PRODOS for the CBM64, and it was selfmade by one person at Interplay. I apologize to Darendor for not believeing him. Now is the q: how do we get that PRODOS version to work with the BT3 files? Or shall we try to make up BT2? The track/sector tables are supposed to be within the main code and the main engine of BT2 uses direct access to the tracks. I was also told some more info about maps and gfx, even if not too much. If you are online on Easter Sunday, when I am back, I will share this info.

EDIT

Oh I see now... a lot more articles there, sorry being hasty, there is more sources


EDIT 2

Unfortunately I didn't find issues after #52. The articles until #52 have no information we don't have already or even we have more on :(

 
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Here are the issues you are looking for:

http://computist.textfiles.com/

Some more interesting information there, especially when it comes to the BT III character format and the codewheel-removal. Noteble is also the articles on the dungeon-editor, which seem to be like Darendors one, although a bit visually worse.
/Twoflower
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

The more interesting stuff you mention is published in the issues AFTER #52, that collection only has the issues up to #52 and that last issue
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Sorry - gave you the wrong link:

http://www.computist-project.net/hcompu ... utist.html

Some interesting stuff on BT I and II:

Code: Select all

Bard's Tale			30	11	Sector Edit		
Bard's Tale (IIgs)		53	19	Sector Edit		
Bard's Tale (IIgs) (Fix)	53	23	Sector Edit		Softkey for same in issue #50, page 23
Bard's Tale (Update)		36	6	Sector Edit		Softkey for same in issue #30, page 11
Bard's Tale I			51	16	Sector Edits		
Bard's Tale II			48	33	Sector Edit		
Bard's Tale II			48	39	Controller		
Bard's Tale II			50	37	Sector Edits		
Bard's Tale II			51	15	Sector Edits		
Bard's Tale II (IIgs)		50	23	Sector Edit		
Bard's Tale II (IIgs)		56	16-17	Binary File Patch		
Bard's Tale II (IIgs)		63	26	Sector Edit		
Bard's Tale II (IIgs)		64	7	Sector Edit		
Bard's Tale II: Destiny Knight	49	29	Sector Edit		
Bard's Tale II: Destiny Knight	56	31	Sector Edit		
Bard's Tale II: Destiny Knight	57	15-16	Sector Edit
/Twoflower
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Twoflower wrote:Here are the issues you are looking for:

http://computist.textfiles.com/

Some more interesting information there, especially when it comes to the BT III character format and the codewheel-removal. Noteble is also the articles on the dungeon-editor, which seem to be like Darendors one, although a bit visually worse.
Visually worse than something I constructed in BASIC? I don't feel so bad now.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Twoflower wrote:Sorry - gave you the wrong link:

http://www.computist-project.net/hcompu ... utist.html

Some interesting stuff on BT I and II:

Code: Select all

Bard's Tale			30	11	Sector Edit		
Bard's Tale (IIgs)		53	19	Sector Edit		
Bard's Tale (IIgs) (Fix)	53	23	Sector Edit		Softkey for same in issue #50, page 23
Bard's Tale (Update)		36	6	Sector Edit		Softkey for same in issue #30, page 11
Bard's Tale I			51	16	Sector Edits		
Bard's Tale II			48	33	Sector Edit		
Bard's Tale II			48	39	Controller		
Bard's Tale II			50	37	Sector Edits		
Bard's Tale II			51	15	Sector Edits		
Bard's Tale II (IIgs)		50	23	Sector Edit		
Bard's Tale II (IIgs)		56	16-17	Binary File Patch		
Bard's Tale II (IIgs)		63	26	Sector Edit		
Bard's Tale II (IIgs)		64	7	Sector Edit		
Bard's Tale II: Destiny Knight	49	29	Sector Edit		
Bard's Tale II: Destiny Knight	56	31	Sector Edit		
Bard's Tale II: Destiny Knight	57	15-16	Sector Edit
Which articles are relevent to our project exactly?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

The documents take too long to load. :?
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Ah there we go... I will check, if any of that articles has information beyond our own research results

EDIT

Ok, the articles beyond #52 will give us a very good start for the roster file format in case we decide to go with BT3 engine.
Apart from the roster I only saw cracking info for the Apples, which cannot be used as is for the C64 I think. Also we must find out about the differences in the structure of Apple II and C64 disks to interpret the given information properly. An excellent Apple source.
User avatar
Quantum Reality
Posts: 91
Joined: Mon Mar 15, 2010 8:34 pm

Post by Quantum Reality »

Apple DOS is fundamentally different from Commodore DOS. The BASIC code will still work, but not the machine language routines used to directly acciess the floppy disk.

I don't know the C64 calls, but I do know the Apple DOS RWTS calls basically say "get me this track, this sector, and dump it *here* in memory". And off RWTS goes and grabs 256 bytes off the disk and pops it into RAM for you. You edit that RAM, and then you can tell your RWTS caller, "grab this memory and write it to this track and sector".

Bingo, the kernel of a character editor. ;)

(I'm actually trying to write one under an Apple //e emulator as we speak, so this lookup table showing information I thought I had long lost to the mists of history is a godsend. Last time I saw the exact information storage for character attributes was in a printout I lost back in the 1990s when I sold all my Apple stuff.

Incidentally, if anyone cares, I can write a routine in machine language to AND/bit shift the attributes to make sensible numbers out of them. Gimme a day or so to play with it, then I'll put the 6502 source here.)

((EDIT TO ADD TEXT BELOW))

I just noticed the Bard's Tale 3 situation.

I can verify that yes, in fact the Apple ][ version of BT3 used a ProDOS-like disk structure for the editing of characters and did not use any encoding unlike BT2. I had, in fact, embarked on the ambitious project of trying to write a character editor for BT3 but just got bogged down in trying to make it cool instead of workable and abandoned the project.

If anyone wants to see how far I got, I can put the program up somewhere in text format. Unfortunately I outsmarted myself a little and at the time, stored off all the variables in a special variable format under ProDOS (mainly lists of items, character classes, things like that). I can't reconstruct those yet so there's some "from scratch" work it looks like I'll be doing.

Long story short, it worked when I tested the MLI calls and everything so I know it's feasible to write the Apple ][ version of a BT3 character editor. I'd just need a list (which I worked off of) of the Bard's Tale 3 data format.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Actually, for the C64, Burgerbecky adapted the ProDOS file structure for the Commodore 64. The C64 BTIII uses ProDOS as well. Of course the sector structure of the disks was physically different, so she changed that on the C64.
User avatar
Quantum Reality
Posts: 91
Joined: Mon Mar 15, 2010 8:34 pm

Post by Quantum Reality »

You'd need some kind of translator for the C64 version then, to translate the sequential block structure of ProDOS to the native track/sector format of whatever the 1541 uses.
Post Reply