Fire Emblem: Ankoku Ryuu to Hikari no Tsurugi/Ken Fan Translation Problem

Started by MegaHayzer, September 05, 2015, 03:39:59 PM

Previous topic - Next topic

MegaHayzer

Hey, guys, I'm new here and what not, but after exhausting a lot of hours looking for help on this issue, I realized the only way I could get the answer I wanted was if I were to specifically ask it myself. I know there's a lot of good ROM hackers here, so I'd like to implore your expertise.

Basics about this project and me: I'm really doing this for my own personal pleasure and as a way to learn some more Japanese. This question is not related to the actual translation of the game at all. I'm translating the script, names, items, etc. by myself. I need no help here.

Now, for most of the game, I'm okay with going into the hex and altering the translations of the strings. I've already successfully translated all of the opening bios (Armor Knight, Lord, General, etc.) finagled with the opening "At first..." and the opening dialogue for the first level between Marth, Jeigan, and Sheeda. I know how to deal with these portions of the text. What I need help with are the itemized texts that are pointed to at various points in the game.

Example of my problem (and this very well illustrates the principle as a whole):
MARTH, in English, requires five characters. The Japanese, though, MA-RU-SU, takes up only three. This means when I edit it to "Marth" and try to shift Jeigan's name down by two places, "Marth" showed up for Marth, which is good, but Jeigan's name, instead of also shifting, displays "H" which is the last letter of Marth and would have held the original starting place of Jeigan's name. I know that this is related to pointers. There's a pointer somewhere that allows for three spaces for Marth's name, five for Jeigan's, etc. So I could go edit those. However, I also will not have enough space in this section of the rom to list all of the Romanizations of the names. I start writing into crucial code since the Japanese characters take much less space.

This follows through in the items. I've been forced to translate "TETSU NO TSURUGI" to "IRNSWRD" because of the lack of space. The names of the chapters themselves are less of a problem. I had to make linguistic cuts, but I have enough space for adequate names.

What I want to know is how I can nullify this section of the rom and use the free space in the rom (there's a ton of FF's errywhere) to make a new table that gets pointed to at every occurrence of these names/items/places/etc.

I'm pretty sure it's possible since I know the pointers cause the problem. And I know they can be edited. But I need someone to kind of explain how I can do this without breaking the rom.

Thank you much!
"There are 10 types of people in this word: those who can read binary and those who can't."

mz

If you already found a table of pointers... Just put the text wherever you want and then edit the pointers so they point to that new position.

Pointers don't say how long a string is, but where that string starts from. You could put that string anywhere else with an infinite amount of free bytes and then that string could be infinite.

Depending on the system you're working on and on how the game was originally programmed, you might need to convert pointers from 16 bits to 24 bits and that kind of stuff if you need to move text around different banks, expand the ROM, etc.

So, what system is this for? Have you found any pointers to edit yet?
There has to be a better life.

MegaHayzer

Quote from: mz on September 05, 2015, 05:30:49 PM
If you already found a table of pointers... Just put the text wherever you want and then edit the pointers so they point to that new position.

I think I've found it. The "names" table for all the characters starts at $3DEA5. That would mean the edited address would be $3DE95, so the pointer string would be 95 DE, right? I was told this is how NES pointers work. Honestly, I'm a little confused on pointers since most docs I've read regarding the NES' pointers almost talk in circles. Will a pointer be in the part with the actual names or up above somewhere in a group of other pointers?

Quote from: mzPointers don't say how long a string is, but where that string starts from. You could put that string anywhere else with an infinite amount of free bytes and then that string could be infinite.

I did not know this. That's good to know.

Quote from: mzDepending on the system you're working on and on how the game was originally programmed, you might need to convert pointers from 16 bits to 24 bits and that kind of stuff if you need to move text around different banks, expand the ROM, etc.

I'm trying to avoid expanding the ROM since there's a lot of free space in there already. And I've heard of bank switching, but I've never really looked into it much.

EDIT: I've found the pointers. And after testing some stuff, I think I may have gotten it to work. We'll see though. Thanks for your help. :)
"There are 10 types of people in this word: those who can read binary and those who can't."

Pennywise

As a general rule of thumb, you need about twice as much space to fit an English script back into a Japanese game. That's when ROM expansion and bank switching come in handy on the NES. That said, such techniques can't be pulled off by someone new to the hobby. Understanding of the hardware and assembly are a necessity and without them any such endeavor is a waste of time. If you'd like to learn about the NES, I would suggest checking out the wiki on NESDev. Most of the documents for the NES are outdated and potentially misleading.

AFAIK, Fire Emblem does have a fair bit of free space in the ROM, especially in the fixed bank, which makes it an ideal project. However, the space isn't nowhere near large enough to accommodate the script overflow and is more suitable as a place to put code hacks instead.

BlackDog61

Have you checked if the game supports ASCII? (That's probably wishful thinking, but better try and be sure, right?)
Are you going to edit everything with a hex editor? If so i'dreally recommend using a tool instead. All that you have described so far seems compatible with cartographer+atlas. (Just trying to make your life easier for edits.)