Bwa-hahahaha!

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

Post by Darendor »

Horpner wrote:OK, so the scoop is that text data is stored in ASCII + 128.

Not the greatest obfuscation, but good enough to prevent casual inspection.

Aside, pertaining to Darendor's signature, I tried IRKM DESMET DAEM in an anagram finder, and never got anything that made sense. It seems like it really is beyond understanding. That is unless "Ted made me smirk" is some sort of in-joke. ;)
Heed not that which is beyond understanding.

Can you please indicate where the text is stored on disk so I can start scrawling my e-mail address inside Kylearan's tower? :?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Also, before we go hunting off on this tangent, where might one find the specials layout (i.e. darkness, antimagic, etc) on the disk?

I'll try to find it myself but I can't promise I'll return sane. :?
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Before we spend time on that, I think we should switch from working with the images directly, to working with files from off the images. We need a system we can both use the pull files out, though. I'll look for something that works.

I say we start with nma1, the first level of the cellars.
Death and drek? WTF?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

The good news is that I found it. The bad news is that I no longer believe in gravity.

The "flags" layout for the wine cellar are stored thus: From $a308 to $a3ff, and $a502 to $a5ee. I wonder if the intervening code has anything to do with it.
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:The good news is that I found it. The bad news is that I no longer believe in gravity.

The "flags" layout for the wine cellar are stored thus: From $a308 to $a3ff, and $a502 to $a5ee. I wonder if the intervening code has anything to do with it.
It's just that files are not generally stored contiguously on a diskette unless they are shorter than 257 bytes or so. They are split up across the disk sectors.
Death and drek? WTF?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

This is the character set I've pounded out so far.

Code: Select all

Note: cf is used for both captial "O" and zero.

c0=?	c1=A	c2=B	c5=K	c6=F	c7=G	cf=0/0	cd=M	d2=R	d4=T	d9=Y	
00=[CR] a0=_	a1=!	a2="	a7='	ac=,	ad=-	ae=.	ba=:	b1=1	b5=5
e1=a	e2=b	e3=c	e4=d	e5=e	e6=f	e7=g	e8=h	e9=i	ea=j	eb=k
ec=l	ed=m	ee=n	ef=o    f0=p	f2=r	f3=s	f4=t	f5=u	f6=v	f7=w
f9=y	
I've been referring to the file made by XXD and putting the text beside the code for future reference. I ended up wandering into the Catacombs and found half the text in there vanishes and I can't find the other half. :?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Horpner wrote:Before we spend time on that, I think we should switch from working with the images directly, to working with files from off the images. We need a system we can both use the pull files out, though. I'll look for something that works.

I say we start with nma1, the first level of the cellars.
I don't suppose you came up with anything suitable?
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Ignore this.
Last edited by Darendor on Thu Jan 29, 2009 4:25 am, edited 1 time in total.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

I've found the special text in the wine cellar on disk.


WINE CELLAR

MAP LAYOUT (MEMORY): $f800 to $f9e3
MAP LAYOUT (DISK): $9c00 to $a6e0
SPECIALS LAYOUT (MEMORY): $fa00 to $fbe3
SPECIALS LAYOUT (DISK): $a308 to $a3ff, $a502 to $a5ee
SPECIAL/TEXT CODE (MEMORY): $fd20 to $fdd4
SPECIAL/TEXT CODE (DISK): $8e2e to $8ee2

Horpner, could you please verify my findings to make sure I haven't made a mistake? Thanks.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Well...I overwrote the text string for 1N, 1E at the location on the disk, but...it ignored what I put and loaded the original code...

How is that possible?

I put:

Code: Select all

0008e20: 6dfd 98fd 20fd 20fd 20fd 20fd 20fd d4e8  m... . . . . ...
0008e30: e5ao c2e1 f2e4 a7f3 aod4 e1ec e500 c2ef  ................
0008e40: eef3 f4f2 f5e3 f4e9 efee aod3 e5f4 00a0  ................
0008e50: d6e5 f2f3 e9ef eeao b1ae b000 add5 cec4  ................
0008e60: c5d2 aoc3 cfce d3d4 d2d5 c3d4 c9cf cead  ................
0008e70: 00a8 c3a9 caa1 eeao b0b9 dcd2 e1f2 e5a0  ................
But it behaves as though it still is:

Code: Select all

