CBM64 Bard's Tale 1 Disassembly

Any developer realated stuff
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

So...the files that load at 15014 are the dungeon maps, right?
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

The files NMa0 to NMaf are dungeon files. They cannot start below NMa0, but can exceed NMaf, as you proved with Mangar level 6. They do not necessarly need to load to the address that is indicated in the file's first 2 bytes. BT tends to load things at different addresses than they were saved from. This is because the used editors might have used a different workspace in memory than the BT engine needs the files at.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Code: Select all

1b 0c 0d 0e 0b 00 0f 10 1c 1d 1e 11 12 14 13 1f
20 21 22 23 24 25 15 26 27 28 29 2a 2b 2c 2d 2e
2f 16 18 17 30 31 32 33 34 19 35 36 37 38 39 3a
3b 3c 3d 3e 3f 40 41 42 43 44 
The above is the table for event files to load. I still don't get it completely.
So are the above NMxx files all the events as listed in that table?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

ZeroZero, can you disassemble a dungeon event where input is needed (for instance, the Old Man in Harkyn's who asks for "VAMPIRE") and publish it? I wish to examine it if you could.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

I think this chart should go into the third post on page 1.


I did a chart that will assist with editing in a dungeon level; specifically locations $002 to $1e5 for dungeon walls/doors etc, and $202 to $3e5 for marking portals/specials/traps/darkness/encounters/stairs and so forth.
Image
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Well....

The chart is here now, thats fine I think. Most programmers won't need it, but for the others it is here as an assisting tool.

The event lookup table is complete. In the map files an offset into this table is given, the resulting loaded event is NM + number from lookup table.

Yes, presently I am disassembling the Guild event, which is the last of the city events. Thereafter I will continue with the dungeon events.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

updates...
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

ZeroZero wrote:updates...
Posts on page 1 I presume?

I'm at work at the Apple Store in West Edmonton Mall in Edmonton, Alberta. Who knew Macs were so popular? :?
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

All my posts marked as "Items" have an update date. Check that dates to see if something new is there... ;)
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

ZeroZero, where on the BOOT disk is the jump table for dungeon events found exactly?
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

That strongly depends on the boot disk version you have.
It is in a file, that normally is hidden.
I suggest to search the disk in hex edit for some bytes of
the table, you should find it soon.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

:?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

ZeroZero wrote:That strongly depends on the boot disk version you have.
It is in a file, that normally is hidden.
I suggest to search the disk in hex edit for some bytes of
the table, you should find it soon.
Wait a minute here...if it's been relocated on certain boot disks then that means it can be modified, correct?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

I've located the dungeon events jump table on the BTI boot disk.

It should be found in the file EA3.PRG, at addresses $132B through $1364:

Code: Select all

1b 0c 0d 0e 0b 00 0f 10 1c 1d 1e 11 12 14 13 1f
20 21 22 23 24 25 15 26 27 28 29 2a 2b 2c 2d 2e
2f 16 18 17 30 31 32 33 34 19 35 36 37 38 39 3a
3b 3c 3d 3e 3f 40 41 42 43 44
Now, there is some concern about adding loadable dungeon events to the dungeon disk due to having to extend this table, and doing so might corrupt the game data. However, consider the next three bytes beyond the table ($1365 to $1367):

Code: Select all

1A 8D 1B
There is no NM1A.PRG, NM8D.PRG, or NM1B.PRG on the dungeon disk, meaning at least three more events can be safely put on the disk.

Thoughts?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

The whole text-offset is incorrect. It appears to be completely random.
Post Reply