News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Translating Pokémon Fire Red  (Read 21646 times)

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Translating Pokémon Fire Red
« on: January 15, 2012, 03:47:49 pm »
Hey,
I'm currently using Scizz's Advance-text program (found here: http://www.romhacking.net/utilities/427/) to translate Pokémon fire red into Finnish, but I've noticed that with this program you can only translate dialogue. Everything else (attack names, item names, item descriptions, battle commands, pokédex data, almost everything in the start menu, etc.) is totally untouchable. I'd like to aim for a 100% translation, so does anyone have any ideas for how to translate the other things that can't be edited with this program? Is there another program out there that I can use, or is there perhaps someway for me myself to hack the game and edit the text manually?

Advice? Anyone?

Kiyoshi Aman

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 2261
  • Browncoat Captain
    • View Profile
    • Aerdan's Blog
Re: Translating Pokémon Fire Red
« Reply #1 on: January 15, 2012, 04:15:37 pm »
The Pokémon Advance games use compressed strings; Advance Text only knows about the strings it has pointers to, so all you have to do is find the pointers for the other strings and plug them into the .ini file for Fire Red and you should be able to move on.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #2 on: January 16, 2012, 11:40:49 pm »
The Pokémon Advance games use compressed strings; Advance Text only knows about the strings it has pointers to, so all you have to do is find the pointers for the other strings and plug them into the .ini file for Fire Red and you should be able to move on.

How do I find these pointers though? I honestly wouldn't even know where to start...

IIMarckus

  • Jr. Member
  • **
  • Posts: 68
  • Something terrible has happened here!
    • View Profile
    • IIMarckus’s homepage
Re: Translating Pokémon Fire Red
« Reply #3 on: January 17, 2012, 02:45:31 am »
The Pokémon Advance games use compressed strings
Uh, you sure? My memory is that they just use a non‐ASCII character set.

Kiyoshi Aman

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 2261
  • Browncoat Captain
    • View Profile
    • Aerdan's Blog
Re: Translating Pokémon Fire Red
« Reply #4 on: January 17, 2012, 04:16:55 am »
How do I find these pointers though? I honestly wouldn't even know where to start...

Use Advance Text's string-search feature; if you know what you're looking for, you'll find ALL the things (eventually).

Uh, you sure? My memory is that they just use a non‐ASCII character set.

I could be wrong, but I do know the strings are self-length-limited.

Darkdata

  • Full Member
  • ***
  • Posts: 121
  • People who hurt others to feel better are idiots.
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #5 on: January 18, 2012, 12:12:00 pm »
The Pokemon games use uncompressed strings. And they are easy to repoint and work with.

Here is a table file:
Code: [Select]
[Table]
00=
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Œ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=œ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[pk]
54=[mn]
55=[po]
56=[ké]
57=[bl]
58=[oc]
59=[k]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[U]
7A=[D]
7B=[L]
7C=[R]
85=<
86=>
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=...
B1=«
B2=»
B3='
B4='
B5=|m|
B6=|f|
B7=$
B8=,
B9=*
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=|>|
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=|A|
F8=|V|
F9=|<|
FA=|nb|
FB=|nb2|
FC=|FC|
FD=|FD|
FE=|br|
FF=|end|

If you load this, you should be able to see any string you search for. To repoint a string, say this guy:


First, search for his string in a hex editor, I use WINDHEX, so I can load a table and search in ASCII characters directly. When I look for it, I find it at 0x17d80d

Now, saw there was not enough room for this string, first I need to find the pointer to it, to do that, you take the bytes, and reverse the order. So 0x17d80d -> [17] [D8] [0D] becomes [0d] [d8] [17], we then add an [08] to the end.

So, [0d] [d8] [17] [08] (0DD81708) is what we search for! After searching, we find it at 0x165831. Keep note of this.

Now, we just need to find some free space. There's about 3MB of free space floating around for anyone to use, just look around 0x800000. So i'll just use that.

So, I insert/write my new text into that slot.

Now, we just convert 0x800000 into a pointer the same way we did the old text: [80] [00] [00] -> [00] [00] [80] [08] adding [08] to the end like normal.

Now we go back to the first text pointer we found: 0DD81708 at 0x165831, remember? and replace that pointer (0DD81708) with our new one (00008008).



FE=|br|, is the first linebreak you make, then you use FB=|nb2|, for each line after in the same box. To make a new box appear, you use FA=|nb|. Always have a [FF] at the end to terminate the string.

Miksy91

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #6 on: January 20, 2012, 01:34:43 pm »
Linked your post to my signature so that hopefully some people in PC will also notice how easily text can be edited without A-text.

That was a very informative post btw, thumbs up for that !
Pokemon Dark Energy is a rom hack based on Pokemon Silver. Like most pokemon hacks, it retains the pokemon stylish gameplay but has plenty of elements from other RPGs as well. You'd better check it out!

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #7 on: February 16, 2012, 11:18:35 am »
Now, we just need to find some free space. There's about 3MB of free space floating around for anyone to use, just look around 0x800000. So i'll just use that.

So, I insert/write my new text into that slot.

Now, we just convert 0x800000 into a pointer the same way we did the old text: [80] [00] [00] -> [00] [00] [80] [08] adding [08] to the end like normal.

Now we go back to the first text pointer we found: 0DD81708 at 0x165831, remember? and replace that pointer (0DD81708) with our new one (00008008).

FE=|br|, is the first linebreak you make, then you use FB=|nb2|, for each line after in the same box. To make a new box appear, you use FA=|nb|. Always have a [FF] at the end to terminate the string.

I'm bumping this in hopes that maybe someone can help me with this part. I can't figure out how to insert text into an new/empty slot (like 0x800000) and also cannot figure out how to replace a pointer (like 0DD81708) with a new one (like 00008008)? Help?

Miksy91

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #8 on: February 16, 2012, 03:21:20 pm »
I'm bumping this in hopes that maybe someone can help me with this part. I can't figure out how to insert text into an new/empty slot (like 0x800000) and also cannot figure out how to replace a pointer (like 0DD81708) with a new one (like 00008008)? Help?
Uhh...what's the problem you're having with that ?
You simply go to any area in the rom where there is free space (marked with FF, FF, ..., FF in Firered), put your text there and "calculate" (not much of a job for a GBA game) the pointer to that offset and make a script that uses a command that locates text from that offsets.
Pokemon Dark Energy is a rom hack based on Pokemon Silver. Like most pokemon hacks, it retains the pokemon stylish gameplay but has plenty of elements from other RPGs as well. You'd better check it out!

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #9 on: February 16, 2012, 11:42:54 pm »
make a script that uses a command that locates text from that offsets.

I don't know how to do this.. :\
I'm also not able to "put" text anywhere, at least not by typing it directly (either by typing the word with ascii characters or by typing out the code for each symbol, e.g. BB for A, BC for B, etc.)
Sorry, I'm totally new to all of this.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Translating Pokémon Fire Red
« Reply #10 on: February 17, 2012, 12:21:49 am »
Okay. Remember what we discussed in the other topic, about dumping scripts? We're talking about reinserting them. You're going to edit the text in the files you've dumped, and you're going to reinsert the changed text into the game.

The nice thing about GBA games is that you don't have to worry about pesky things like bank pointers. Just change the #JMP address to point to somewhere in the ROM where you have a lot of free space; that's where your script resides now. Then you can use Atlas to reinsert the script into the game.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #11 on: February 17, 2012, 05:38:43 pm »
Okay. Remember what we discussed in the other topic, about dumping scripts? We're talking about reinserting them. You're going to edit the text in the files you've dumped, and you're going to reinsert the changed text into the game.

The nice thing about GBA games is that you don't have to worry about pesky things like bank pointers. Just change the #JMP address to point to somewhere in the ROM where you have a lot of free space; that's where your script resides now. Then you can use Atlas to reinsert the script into the game.

Ah, I see! I don't think this will help with the trainer names though because I still have to figure out how to actually dump them first.

In the mean time, can anyone tell me why I'm getting this error message in cartographer:



?

I'm using the table that Darkdata posted above (scroll up). Is something missing from it? Oh, and this is my .bat file:

Code: [Select]
cartographer firered.GBA frcommands.txt firered_script -m

pause

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Translating Pokémon Fire Red
« Reply #12 on: February 18, 2012, 02:07:51 am »
Incredibly, a Google search for that error code and its accompanying message suggests that there's some kind of software screwup on your computer. O_O

Try searching for "R6002 fix" yourself.
In the event of a firestorm, the salad bar will remain open.

Miksy91

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #13 on: February 18, 2012, 08:57:44 am »
And we've got another Finnish hacker on board ;)
Pokemon Dark Energy is a rom hack based on Pokemon Silver. Like most pokemon hacks, it retains the pokemon stylish gameplay but has plenty of elements from other RPGs as well. You'd better check it out!

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #14 on: February 19, 2012, 12:13:48 pm »
Ok I fixed that R6002 problem. For some reason there was something wrong with Darkdata's table, because all I had to do was switch back to the table I was using previously and cartographer started working again.

(moving question to other thread)
« Last Edit: February 22, 2012, 04:59:25 pm by paranvoi »

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Translating Pokémon Fire Red
« Reply #15 on: February 28, 2012, 10:39:16 am »
Yes! I got the trainer names and some menu text to dump using the raw method. I have a problem though. Here's what I wound up with:

Code: [Select]
//GAME NAME: Pokemon - Fire Red.GBA

//BLOCK #007 NAME: menu_pok(raw)
//Block Range: $1B7CC1 - $1B7E14

////HPEND[LINE]
//. <$F9><$13>EX[LINE]
//P. Poi[LINE]
//nts<$F9><$14>END[LINE]
//MOVESEND[LINE]
//ATTACK[LINE]
//END[LINE]
//SEEND[LINE]
// ATKEND[LINE]
//P. DEF[LINE]
//END[LINE]
//END[LINE]
//<$13>Level[LINE]
//<$F9><$14>END[LINE]
//EEND[LINE]
//TEMEND[LINE]
//ILITYEND[LINE]
//MONEYEND[LINE]
//MOVE T[LINE]
//YPEEND[LINE]
//TUREEND[LINE]
//D No.END[LINE]
//PPEND[LINE]
//EREND[LINE]
//URACYEND[LINE]
//FNTEND[LINE]
//EMSEND[LINE]
//Y ITEM[LINE]
//SEND[LINE]
// BALLS[LINE]
//END[LINE]
//EXEND[LINE]
//Y TIME[LINE]
//END[LINE]
//SEND[LINE]
// SPEED[LINE]
//END[LINE]
//E SCEN[LINE]
//EEND[LINE]
//LE STY[LINE]
//LEEND[LINE]
//NDEND[LINE]
//TON MO[LINE]
//DEEND[LINE]
//MEEND[LINE]
//CELEND[LINE]
//END[LINE]
// MOVEEND[LINE]
//EVOLUT[LINE]
//IONEND[LINE]
//ATUS P[LINE]
//ROBLEM[LINE]
//END[LINE]
//ONEND[LINE]
//No.END[LINE]
//NEYEND[LINE]
//DGESEND[END]


In other words some names are not only split up by lines breaks but the beginning letters of some names are missing altogether. Like here:

Code: [Select]
//ATUS P[LINE]
//ROBLEM[LINE]

That should be "STATUS PROBLEM" but the word "problem" is split by a line break after the first letter, plus the first 2 letters of "status" are missing altogether. Why did this happen, and does this mean it's not possible to edit this data? When I translate this, do I also need to split the word up by a line break just like was done with "problem"? How do I accomodate for the first 2 letters of "status"? :\

Also Ryusui said in another thread that after you've dumped a script in raw mode you need to "insert the pointers into the dumped script manually". What does this mean?