Please Register or Login -By Tension

Please Donate 10$ to help NRU and get VIP Access:
www.NooBzAreUs.niceboard.org/Donate.forum
"Help the site be better and have a /.net !!"

We have True Slot Freeze,WiFi Boot,Server Boot,God Menus, and more!


Where N00BS become L33T!
 
HomePortalCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in
Latest topics
» No Recoil/Perfect Shot
Fri Sep 30, 2011 2:09 pm by CjZaZy.ReApEr

» ><>shot kills<><
Fri Sep 30, 2011 2:08 pm by CjZaZy.ReApEr

» ><>Boucing shyt<><
Fri Sep 30, 2011 2:07 pm by CjZaZy.ReApEr

» lock on/ throw shyt
Fri Sep 30, 2011 2:06 pm by CjZaZy.ReApEr

» SUPPESR 1/2 EVERY GUN
Fri Sep 30, 2011 2:06 pm by CjZaZy.ReApEr

» Every thing on your gun
Fri Sep 30, 2011 2:05 pm by CjZaZy.ReApEr

» Always 32x Zoom Range
Fri Sep 30, 2011 2:05 pm by CjZaZy.ReApEr

» Lockon Distance Primary
Fri Sep 30, 2011 2:03 pm by CjZaZy.ReApEr

» Knife Freeze []
Fri Sep 30, 2011 2:01 pm by CjZaZy.ReApEr

Affiliates
www.FTB2Krazy.tk
 
Top posters
Tension
 
CHIV3S
 
looneyhead
 
TyrantHunTer15
 
CjZaZy.ReApEr
 
-FtB2..KrAzY-
 
SocomGuy99
 
WeeZyxBaBy
 
IIvIIr.L0VE
 
ARMY-OF-HELL
 
Statistics
We have 33 registered users
The newest registered user is panban

Our users have posted a total of 433 messages in 241 subjects

Share | 
 

 How to make a Sub Routine

Go down 
AuthorMessage
Tension
Admin & 1337
Admin & 1337
avatar

Posts : 234
Join date : 2009-08-17

PostSubject: How to make a Sub Routine   Mon Sep 21, 2009 9:22 pm

Code:


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 0x0A3A0000
0x00800000 0x3C0808CD
0x00800004 0x3C090000
0x00800008 0x35290000
0x0080000C 0xAD099628
0x00800010 0x03E00008

AND YOU ARE FINISHED!!!!
Back to top Go down
View user profile http://nruretiredforum.forumotion.com
 
How to make a Sub Routine
Back to top 
Page 1 of 1
 Similar topics
-
» How to make yourself look like a smurf.
» How do you make a mmv ?
» How do you make your fantage character, your avatar?
» Make money with Swagbucks and Bing and others?
» How to Make a Simple Blend in Photoshop (any version): Lasso Feather Blend Technique

Permissions in this forum:You cannot reply to topics in this forum
 :: Tutorial Center :: PSP Turorials-
Jump to: