[GBA] DBZ Buu's Fury - Help with translation?

Started by BSTCloud, August 12, 2017, 08:17:44 AM

Previous topic - Next topic

BSTCloud

Hi everybody! This is my first post, so I hope I can start my trajectory on the website on the right track :)
Nice to meet you all!

So, let's get this business moving. And sorry in advance for the massive wall of text I'm about to post.
I've been somewhat bored currently on my vacations so I've started messing around with romhacking to translate this game -which I've always liked a lot- to Spanish (my native language).

When I was younger, I read and messed lot in but never really dived deep into the world of romhacking trying to translate a game for real, but nowadays I work as a programmer so I'm more than used to read documentation and learning the how-tos 'on the fly' :laugh:

The first thing I've done is mess with an hexadecimal editor. And the only viable text to edit there without any kind of table are the menus and, in short, any kind of message that isn't a textbox. I learned about GBA pointers, how to properly edit them to adapt the text, and voilà!

Preview of a spanish translated menu


I think it looks good.
Fortunately, the game already had a lot of characters we use in our language, namely ¡¿ñÑÁáÉéÍíÓóÚú.
Well, it didn't have a "á" in one of the fonts, but a few hours of crystaltile2 allowed me to get there.

The á I modified


After I decided these kind of assets were covered, I tried to mess with other parts of the game to secure all the areas I needed for a proper translation.
And then things didn't go so smooth.

So, I have two main issues:
-Can't find ANY graphical assets to save my life.
-Can't find the text from the dialogue boxes to save my life.

Let's start with the first one: graphical assets
If I understand correctly, when it comes to GBA, things can come uncompressed, but you have to expect they'll come compressed requiring an additional step for both extraction and insertion. Okay.
And, if I understood it correctly, the most common one is LZ77. For the which there are a gazillion tools available in this very website.

For example, LZR77estructor2, NLZ-GBA Advance, unLZ-GBA, and more. I've tried ALL of them, resulting in amazing amounts of nothingness.
Every single tool I've tried was related to this algorithm and I didn't find anything. Of course, I did the exact same thing with a different game (Advance Wars) and I got tons of sprites easily. Well damn.

I also tried to extract using GBAmdc, with boths and offset and VBA logs, but the program always gives me the same error of failed operation and that's it.