0008e20: 6dfd 98fd 20fd 20fd 20fd 20fd 20fd d4e8  m... . . . . ...
0008e30: e9f3 a0e9 f3a0 f4e8 e5a0 f7e9 eee5 a0e3  ................
0008e40: e5ec ece1 f2a0 efe6 a0f4 e8e5 a0d3 e3e1  ................
0008e50: f2ec e5f4 a0c2 e1f2 e4ae a0d4 e8e5 a0e1  ................
0008e60: e9f2 a0e9 f3a0 edf5 f3f4 f9a0 f7e9 f4e8  ................
0008e70: a0ef ece4 a0f7 e9ee e5ae dcd2 e1f2 e5a0  ................
There is no other occurrance of the Wine cellar special text on the disk so I'm a little confused and frustrated right now.
User avatar
Darendor
Posts: 1503
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

As I'm currently trolling through the entire DUNGEON disk deciphering ingame text as I go, I thought I'd point out that apparently characters can become "PARA" in addition to the usual "Psnd", "Ston", "Old" and so on.

Neat eh?
Chaney
Posts: 100
Joined: Tue Jun 27, 2006 7:56 pm
Location: California

Post by Chaney »

I don't know squat about coding, but I am finding this thread very interesting-just wanted you 2 to know it is being read.
When in doubt, kick your neighbors dog!
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:As I'm currently trolling through the entire DUNGEON disk deciphering ingame text as I go, I thought I'd point out that apparently characters can become "PARA" in addition to the usual "Psnd", "Ston", "Old" and so on.

Neat eh?
Cool!

I plan on changing DEAD to PWND on my disk. :lol:

Have a look at the 64copy program at Lemon64. I tried it, and it seems be the same program as Star Commander. Maybe you'll have more luck with it, though.
Death and drek? WTF?
Chaney
Posts: 100
Joined: Tue Jun 27, 2006 7:56 pm
Location: California

Post by Chaney »

PWND?
When in doubt, kick your neighbors dog!
User avatar
Horpner
Posts: 224
Joined: Thu Jan 08, 2009 11:53 pm
Location: New England
Contact:

Post by Horpner »

Darendor wrote:Well...I overwrote the text string for 1N, 1E at the location on the disk, but...it ignored what I put and loaded the original code...

How is that possible?

I put:

Code: Select all

0008e20: 6dfd 98fd 20fd 20fd 20fd 20fd 20fd d4e8  m... . . . . ...
0008e30: e5ao c2e1 f2e4 a7f3 aod4 e1ec e500 c2ef  ................
You've accidentally got an 'o' (OH) in that line instead of a 0 (ZERO).
There is no other occurrance of the Wine cellar special text on the disk so I'm a little confused and frustrated right now.
That's weird. It should at least crash or something.

I managed to change the word 'This' to 'Here' (c8e5 f2e5) successfully, and got it to run.

Below is a quicky Python program I wrote that will either dump the "Bard's Tale Text" from a d64 disk image, or will convert a string of text into the hex codes for "Bard's Tale Text".

Code: Select all

import sys

Bytes_At_A_Time = 65
Min_Message_Len = 4

try:
    fname = sys.argv[1]
except:
    print >> sys.stderr, "usage: bttext.py d64_disk_file OR text"
    sys.exit(1)

def to_str(byte):
    o = byte - 128
    if o >= ord(' ') and o < 127:
        c = chr(o)
        if c in "%=/~{}|@\\*^`":
            return None
        else:
            return c
    else:
        return None

fp = 0
try:
    data = file(fname, "rb")
    message = []
    bytes = data.read(Bytes_At_A_Time)
    while bytes != '':
        for byte in bytes:
            fp += 1
            c = to_str(ord(byte))
            if c:
                message.append(c)
            else:
                if len(message) >= Min_Message_Len:
                    print ''.join(message)
                message = ['$%x: ' % fp]
        bytes = data.read(Bytes_At_A_Time)

except IOError:
    space = ''
    for b in ''.join(sys.argv[1:]):
        sys.stdout.write('%x%s' % (ord(b) + 128, space))
        if space == ' ':
            space = ''
        else:
            space = ' '
    print
    sys.exit(0)
Copy that program, and save it as bttext.py.

To dump all the text from the file BT1_dung.d64, you'd do:

c:\> python bttext.py bt1_dung.d64

To find out the correct hex codes for "IRKM DESMET DAEM", you'd do:

c:\> python byttext.py IRKM DESMET DAEM

Note that the last will not work if there's a file in the current directory named IRKM.
Last edited by Horpner on Thu Jan 29, 2009 3:19 pm, edited 1 time in total.
Death and drek? WTF?
Post Reply