I'll try to explain pointer codes.
Sometimes, blocks of data move around in memory. Therefore it is necessary to use a pointer!
The game needs to know where the data block is or else it can't use it either, so there will most times be an address holding the address of the start of the memory block.
Let's say we have cheat at the address 0x02301F90 that moves around in memory every time you change a level. (We're on level 1)
First, let's get some readings on what the cheat is in levels 2 and three. Once you find these cheats in these levels, jot down the first 5 or so digits of each address.
In level 1, we search for the first 5 digits of our cheat 02301*** (* means it can be anything, or wildcard).
Repeat this in level two until you find an address that has a value that consistently changes each level.
Let's say we find an address at 0x02010000 that, on our first level of the game, has a value of 02301F00. It changes only when we change levels. This is probably a pointer we can use!
Code:
Type 0x0B
Load offset
BXXXXXXX 00000000 Loads the 32-bit value into the 'offset'.
Offset = word at [0XXXXXXX + offset].
Basically this codetype loads the value at address xxxxxxxx and uses it as the offset.
In our case it would be B2010000 00000000
Our offset is now set to 02301F00, now all we need to do is write our address. In our case, our cheat is always 0x90 from our offset.
Code:
0x02301F90 <-Cheat code for level 1
0x02301F00 <- Minus the value of our pointer address on level one
-------------
0x90 <- Our code is this far away from the start of the data block, and always will be.
Code:
B2010000 00000000 <- Load the value at 0x02010000 as the offset.
20000090 000000FF <- Write 0xFF to offset + 0x90
D2000000 00000000 <- End, clear offset, etc
Let's go over it once more. The above code will:
-Take the value at 0x02010000 and use it as the offset.
-Write the byte 0xFF to offset + 90
Even if the value at 0x02010000 changes, our cheat will always be 0x90 away from the address specified by the address 0x2010000 holds.
There are a few things we must do to make our pointer more "proper". Don't worry, they're easy.
We don't want to use the value of 0x02010000 if the value is 0. If we did, it could potentially cause problems.
So to prevent that, we first check to see if the value of 02010000 is 0. We will only continue if it != 0
Code:
62010000 00000000 <- If 0x02010000 != 0, continue
B2010000 00000000 <- Load the value at 0x02010000 as the offset.
20000090 000000FF <- Write 0xFF to offset + 0x90
D2000000 00000000 <- End, clear offset, etc
If you have any questions, feel free to ask.
Oh, and I probably should have told you this before, but if you have two RAM dumps (One from each level, or two places where the cheats are different) and the codes from each level, you can use Kenobi's pointer app to find pointers for you.
_________________
<EggWerx> MetalOverlord: Dsman and lemmayoshi will be used for taco meat, ask mo he knows me.
jleemero wrote:
Being required to learn Java for a Comp Sci MAJOR is like being required to shit on a lawnmower to be an astronaut.