ROM Hack Noob Question about text editing/translations

RemyK313

New Member
OP
Newbie
Joined
Feb 1, 2008
Messages
1
Trophies
0
XP
42
Country
United States
I've scoured the forums a bit, and searched through the ROM hacking 101 pdf.
I've never done any bit of rom hacking, but I've been programming for close to a decade now.
That is to say, I'm fairly comfortable with ARM, a bit of hex and all that.....
In other words, I'm not coming onto the forums, and demanding a port of x game to the DS.

So, I just wanted to ask for a few clarifications :
1.) What hex editor do people typically use for translations?
2.) How would I be able to tell what character encoding-system a game is using.
(For instance, how can I tell if they're using unicode, ascii or shift jis or something else?)
3.) What steps do people typically take in a translation? I mean, is there any specific way people are doing these things, or do people just throw a rom into a hex editor and just scour through it until they hit a part that looks like a series of text sections?

I'm interested in throwing my hand at a translation, but since the search feature's been disable, it's a bit hard for me to get any info on this...

I'm thinking it can't be all that bad. I mean, is it as simple as finding the text sections, and replacing them with English equivalents? Or are there some kind of hardware limits that make that difficult?

I'm interested in translating Houkago Shonen, which is an adventure game, and from what I've seen, it seems to be a fairly standard one at that. That is to say, seeing as it would have a lot of text in the form of spoken dialogue, it looks like there would just be large data sections corresponding to the game's text strings.

However, I'm miserably new to this, so I don't know. That's why I'm asking you guys.

I figure if someone can point me in the right direction, at least help me getting to the point where I could be replacing text, I could pop SOMETHING out. However, if there's a ton of things I completely overlooked, that's fine, too (that's why I'm a noob, right?), I just wanted to know some info on this, see if it would be viable (on my schedule) to do something like that.
 
D

Deleted User

Guest
1) hexdump to dump the data, and some script to dump using a special encoding scheme (like sjis). I never insert data with an hex editor and consider it a very bad thing to do. Keeping track of everything you've changed is tedious and overall it's a very limited technique for editing nds roms.
2) by looking trough the files used by the game. First thing to do : dump massively the rom as a sjis encoded string and replace everything that is not a sjis character with the empty string, this way you can directly see if you have a good amount of sjis text. Do the same for utf-8 (very unlikely in ds rom), ect... But the rule of thumb is "Is it sjis ?" if it is it's quite good, otherwise you've got a lot more work to do.
3) Here the method I use, which is quite different from the usual one you'll get my reading tutorial.
Step 1: extract the data in the rom
Step 2: look trough the name of files to see if there is some obvious naming, like story.pack, ect...
Step 3: Text will always be packed in an array like file with some header. So the first thing to do is to write script to extract these packs
Step 4: When you've found the pack format, use it to reconstruct the rom
Step 5: When you've a good set of script and have made translation you can release some patch

Of course it's the easiest case, and usually there's more work to do. For example in FFTA2 : one big archive without direct naming, instead some hash function to convert filename into an integer that is used to access the file in the archive. Then each table is packed with a text using two tables encoding : one global to the game and one specific to each table. To work it out, of course I've not done it like this. It was more : extracting unknown chunk of data from the archive, getting the global table by using character naming and saves, then locating the text tables. after some time I've reversed the hash function in the arm9 binary and then I could access a lot more data, like the story that was packed quite differently.
For Jump ultimate stars, it's a lot of packed tables of text in SJIS. So it was simple.... except that a lot of text was missing and was in fact located in another archive file format. So I have to have several layers of extraction and reconstruction.
The rule is : every game is different and define its own little world of romhacking. But it's the main reason why it's interesting and not boring...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
1) I have about 9 hex editors, listed here:
http://gbatemp.net/index.php?showtopic=695...ndpost&p=928455

