ROM Hack How to make a table file for a rom (gba/nds)?

MegaStarforce

New Member
OP
Newbie
Joined
May 11, 2012
Messages
4
Trophies
0
XP
1
Country
Well I searched the web about how making a table file so that I can edit the text of a gba game.

I found a tutorial on Romhacking but the way they typed it in notepad, the letters are like jumbled and I there are no line spaces which makes my head ache.

And I think I don't understand quite well the step they are saying (I think because of the format of how they typed it).


Wondering if anyone could share how to do it through giving me a link or just type it here in this topic (through replying of course).

I want a tutorial that is straight to the point, and easy to understand cuz you know im still a newb.


Thanks in advance!
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,795
Trophies
5
XP
28,536
Country
United Kingdom
A table file is just a list of hex numbers and the letters they correspond to*, there are a few different standards out there (the main ones right now are thingy and what crystaltile2 calls a table) and a proper standard has been drafted which has yet to be implemented http://transcorp.parodius.com/scratchpad/Table%20File%20Format.txt

*my usual example here is as a kid you probably made a code along the lines of a=01, b=02 , c=03 (a=01, b=02 , k=03?). The only things to change here are you can use various amounts of numbers in hexadecimal to represent letters and represent whole words or fractions of them with single hex digits if you want to.

Tools like http://www.romhacking.net/utilities/55/ can output a table and you can use a rom hacking hex editor or crystaltile2 to display it. More on hex editors http://gbatemp.net/topic/326873-rom-hacking-hex-editors-mid-2012-discussion/

That is not the whole story though as you have to figure out the encodings and games developers will not necessarily try to make it hard but the things they do can add complexity to the situation (custom symbols, most of the time bold letters will just be another letter in the code as opposed to something to tell it to be bold and such). These processes however encompasses a large amount of rom hacking and there are loads of techniques you can try.

I am presently rewriting the rom hacking docs and naturally I have a chapter on it but I am not quite prepared to release the new version yet even though the text section is largely completed. In the meantime though the three basic techniques which I encourage you to combine in various ways to figure things out are

First compression troubles all of these techniques so make sure you are working with uncompressed files ( http://code.google.com/p/dsdecmp/ and http://gbatemp.net/topic/313278-nintendo-dsgba-compressors/ for DS and sometimes for GBA, crystaltile2 can handle some GBA and poke around romhacking.net for some more GBA compression tools).

1) Check the game to see if it uses ASCII ( http://www.asciitable.com/ ), unicode (or something related to it http://www.joelonsoftware.com/articles/Unicode.html ), shiftJIS (more for Japanese but not always http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml ), eucJP (also Japanese http://www.rikai.com/library/kanjitables/kanji_codes.euc.shtml ) or something similar. GBA games did occasionally use known encodings (advance wars for instance used ASCII) and DS roms do it frequently. Sidenote- NFTR fonts in DS games contain the encodings they use and crystaltile2 can dump them to a table and http://gbatemp.net/topic/105060-nftr-editor/ can also tell you what goes.

2) Relative search.
http://www.romhacking.net/utilities/513/ is my usual tool although crystaltile2 has abilities here as well
http://filetrip.net/f23649-CrystalTile2-2010-09-06.html (hex window, click the tools pulldown menu).
In English and most languages that use the Roman character set there is a defined order of letters (abcdef...) and although games are not obliged to use it they quite often do. The idea then is you find a word, phrase or large chunk of a sentence used in the game (or if you live dangerously guess that a word like "the" which appears in most English paragraphs and almost certainly in a script or a character trait/series staple- final fantasy probably has the word moogle in there for instance) and search for it. If the encoding is relative searching for a word like bad will search for something with one value, a value lower than that and a value two higher than the original one which then means you have most of the rest of the encoding if it finds something (e will be one value up from d and it carries on from there).
Japanese on the other hand does not really have an order so relatively searching is quite hard to get anything from (you can occasionally get something from Kana but that is not foolproof). Equally there are things you can do to help the relative search (character names if they are user editable should not be used, if there is a variable (it costs [insert price] to buy) do not use it, if you have a capital letter do not use it in the initial search, if the phrase is likely to wrap around to another area shorten it or do not use it and the list goes on).

3) Corruption and alteration.
Corruption is a technique rom hackers use where they mess up part of the rom (I tend to invert things) and run it, assuming it does not crash right away wherever something has an error that was not there in the original that is what the part you corrupted deals with.
Alteration is a bit more like guided corruption. Here you will edit things you know to be text and run the game to have it display what you have edited- I like to put a run of characters* so when in a game it pops up with that long run I know what has been done). Also quite useful if you have some stuff thanks to relative searching and you need to fill in the rest.

*either the same character, characters always increasing by one or a pattern like abbcccdddeeeefffff and then matching up where the pattern starts with what goes.

