Advertisement
dragonbane

HowTo: Dynamic Pointers

Jul 18th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. If you discovered a dynamic value and want to find the pointer for it, here is how I do it (uses TP and TWW's engine as an example):
  2.  
  3. 1. Make sure your dynamic value is accessed by the game right now
  4.  
  5. 2. Add 80000000 to the offset of the dynamic address you found. This is the value you have after you created a pointer out of the address, so its not the 80X address. The pointer you are looking for can't be bigger than this resulting number. The pointer value always needs to be smaller or equal to the dynamic value you want to keep up-to-date.
  6.  
  7. 3. Start a Value search in CE in the game memory range, check the hex box, choose 4 Byte Big Endian. Then select "value between"
  8.  
  9. 4. The maximum value is the one you just calculated. The minimum one I just guess by inputting the maximum one and setting it somewhat lower. If the maximum one is 80A92718 I would first choose 80A92000 as the minimum for instance.
  10.  
  11. 5. If CE doesnt find anything lower the minimum one further.
  12.  
  13. 6. Now CE should find a couple of addresses. It usually goes by the law "the top ones are the right ones" and the pointers are usually stored in the 803xxxxx-804xxxxx memory range
  14.  
  15. 7. Take a few and make sure they dont constantly change every few frames. If your dynamic value is used it should show a consistent value. If its not used its often 00000000, thats fine as long as it changes back when its used again.
  16.  
  17. 8. Calculate the offset of your dynamic value. Display the address you think contains the pointer as hexadecimal (right click on it). Take the hexa value and subtract 80000000 (7 zeroes) from it. This is now the normalised offset from the pointer. Now subtract this offset from your dynamic value (the one you found originally) (dynamic address offset - normalised pointer offset). This will give you the offset you need to add to the address the pointer gives you to re-find your address later. In Dolphin's Info Display ini file it works like this: pointerAddress + Offset. The code will read the pointerAddress (4 Bytes), subtract 80000000 from it, then add Offset to it and finally reads out the resulting address and displays the value.
  18.  
  19. 9. Switch areas, so the pointer value changes and your old address becomes useless. Re-calculate the address of your dynamic value and see if it still matches up
  20.  
  21. 10. Use Dolphin's Info Display to permanently keep track of your dynamic address
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement