Page 5 of 11

Posted: Mon Apr 19, 2010 9:03 am
by ZeroZero
If you don't know, what the memory after the offset table means for
the game engine, then you better don't touch it.
It is not necessary to extend or modify the events offset table. Instead,
refactor or extend the existing event files.

Posted: Thu Apr 22, 2010 6:37 am
by Darendor
Wow nice you completely ignored my posts. :?

Posted: Thu Apr 22, 2010 8:42 am
by Darendor
Darendor wrote:The whole text-offset is incorrect. It appears to be completely random.

So am I right on this or what am I missing? :?

Posted: Thu Apr 22, 2010 10:13 am
by ZeroZero
you should read your instant messages in msn

Posted: Thu Apr 22, 2010 10:07 pm
by Darendor
ZeroZero wrote:you should read your instant messages in msn
And did you read my responses? :?

Posted: Fri Apr 23, 2010 1:54 am
by ZeroZero
Well you seem not having read your IMs in days while you post here and I wasn't simply at home when you today posted your answers....

Did you find the file event load offset table, that I showed you?

EDIT

Oh I just see, you already posted, that you found them

Posted: Fri Apr 23, 2010 3:52 am
by Darendor
Darendor wrote: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?

Posted: Fri Apr 23, 2010 10:21 pm
by Darendor
I've gone ahead and attempted a disassemble of the event NM31.PRG - the magic mouth in Kylearan's Tower that asks for the name of the endless byway in Skara Brae.

Code: Select all

NM1A.PRG - copied from NM31.PRG | Magic Mouth [SINISTER] in Ky Tower

$002: INC C1
$004: LDX 2D
$006: JSR $0803
$009: LDA BB
$00B: STA 59
$00D: LDA 5A
$00F: STA 58
$011: JSR $080C
$014: JSR $0806
$017: LDY BB
$019: LDX 63
$01B: JSR $0809
$01E: INC 1D
$020: JSR $081B
$023: BCS 2A
$025: LDX 07
$027: LDA $0334,X
$02A: CMP $BBD7,X
$02D: BNE $CA20
$030: BPL F5
$032: LDA 58
$034: STA 85
$036: SED
$037: JSR $0806
$03A: LDY BB
$03C: LDX DF
$03E: JSR $0809
$041: JSR $AE09
$044: LDY 29
$046: LDA $(6E),Y
$048: AND FB
$04A: STA $(6E),Y
$04C: JMP $AE03
$04F: JSR $0806
$052: LDY BB
$054: LDX E8
$056: JSR $0809
$059: JMP $AE03

$05C-$064 = text "Mouth...~" [Caption text]
$065-$0F2 = text "A magic mouth on the wall speaks to you, saying this:[cr]'Name the endless byway and your path shall be guaranteed:'[cr][cr]>SINISTERRight...~Wrong...~
$0F3-0100 = unknown bytes
Note that [cr] means a carriage return and that the tilde represents the DC byte, meaning end of text string.

Now, this means that events requiring input from the user are self-contained. I am wondering what the bytes from $0F3 to the end of the file mean:

Code: Select all

BA FF A0 FC DE BF 00 00 00 01 20 E1 F6 E5

What's interesting about the text bit is that the code for > actually generates an input field.

Consider:
Image

Posted: Fri Apr 23, 2010 10:44 pm
by Quantum Reality
Darendor's file lookup table doesn't exist on the Apple version disks. Conclusion? Filenames don't exist on my disks and it's all hard-coded to specific tracks and sectors.

Posted: Sat Apr 24, 2010 6:07 am
by Darendor
So, we've managed to conclude that the jump table for the dungeon event files cannot be altered.

That kind of blows my tires in a big way. :?

Posted: Sun Apr 25, 2010 4:54 pm
by ZeroZero
updates

Posted: Thu Apr 29, 2010 2:09 pm
by ZeroZero
Darendor wrote:What's interesting about the text bit is that the code
for > actually generates an input field.
Thats bull. The ">" only shows a ">". The engine routine
at 081b handles all the input including prompting. This
could easily have been read in the post marked as
ITEM02 in this thread. Your posted code fragment shows
this call clearly:
$020: JSR $081B

Posted: Fri Apr 30, 2010 9:26 am
by ZeroZero
I T E M # 13

Last update: 2010-04-30

Making own events....

Since the item came up to me several times now, I here explain
in short again, how you can make events.

First: it is in no way necessary to manipulate the offset table for
the generation of file names for events. Just reuse the existing
filenames, as given in the filelist, for your own events. You can
even create a lot more events than the original BT1 is using on
the C64.

On the C64, events can use up to 5 mem blocks (1280 bytes).
They are loaded by the engine to $bb00. If you have small events
with not too much text, you can pack two or more into one file.
You can then reference the same file (i. e. give the same offset
into the table to generate filenames) more than once. You can
do that even twice for the same level.

In your own event, you can check this variables to decide, which
part of your event machine code you want to execute:

$e0 the level number you are in, 0 to f (=NMA0 to NMAF)
$28 the party's present NORTH coordinate in the level
$29 the party's present EAST coordinate in the level

Thus you can determine, where you are and hence which of the
two (or more) events within one file you want to call.

This refers to dungeon events.

I hope this clears things up.

Posted: Fri Apr 30, 2010 6:49 pm
by ZeroZero
Updates...

Hey Darendor, this update includes an event with input.

Re: CBM64 Bard's Tale 1 Disassembly

Posted: Sat May 01, 2010 11:21 am
by ZeroZero
Updates...

The preamble post now contains links and update dates to all major items.