After this we get into edge cases, things like language analysis (the space character is probably the most common character, English has a vowel in almost every word and if it does not the word will tend to contain a y character.......), hex analysis and programming level techniques (assembly, memory viewing, name input memory viewing, save analysis, pointer searching and so forth) most of which are not that hard to learn but are not something I wish to dump on you right now if you are just getting the hang of things.

Do not launch right into an ultra complex Japanese RPG and even if you see the text in ASCII or something try the techniques out anyway as it will let you get a feeling for them (not to mention games might only use part of the ASCII encoding). If you want a nice demo or a not ascii but still easy enough to get working try Megaman ZX

Re line spaces- make sure it is not unix (0A) or apple style (0D) line spaces compares to windows ones (0D0A). A proper text editor should be able to handle this ( http://notepad-plus-plus.org/ if you need a suggestion) but the windows standard stuff is poor at it at best and usually fails to appreciate it.
 
  • Like
Reactions: swosho

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,745
Trophies
4
Age
46
Location
Engine room, learning
XP
15,696
Country
France
I didn't either :P
But if you are really interested in rom hacking, FAST always have good informations and reading his posts are always a good sources of knowledge.

I didn't know there were a proper table standard in the work.
Too bad it's less used now with recent consoles hacking, it would have boost the release of that standard in hacking tools.
I remember using thingy and SearchR for SNES games.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Latest Switch 2 leak says it will have a LCD, not OLED, run most games 40fps max, and only be 1.5 tflops handheld, 3 tflops docked. That's less than the steamdeck at 1.71 handheld, 3.1 docked.
    +1
  • console @ console:
    Switch 2 LCD is about like TN type compare to old Nintendo Switch LCD before. Also games running on 40 FPS look not good for us and people. 60 FPS are best for normal everyday gaming. That's weird. I think should not buy Switch 2 because it like Switch 1.5 something like that. Little improve but not major improve. I think going to skip it.
    +1
  • BigOnYa @ BigOnYa:
    Yea that's just rumored but not sounding that impressive for a next gen upgrade. Of course Nintendo is very good at optimization of their games to play well, but for a $400+ 2025 console I expected a little better. Even a $299 2020 Xbox Series S has 4 tflops.
    +1
  • Anrei @ Anrei:
    I thought it was supposed to be on par with an xbox 1 in power, why is it running most things at 40fps lol
  • Anrei @ Anrei:
    in terms of power I thought it was a 2.0 compared to the switch man 40fps sounds whack is there poor optimisation or something?
  • BigOnYa @ BigOnYa:
    Just rumors/ leaks. We will find out in a few weeks. But yea prob way underpowered to save battery, for longer playtimes, like Switch 1 is.
    +2
  • Cranesbill @ Cranesbill:
    Ooo ooo switch 2 leaks are in :>
    +1
  • M @ Misaka_Mikoto_Fan:
    Could've used 50 FPS for the true PAL experience
  • Kirbydogs @ Kirbydogs:
    2 double parkers on opposite ends have created a traffic jam
  • Kirbydogs @ Kirbydogs:
    more specifically, people have been holding their horns non-stop for the past three minutes.
  • BigOnYa @ BigOnYa:
    OIP.uesE-DOazRhQs40fTwiJSwHaDT

    Put on your daisy dukes, and start a car wash
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Sell hot dogs
    +2
  • Xdqwerty @ Xdqwerty:
    I'd use lemuroid more often if games didnt look blurry even with the "sharp" filter on
  • Kirbydogs @ Kirbydogs:
    I honestly forgot GBAtemp has ads
  • Kirbydogs @ Kirbydogs:
    I wouldn't be surprised if the staff forgot too
  • Xdqwerty @ Xdqwerty:
    @Kirbydogs, most staff members are patrons so it's understandable
    +1
  • E @ evanft:
    Teraflops are not necessarily indicative of real world performance, especially when compared across different architectures. The Switch 2 will also be smaller/lighter than the Steam Deck so it's performance has to fit inside a much smaller thermal and power envelope. Using a 120hz VRR panel means 40 fps locks can be an option in handheld mode, which will be a noticeable upgrade over the current 30 fps standard on Switch 1. Games could also go uncapped and leverage VRR to keep things smooth.
    +1
  • Veho @ Veho:
    Call me a filthy casual but I really don't notice the difference between the last few generations of consoles, and pushing specs just for the sake of bragging rights is really pointless.
    +5
  • Psionic Roshambo @ Psionic Roshambo:
    With a bit of emulation upscale magic, I'm OK playing old games lol
    +2
  • MysticStarlight @ MysticStarlight:
    I still don't see the difference between PS4 and PS5 other than the loading times
    +1
    MysticStarlight @ MysticStarlight: I still don't see the difference between PS4 and PS5 other than the loading times +1