Tutorial: How to make your own Pointer Address for Emulated/VC games

Started by Skiller, March 16, 2010, 05:14:50 AM

Previous topic - Next topic

Skiller

Things u need to know doing things this way you will need to know how to write your own sub code i will walk you through a simple way  u can make your code in "asmwiird" but will need to split the code up to a Custom subroutine code format. I'm going to use a Simple Example code that will work on every VC game if u fallow the same instructions here. meaning u already have the ASM done for you and you just need to change the Registers maybe.
Example Sub code (Setup for Shining force 2)

Pointer Activator
04002F00 61EFF600 ori r15,r15,0xF600
04002F04 7C0F0000 cmpw r15,r0
04002F08 4082000C bne- 0x0C
04002F0C 3DE08000 lis r15,0x8000
04002F10 90AF2F1C stw r5,0x2F1C(r15)
04002F14 7F85022E lhzx r28,r5,r0
04002F18 4801B534 B 0x8001E44C
0401E448 4BFE4AB8 B 0x80002F00
I will get to the breakdown of this ASM after iv walked u threw to get the Section to branch from
+++++++++++++++++++++++++++
First things first you need to find yourself something like Health, Money or Stats or any kind of code.
Next Set it to Break on Read and try to find something that's always read or one that reads at a point u can fallow (like the Shining Force 2 you set the pointer using the code when you view your money).

once you have found this u need to find out what register is being used as offset, allot of the time its r0 but could be different.  Next u need to find a Free Register to Reprint that offset to so u can do a Cmpw to it. (I used R15 since it was always 0 when I needed it to Execute)  One last thing u need to find is the Original Pointer address this is easy since you can look at your breakpoint address and what register its loading from. so once you have the registers you needed your ready to start the Subroutine code, that was shown above.
04002F00 61EFF600 ori rXX,rXX,0x????
04002F04 7C0F0000 cmpw rXX,rSS
04002F08 4082000C bne- 0x0C
04002F0C 3DE08000 lis r15,0x8000
04002F10 90AF2F1C stw rGG,0x2F1C(r15)
04002F14 7F85022E lhzx r28,r5,r0  <--- original Value on branched address (in this case 8001E448)
04002F18 4801B534 B 0x8001E44C <--- Branch back to ASM
0401E448 4BFE4AB8 B 0x80002F00
XX = Register your Reprinting the Offset to
???? = the value u want to put there
SS = Register holding the Offset
GG= Register holding Original pointer

Make sure u copy the BPR Address value to the end of your sub code like in the above example
also make sure u set the last line of your sub code to branch back to the ASM section just make sure u +4 it so if your Branch is on 48 u would branch back to 4C. keep reading will tell u how to find what the value is to your Branch code.
once you have the Subroutine code activated then it's time to setup the Branch to the Subroutine so it will execute .. (this is only for testing , once u have the code all done u can activate it all at one time)
To get the Branch Value since your using Wiird u can just go to your BPR address and pause your game and change the instruction to B 0x80002F00 now before u un-pause it, go to the end of your sub code and set it to hook back to the ASM B 0x???????? and that's it.

the sub code will print the Pointer to 0x80002F1C So if everything is setup right. it should print the pointer to the newly setup pointer address. and all u need to do is use the Pointer code types and your codes will always be active once you have done what u need to make the pointer show up. (Example mine only prints the Pointer once I have looked at the money code) Note: the pointer stays even after that so the codes become always active that u set for the pointer.