+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Expanding the script
Pages: [1] 2
Poll
Question:
Total Voters:

Author Topic: Expanding the script  (Read 1 times)
Arcadia453
Guest
« on: January 17, 2011, 02:39:11 am »

I'm trying to translate the game Magi Nation for the GBA from Japanese to English. I was very disappointed that it never came out in English, so I'm definitely dedicated to this one.

There's two ways I think I might be able to do it...
In hex I can actually see the English script, but I can't figure out how to switch from the Japanese one to the English one. How could I do that?
I've managed to make the Japanese script show English characters, but the problem is that it's too short for what I want to replace it with. I try to push everything back, but the text always starts in the same place, and I can't figure out where it's coming from. How can I fix that?

Thanks
Ryusui
Guest
« Reply #1 on: January 17, 2011, 05:05:00 am »

Quote from: Arcadia453 on January 17, 2011, 02:39:11 am
In hex I can actually see the English script, but I can't figure out how to switch from the Japanese one to the English one. How could I do that?
I've managed to make the Japanese script show English characters, but the problem is that it's too short for what I want to replace it with. I try to push everything back, but the text always starts in the same place, and I can't figure out where it's coming from. How can I fix that?

The answers to both your questions are in the same place.

This is first-timer stuff: what you're asking about is pointers. Usually, they're all gathered up together in one big table. Each pointer is a hex address indicating the start of a different string in the game's script. For a GBA game, finding them should be a simple matter of hex searching the address where one of the strings starts. GBA ROM addresses are offset by $08000000; i.e., if you're looking for a pointer to $158BA, it'll actually be $080158BA - and little-endian to boot (so it'll be stored as BA 58 01 08).

You can change 'em manually, but that's a one-way ticket to the crazy bin. Instead, you'll use a tool like Cartographer to dump the ROM, then format it so you can use a tool like Atlas to reinsert the script and modify the pointers as necessary. Do it right and the only hard part will be translation. :3
Normmatt
Guest
« Reply #2 on: January 17, 2011, 06:35:52 am »

Quote from: Ryusui on January 17, 2011, 05:05:00 am
Quote from: Arcadia453 on January 17, 2011, 02:39:11 am
In hex I can actually see the English script, but I can't figure out how to switch from the Japanese one to the English one. How could I do that?
I've managed to make the Japanese script show English characters, but the problem is that it's too short for what I want to replace it with. I try to push everything back, but the text always starts in the same place, and I can't figure out where it's coming from. How can I fix that?

The answers to both your questions are in the same place.

This is first-timer stuff: what you're asking about is pointers. Usually, they're all gathered up together in one big table. Each pointer is a hex address indicating the start of a different string in the game's script. For a GBA game, finding them should be a simple matter of hex searching the address where one of the strings starts. GBA ROM addresses are offset by $08000000; i.e., if you're looking for a pointer to $158BA, it'll actually be $080158BA - and little-endian to boot (so it'll be stored as BA 58 01 08).

You can change 'em manually, but that's a one-way ticket to the crazy bin. Instead, you'll use a tool like Cartographer to dump the ROM, then format it so you can use a tool like Atlas to reinsert the script and modify the pointers as necessary. Do it right and the only hard part will be translation. :3

The translation is already in the game so the only hard part is dumping the japanese and english and replacing the japanese. Or better yet change the pointer to the japanese pointer table to the pointer to the english pointer table.
syntax error
Guest
« Reply #3 on: January 17, 2011, 02:57:43 pm »

"I'm trying to translate the game Magi Nation for the GBA from Japanese to English. I was very disappointed that it never came out in English"

Magi-Nation is available on GBC in English
Ryusui
Guest
« Reply #4 on: January 17, 2011, 03:21:52 pm »

We're talking the GBA version, though.

So yeah. If there's already an English script in there, and it corresponds exactly with the Japanese script, all you have to do is dig up the pointer table and make it point to the English strings instead of the Japanese ones. Fun times.
Arcadia453
Guest
« Reply #5 on: January 17, 2011, 08:30:04 pm »

I tried looking for pointers, but I had trouble finding specific ones. Maybe I was doing it wrong. Is there usually one pointer at the beginning of the script, or are there several throughout?

Thanks again
Ryusui
Guest
« Reply #6 on: January 17, 2011, 08:42:35 pm »

Pointers will usually be in one big block - that is, there will be a "pointer table" somewhere in the ROM consisting of pointers to all the game's strings in sequence. It may be near the script, but it doesn't have to be.
DeGamer
Guest
« Reply #7 on: January 17, 2011, 11:44:40 pm »

Wow, you are so lucky. The game you want to translate not only has an English version out on another system, but the version you want to hack has an English script in it already! Damn boy, I need your favorite numbers so I can go play the lottery.  Tongue

They obviously planned an English release but it got canned. I feel your pain Arcadia453. So many games this has happened to, including mine.  Sad

