CBM64 Bard's Tale 1 Disassembly

Any developer realated stuff
Post Reply
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Updates...

This includes the correct disassembling of NM31, the riddle for the endless byway
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Updates: five new events, some vars and functions identified
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Updates: event disassemblies are now complete, some new vars and functions
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

ZeroZero wrote:I T E M # 07
Map 1: buildings and specials
This map contains all the buildings (incl. statues) and is used to call the related
events for a map cell.

Code: Select all

Values		Event called
00		none, is no building. ? command is available
01 02 03 04	standard house types, nothing special. if stepped on,
		event NM0F is called
0B		guild, event NM1B
12		a tavern, event NM0C
1C		shop, event NM0D
21		a standard temple, event NM0E
2B		Review board, event NM0B
60		some statue, event NM11 is called
68		gate, event NM12 is called
71		Mad God's temple, event NM14
78		sewer entrance, event NM13
81		credits, event NM16
89		Roscoe, event NM17
91		Kylearans tower, event NM18
9B		Harkyn's castle, event NM15
A1		Mangars tower, event NM19
A8		city gate, event NM1A
 
The value byte make more sense, of you see each of them as a bitfield with the lower 3 bits indicating the house type (or 0 if its a street or something on a street) and the higher 5 bits indicating something special. If you do that with the table above, you get

Code: Select all

High Low		Event called
00    00    none, is no building. ? command is available
00    01    standard house type 1
00    02    standard house type 2
00    03    standard house type 3
00    04    standard house type 4
01    03    guild, event NM1B
02    02    a tavern, event NM0C
03    04    shop, event NM0D
04    01    a standard temple, event NM0E
05    03    Review board, event NM0B
0C    00    some statue, event NM11 is called
0D    00    gate, event NM12 is called
0E    01    Mad God's temple, event NM14
0F    00    sewer entrance, event NM13
10    01    credits, event NM16
11    01    Roscoe, event NM17
12    01    Kylearans tower, event NM18
13    03    Harkyn's castle, event NM15
14    01    Mangars tower, event NM19
15    00    city gate, event NM1A
The special buildings get rendered as the house type indicated unless you stand directly in front of them. This is especially helpful, if you want to render the city.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Thx for this enlightening!
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

ZeroZero: do you know where they have the mapping that resolves the names or types of the temples, inns and guardian statues? They could have easily put it into the street name map (well, at least least for the inns and temples), but they didn't. I fear they hard-coded it somewhere, probably in the events NM0C NM0E, NM11? Did you find that somewhere there?

The reason I want to know that is: I would prefer to read this info as data, instead of hardcoding it ('cause that's ugly as hell: either I have a data file, that completely describes the data, or I put everything in source, but mixing it is :evil:...).

BTW: I also looked for some pattern in the naming scheme, e.g. like taverns use the names from the list in order going from north to south or something, but there seems to be no such pattern at all.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Indeed in the 8-bit versions the names of the places (except the street
names) are coded in the events. In the events they check the N and E
position to find, what place they refer to. So they check the coordinates
of the party to tell, WHAT tavern (temple etc) you are in/looking at.

That saved a lot of precious main memory, since the events files
overlay the same mem space.
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Just for your interest.

I've started to look into the tape version of Bard's Tale (both the german and the english version), and so far i'm quite impressed - loads of things are recoded, loads of stuff have been compressed and loads of stuff have been altered. After some research, I got the releasedate of this verson set to 1988 - which means that this must've been put together for the european market by someone with access to the sourcecode. Probably Burgerbecky and some others.

I believe (from screenshots, etc.) that there was a french version aswell - have any of you seen that one? Or was it only released on the Amstrad / MSX?
/Twoflower
User avatar
Flanimal
Posts: 107
Joined: Sun Aug 08, 2010 3:40 pm
Location: London, England

Post by Flanimal »

Twoflower wrote:Just for your interest.

I've started to look into the tape version of Bard's Tale (both the german and the english version), and so far i'm quite impressed - loads of things are recoded, loads of stuff have been compressed and loads of stuff have been altered. After some research, I got the releasedate of this verson set to 1988 - which means that this must've been put together for the european market by someone with access to the sourcecode. Probably Burgerbecky and some others.

I believe (from screenshots, etc.) that there was a french version aswell - have any of you seen that one? Or was it only released on the Amstrad / MSX?
I grew up with the C64 tape version of Bard's Tale. It's with that version that I developed my super high level characters. They really did an amazing job squeezing it all into memory. The best thing about it is that there are no IO delays during play on single level. That means that you can wander around Scara Brae and the dungeons as fast as you can press the keys.

I was really looking forward to playing the C64 disk version, but I was shocked at the intrusion of IO access during movement, so I reverted back to playing the tape version. I preferred the responsiveness to the extra graphics and animation.

I would love to play the disk version though if the emulator can be set up to access the disk instantly. The tape version could have been so bad, but they really came through with a brilliant conversion. The only bad thing about the tape version is the music, but I never discovered the fire horn so I quickly replaced my bard with a spellcaster and never looked back.
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Flanimal wrote:I grew up with the C64 tape version of Bard's Tale. It's with that version that I developed my super high level characters. They really did an amazing job squeezing it all into memory. The best thing about it is that there are no IO delays during play on single level. That means that you can wander around Scara Brae and the dungeons as fast as you can press the keys.
Same here - the tape version is really what I have fond memories of playing as a kid. I was really surprised when I realised that there were two other kids in my age playing Bard's Tale tape at school - one even had the cluebook which he kindly let me copy.

