C64 Dungeon Disk Layout

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

C64 Dungeon Disk Layout

Post by Darendor »

Here's the starting track and sector # for all 97 files on the DUNGEON disk for the Bard's Tale on the C64.

Code: Select all

DUNGEON SPECIALS
NM1F.PRG  starts @ T25 S1 - Stairs long way up  (16N 17E Sewers L3)
NM20.PRG  starts @ T25 S2
NM21.PRG  starts @ T25 S3
NM22.PRG  starts @ T25 S4
NM23.PRG  starts @ T25 S10 - Bashar Kavilor (12N 12E Catacombs L2)
NM24.PRG  starts @ T10 S0
NM25.PRG  starts @ T10 S2
NM26.PRG  starts @ T10 S6
NM27.PRG  starts @ T10 S9
NM28.PRG  starts @ T10 S14
NM29.PRG  starts @ T26 S0
NM2A.PRG  starts @ T26 S2 - (9N 9E Harkyn's L2)       
NM2B.PRG  starts @ T26 S4
NM2C.PRG  starts @ T26 S5
NM2D.PRG  starts @ T26 S7
NM2E.PRG  starts @ T26 S9
NM2F.PRG  starts @ T9 S0 
NM30.PRG  starts @ T9 S1
NM31.PRG  starts @ T9 S2
NM32.PRG  starts @ T9 S3
NM33.PRG  starts @ T9 S4
NM34.PRG  starts @ T9 S6
NM35.PRG  starts @ T9 S9
NM36.PRG  starts @ T9 S15
NM37.PRG  starts @ T27 S0
NM38.PRG  starts @ T27 S2
NM39.PRG  starts @ T6 S3
NM3A.PRG  starts @ T27 S6
NM3B.PRG  starts @ T27 S4
NM3C.PRG  starts @ T27 S8
NM3D.PRG  starts @ T27 S13
NM3E.PRG  starts @ T27 S17
NM3F.PRG  starts @ T8 S0
NM40.PRG  starts @ T8 S1
NM41.PRG  starts @ T8 S2
NM42.PRG  starts @ T8 S3
NM43.PRG  starts @ T8 S4
NM44.PRG  starts @ T8 S5 - Mangar (20N 10E Mangar L5)


WTF
NM02.PRG - starts @ T7 S9
NM05.PRG - starts @ T21 S11
NM06.PRG - starts @ T11 S19
NM07.PRG - starts @ T28 S1
NM08.PRG - starts @ T29 S0
NM0A.PRG - starts @ T6 S7
NM1C.PRG - starts @ T21 S2
NM1D.PRG - starts @ T21 S5
NM1E.PRG - starts @ T21 S7
NM5E.PRG - starts @ T17 S0
NM5F.PRG - starts @ T17 S1
NM60.PRG - starts @ T17 S2
NM61.PRG - starts @ T17 S4
NM62.PRG - starts @ T17 S7
NM63.PRG - starts @ T17 S9
NM64.PRG - starts @ T19 S0
NM65.PRG - starts @ T19 S6
NM66.PRG - starts @ T19 S3
NM67.PRG - starts @ T19 S5
NM68.PRG - starts @ T19 S9
NM69.PRG - starts @ T19 S18
NM6A.PRG - starts @ T16 S0
NM6B.PRG - starts @ T16 S1
NM6C.PRG - starts @ T16 S2
NM6D.PRG - starts @ T16 S3
NM6E.PRG - starts @ T16 S5
NM6F.PRG - starts @ T16 S7
NM70.PRG - starts @ T16 S9
NM71.PRG - starts @ T16 S14
NM72.PRG - starts @ T20 S0
NM73.PRG - starts @ T20 S2
NM74.PRG - starts @ T20 S3
NM77.PRG - starts @ T20 S5
NM78.PRG - starts @ T20 S7
NM79.PRG - starts @ T20 S11
NM7B.PRG - starts @ T15 S0
NM7c.PRG - starts @ T15 S1
NM7D.PRG - starts @ T15 S3
NM7E.PRG - starts @ T15 S5
NM7F.PRG - starts @ T15 S7
NM80.PRG - starts @ T15 S9
NM81.PRG - starts @ T15 S16
NM82.PRG - starts @ T21 S0


DUNGEON LEVELS
NMA0.PRG - starts @ T8 S9 - Contains "The Cellar"
NMA1.PRG - starts @ T14 S0 - Sewers L1
NMA2.PRG - starts @ T14 S1 - Sewers L2
NMA3.PRG - starts @ T14 S19 - Sewers L3
NMA4.PRG - starts @ T22 S2 - Catacombs L1
NMA5.PRG - starts @ T13 S0 - Catacombs L2
NMA6.PRG - starts @ T13 S2 - Catacombs L3
NMA7.PRG - starts @ T23 S0 - Harkyn's L1
NMA8.PRG - starts @ T23 S6 - Harkyn's L2
NMA9.PRG - starts @ T12 S0 - Harkyn's L3
NMAA.PRG - starts @ T24 S0 - Kylearan's    
NMAB.PRG - starts @ T12 S1 - Mangar's L1   
NMAC.PRG - starts @ T24 S5 - Mangar's L2
NMAD.PRG - starts @ T24 S14 - Mangar's L3
NMAE.PRG - starts @ T11 S0 - Mangar's L4   
NMAF.PRG - starts @ T11 S2 - Mangar's L5

9 blocks each - 2 blocks for layout, 2 blocks for specials/traps/etc...5 blocks for ???

97files
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Note that this is incomplete - I need to notate how many blocks (sectors) each file takes up and how they relate to each other.

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

Post by Darendor »

I decided to explore how the Bashar Kavilor event plays out.

I took note of the disk drive movements. The event is made up of 3 blocks, so a maximum of 768 bytes.

This is the movement sequence from the moment you kick down the door to his chamber:

Jump to Track 18 [directory]
Jump to 25
Jump to 18 [directory]
JUmp to 25
Jump to 26
Jump to 18 [directory]
Jump to 16
Jump to 18 [directory]
Jump to 16

Track 25 and 26 are where the event is stored on disk. 18 is the directory and 16 is where the image is called from to be displayed. There is no caption printed under the window for this particular event.

The three sectors containing the event are T25 S10, T26 S1 and T26 S11, in that order.

Consider:
Image


Notice the text displayed to the player in the text window is in the reversed ASCII symbols, except for the capital letters and other symbols (quotes, parenthesis, exclamation point, etc). Notice also that the first sector and third sector are very nearly identical. The 2nd sector contains the text "_in_trouble~", the ~ denoting the end of text string. I'm not sure if the rest of the 2nd sector is relevent to the special, but from here it loads a preset battle with 1 Master sorcerer (with the contingency that if the player successfully runs away they're moved 1 square east).

