Hi, I've been searching for a memory adress that shows my character's movement speed in "Star Wars Trilogy - Apprentice of the Force (U) (M3)" for GBA. I did find an adress for speed in the very first level and went with it, until I discovered that in the second level, that same adress was showing something completely different! Is this normal behaviour? Is it possible to find a memory adress that keeps track of my movement speed, regardless of what level/area I'm in? Having to look up a new adress for every area in the game would be tedious.
I'd appreciate any suggestions.
Joined: 8/26/2006
Posts: 1139
Location: United Kingdom
If you are using the internal memory watch then alden is right and you'll just have to search in every level unfortunately. However, if you have been using an external memory watch program (MHS, Artmoney etc.) it may just be screwing you around and it'd be worth continuing to try. I've had it happen before.
It's to be expected, really. If a game handles characters generically enough, then your character is just another "thing" in the world, and of course you can't expect to find every thing in the world at the same memory address, because there's more than one of them. If you're lucky, it'll be at the same place every time anyway simply because the player object gets loaded first and gets assigned to the same slot in memory, but there's nothing stopping a game from putting the player in a random slot every level instead.
I had a similar problem recently with a Sega CD game (Popful Mail), where the game code itself got replaced with a slightly different version of the code per level, and the data I wanted to read (hitbox dimensions) was mixed in with that code that was shifting around. So while I thought I had something already working with minimal effort, suddenly I had to figure out what exactly the game does to calculate the memory address it reads that data from.
In this case, yeah, unless you have some way of scripting custom offset calculations into the memory watch tool you're using, you'll have to redo the search per level.
Indeed, I found the same thing happening in Chaotix - the player characters were dynamically loaded into a linked list of objects at the start of every level.
[quote="nitsuja"I had a similar problem recently with a Sega CD game (Popful Mail), where the game code itself got replaced with a slightly different version of the code per level, and the data I wanted to read (hitbox dimensions) was mixed in with that code that was shifting around.[/quote]
Virtually every SegaCD game is going to do this. Because of the way the addon works, each level has to be a complete self-contained program that no more than 256KB in size. And while working within that limitation, it's much easier to include the common routines and data at the same basic positions in the source code than to include them at the same offsets assembled binary.
How fleeting are all human passions compared with the massive continuity of ducks.