The quick walking around, and the general speed-up is actually one of the reasons why i'm looking into this. If this works out well, you guys might have a diskbased version with all the cons in a little while - provided that I can find enough space to cram in a loader. :-)
/Twoflower
User avatar
Flanimal
Posts: 107
Joined: Sun Aug 08, 2010 3:40 pm
Location: London, England

Post by Flanimal »

Twoflower wrote:The quick walking around, and the general speed-up is actually one of the reasons why i'm looking into this. If this works out well, you guys might have a diskbased version with all the cons in a little while - provided that I can find enough space to cram in a loader. :-)
Wow, that would be the best version of the Bards Tale ever!

I used my semi-limited knowledge to try to transfer my C64 tape saved party into the Disk game. I discovered that no entire 1024 byte page of memory can be transferred from the memory of the tape game to the disk game, so I knew from this that they must have reorganised a lot to create the tape game.

I would be really interested in any ideas you might have for transferring my tape game characters to the disk game.
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

First of all, the characters are stored - or atleast saved - in a completely different way between tape and disk. The tapeversion stores the party as a unit while the diskversion stores it as individual characters (if I recall things correctly).

You could ofcourse edit your characters - byte by byte or in a level-editor - from tape to disk, but that'd be a nuisance. I'll look in to this.
/Twoflower
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

You could try to identify the memory addresses of the character rosters in the CBM64 emulator, copy that bit of memory and "implant" it then into the disk version in emulator at the addresses used by it.

I think I gave the memory address of character rosters for the disk version somewhere in this thread
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

ZeroZero wrote:You could try to identify the memory addresses of the character rosters in the CBM64 emulator, copy that bit of memory and "implant" it then into the disk version in emulator at the addresses used by it.

I think I gave the memory address of character rosters for the disk version somewhere in this thread
Heh. that'll be a problem since the characters are located between $0251-0343 in the tape-version. No normal save/load there. Furthermore, they are stored as a block (as an entire Party) while the disk-version stores them as characters with a checksum in the end to prevent them from tampering. I believe the tape-version may lack that checksum-byte. Will look in to the details of how the characters differ tomorrow.

While were at it - do you guys know if anything but dungeons, the city and the player parties are loaded in the tape-version? Right now it looks as 1 dungeon-level equals one load. Could anyone confirm this? Furthermore, it looks as there is one "main" side of the tape including the engine, the ATEAM and the Partymerger - the rest is dungeons. Any information on what is on each tape-side would be appreciated.
/Twoflower
User avatar
Flanimal
Posts: 107
Joined: Sun Aug 08, 2010 3:40 pm
Location: London, England

Post by Flanimal »

Twoflower wrote:You could ofcourse edit your characters - byte by byte or in a level-editor - from tape to disk, but that'd be a nuisance. I'll look in to this.
I'm hoping that there may be an easier way. Plus, I don't have a character editor for the tape version so I can't be sure that I would enter all the values exactly right.

ZeroZero wrote:You could try to identify the memory addresses of the character rosters in the CBM64 emulator, copy that bit of memory and "implant" it then into the disk version in emulator at the addresses used by it.

I think I gave the memory address of character rosters for the disk version somewhere in this thread
That's what I have in mind. Extracting and importing memory content is easy thanks to the Action Replay cartridge machine code monitor. Problem is, knowing which addresses to copy from, which addresses to copy to, and whether the internal party representation in the C64 is different between tape and disk versions, in which case some manipulation is going to be needed.
Twoflower wrote:Heh. that'll be a problem since the characters are located between $0251-0343 in the tape-version. No normal save/load there. Furthermore, they are stored as a block (as an entire Party) while the disk-version stores them as characters with a checksum in the end to prevent them from tampering. I believe the tape-version may lack that checksum-byte. Will look in to the details of how the characters differ tomorrow.
Does the Action Replay machine code monitor eliminate the address problem, seeing as it can save any address data at any time? Are you referring to how the party data is storred in memory, or tape/disk media? If the former, then agreed, this presents a problem. Thanks so much for looking into this.
Twoflower wrote:While were at it - do you guys know if anything but dungeons, the city and the player parties are loaded in the tape-version? Right now it looks as 1 dungeon-level equals one load. Could anyone confirm this? Furthermore, it looks as there is one "main" side of the tape including the engine, the ATEAM and the Partymerger - the rest is dungeons. Any information on what is on each tape-side would be appreciated.
This is from memory, so it may not be 100% reliable or complete - I'll verify the accuracy tomorrow.
The tape is a single core load. Aside from loading and saving the party, the only time that tape access is needed is when moving between levels. The level is loaded, and that's the end of tape access until you change level again. When the level is loaded, I am sure that monster names and graphics are also loaded. (I suspect there will also be a core set of monsters that are permanently in memory.)
So I can confirm your question.

As to your query about whats on the tapes, I can try to remember, let me see:

Tape 1 side A. Bard Tale Boot game. Then maybe A team party save? Then maybe the party editor standalone program?

Tape 1 side B. Scara Brae. Then Celler. Then Sewers.

Tape 2 side A. Castle and Catacombs, I forget which first.

Tape 2 side B. Thingy's Tower. Then Mangars tower.


I'll edit this info if I find any corrections/clarifications.
Post Reply