Page 1 of 2

Re: Partial phone text dump.

Posted: Mon Jun 08, 2009 11:10 am
by Blaziken257
Here's a dump of some of the phone text. I dumped bank $45, which is from $114000-117FFF. Yes, I'm aware that some of the text in this file is battle text that has already been translated, that's just because it was from the same bank. Just ignore that and just look in the middle of the ROM.

And I'll dump the other phone text later.

http://www.mediafire.com/download.php?muz0yj43ndl

EDIT: I also dumped bank $56 ($158000-15BFFF). Once MediaFire starts working again I'll upload it there. I'm also working on bank $57 as well (just a bunch of E9 codes I have to fix by hand).

Re: Partial phone text dump.

Posted: Mon Jun 08, 2009 7:42 pm
by Kimbles(imported)
Cool! XD
I actually dumped these before, but didn't bother with them since there's currently no way to fit them into the game translated. We'd have to fit both answers on a single line, and that's just not possible. ):

They should be easy as heck to translate though, so I'll take a look right now. XD It's a really cute feature of the game... *sigh*

Re: Partial phone text dump.

Posted: Mon Jun 08, 2009 8:21 pm
by Blaziken257
The answers are too long to fit in one line? Darn. Well, maybe somehow it's possible make the answers multiple lines, like the Fight/Status/Run thing. I also hope there's enough room in the bank to do all of this... I don't think hardcoding strings in $0000-$3FFF will be enough to save this...

However, the following banks have no space whatsoever in it (at least in non-bootleg versions, anyway):

- $01 ($004000-$007FFF)
- $1E ($078000-$07BFFF)
- $25 ($094000-$097FFF)
- $2D ($0B4000-$0B7FFF)
- $34 ($0D0000-$0D3FFF)
- $3B ($0EC000-$0EFFFF)
- $3C ($0F0000-$0F3FFF)
- $3D ($0F4000-$0F7FFF)
- $43 ($10C000-$10FFFF)
- $44 ($110000-$113FFF)
- $58 ($160000-$163FFF)
- $5A ($168000-$16BFFF)
- $5B ($16C000-$16FFFF)
- $5C ($170000-$173FFF)
- $5D ($174000-$177FFF)
- $61 ($184000-$187FFF)
- $62 ($188000-$18BFFF)
- $77 ($1DC000-$1DFFFF)
- $78 ($1E0000-$1E3FFF)


That's 19d/13h banks of data. That equates to 4C000h, or 311,296d bytes. That's 14.84375% of the ROM. That's way more than enough for any text that we need to move over. (All this unused space leads me to wonder why compression was necessary in the first place.) Of course, the problem is figuring out how to move text from one bank to another. It isn't impossible, though, considering I figured out how to do this with sprite-based text to some extent. Now if only we can do this with phone text... I wouldn't be surprised if IIMarckus could figure out how to do this...

Oh and bank $55 ($154000-$157FFF) has almost nothing in it as well, though it does have a very small bit of data in it.

Finally, you can get a link to the dump I made of bank $56! Here's the link:

http://www.mediafire.com/download.php?yjnkzrgzjdi

The weird thing with this is that there were some $E9 codes in here. I have no idea what purpose $E9 serves, but there is apparently a use for it. If someone could figure that out it would be awesome.

Re: Partial phone text dump.

Posted: Mon Jun 08, 2009 11:57 pm
by andwhyisit
Ugh. I think I fried my brain thinking about this one. I really, really hope there is a separate function for processing the battle text, that way I can redirect it to a different bank. I may need to know which are battle text and which are phone text.

Re: Partial phone text dump.

Posted: Tue Jun 09, 2009 12:31 am
by Blaziken257
What does battle text have to do with this? Wait, do you mean the bank where it's shared with the phone text? Anyways, I dumped bank $57 (offsets $15C000-15FFFF) now...

http://www.mediafire.com/download.php?3imwjojwtyj

EDIT: Out of curiousity, I looked at the text for "Well, have you had curry?" in the Japanese version (second string of text in bank $56), and it's MUCH longer. Not only does this explain why the Engrish version's text looks out of place and COMPLETELY random, but it also indicates that there may indeed be a shortage issue...

もしもし
オマエ カレーってたベたこと
あるか?
ネリカラってヤツが
『おいしいカレー』っていって
いたんだけど オレたベたこと
ないから わかんないんだ
こんど たベさせてくれよなー

Re: Partial phone text dump.

Posted: Tue Jun 09, 2009 12:58 am
by andwhyisit
Blaziken257 wrote: Wait, do you mean the bank where it's shared with the phone text?
Yes.

Why is the phone text randomly spread across multiple banks (45h, 55h, 56h, 57h)?

Re: Partial phone text dump.

Posted: Tue Jun 09, 2009 1:13 am
by Blaziken257
Probably because there isn't enough room for it to fit in all one bank. There is almost nothing in 55h, though... And the programmers seemed to have grouped the banks based on different things. For example, the text in bank 45h is questions that you have to answer. The phone text in bank 56h involves the general plot. The phone text in bank 57h is related to evolution items.

Re: Partial phone text dump.

Posted: Tue Jun 09, 2009 3:19 am
by andwhyisit
Back to my original question: Does anyone know where (as a hex address or 2-byte pointer) the phone text starts in bank 45h (as opposed to the battle text)?

Re: Partial phone text dump.

Posted: Tue Jun 09, 2009 4:20 am
by Blaziken257
Uh... well there are a bunch of 2-byte pointers from $11418A-$11419F (why there are 11 identical pointers is beyond me). This points to the first phone text pointer (this is different depending on whether you're playing the Japanese version, Diamond/Jade, or the translation). In this pointer table, there are 100h/256d pointers, so this pointer table is 200h/512d bytes long. In both Power/Speed and Diamond/Jade, these pointers are 7B 50, so the first phone text pointer is at $11507B (and it ends at $11527A). In the latest version of the translation patch, these pointers are 88 56, so it starts at $115688 (and ends at $115887).

Re: Partial phone text dump.

Posted: Wed Jun 10, 2009 1:48 am
by andwhyisit
Well I checked for 3-byte pointers and asm strings that set "a" to 45 and perform a bankswitch. I couldn't find anything. The only things I can think of are:

a. Set A as 45, use call to move to a function in bank 0, perform bankswitch, process data, revert from bankswitch, ret.

b. Pull the value for A from ram, perform bankswitch, process data, revert from bankswitch.

Option "a" makes more logical sense for having only one function in bank0 for processing any pointer table data in the rom. I am worried that I might not be able to find it though.