Page 1 of 1

Bard's Tale 1/Bard's Tale 3 Character Editors (Apple ][)

Posted: Fri Mar 19, 2010 5:14 am
by Quantum Reality
Unfortunately I can't continue the BT3 editor project until such a time as I can recover a complete list of how the data is stored on a Bard's Tale 3 character disk. I had a printout once upon a time, but it was lost to the winds of time when I sold all my Apple stuff back in the 1990s.

That said, for anyone who can help me reconstruct the complete character info, I offer a big grin. :D

http://www.pastebin.ca/1845401

Enjoy the wonders of Applesoft :P

Oh, and the CHREDIT assembly code in Merlin Pro format is pasted here:

Code: Select all

 ORG $300
MLI EQU $BF00 ;Location of the MLI
RB EQU $80 ;MLI code for Read_Block
WB EQU $81 ;MLI code for Write_Block
BUF EQU $6000 ;Buffer location for character being edited
READ JSR MLI
 DFB RB
 DFB #<RPARM,#>RPARM
 RTS
RPARM DFB 3
 DFB 0
 DFB #<BUF,#>BUF
 DFB 0,0
WRITE JSR MLI
 DFB WB
 DFB #<WPARM,#>WPARM
 RTS
WPARM DFB 3
 DFB 0
 DFB #<BUF,#>BUF
 DFB 0,0

Posted: Sat Mar 20, 2010 5:10 am
by Darendor
I assume this is for the Apple II only?

Posted: Sat Mar 20, 2010 9:26 am
by Quantum Reality
Unfortunately, yes. But I am reliably informed (from here *waves* :D ) that the basic structure of the character storage format is unchanged going to the C64.

So there is considerable overlap - the sticking point will be writing a C64-based track and sector reader for those that want to run the editor in an emulator.

The ProDOS MLI works like DOS 3.3's RWTS - only instead of track X, sector X, you say "read block X" or "write block X", where X goes from 0 to 279 for a standard 5.25" disk.

So you could in principle convert the BASIC part to Commodore BASIC; you'd just need to translate the machine language specific bits. :)

Posted: Sat Mar 20, 2010 12:35 pm
by Quantum Reality
A propos of general programming and AGH

I nearly lost all my work on the BT1 editor because I somehow clobbered the sector that contained the all-important file-structure information! (the VTOC, roughly equivalent to the FAT on a DOS or Win95/98 machine)

Luckily, I was able to partially reconstruct the VTOC information and copy the files. Whew! Now I'm prayin' I didn't clobber my character disk too. :shock:

Edit: I'm luckier than I ought to be. I didn't clobber the character disk!

Posted: Sat Mar 20, 2010 3:54 pm
by ZeroZero
LOL, Quantum, if you go to the main section of here (crop the link back to
http://brotherhood.de/Bardstale/talefiles, then you find file sections, that should provide disk images of the apple II versions of the 3 BT's also.

Posted: Sat Mar 20, 2010 7:12 pm
by Quantum Reality
Post-mortem: Apparently what caused my troubles was me accidentally executing some code in the middle of the DOS master disk bootstrap loader. DOS loads itself into approximately the the high-resolution screen area and then bumps itself up to just below the Applesoft ROMs prior to turning execution over to the user.

And how did I accidentally do this? I had punched in a few bytes of assembly into $3000 and somehow thought they were still there when I typed 3000G. Oopsie! :shock:

Posted: Sat Mar 20, 2010 11:55 pm
by Quantum Reality
ZeroZero asked for some screenshots of the BT1 character editor as it stands right now - happy to oblige! :)

The six images below show the steps of booting up the disk image, running the program, telling it where the character disk is, reading the characters, and choosing to look at a particular character.

Image

Image

Image

Image

Image

Image

Image

Posted: Sun Mar 21, 2010 12:00 am
by Darendor
I can try to convert this to C64 Basic/ML. :?

Posted: Sun Mar 21, 2010 12:55 am
by Quantum Reality
Be my guest - I'm sure there are some C64-emulator-users who would prefer to edit their characters within the emulator. :D

I'd like to ask you to wait until I complete this project and clean the code up a bit, though. That way you won't make my mistakes. :P

Posted: Sun Mar 21, 2010 5:07 am
by Quantum Reality
Not strictly character-editor-related, but...

ZeroZero prodded me enough to start poking around with the AppleWin debugger, and lo and behold, I found where characters get stored - at least, the name of the first character, which is at $380 on up :)

Image

It looks like a worthwhile goal might be to find a debugger that will disassemble the entire contents of system memory into a text file after a team has been loaded.

Posted: Sun Mar 21, 2010 12:16 pm
by ZeroZero
Use your emu's monitor to save all apple memory into a binary file.
Then use your favourite cross-platform 6502-disassembler to disassemble
it. At best a disassembler who is configurable for the systems area
your 8-bit computer uses, there are several that can disassemble
respecting C64, Apple, Atari or Nintendeo roms.