Anyone wanna help me make sense of this?
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Darendor wrote:Note that this is incomplete - I need to notate how many blocks (sectors) each file takes up and how they relate to each other.

Or something.
Hi... if I recall it right, the first two bytes of each disk sector contain the track and sector of the next block of this file... if last block the first byte reads 0 (if I recall it right). Thats why I always ran the disk doctor in split mode with hex indication also (near CBM char code)
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Darendor wrote:I'm not sure if the rest of the 2nd sector is relevent to the special, but from here it loads a preset battle with 1 Master sorcerer (with the contingency that if the player successfully runs away they're moved 1 square east).

Anyone wanna help me make sense of this?
as you can see in last sector of that three, the byte 1 reads 0 (last sector of file) while the second byte indicates, how many bytes of this sector actually belong to the file, it is the remainder. All after that amount is garbage or unused.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

How do I turn on hex mode? And can you break down what you just said into simpler terms? :?>
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

a) I recommend to try out the "D64" hex editor for C64 disk images.

b) in 1541 DOS, the first sectors of each program file are in the BAM sectors (18, xx dec). Each file takes *I think* 16 bytes in a BAM sector. The line for each file should contain the first sector of that file on disk, I can't remember where exactly. In each sector, the first two bytes indicate:

1) if LAST sector of file: byte 0 = 0, byte 1 = number of remaining bytes for the file in this last sector
2) if any INTERMEDIATE sector of file: byte 0 = next track, byte 1 = next sector

As for my post and your replay in the other thread: No, actually I do NOT work on any editor for BT, just follow your project here. I do because BT was my first all-time-greatest program in 1985, and nothing ever again fascinated me that much until MM3 on the PC arrived in 1991
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

