Post subject: Desmume RAM Search
TRT
Former player
Joined: 5/13/2009
Posts: 132
I'm not exactly a noob in making TAS videos, however, I am a noob when it comes to optimizing and using the RAM addresses to my advantage. I know there are specific addresses that change values as you play the game, but I do not know how to use the RAM search tool. Right now, I am only using RAM watch using addresses that others have used. Can someone tell me the basics on how to use RAM search effectively? (I do not know if this belongs in the "Newbie Corner" or the "DS Emulators" forums)
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3574)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Newbie corner is a good place for this, especially since that exact Ram Search tool is in no less than 7 rerecording emulators at this point. As far as using it, that's not easy to explain. Basically it is designed to weed out values you know aren't the one you are looking for. Let's take Mario's in level position for example. First you want to set it to search for 4 byte values (which requires a little knowledge of DS beforehand to know). Then you want to start a search by clicking search. Move to the right some. You know know that mario's position is greater than it was before. So select "previous value" then click greater than. Do this a few time and it should weed a lot of possibilities out. Try running to the left some, and do a less than search. At some point you will limit it down to a manageable number of possibilities. From there, simple monitor the behavior of these values and one of them should be what you are looking for. Also note that often there are several values that serve the purpose.
It's hard to look this good. My TAS projects
Editor, Player (54)
Joined: 12/25/2004
Posts: 634
Location: Aguascalientes, Mexico
You use the RAM search to look for valuable information not found in the game (I mean, playing normally). In RPG games, you usually look where the attributes of players & enemies (Hp, Mp, Stats, etc.); in Platform games, you look for the character's speed (as adelikat point how) & so on. Here's a link with more information about Memory Search
I'm the best in the Universe! Remember that!
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
Another hint is that you can quickly narrow things down with a search on the "number of changes". This is especially useful if you don't have any clue what kind of value you're looking for or which direction it might be changing, but you have some idea of when or how frequently it changes. For example, suppose you want to find out how many hit points your character has in a game that keeps it hidden. What you could do is bring up the search dialog, then switch to the game and let yourself get hit 5 times, then switch back to the search dialog and click on "equal to", "number of changes", and type 5 in the box and click "search". You will be left with a list of numbers that have changed exactly 5 times in that duration, which will probably be a small list, and you can watch them change a bit more and then pick out the ones that look useful and add them to the RAM watch for future use. You're not guaranteed to find the value you're searching for because you might have made a wrong assumption (for instance, maybe the character regenerates hitpoints gradually, which will increase the change count above 5 if it kicks in), but then you can always alter your search parameters to take into account some uncertainty. This method also works for continuously-changing things like your character's current speed. For example, you could make your character stand perfectly still for a while and do a search for "equal to 0 changes", then walk around for a while and do a search for "greater than 60 changes". If the character's speed changes smoothly and you walked back and forth for a few seconds, then it's a safe bet that the speed value changed on more than 60 of those frames at the very least. Usually you won't know exactly how many times it changed but you can be sure that it's within a certain range. You might still have a lot of results left at this point but then you can switch to more traditional methods like eliminating values that are zero while you're moving or nonzero while you're standing still, and you'll have fewer useless results to wade through.