Post subject: Memory addressess in VBA?
Active player (441)
Joined: 3/21/2006
Posts: 940
Location: Toronto, Canada
I'm working on a TAS for Prince of Persia: The Sands of Time at the moment and I want to use RAM addressess to monitor the Prince's speed. I have two questions: 1. Is it possible to search for RAM add. in VBA? 2. If so, is there a relatively easy trick to track down the speed counter?
My current project: Something mysterious (oooooh!) My username is all lower-case letters. Please get it right :(
Dwedit
He/Him
Joined: 3/24/2006
Posts: 692
Location: Chicago
Cheat Finders are your friends.
Active player (441)
Joined: 3/21/2006
Posts: 940
Location: Toronto, Canada
Er...can anyone be more specific? I find using the cheat search to be a bit awkward to narrow down so many values to one for speed... I'm running a search late in the game with the Prince not moving, because obviously I don't know his speed. There's stll close to 30,000 addresses. Gotta keep slogging I guess...
My current project: Something mysterious (oooooh!) My username is all lower-case letters. Please get it right :(
Editor, Emulator Coder, Expert player (2106)
Joined: 5/22/2007
Posts: 1134
Location: Glitchvania
Try to cheat-search for his position instead. It's much easier since you just need to check "Equal", "Greater than" or "Less than" and you don't need to know what the exact difference is. The address of the speed must be, I guess, around it, and watching the memory you can do a few moves to distinguish it.
<klmz> it reminds me of that people used to keep quoting adelikat's IRC statements in the old good days <adelikat> no doubt <adelikat> klmz, they still do
Skilled player (1886)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
Here's how I find speed addresses: 1. Search for "value equal to 0" when you're standing still. 2. Start moving to the right, and search for "value greater than previous value" when you're still having your horizontal momentum. 3. Stop moving, and search for "value equal to 0" again. 4. Jump straight up in the air, without any horizontal movement, and search for "value equal to 0" again. (this is because often, memory addresses hold information regarding both your horizontal and vertical speed. You want to rule those out. 5. Repeat step 2. 6. If necessary, repeat step 2-3 a few times. That should do the trick. :)
Former player
Joined: 12/27/2006
Posts: 532
Location: Göteborg, Sweden
Do what Randil said, but don't forget to try different sizes of an adress (2-bit, 8-bit, 16-bit) and also try signed values if you can't find and unsigned ones. At times when you are moving back on the level, the speed goes negative which only signed values can handle.
My published movies [03:45:05] <Naohiro19> Soulrivers: ... [03:45:19] <Soulrivers> ? [03:46:35] <Naohiro19> <Soulrivers> No! <Naohiro19> So? <Soulrivers> Yes! [03:46:48] <Naohiro19> joke
Player (147)
Joined: 7/12/2006
Posts: 264
Location: Brazil
Randil wrote:
Here's how I find speed addresses: 1. Search for "value equal to 0" when you're standing still. 2. Start moving to the right, and search for "value greater than previous value" when you're still having your horizontal momentum. 3. Stop moving, and search for "value equal to 0" again. 4. Jump straight up in the air, without any horizontal movement, and search for "value equal to 0" again. (this is because often, memory addresses hold information regarding both your horizontal and vertical speed. You want to rule those out. 5. Repeat step 2. 6. If necessary, repeat step 2-3 a few times. That should do the trick. :)
But if this happen: What I have to do ?
Former player
Joined: 12/27/2006
Posts: 532
Location: Göteborg, Sweden
Dark Fulgore wrote:
Randil wrote:
Here's how I find speed addresses: 1. Search for "value equal to 0" when you're standing still. 2. Start moving to the right, and search for "value greater than previous value" when you're still having your horizontal momentum. 3. Stop moving, and search for "value equal to 0" again. 4. Jump straight up in the air, without any horizontal movement, and search for "value equal to 0" again. (this is because often, memory addresses hold information regarding both your horizontal and vertical speed. You want to rule those out. 5. Repeat step 2. 6. If necessary, repeat step 2-3 a few times. That should do the trick. :)
But if this happen: What I have to do ?
It means there are too many results to display at that time. They have been found, they are just not displayed. Keep doing the following steps as Randil described and they will eventually show up.
My published movies [03:45:05] <Naohiro19> Soulrivers: ... [03:45:19] <Soulrivers> ? [03:46:35] <Naohiro19> <Soulrivers> No! <Naohiro19> So? <Soulrivers> Yes! [03:46:48] <Naohiro19> joke
Joined: 7/18/2007
Posts: 109
i need help with actually making the memory watch work. after you finish finding a speed address, what do you do then to make the watch work?
Skilled player (1886)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
pyromaniac wrote:
i need help with actually making the memory watch work. after you finish finding a speed address, what do you do then to make the watch work?
VBA does not have a memory watcher like FCEU does, so you basically have two options when you want to watch a RAM address: Either use the memory viewer (this is pretty inconvenient) or use gocha's memory watcher, though I've heard that it might be hard to get it to work.
Editor, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I have actually trouble finding a HP memory address. Before attacking a monster, I start a cheat search, then fool around and search for equal values since the HP shouldn't have changed. Then I attack the monster a few times, and search for lower values. I repeat this step but there often already are no values anymore at this point :( Even if I straightly kill the enemy and search for values equal 0, it's no use... Any suggestions? What data size do HP addresses have usually (in my case it takes like 100 hits to kill an enemy, so I ran many tests in the 16 bits area...
Skilled player (1886)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
MUGG wrote:
I have actually trouble finding a HP memory address. Before attacking a monster, I start a cheat search, then fool around and search for equal values since the HP shouldn't have changed. Then I attack the monster a few times, and search for lower values. I repeat this step but there often already are no values anymore at this point :( Even if I straightly kill the enemy and search for values equal 0, it's no use... Any suggestions? What data size do HP addresses have usually (in my case it takes like 100 hits to kill an enemy, so I ran many tests in the 16 bits area...
Instead of searching for lower values, try searching just for changed values after each hit. That helps sometimes.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
Sometimes when an enemy dies, their health value turns into a 1 or an FF
Editor, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany