PDA

View Full Version : how to write a simple subroutine!



Scruffy120
03-06-2009, 08:53 PM
lui t0, $First half of code address (+0880).
lui t1, $First half of hacked/modded value.
addiu t1, t1, $Second half of hacked/modded value.
sw t1, $Second half of address.(t0)
jr ra


Well the first line will load the first half of the code address + 0880 and round up 1 if second half is > than 7FFF.Second line will load the first half of the code hacked/modded value.Third line will load the second half of hacked/modded value into t1 together with the first half.Fourth line will store the second half of code address into register t0.The last line jumps to return address and ends the routine.

Now you need to find a hook to make it work. Don't confuse this as jokering since once activated the code will always be on.

lui = Load Upper Immediate
addiu = Add Immediate Unsigned
sw = Store Word
jr ra = Jump Register Return Address



How To Get Real Addressing
Open Windows calculator, go to "View" and select "Cientific" now select "Hex" and "Dword" now type 8800000 (5 zeros) + (plus) the address you want. There you go.


/!\ NOT MINE CREDITS TO "Sly Xross"/!\

WhoIsYou
03-06-2009, 09:07 PM
Moved this and the other thread.... Nooblet....

Scruffy120
03-06-2009, 09:52 PM
Moved this and the other thread.... Nooblet....

lmao, i didnt even see the ps2dis guides section xD thanks

DJfire
03-16-2009, 03:17 PM
Umm nice copy and paste Lol hmm this is easy.

Scruffy120
03-18-2009, 09:56 PM
Umm nice copy and paste Lol hmm this is easy.

umm nice reading skillz, if you read it says that its NOT mine....nub

DFZ
03-18-2009, 10:15 PM
DJFire = Sly Xross

Scruffy120
03-19-2009, 09:23 PM
DJFire = Sly Xross

lmao....why use 2 names?

DFZ
03-19-2009, 09:43 PM
lmao....why use 2 names?

djfire is his old name, he cant change it...nub :P

Scruffy120
03-20-2009, 02:15 PM
djfire is his old name, he cant change it...nub :P

ask an admin, or save up some vb points...nub :P

kroxier
03-23-2009, 02:37 AM
lol.... "Cientific"