I keep getting the question: What exactly are the ASM hacks, why you guys do them in the first place and are they even necessary? I hope with this post I might clear things up and actually give you some progress report, because those hacks actually are were achieved in a timespan of two days (that is yesterday and today).
Let’s start with the most obvious question:
What are ASM hacks?
First of all ASM is an abbrevation we commonly use to describe Assembly language. Assembly language is in essence, machine code. Stuff your computer understands without additional operations. Now when it comes to Games, every machine uses a specific processor. This specific processor was designed for one of those specific languages. In games, that is usually MIPS. Now when a game gets localized, obviously things can’t always stay the same. English Text needs more space,
sometimes it needs less space. We need to enlarge those boxes ore move them around in order to fit stuff. A practical example:
Often, when we hack a game we encounter a common issue: There is no variable width font avaible. But here you might ask: What is that, why do we need it in the first place? Well, for Japanese characters you don’t need it, because they all have the same Width and as such the font usually avaible is MONOSPACED
What is wrong with that you might ask? I’d like to illustrate that with a picture:
See? Not only it takes up a lot of space, it is just very hard to read. And especially in games where we have textboxes, it is just an issue, because it limits on how much you can squeeze in. So what do we do? We certainly don’t want a game that has monospace text.
This is where ASM comes in. When the programmers coded the game it was written in a non-machine language, like c++, c# or other modern languages.
However we don’t have the pleasure to own the source code of the game. What a Romhacker usually ends up with is the completely compiled game. Usually an ISO or a ROM. Now an ASM hacker, has the ability to read assembly language and actually backtrack things ingame and figure out how things like this:
This corresponds to a box, text or anything similar in the game. And they adjust the values to what they need to make it work with the localized version.
This is what an ASM hacker essentially do (Or well that’s the short version of it)
Normally ASM Hacks are tedious work
Why? Because programmers are lazy. Or let’s say most of those who program games in the industry are. So they just toss all the stuff their game uses in one big archive and even they won’t have a clue what the hell is where. Because they neither care or intend you to hack their games (naturally). But if routines that belong together just fly around, and things are just tossed together, how can you know where to look for the thing you need? That’s the thing: You can’t.
There are some approaches though of course.
- You analyze the files and figure out what corresponds to what. Essentially you read Hex files. This approach is rarely succesful
- You Debug by making Ram Dumps, using Breakpoints, and finding values. -> The way to go. There’s just one catch. Even if we find a value,
we found it only in the RAM (Random Access Memory). As soon as you enter a new room, reset the game or anything similar, all your changes will be gone.
So once you found a value in the RAM you have to backtrack it to its root, otherwise you can’t change it. That’s why it’s hard.
Another issue is, that depending on what console you work on, there might be only a few next to no tools to actually debug a game.
Especially when it comes to a “new” (in terms of Romhacking) console like the PSP, the tools we have for ASM debugging and hacking are still very limited.
Whether we’re succesful to backtrack a value or land on a value that just happens to use the same instruction, is to a certain degree luck based.
You seed add a0,a2(0x42C3) or add a0,a2(0x42C3) can occur more than once, even more than twice (up to 100000 and more). Whether you’re able to backtrack it to the right value is somehow a hit and miss thing. But usually, once you found one routine, you’ll find the others, because they like to stay close.
Ok so at the end of this post many people might feel just as confused as before (or even more confused). It wasn’t intented as an tutorial neither do I think I’m qualified to make one. I just tried to give you a very short and limited outview on ASM.
And now I just wanna show you how this whole jabbing looks in practice. Enjoy SOME ASM Hacks from Re:Digitize (Screens show work in progress and are subject to change)
Before and AFTER an ASM hack was applied.