I ALSO tried to follow this lovely tutorial here (https://www.romhacking.net/documents/361/).
Downloaded VBA-SDL-H, followed the exact same instructions.

(This part is the one I know the less of so if I'm doing anything wrong, please feel free to correct me, I'm willing to learn, I promise!)

I used the bottom text of background of the main menu as an example

And VBA tells me the first tile is located at the adress 0x06008f00.
So, i set up a breakpoint there, and when the time of truth comes, VBA-SDL gives me this input

Breakpoint (on write) address 06008f00 old:02020202 new:00000000
Breakpoint (on write) address 06008f04 old:02020202 new:00000000
Breakpoint (on write) address 06008f08 old:02020202 new:00000000
Breakpoint (on write) address 06008f0c old:02020202 new:00000000
Breakpoint (on write) address 06008f10 old:02020202 new:00000000
R00=06008f20 R04=00000000 R08=00000000 R12=00000000
R01=00000000 R05=00000000 R09=00000000 R13=03007d9c
R02=00000720 R06=00000000 R10=00000000 R14=080053b1
R03=00000000 R07=00000000 R11=00000000 R15=030007dc
CPSR=2000001f (..C.... Mode: 1f)
030007d4  e8a011fa stmia r0!, {r1,r3-r8,r12}
> 030007d8  e2522020 subs r2, r2, #0x20
030007dc  cafffffc bgt $030007d4


I look up the previous instruction and...
030007d0 e2422020 sub r2, r2, #0x20.

I know a little bit of assembler and that's r2 = r2 - 20.
The value of R2 is R02=00000720, and minus 20 it's 00000700 I... don't think that's quite it.

Obviously that section of memory is pretty much empty.

debugger> mw 00000700
00000700 00000000 00000000 00000000 00000000 ................
00000710 00000000 00000000 00000000 00000000 ................
00000720 00000000 00000000 00000000 00000000 ................


The previous instruction is
030007cc e1a0c001 mov r12, r1, and both value 00000000 at the time.

So I move on to the next time the execution is stopped by the breakpoint.

Breakpoint (on write) address 06008f00 old:00000000 new:02010102
Breakpoint (on write) address 06008f04 old:00000000 new:01020202
Breakpoint (on write) address 06008f08 old:00000000 new:01020102
Breakpoint (on write) address 06008f0c old:00000000 new:01010101
R00=03007d90 R04=00000008 R08=02010102 R12=00000007
R01=06008f10 R05=000000e8 R09=01020202 R13=03007d70
R02=0203d5b8 R06=0203d5c0 R10=01020102 R14=0800521d
R03=000000f0 R07=0203d7a0 R11=01010101 R15=030003bc
CPSR=2000001f (..C.... Mode: 1f)
030003b4  e8a10f00 stmia r1!, {r8-r11}
> 030003b8  e8970300 ldmia r7, {r8,r9}
030003bc  e0877003 add r7, r7, r3


And the previous instruction is
030003b0  e0877003 add r7, r7, r3 -> which reads r7 = r7 + r3 = 0203d7a0 + 000000f0 = 0203D890
So i look up at that position

0203d890 01020102 60a29e9d 02010201 02010101 .......`........
0203d8a0 02016d01 02014001 02010101 b0010201 .m...@..........
0203d8b0 a2010201 45729ea2 01010101 01440102 ......rE......D.
0203d8c0 01700102 01bb0102 01020102 010201bb ..p.............
0203d8d0 010201fb 01020147 0102013f 01010101 ....G...?.......
0203d8e0 01010102 04040102 01010101 01020102 ................
0203d8f0 01020101 01290102 02010102 01010101 ......).........
0203d900 02012929 012b2b01 02010101 01010201 ))...++.........
0203d910 02010201 02010101 29292801 29292929 .........())))))
0203d920 2b010201 2b010201 02010201 01010101 ...+...+........
0203d930 0201765c 04414101 02010404 02010101 \v...AA.........
0203d940 01020101 01020201 01020129 01020186 ........).......
0203d950 01020102 01010102 012b0102 2b2b0102 ..........+...++
0203d960 0102012c 01020125 01020125 02010102 ,...%...%.......
0203d970 2e250102 2c2d2d2e e6e6cccc 014eeded ..%..--,......N.
0203d980 01020102 01010101 02010201 02010101 ................


So.. according to the tutorial, the graphic should be getting loaded from ¿01020102?

This is where I start getting lost and I really don't know what to do with that information.
And even if I got the right address, I don't think there is a proper tool to exact from the offset for this game, because every single one of them I've tried failed :(
At least I didn't find one...

Now, let's talk about text:
As far as I know, text is often compressed and you can't edit it from the get-go, you need a TABLE so the hexadecimal editor can interpret where the actual text is and allow for easier and more comfortable edition.

I don't have any for this game (there is some buu's fury documentation here, including a table, but I couldn't get it to work), so sad times all around.
Apparently the most common way to build a table is looking up the first sentence in the game, and using relative search.

Okay then.
The first textbox sentence in the game is:
"Previously in DRAGON BALL Z: LEGACY OF GOKU 2..."

I tried using Monkey-moore, crystaltile2 and more engines to do a relative search using short and keywords from that sentence (for exaple BALL, DRAGON and whatnot) and didn't find anything.

Maybe it has to do with the way the game stores text, at least uncompressed one. It's my only clue of why I can't find anything.
You see, the game stores text using 2 bytes for any character.
1 byte for the character, and 1 byte to store "00". Maybe japanese characters required 2 bytes to store and that's what this game's translators used as a workaround?

E.v.e.r.y. .s.e.n.t.e.n.c.e. .l.o.o.k.s. .l.i.k.e. . t.h.i.s...O.k.?.



Maybe this format is what keeps me from doing the relative search? It's a total pain in the ass because I assume whenever I get the text table it's a matter of using it, recalculate pointers if any sentence grows shorter/larger, and that's about it.

I totally tried using monkey moore's wildcard property to look up *D*R*A*G*O*N* for example, but no luck.


So, this is a summary of my issues and everything I've tried so far. Any ideas, suggestion, or documentation will be GREATLY appreciated.

Sorry once again for the massive amounts of text but I think it's better for everybody to explain as much as possible to avoid fruitless conversation about things that have already been covered.

Thanks in advance to whoever has the bravery to come here and try to lend me a hand :laugh:

superjill

I am not sure this could help or not
I tried to translate this game into Chinese as well, but I gave up as I don't know anything about debug or programming at all
I knew the text is compressed, then I used the memory viewer to look for some text in the game, I found some texts which I could not find directly in the ROM
I dumped the whole memory, I could find couple addresses with a few text, and they are all the same sentences, which could not be found in the ROM
For example, when you stop at the first sentence, you can get a bundle text at 02164C10
When you scroll down, you can see the same bundle 02664C10, but they are not all the text of this game.
If the scene change, the text would also change in different address, but very close to the previous one

This is the only thing I can find out myself, I wish it helps

shinichi999

Did you manage to solve these problems after all this time? I'm trying to translate this game into Spanish and I'm having the EXACT issues and problems... this game is crazy!

I made a table but I can only see the main text of the menus and nothing else:



And the table is:

00=
21=!
22="
24=$
27='
41=A
42=B
43=C
44=D
45=E
46=F
47=G
48=H
49=I
4A=J
4B=K
4C=L
4D=M
4E=N
4F=O
50=P
51=Q
52=R
53=S
54=T
55=U
56=V
57=W
58=X
59=Y
5A=Z
5B=[
5C=\
5D=]
5E=^
5F=_
60=`
61=a
62=b
63=c
64=d
65=e
66=f
67=g
68=h
69=i
6A=j
6B=k
6C=l
6D=m
6E=n
6F=o
70=p
71=q
72=r
73=s
74=t
75=u
76=v
77=w
78=x
79=y
7A=z


Does anybody have any idea about how the compressed text works? I'm really into translating this videogame into Spanish! I want it so bad!

I'm begging for any useful information  :'(

Solid One

Some years ago, I remember trying to find any texts in both DBZ Legacy of Goku 2 and 3. On LoG2, I could find some texts, but not others. I heard somewhere the scripts are partly compressed somehow, so you gotta uncompress them before trying to edit them. On LoG3 (Buu's Fury) it's the same, except there's the possibility that there's more text compressed than uncompressed.

Anyway, you're trying to translate Buu's Fury to spanish, right? What about the european version of those games? I know that at least LoG2 has an official spanish translation, and probably the same applies to LoG3. Try the european rom instead of the US one (assuming you're in fact using the US version). If there's already an official translation, then I guess there's no need to retranslate it.

shinichi999

Quote from: Solid One on November 20, 2019, 06:19:10 AM
Some years ago, I remember trying to find any texts in both DBZ Legacy of Goku 2 and 3. On LoG2, I could find some texts, but not others. I heard somewhere the scripts are partly compressed somehow, so you gotta uncompress them before trying to edit them. On LoG3 (Buu's Fury) it's the same, except there's the possibility that there's more text compressed than uncompressed.

Anyway, you're trying to translate Buu's Fury to spanish, right? What about the european version of those games? I know that at least LoG2 has an official spanish translation, and probably the same applies to LoG3. Try the european rom instead of the US one (assuming you're in fact using the US version). If there's already an official translation, then I guess there's no need to retranslate it.

This game didn't have an EUR version (only Legacy of Goku 1 and 2), so of course there is no Spanish translation (if there were one, I wouldn't do this  ;D)

I'm still stuck  :(

BaiduMe

If this is still relevant - the game uses the JCALG1 compression algorithm. I made a table on this game's DataCrystal pointing to all the offsets where you can find the text. Once you find it just decompress it, edit what you want and compress it back.

shinichi999

Quote from: BaiduMe on April 28, 2020, 10:50:49 AM
If this is still relevant - the game uses the JCALG1 compression algorithm. I made a table on this game's DataCrystal pointing to all the offsets where you can find the text. Once you find it just decompress it, edit what you want and compress it back.

Awesome! Yep, it is still relevant! Could you please share it with me?

BaiduMe

Quote from: shinichi999 on April 28, 2020, 11:26:02 AM
Awesome! Yep, it is still relevant! Could you please share it with me?

You can find some information here: http://datacrystal.romhacking.net/wiki/Dragon_Ball_Z:_Buu%27s_Fury:ROM_map.

You're also encouraged to add your own, and expand the knowledge-base.

CTM Softwares

Quote from: BaiduMe on April 28, 2020, 10:50:49 AMIf this is still relevant - the game uses the JCALG1 compression algorithm. I made a table on this game's DataCrystal pointing to all the offsets where you can find the text. Once you find it just decompress it, edit what you want and compress it back.
What program are you using?

KingMike

Please do not bump a two year old thread. I see you have already made a thread about this game, use that to ask more questions.
"My watch says 30 chickens" Google, 2018