Translating Japanese GBA demo game

Started by Jaz, March 21, 2021, 08:29:38 PM

Previous topic - Next topic

Jaz

I found a somewhat obscure GBA Japanese demo game and I'm working on translating it.

It took a while but I made a table for the in-game dialogue and when the dialogue is on the screen I can see the text in the video ram, but I can't find where it is located in the rom. Is the text stored differently in the rom? Translating will be relatively easy once I can get to the text, there's maybe 30 lines of dialogue so I think it's doable.

I don't even know the name of the demo, sorry if it seems vague. If anyone has encountered this before please give me guidance. This is a huge learning curve for me but I'm willing to put in the work!

(I moved the post, was originally posted in the wrong section)

[Unknown]

Quote from: Jaz on March 21, 2021, 08:29:38 PM
It took a while but I made a table for the in-game dialogue and when the dialogue is on the screen I can see the text in the video ram, but I can't find where it is located in the rom. Is the text stored differently in the rom?

Most of the time, yes.  For example, it could be:

1. Compressed as an image.  This could be in a variety of algorithms, although the GBA BIOS version of LZ77.
2. Arranged as a tileset.  Might be uncompressed, but in an order that makes it hard to recognize.
3. Rendered based on text.  Often this might be in a custom encoding, i.e. 1 = A, 2 = B, 3 = C.
4. Rendered based on compressed text.  The text might in turn also use a custom encoding, after decompression.

And there can be other ways.  The above are fairly common in GBA games from what I've seen.

You said you created a table, are you referring to figuring out the custom encoding the game used (7 = A, 4 = B, 32 = C)?  Was some of the text more easily found, and you're just having trouble finding the remainder?

-[Unknown]

Jaz

Quote from: [Unknown] on March 22, 2021, 08:08:31 PM
Was some of the text more easily found, and you're just having trouble finding the remainder?

I found some English text in the rom which is plain ASCII. Using the the hex values of the character graphics I made some tables which allowed me to see the Japanese text in the video ram when displayed on the screen. But I just can't seem to figure out how to find it in the rom.

You talked about compressed text, maybe that's my next lead.

I've only ever done this with the NES before which seemed a lot easier but I'll learn.

Vehek

How did you generate this text table? Is a full alphabet visible in VRAM, or just the components of the on-screen text? Is the table consistent between different lines of dialogue?

Jaz

#4
Quote from: Vehek on March 22, 2021, 08:57:34 PM
How did you generate this text table? Is a full alphabet visible in VRAM, or just the components of the on-screen text? Is the table consistent between different lines of dialogue?

I used no$gba to view the tiles and their hex values, so I made my tables based on that. I don't really know how to find the Japanese otherwise. When there's text on the screen it shows up in vram and the tables I made makes it readable.

Looking at the rom in a hex editor the only thing I can find is what's in plain ASCII and that's the 8 or so English words in the game. My tables are useless there.

I was poking around and tried using Advance-Text but I have no idea how, and wanted to try XSE but it just won't run on my machine (Linux + Wine).

Tardis

#5
I just give it a quick try and didn't get any problems. Did you get this far?



If not, you should consider to check the basic tutorials again. :)


Try this table here. Not quite sure if everything is correct. Works for menu, shop system and also some dialogue.

Spoiler

