============
lui t0 $(First half of your address)
lui t1 $(First half of your hex)
ori t1 t1 $(Second half of your hex) OR addiu t1 t1 $(Second half of your hex)
sw t1 $(Second half of your address)(t0)
jr ra
============
To get a better understanding of what to do with the MIPS above, continue reading this guide.
You will need the following:
PS2DIS
Latest Patch Dump (We will be using Socom FTB2 1.60)
A Code
A Hook
Socom FTB2 1.60 Dump:
http://www.consolediscussions.com/fo...78/#post133715
Codes:
Go to the Socom FTB2 No Banning Codes Archive.
http://www.consolediscussions.com/fo...d-4-19-t11532/
Safe (No Ban/35) Hooks:
0000004C
00000024
00000004
00000098
Alright! Let's start making a sub routine!!!
We will be using Infinite Health for this tutorial.
#Infinite Health
;One shot kill will kill you
0x004C9628 0x00000000
Open PS2DIS. And drag your 1.60 dump into PS2DIS.
If you get the box in the corner that asks you about 'Address From' or 'Load Address'.
Change 'Load Address' to 08800000.
Now choose one of the safe hooks above and add 08800000.
We will use 00000098.
So now, open up the Windows Calculator.
Start>All Programs>Accessories>Calculator
Once you have the calculator open, change it to a scientific calculator
View>Scientific
Make sure you have 'Hex' and 'QWord' marked/bubbled.
So add:
08800000 + 00000098 = 08800098
After you added safe hook 08800000 to make it real addressing, press 'G' and type:
08800098
You should get a jr ra. Now double click on the safe hook in PS2DIS. Go down to the command line where it says jr ra. And change it to:
j $09000000
The reason we use 09000000 is because that is where we are writing our sub. If you are writing your sub with a different address, then use that address instead of 09000000.
Now write down the address + hex.
Now you have your hook.
This is the beginning of your sub.
#Inf Health Sub
0x08800098 0x0A400000 (Your hook)
The Infinite Health address, which is 004C9628, is what you call a shortcut address. You want to change it into the real address.
Now add:
004C9628(Infinite Health address) + 08800000 (To make it real addressing)
You should get 08CC9628. That is Infinite Health's REAL address.
Write it down. You will need it later.
Now we need to find a place full of nops to write our sub. We will use 09000000.
So press 'G' and type in 09000000.
Now you want to load the first half of your address.
So double click on the first line and change the nop to:
lui t0 $(First half your REAL address)
But before you load the first half of your address, you need to know the 7FFF rule.
If the last half of your address is higher than 7FFF, then you add 0001 to the first half of your REAL address.
So since Inf Health's last half of the address is 9628. Then you add 0001 to the first half of the REAL address with is 08CC. So add 08C + 0001 = 08CD.
So instead of typing:
lui t0 $08CC
Type:
lui t0 $08CD
Now press 'OK'.
Now you have the second line to your sub routine. So write down the address and hex.
Now you have:
#Infinite Health Sub
0x08800098 0x0A400000 (Your hook)
0x09000000 0x3C0808CC (Your loaded address[first half])
Now we need to load the first half of the hex.
So go down one line, double click on it and change the nop to:
lui t1 $(First half of your hex)
Since the first half of the hex is 0000, type:
lui t1 $0000
And press 'OK'.
Now you have the third line to your sub routine. So write down the address and hex.
Now you have:
#Infinite Health Sub
0x08800098 0x0A400000 (Your hook)
0x09000000 0x3C0808CC (Your loaded address[first half])
0x09000004 0x3c090000 (Your loaded hex[first half])
Now we need to load the second half of your hex.
So go down another line, double click on it and change the nop to:
ori t1 t1 $(Second half of your hex)
OR
addiu t1 t1 $(Second half of your hex)
Since the second half of your hex is 0000, type:
ori t1 t1 $0000
OR
addiu t1 t1 $0000
And press 'OK'.
Now you have the fourth line to your sub routine. So write down the address and hex.
Now you have:
#Infinite Health Sub
0x08800098 0x0A400000 (Your hook)
0x09000000 0x3C0808CC (Your loaded address[first half])
0x09000004 0x3C090000 (Your loaded hex[first half])
0x09000008 0x35290000 (Your loaded hex[second half])
Now we need to load the second half of your address.
So go down another line, double click on it and change the nop to:
sw t1 $(Second half of your address)(t0)
Since the second half of your address is 9628, type:
sw t1 $9628(t0)
And press 'OK'.
Now you have the fifth line to your sub routine. So write down the address and hex.
Now you have:
#Infinite Health Sub
0x08800098 0x0A400000 (Your hook)
0x09000000 0x3C0808CC (Your loaded address[first half])
0x09000004 0x3C090000 (Your loaded hex[first half])
0x09000008 0x35290000 (Your loaded hex[second half])
0x0900000C 0xAD099628 (Your loaded address[second half])
Now we need to finish off the sub routine.
So go down another line, double click on it and change the nop to:
jr ra
Now you should have:
#Infinite Health Sub
0x08800098 0x0A400000 (Your hook)
0x09000000 0x3C0808CC (Your loaded address[first half])
0x09000004 0x3C090000 (Your loaded hex[first half])
0x09000008 0x35290000 (Your loaded hex[second half])
0x0900000C 0xAD099628 (Your loaded address[second half])
0x09000010 0x03E00008 (Jump and register)
WooHoo!!! We aren't done yet. But we only need to apply one more step!!!
Now you need to subtract from all the addresses.
So go back to the Windows Calculator.
Start>All Programs>Accessories>Calculator
Now you want to subtract the addresses.
08800098 - 08800000
09000000 - 08800000 = 0x00800000
09000004 - 08800000 = 0x00800004
09000008 - 08800000 = 0x00800008
0900000C - 08800000 = 0x0080000C
09000010 - 08800000 = 0x00800010
So now you have:
#Infinite Health Sub
0x00000098 0x0A400000
0x00800000 0x3C0808CD
0x00800004 0x3C090000
0x00800008 0x35290000
0x0080000C 0xAD099628
0x00800010 0x03E00008
AND YOU ARE FINISHED!!!!