2) DS roms have a file system (GBA and earlier tend to be one long binary as everything was mapped to the memory (give or take a bank or three)). This means you can usually guess what files are text (see deufeufeu's explanation).
Failing that it is brute force time. Text is usually small compared to graphics so you can discern what is what that way and then run it in a cart/on an emulator.

I work differently to deufeufeu in that I (ab)use existing tools (mainly a spreadsheet, a hex editor that can do tables and my hex editors search and replace function) to get the job done rather than make my own from scratch. I usually open in a hex editor and it is then obvious if it is unicode, ASCII or shiftJIS ( http://www.rikai.com/library/kanjitables/k...odes.sjis.shtml kana are mainly 82XX or 83XX). If that is the case then life is good. If not then we have some work.

Relative text: c follows b which follows a etc. There are tools able to do this if you feed it a phrase. Most are 8 bit only though and I have noticed most DS roms use 16 bit encoding (even if the first 8 bits are just 00).

Some roms (here is Final Fantasy 6 for the SNES aka FF3US: http://www.romhacks.net/tutorial/files/ff3_table.tbl ) are a bit more complex as developers saw fit to tweak their code to make life harder.
Such things include variables, dual/multi tile encoding (the example above has 02=TERRA ). Other times games can have many tables (normally one for menus, ingame, cutscenes..... but do not count on it).

Now we have the wonder that is pointers to stop text being on other lines/sentences. Most DS roms use them (as opposed to fixed length or parsed text) and I wrote up some here:
http://gbatemp.net/index.php?showtopic=73394

Here is a simple text tweak I did for Rune Factory 2:
http://gbatemp.net/index.php?showtopic=701...ndpost&p=921501

As for the search function GBATemp allows bots to crawl the forum so adding site:gbatemp.net to a search tends to work.
 

sususu

New Member
Newbie
Joined
Jan 30, 2008
Messages
1
Trophies
0
XP
1
Country
United States
Are the data files encrypted in all NDS games? Do they have any common and/or known decryption methods?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Push it :creep:
  • Veho @ Veho:
    Talk about propaganda.
  • Veho @ Veho:
    Illinois is working to ban toxic food additives that have been banned for decades in other countries; additives that can be replaced and all those countries still have Skittles and Mountain Dew. Title of the piece: GUBMINT WANTS TO TAKE AWAY YOUR CANDY
  • Veho @ Veho:
    Gee, I wonder if the author is biased?
  • SylverReZ @ SylverReZ:
    @Veho, Sounds and smells like bullshit. They don't give you cancer, and California should know that. I don't get why they stick labels that say "may or may not cause reproductive harm or cancer".
  • Veho @ Veho:
    Arsenic doesn't give you cancer either.
    +2
  • Veho @ Veho:
    California has already banned those additives BTW.
    +2
  • Veho @ Veho:
    Psi has been banned in the state of California.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I am the cancer!!! lol
  • Psionic Roshambo @ Psionic Roshambo:
    Yayyy got arcade games on the Pi working lol
  • Veho @ Veho:
    Cool.
  • Psionic Roshambo @ Psionic Roshambo:
    Now to spend 6 months deleting all the garbage lol
  • Psionic Roshambo @ Psionic Roshambo:
    Mame should be two sets one for preservation of everything and one set for people who just want to play and enjoy the old old ganes
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Shouldn't preservation be legal tho?
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, I always see this dude's shorts, he sounds pretty annoying.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Preservation yeah it absolutely should be legal
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Believe Japan was going to make it legal at some point, according to a Kotaku story.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I swear like 99% of arcade games wouldn't even exist these days outside of MAME the arcade machines are old and busted very few ever saw any sort of home conversion
  • Psionic Roshambo @ Psionic Roshambo:
    We get 37 versions of Super Mario Bros but 0 of Beast Busters
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, There's a lot of obscure Japanese arcade titles that are either lost to time or dumped.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's so unfair, maybe AI can save us lol
  • Psionic Roshambo @ Psionic Roshambo:
    I mean if a company could use AI to do the work of a home conversion for essentially free why not? The rights for some games are completely lost though
    Psionic Roshambo @ Psionic Roshambo: I mean if a company could use AI to do the work of a home conversion for essentially free why...