01=
03=0
04=1
05=2
06=3
07=4
08=5
09=6
0A=7
0B=8
0C=9
0D=A
0E=B
0F=C
10=D
11=E
12=F
13=G
14=H
15=I
16=J
17=K
18=L
19=M
1A=N
1B=O
1C=P
1D=Q
1E=R
1F=S
20=T
21=U
22=V
23=W
24=X
25=Y
26=Z
27=『
28=』
29=を
2A=っ
2B=ゃ
2C=ゅ
2D=ょ
2E=あ
2F=い
30=う
31=え
32=お
33=か
34=き
35=く
36=け
37=こ
38=さ
39=し
3A=す
3B=せ
3C=そ
3D=た
3E=ち
3F=つ
40=て
41=と
42=な
43=に
44=ぬ
45=ね
46=の
47=は
48=ひ
49=ふ
4A=へ
4B=ほ
4C=ま
4D=み
4E=む
4F=め
50=も
51=や
52=ゆ
53=よ
54=ら
55=り
56=る
57=れ
58=ろ
59=わ
5A=ぎ
5B=ん
5C=ィ
5D=「
5E=ェ
5F=オ
60=ッ
61=ャ
62=ュ
63=ョ
64=゙
65=゚
66=ー
67=
68=!
69=?
6A=%
6B=/
6C=:
6D=」
6E=ア
6F=イ
70=ウ
71=エ
72=オ
73=カ
74=キ
75=ク
76=ケ
77=コ
78=サ
79=ツ
7A=ス
7B=セ
7C=ソ
7D=タ
7E=チ
7F=ツ
80=テ
81=ト
82=ナ
83=ニ
84=ヌ
85=ネ
86=ノ
87=ハ
88=ヒ
89=フ
8A=へ
8B=ホ
8C=マ
8D=ミ
8E=ム
8F=メ
90=モ
91=ヤ
92=ユ
93=ヨ
94=ラ
95=リ
96=ル
97=レ
98=ロ
99=ワ
9A=ヲ
9B=ン
9C=←
9D=→
9E=↕
9F=あ
A0=い
A1=う
A2=え
A3=お
A4="
A5=、
A6=。
A7=・
A8=♥
A9=(
AA=)
AB=ア
AC=ウ
AD=Ⅱ
AE==

[close]

FAST6191

Advance-Text is a pokemon specific tool. The GBA does not do anything that particularly makes it suited to having a dedicated text editor.

VRAM to tables is tricky on the GBA compared to some older stuff where that was more popular. It can give you hints as to the ordering (what it is in the actual table tends to be the same as the RAM order) and maybe what special characters you might have missed if it dumps a whole bunch in there at once, as well as options to do tracing for the font to see if that comes with something else (maybe width values) and tracing to go back to the text when something fetches things from it but for the GBA it is usually only going to be an extra step.

For the GBA I then almost always do relative search (hard for Japanese, though the ordering from above can give you some things to look at http://www.romhacking.net/utilities/513/ ), pointer inference*, statistical methods (though that I save more for when I have found the text and I am making the table), compression tracing**, actual tracing, corruption (if you have scanned through with a tile editor, noted what is graphics then somewhere in the rest is text, tweak parts of the ROM and if the text breaks you have your in) and a few variations on each of those.


*the GBA ROM is present in memory from 08000000 to 09FFFFFF and a few other mirrors that are rarely used, especially for text, and as 09000000 to 09FFFFFF is the upper 16 megabytes of the ROM it means pointers start with 08 almost all of the time. Find a sea of 08 values normally fairly evenly spaced (08 is a value that can also be in the pointer itself so it does not have to be exact) and usually about 4 bytes apart (can have more for things like formatting) and while it might still be pointers for other things (graphics, music, levels) then it is usually something and thus worth looking at

**the GBA BIOS has compression methods built in. Emulators can then log the calls to this and the destination in the ROM giving you an idea of where to look.

Jaz

#7
Quote from: Tardis on March 23, 2021, 05:39:59 AM
I just give it a quick try and didn't get any problems. Did you get this far?

If not, you should consider to check the basic tutorials again. :)

I have not gone this far yet! Most of my time spent so far was making the table which looking at it now, I was likely doing wrong as well.

Thank you for showing me what you've shown me now, I will work on this and see what I can come up with.

Quote from: FAST6191 on March 23, 2021, 08:25:50 AM
For the GBA I then almost always do relative search (hard for Japanese, though the ordering from above can give you some things to look at http://www.romhacking.net/utilities/513/ ), pointer inference*, statistical methods (though that I save more for when I have found the text and I am making the table), compression tracing**, actual tracing, corruption (if you have scanned through with a tile editor, noted what is graphics then somewhere in the rest is text, tweak parts of the ROM and if the text breaks you have your in) and a few variations on each of those.

Thank you for these resources! I have a lot to learn and this helps.

With you guy's guidance I am now on my way to get this completed!

Jaz

I finished the translation! I also did some graphical improvements.
http://www.romhacking.net/translations/6037/