MemEditor

Lazy Bastard
To an experienced GS hacker, the Memory Editor function of the GSPro is one of the most powerful tools around. Without it, some codes would be almost impossible to hack, and testing would be ridiculously time-consuming. Put on your thinking cap (what a gay expression) and concentrate for a moment.


-So where do I start?

Well, the Memory Editor has two main options, besides simple scrolling and editing, which I will discuss later on. First, there is the "Goto Address" option. This is very simple (besides the stupid name); input an address, push "X" and you'll go to that address in memory. Next, there is the "Text Search" option. Its explanation is in its name, heh. When searching for text, remember that text searches in the Mem. Editor are not case-sensitive. If you forget, don't worry...it doesn't give you the option to change case, heheh. I'm just telling you so you don't worry or whatever. The third and fourth options, "Back to Editor" and "Return To Game" (notice that "to" is capitalized in the second, but not the first of the two...yep, that's inconsistent English straight from the UK, heh) are hopefully also exempt from explanation. But just in case you're curious, what these do is query addresses at increments of 0xF, and return those that have values which are represented as integers divisible by 16. Heheh, just kidding. Come on, this's simple stuff; relax.


-Did you forget to talk about basic scrolling and editing?

Yep. Er, I mean, nope. Basic scrolling and editing are also simple. It should be pretty obvious that you use the Directional Pad to move up, down, left, and right (these, coincidentally, are directions). Press "X" while a value is highlighted, and the value will be decreased by one. Press "triangle", and it'll be increased by one. If you press "R2", you'll toggle between hex values (the default, on the left) and their ASCII equivalents (on the right). This affects essentially nothing, because if you press "X" or "triangle" while in ASCII mode, you'll still either increase or decrease the value by one. The only difference is that in ASCII mode, you can only increase or decrease by one at a time; you can't increase or decrease by 10's (which are actually 16's, considering it's in hex, heh).

The hex display of the Memory Editor looks like this:

8006F288: 02 86 F3 58 68 43 86 94
8006F290: 53 46 87 34 93 49 56 28
8006F298: 64 89 A3 A7 96 97 46 84
8006F2A0: 34 31 2F 89 7C A4 E4 76

The addresses on the left represent the addresses of the four digits to the right of them. For example, 8006F288 is the address for the value "02 86". The next four digits on a row are at the next address. "F3 58" is at the address 8006F28A. Codes that start with "80" (which is how the Memory Editor represents addresses) can only end with an even number (0, 2, 4, 6, 8, A, C, or E). Anyway, the value "68 43" is at the address 8006F28C, as a final example.

