SNES Hacking for Absolute Beginners


Text Editing

Text Editing Without Any TBL Files:

This is hilariously easy. Some games will simply bare their scripts into decoded text the moment they’re loaded in HxD. As a result, relocalized name patches, typo fix patches, and most importantly retranslation/restoration (or perhaps even, for example, French->English translation) patches of these games are simple enough for anyone reading this to make.

I’ll use Demon’s Crest for an example. The first line of dialogue in the game is the following:

Open Demon’s Crest in HxD and search for “PROGRESS” using Text-string, not Hex-values.

What can we observe from this? A few things. Most notably, HxD can be reliable for spotting the alphabet portions of a game’s script. However, when looking at symbols such as the apostrophe when Alma says “I’ve” one might notice the symbols are messed up. It’s perfectly possible to edit a game’s script simply by replacing text here and making sure the amount of characters doesn’t change. This can entail script trims and using spaces when necessary.

Of course, using the above method means you will have to manually keep track of things like 02 being a line breaker, or 5B being an apostrophe in the decoded script. Is there a way to make things easier? The answer is below.

Text Editing With TBL Files:

You don’t technically need anything more than Notepad to make a TBL file, but to make life easier we’ll use Monkey-Moore here. Download Monkey-Moore, open it up, and load Demon’s Crest. Search for the word “PROGRESS” (using relative search, not value scan relative) and let’s see what pops up.

The word “PROGRESS” only shows up once in the game’s script. Click on the result and press Create Table.

Name your table file dctext.tbl, save it in the same folder as your ROM, and use the default format/encoding settings.

Before we move on, I want to spruce the TBL file up with symbols. Drag the TBL file into Notepad++ or any other program you use to write code, make a new line under Z, and start adding some symbols. We already know 02 is for line breaks, 20 is for spaces, and 5B is for apostrophes so for the purposes of this tutorial I’ll just add those.

Save your TBL file, and now let’s open up WindHex32. Press CTRL+O and open the Demon’s Crest ROM first. Then click File->Open Table File->Table #1 and load dctext.tbl. CTRL+F and search for the word “PROGRESS” once more. Your screen should look like this.

You can now easily edit things like apostrophes! Simply highlight the portion of the decoded text you wish to edit, press TAB to toggle text editing mode, and overwrite the script while taking care not to overflow it with too many characters.

What makes Monkey-Moore so powerful is the fact it works on many games which will not normally display decoded text in HxD. For example, let’s take an iconic quote from Turtles in Time.

If we search the word “bean” in HxD, nothing comes up. Yet, by searching “bean” in Monkey Moore we can find a relevant result. Repeat the steps above and suddenly, a large number of games can now have their scripts edited with ease. Monkey-Moore even works with Japanese fonts if you have the know-how.

Tertiary fonts:

Mega Man X is another game which contains an easily edited script. At least, for the UI and dialogue. However, when it comes to the maverick screens a unique approach is needed. After all, they use a different and larger font than the rest of the game.

Let’s revert Sting Chameleon’s name to his original Japanese name, Sting Chameleao. Open Mega Man X (I’m using Rev 1/NA 1.1 although I’m not sure how much this matters) in MESEN-S and reach Sting Chameleon’s screen. Then press ESC to pause the game while his name is on-screen, followed by CTRL+1 to open the tilemap viewer where the big font is visible in layer 3. You can use the password 1764 1788 8748 to skip the intro stage.

We only really need to find the LEON portion in the ROM. The top half has values of 3089 (L) 3084 (E) 308C (O) 308B (N) but we’ll only need the last 2 digits of each in this case. Therefore
3089 3084 308C 308B
becomes
89 84 8C 8B

The top half of A has a value of 3080 which is chopped down to 80. Of course, O as stated earlier goes from 308C to 8C.

We simply repeat this with the bottom half. 3099 (L) 3094 (E) 309C (O) 309B (N) is our second sequence. After the trimming
3099 3094 309C 309B
becomes
99 94 9C 9B

The bottom half of A has a value of 3090 which means we simply use 90. Again, O starts as 309C but becomes 9C.

After opening HxD be sure to load your Mega Man X ROM, press CTRL+F, and use the Hex-values tab. Search your ROM for 89848C8B and 99949C9B. Make the following replacements.

Save your ROM, load it, and make sure your name restoration process was successful.

Adding New Characters:

One last thing is that you may want to add new characters. Some (if not most) games need a new English font if you want to translate from Japanese to English. Most games will require accent insertion to achieve a French translation. I will quickly showcase how this process works.

For this segment I opened Mortal Kombat 2 in YY-CHR, scrolled down to the font, and replaced a hardly used symbol (in this case, the question mark) with the French ù.

Using the table method detailed above, you can add ù to a TBL file where the question mark used to be and see it in-game for yourself. I also replaced the A to demonstrate this.

One can also assign new characters in the ROM without replacing old ones, but this is often considerably more complicated and outside the scope of this tutorial. That said, if you want to experiment yourself? Try using the empty spots apparent in the YY-CHR screenshot above and assigning characters with accents to them.

New to RHH? Click here.


Privacy Policy
Guidelines
Contact Us


For Hackers, By Hackers