Ok some more info: in track 18 BAM directory sector, each file takes up 32, not 16 bytes. Byte 1 is always the file type of values 8x, e.g. 82 means file is of type PRG. The next two bytes indicate the FIRST sector, where that file starts. In the first sector of a file, the first bytes (always excluding the first 2 bytes of a block, which contain block chain info) indicate the LOAD ADDRESS into memory and size or so, I forgot, how precisly, but can find out.

Hope that helps. There where pokes (or load registers and then call ROM sys routine) that can load a file to a diff position in mem than it is indicated on the disk. Have to chck these also, can't remember after more than 25 years.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Alright, I guess that's helpful for when it comes time to put in a module that allows dungeon creation from scratch. Thanks.

However, I'm more focused on how to figure out how a special event loads/triggers. Still no real clue on this. Any ideas?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

37 Loaded Specials
17 Dungeon levels
43 "WTF"

The files appear to be continguous except those I categorized under "WTF"...

Anyone wanna take a shot in the dark as to what they're used for?
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

Went through the special events starting at file NM2F. All are loadable and runnable from the game is loaded at $BB00 and executed at the same adress.
Will examine NM1F-2E when I find the time. Here goes:

Code: Select all

NM2F	Old Man: "What tavern lies off Night Archer street?"
NM30	Magic mouth: "Name the one of cold, foretold, twofold:"
NM31	Magic mouth: "Name the endless byway and your path (...)".
NM32	Magic... (Character #3 finds a silver triangle)
NM33	Golem! A crystal statue comes to life before you (...)
NM34	Kylearan Special Event - you get onyx key.
NM35	Magic mouth: "Perseverance in all things".
NM36	Magic mouth: "Two shapes yours, one's around (...)"
NM37	Old Man: "I am the Keymaster (...)"
NM38	Magic mouth: "Speak the seven of the One God (...)".
NM39	There is a large black coffin in this tomb (...)
NM3A	Two sleeping dragons awaken at your passage (...)
NM3B	Magic mouth: "Name the greatest son of Odin (...)"
NM3C	- Strange teleportation occurs -
NM3D	On the wall to the north are etched (...)
NM3E	Magic mouth: "What can bind the mightiest foes?"
NM3F	The Lich Event - only occurs if Mangar is defeated ($FE = 01). 
NM40	There is a pool of boiling liquid here. Will you (D)ive in (E)xit
NM41	This is Mangar's treasure trove (...)
NM42	Magic mouth - Death to those (...)
NM43	There is dissention in your ranks... (Character #3 gets possessed).
NM44	Mangar Special Event.
/Twoflower
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

NM3C - Strange teleportation occurs
What dungeon map and which co-ordinates is this teleportation?
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

I believe that NM5E-NM82 are the imagefiles for the monsters. These can be loaded from any special event which hosts a JSR$0803.
Simply do the following:

LDX#$0E, JSR$0803

The routine will take the value #$0E, add #$50 to the value and load the resulting file with the prefix NM. In this case - NM5E, the warrior.
/Twoflower
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

The special events begin as early as NM1C:

Code: Select all

NM1C	There is a chest here [...]
NM1D	TRAP! You've hit a pit!
NM1E	A wandering creature offers to join your party (...)
/Twoflower
User avatar
Twoflower
Posts: 128
Joined: Thu Mar 19, 2009 12:40 am
Location: Haarlem, NL
Contact:

Post by Twoflower »

And here comes the rest of the missing events:

Code: Select all

NM1F	There are stairs here, which seem to go a long way up (...)
NM20	There is the statue of a large spider here (...)
NM21	A light beam from the surface is mirrored down here (...)
NM22	Magic mouth: "Know this, that a man called Tarjan (...)"
NM23	You have entered the living chambers of Bashar Kavilor (...)
NM24	This is the High Priest's treasure chamber (...)
NM25	Before you lies the ancient burial chamber of King Aildrek (...)
NM26	You are at the Baron's throne. Who wishes to sit on it? (1-6)
NM27	You see the Captain of the Guard standing before you. (...)
NM28	Before you stand six warriors, dressed in bright green robes. (...)
NM29	Magic... (finding Crystal Sword).
NM2A	A wizened man appears before you, saying, "Answer this riddle to pass:" (...)
NM2B	Magic... (finding Silver Square).
NM2C	Magic mouth: "Past warscapes fought by men (...)"
NM2D	The legions of Baron Harkyn stand before you (...)
NM2E	An old statue of a fifteen foot tall warrior stands before you. (...)
/Twoflower
Post Reply