Moving on, if you look at the structure of the value displayed as "02 86"...no wait...I can't finish my sentence...nothing happens if you look at it. Anyway, look at it. There's an interesting little quirk here. You see, the value represented as "02 86" is really "8602". In other words, the Memory Editor is backward (this is due to the structure of little-endian addressing, which we'll talk about in another guide). Simply switch the two-digit values at an address when composing an actual code. For one more example, if the address 8006F28A contains the value "F3 58" (which it does in the example), the code to make that address constantly stay at that value would be 8006F28A 58F3.


-How does the Memory Editor affect the memory?

The Mem. Editor's input system is...yeah, you guessed it...simple, heh. When you change a value in the Memory Editor, a message is sent to the memory to change the value of the address you specified to the value you specified. If you change the value of the address 8006F28A to "3442" (which would be displayed as "42 34") in the Memory Editor, a message is sent to the memory telling it to make the change. This is a simple, temporary write to an address. Let me explain why this is important to know.

A memory address can be in one of two states: static, and constant write. When an address is static, no values are being written to it, and it just stays at its current value, waiting to be changed. When an address is in constant write, a value is constantly being written to it by the memory, and it's stuck at that value. 

If you edit the value of a static address in the Memory Editor, return to the game, and come back to the Memory Editor again, that value will still be what you changed it to, providing that the value wasn't affected by anything. For example, if the static address controls where your character is standing, and you don't move, when you look at the address again in the Memory Editor, it'll still be the same. But if you move, the value will be changed.

If you edit the value of an address in constant write, return to the game, and come back to the Memory Editor, the address will have returned to its original value, as it was before you edited it. For example, if the address 8006F288 was in constant write and had a value of "8602" when you found it, and you changed that to "7605" in the Memory Editor, went back to the game, and returned to the Memory Editor, the address would have a value of "8602" again. This is because you sent a message to the memory telling it to change the value of the address 8006F288 to "7605", and, after doing that, something (something in the game, or your cheat device if you have a code enabled) instantly wrote over it with the value "8602". On a seperate note, an actual GS code can write to an address even if it's in constant write.


-How exactly can I use this knowledge?

OK, you can stop rubbing your temples now; the technical stuff's over. Now, with a little common sense, you can probably figure out that the Memory Editor can be used to test values for a code (to change the value at an address, and note the results) and to watch what's going on in the memory at certain points in a game, but those aren't the only uses for the Mem. Editor.

For one thing, many a good code has been found by arbitrarily changing values at addresses near other codes, or even in a totally uncharted area. This is probably the most crude form of hacking, but it is still hacking and can produce some good codes. If you're in an uncharted area with no specific goal, the most effective thing to do is probably to look for unique values. Anything with one digit by itself, surrounded by three zeros (0001, 0030, 0F00, C000, and such) is a suspect. "0000" and "FFFF" are good to check out, but only if they are isolated within a group of other values, and not in large groups of the same value. Remember that both "FFFF" and "0000" can represent a value of nothing. Large groups of addresses with a value of either "FFFF" or "0000" represent either permanantly empty areas of space, or areas that aren't being used at the time. There are the rare instances when a large group of things must have a value of nothing, such as during an event in an RPG in which no one has anything equipped, but these are quite rare, and most of the time you won't be hacking during these events. But hey, if you are...maybe you should check out those armies of F's and 0's.

Besides pseudo-random and semi-pseudo-random changing of values, there are other uses for the Memory Editor. Consider the text mod.

Without the Memory Editor, hacking one of these puppies might take all day, and that's if you really knew what you were doing. With the Mem. Editor, it might not even take two minutes. Making sure the text you're searching for is being displayed in the game, enter the Mem. Editor, and run a text search for one of the words. Try to pick the rarest one, so as to reduce your chances of finding useless crap, heh. You may find it right off. If not, don't worry. You see, in some games, text is not stored in the same way as the GS assumes (normal ASCII character set). All capital letters may be shown as symbols of various kinds, or even as blank spaces. If a regular text search doesn't work, try running a search for the word without the first letter (or whatever letters are capital). If neither of these methods work, and other text mods have already been hacked for the game you're dealing with, use one of those text mods, and go to the address in memory that they're at. Observe the values that represent each letter. There'll be a pattern, so if "G" is represented by 36, "H" will be represented as 37. Map the other letters out (and/or numbers, depending on what you're searching for). Now, with your new chart, exit the editor and run a Known Value search for the value of two of your letters that are next to each other (in the actual text you're searching for). For example, if "G" is represented as 37, and "o" is represented as "63", run a search for 3763, converted to decimal (read the FAQ on Hexadecimal in the GSHI Hacking FAQs section if you're stumped here). You may turn up nothing. If this happens, run a search for the value of "o" and the value of a space together. If you still don't turn anything up, run a search on the value of a space and the value of "G" together. If you're stuck there...I don't know what to tell you. Some things are still mysterious to the hacking world. Go on, try things...you may be the first to discover something totally alien to the scene. Anyway, unless you returned absolutely zero results after all those searches, go into the Memory Editor, and check out the addresses that contained those values. Do you see what seems to be what you're looking for? Try to modify the value of one of your results. Go back to the game. Did the text change? If it did, you have your mod. If not, keep goin' through those addresses. Good luck.

Another use of the "Text Search" option involves games with complicated memory. Things like Metal Gear Solid use text pointers to modify values in the game. Unless you have a Comms link and a GS 2.3 or lower, you can't breakpoint to find the root addresses. This means the easiest route will be to modify the pointers themselves. In MGS in particular, the names of characters, items, and such are pointers themselves. By changing those text pointers to the same value as other text pointers, you cause things like character graphic mods. Memory systems like this are pretty rare, but they do exist, and they're definitely worth messing around with.

Besides these main uses, there's a host of other things you can do with the Memory Editor, most of them being game-specific and a little complicated. Try whatever you think'll work. Hell, try what you think won't work. Just experiment; all kinds of things are out there that haven't been discovered. And the experience along the way won't hurt. The Mem. Editor is one of the most powerful and versatile tools you have. Use it.


If you have any further questions on the Memory Editor, please feel free to e-mail anyone on GSHI staff.

This text was brought to you by GSHI.org, unless someone else gave it to you, in which case it was only written by someone at GSHI.org. Heheh.