I wonder though....perhaps your game has a pointer to a region (or script pointer)? Region, meaning country. If it does, all you have to do is find that single pointer and mess with the values until it changes the script to English. Resident Evil 2 for the PS1 was like this where it had both Japanese and English scripts. All I did was change 2 bytes and bam! I could switch from Japanese to English and vice versa without having to modify the script or its dialog pointers. This type of pointer can be a bitch to find though (at least for me it was). The only other game I found one like it was in X-men vs Street Fighter for the Saturn.


Ryusui:
Do you know if Cartographer has a command like #BASE POINTER to subtract a value instead of adding? I need to do that for the game I'm working on and if it doesn't, it looks like I'll be on my way to the crazy bin. I don't see such a command in the readme, which tells me there isn't one but I wanted ask to make sure.

Quote from: Ryusui on January 17, 2011, 08:42:35 pm
It may be near the script, but it doesn't have to be.

You can say that again. the game I'm working one has pointers scattered in various ways. Some are underneath the text block (easy), some can be found by comparing the location of the text in the game and a save state and finding the difference in memory (not too hard), and some have pointers nowhere near the dialog or text block and are stored in a different format and require a different calculation (pain in the ass).
Normmatt
Guest
« Reply #8 on: January 18, 2011, 12:57:52 am »

Quote from: DeGamer on January 17, 2011, 11:44:40 pm
Wow, you are so lucky. The game you want to translate not only has an English version out on another system, but the version you want to hack has an English script in it already! Damn boy, I need your favorite numbers so I can go play the lottery.  Tongue

They obviously planned an English release but it got canned. I feel your pain Arcadia453. So many games this has happened to, including mine.  Sad

I wonder though....perhaps your game has a pointer to a region (or script pointer)? Region, meaning country. If it does, all you have to do is find that single pointer and mess with the values until it changes the script to English. Resident Evil 2 for the PS1 was like this where it had both Japanese and English scripts. All I did was change 2 bytes and bam! I could switch from Japanese to English and vice versa without having to modify the script or its dialog pointers. This type of pointer can be a bitch to find though (at least for me it was). The only other game I found one like it was in X-men vs Street Fighter for the Saturn.


Ryusui:
Do you know if Cartographer has a command like #BASE POINTER to subtract a value instead of adding? I need to do that for the game I'm working on and if it doesn't, it looks like I'll be on my way to the crazy bin. I don't see such a command in the readme, which tells me there isn't one but I wanted ask to make sure.

Quote from: Ryusui on January 17, 2011, 08:42:35 pm
It may be near the script, but it doesn't have to be.

You can say that again. the game I'm working one has pointers scattered in various ways. Some are underneath the text block (easy), some can be found by comparing the location of the text in the game and a save state and finding the difference in memory (not too hard), and some have pointers nowhere near the dialog or text block and are stored in a different format and require a different calculation (pain in the ass).

Too work with GBA pointers in Cartographer i used "#BASE POINTER:\t\t$F8000000" as a minus 0x08000000
DeGamer
Guest
« Reply #9 on: January 18, 2011, 02:34:32 pm »

So you're saying, for example, if I want to subtract 4000h, I put in $F0004000 and this works for you?
RedComet
Guest
« Reply #10 on: January 18, 2011, 03:23:53 pm »

Just put -$4000. The sample command files demonstrate this ability. Roll Eyes
Ryusui
Guest
« Reply #11 on: January 18, 2011, 03:37:39 pm »

Yeah, I've never had trouble just putting down a minus sign.
DeGamer
Guest
« Reply #12 on: January 18, 2011, 04:24:04 pm »

Quote from: RedComet on January 18, 2011, 03:23:53 pm
Just put -$4000. The sample command files demonstrate this ability. Roll Eyes
&
Quote from: Ryusui on January 18, 2011, 03:37:39 pm
Yeah, I've never had trouble just putting down a minus sign.

I'll have to try that out now. Thank you for saving me going to the bin. Wink

Hmm.... I looked at the sample commands and that's not included with what I have. It's not mentioned in the read me either. It mentions the #BASE POINTER command with adding a value and nothing else. :huh:

Did you release a newer version or something with some added examples? I have PR3. I triple checked the files with the Cartographer I have and I don't see this ability demonstrated anywhere. I read them entirely. I didn't want to thrown in extras in the commands that were not mentioned, thus messing up the output.

« Last Edit: January 18, 2011, 04:43:59 pm by DeGamer »
Ryusui
Guest
« Reply #13 on: January 18, 2011, 09:07:35 pm »

Just make a copy of the ROM and test to see if negative offsets work properly.
Normmatt
Guest
« Reply #14 on: January 19, 2011, 01:38:24 am »

Quote from: RedComet on January 18, 2011, 03:23:53 pm
Just put -$4000. The sample command files demonstrate this ability. Roll Eyes

Not in the current build in the Utilities section its not. Using minus in that version didn't work for me either hence my ugly work around.
Pages: [1] 2  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC