Log in

I forgot my password

Latest topics
» Could someone point me to a sprite rotation tutorial, please?
Mon Feb 18, 2013 6:53 pm by sckuz254

» RR archive 2
Sun Dec 02, 2012 4:20 pm by losdelsur16

» [ULUS-10310]MoHH2 Uni Instant NukeBoom
Tue Jul 12, 2011 6:52 pm by m33masterBad

» Some vip releases and more
Tue Jul 12, 2011 6:47 pm by m33masterBad

» Mohh2 no fog code.
Tue Jul 12, 2011 6:42 pm by m33masterBad

» instant nade guide
Tue Jul 12, 2011 6:31 pm by m33masterBad

» m33masterBad's Here
Sat Jul 02, 2011 5:35 pm by m33masterBad

» How to teach yourself and try and make templates
Sat Nov 13, 2010 4:56 pm by Jordan

» Making Universal Weapon Mods, Find Weapon Value
Thu Oct 07, 2010 4:02 am by mafiafran

» [ULUS-10141] Jokered Flash Sprint (My first Joker)
Thu Oct 07, 2010 4:02 am by mafiafran

» INF PMNS AND CLAYMORES
Thu Oct 07, 2010 4:02 am by mafiafran

» im back
Wed Aug 18, 2010 12:42 pm by SXYxJeff

» ADMIN APPLICATION
Fri Jul 30, 2010 7:48 pm by NiekTSK

» Ps2dis begginers guide - how to make a basic subroutine
Fri Jul 23, 2010 4:02 pm by pspguy1234290

» Hey
Mon Jul 19, 2010 3:29 pm by SXYxJeff

Top posters
Nick (454)
 
MJKT (419)
 
RappY (318)
 
tHaTdiRTykID (232)
 
CrAzY Gamer (194)
 
XxMIRAGExX (135)
 
EEL007 (128)
 
NiekTSK (124)
 
Battle Star (105)
 
TYLER108 (99)
 

Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

[ View the whole list ]


Most users ever online was 95 on Tue Aug 01, 2017 7:44 pm

Ps2dis begginers guide - how to make a basic subroutine

Go down

Ps2dis begginers guide - how to make a basic subroutine

Post by MJKT on Sat Apr 25, 2009 10:49 am

Begginners Guide- made for begginers by begginers
Credit - MJKT

Ok today im going to teach you how to turn a normal one line code into a subrotine using a computer program called ps2dis.

Once you learn how to do this you can start to learn jokers and other cool codes

Ok so first what we need is :

-PS2DIS
-A Ram Dump of your game (eg. mohh2)
-one line code converted to real addressing (eg. mohh2 flash)

-----------------

ok before you open ps2dis you need a ram dump of the game your making a Subrotine for.

so go to the game open up nitpr and scroll along to options and you will see this:

Dump ram to slot #0 <--------

click it and it will make a ram dump of your game in the root of your memory stick.

we will need it lator so dont delete it.

----------

next we NEED to convert our codes address to real addressing.

we do this so when we type the bits we need into ps2dis your subrotine will work.

so to convert to real address we just need to Add 8800000 to our normal nitepr code using a hex calculator.

hex calculator:
http://www.squarebox.co.uk/hcalc.html

eg.

here my code

#FLASH
0x0016ADC0 0x3C044080

now type in your address into the calculator and add 8800000

16ADC0 + 8800000 = 896ADC0

so heres our code in real addressing

0896ADC0

(plus a zero on the front so it is 8 didgets)

---------------------------------------------------
---------------------------------------------------

OK WE HAVE EVERYTHING WE NEED SO LETS BEGIN

1.Plug you psp into your computer and put your ram dump file on your computer.

2.Click on ps2dis and it will open.

3. click and drag your Ram dump file into ps2dis and it will say this:

load from 000000000
address from 000000000

now change the address from to 08e80000

load from 0000000000
address from 08e8000000


and click ok....

4.Now we need to find the NOP part of a your Ram dump.

now NOP is an area of zeros in ps2dis.

to get the NOP are press Ctrl F and a new box will appear

saying "find String"

now tick the little box that says "as hex string"

and in the typing box just type in lots and lots of zeros

"000000000000000000000000000000000000000000000000000000000000000000000000"

just hold down the zero button "0" for about 10 seconds.

you should now have a bit in ps2dis where all you can see as values is 0 or NOP

eg.

0x??????? 000000000 nop
0x??????? 000000000 nop
0x??????? 000000000 nop
0x??????? 000000000 nop
0x??????? 000000000 nop

------------------

5.Ok so now we can start writing our subrotine using this template

lui t0 $[First Half Of Address + 1 If Second Half Is 8000 Or More]
lui t1 $[First half Of Hex]
ori t1 t1 $[Second Half Of Hex]
sw t1 $[Second Half Of Address](t0)
JR RA

you confused what to do?

OK so

this is my flash code in real addressing

0896ADC0

when it says first half of a code i means it like, this

0896 ADC0

first half of address is 0896
second half of address is ADC0

you do this with hex value aswell

first half hex value 3c04
2nd half hex value is 4080

-----------------------------

OK so now double click on the first NOP fo the first line.

a box will come up.

there is a mini box called Command. it will have "nop" written in it like this:

Command : nop

now take the first part of our template:

lui t0 $[First Half Of Address + 1 If Second Half Is 8000 Or More]

and replace where it says

Command : nop

to

Command : lui t0 $

(you dont need the brackets)

now it wants us to put our first half of address in there so go ahead and put in it

eg

Command : lui t0 $0896.

that is our first line of the code!!! (but we will be coming back to this line in a minute)

-------------------------------

OK time for the second line and 2nd line of template.

lui t1 $[First half Of Hex]

ok so click on the next nop down and change the command to this.

Command : lui t1 $

now it wants us to put in the fist half of the hex value.

mine is 3C04 so it would look like this.

Command: lui t1 $3c04

click ok.

------------------

the 3rd line.

template for this line is

ori t1 t1 $[Second Half Of Hex]

so replace the command as "ori t1 t1 $ " like we did in the other lines.

my second half of my hex value is 4080 so it would look like this

Command : ori t1 t1 $4080.

get it now?

-----------------

now this is the 4th line and is inportant to look at.

the template

sw t1 $[Second Half Of Address](t0)

now we just do the same as we did before but we keep the (t0) there...

so mine looks like this

Command: sw t1 $ADC0(t0)

now going back to the first line of my code.

in the first line of the template it said

lui t0 $[First Half Of Address + 1 If Second Half Is 8000 Or More]

now look at the (+ 1 if second half is more then 8000)

now back to my code in real addressing.

first half

0896

second half

ADC0

now the second part is higer then 8000 istn it.

ADCO is bigger then 8000

(if your code is different you wont need to do this)

so what we need to do is add 1 to the end of the first half or the address

so 0896 becomes 0897.

UNDERSTAND?
if the second half is more then 8000 then you msut plus 1 to the first half for it to work.

------

now the last line of you code is the JR RA

this is easy so just replace the NOP with a jr ra.

so like this:

Command:jr ra

-----------
THERE!!!--NOW YOU HAVE NEARLY FINISHED YOUR SUBROTINE
-----------

ok now copy those lines you just did down and make sure you save them!!!!

now remember we added 8800000 to make our code real addressing?

we need to now convert are addresses back to fake/nitepr format addressing.

so just take away 8800000 from the address in th hex calculator

eg 08e80244 - 8800000 = 680244.

so your code goes from

EG.

0x08e80244 0x?????????
0x08e80248 0x?????????
0x08e8024c 0x?????????

to

0x00680244 0x?????????
0x00680248 0x?????????
0x0068024c 0x?????????

-----------------------------

my code looks like this (without hook):

#MOHH2 FLASH WITHOUT HOOK
0x00680244 0x3C080897
0x00680248 0x3C093C04
0x0068024C 0x35294080
0x00680250 0xAD09ADC0
0x00680254 0x03E00008

WE ARE SO NEARLY FINSIHED ALL WE NEED NOW IS A HOOK added to our SUB and its done!!

link to hook guide comming soon:

hope this guide helped and i wont have to explain myself in to much detail again Very Happy

credit: MJKT


Last edited by MJKT on Mon May 25, 2009 2:55 pm; edited 2 times in total
avatar
MJKT
Admin

Posts : 419
Join date : 2009-04-25
Age : 23
Location : The UK

http://pspcoding.darkbb.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by CrAzY Gamer on Sat Apr 25, 2009 10:51 am

Good guide mjkt Smile
avatar
CrAzY Gamer
Admin

Posts : 194
Join date : 2009-04-25
Age : 21
Location : USA, Massachusetts

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Sat Apr 25, 2009 3:33 pm

OMG i love this guide
you still need to post the link to the hook guide Sad i need a hook Sad
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by MJKT on Sat Apr 25, 2009 3:42 pm

zebonik wrote:OMG i love this guide
you still need to post the link to the hook guide Sad i need a hook Sad

well you can just use the mohh1 if your making for mohh1 ...which you proably are

_________________






here to help Razz

Mohh2 ID : iMJKT
avatar
MJKT
Admin

Posts : 419
Join date : 2009-04-25
Age : 23
Location : The UK

http://pspcoding.darkbb.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Sat Apr 25, 2009 4:14 pm

the one rap gave me? ya but d like to find one myself to have complete credit
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by NiekTSK on Mon Apr 27, 2009 2:09 am

Good guide! Thanks,
avatar
NiekTSK
Senior Member

Posts : 124
Join date : 2009-04-27

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Mon Apr 27, 2009 2:34 am

not good GREAT GUIDE MJKT!!!
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by NiekTSK on Mon Apr 27, 2009 6:11 am

Yes, it's a great guide:P
sorry for the "good" word:P
hhaha
avatar
NiekTSK
Senior Member

Posts : 124
Join date : 2009-04-27

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by TYLER108 on Tue Apr 28, 2009 3:53 pm

Great Guide. I may try this once I become better with coding on CoderPR. Great Job MJKT.

TYLER108
Junior Member

Posts : 99
Join date : 2009-04-26

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Tue Apr 28, 2009 6:14 pm

tyler you dont have to do anything with coderpr for this except the ramdump...try it
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by tHaTdiRTykID on Tue Apr 28, 2009 7:55 pm

i downloaded coderpr, its sweet
avatar
tHaTdiRTykID
Active Member

Posts : 232
Join date : 2009-04-26
Age : 24
Location : Illinois

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Wed Apr 29, 2009 8:07 am

yep coderpr is soooo much better Very Happy
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by tHaTdiRTykID on Wed Apr 29, 2009 2:54 pm

now that i have used it, i like them about the same
avatar
tHaTdiRTykID
Active Member

Posts : 232
Join date : 2009-04-26
Age : 24
Location : Illinois

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Nick on Wed Apr 29, 2009 3:16 pm

i like the hz auto 15/1000 the best Smile
avatar
Nick
Active Member

Posts : 454
Join date : 2009-04-25
Age : 22
Location : USA

http://gghq.forumotion.com

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by BeyondOwnage on Sat Jun 13, 2009 11:34 am

lol im a lil bit late but i luv this guide. it kick pushed me into learning mips
avatar
BeyondOwnage
Member

Posts : 39
Join date : 2009-05-30

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by GMKBUDDY on Tue Jun 30, 2009 12:16 am

Wow man.. I will try to make good codes Very Happy
avatar
GMKBUDDY
Junior Member

Posts : 96
Join date : 2009-06-02
Age : 22
Location : Singapore

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by -x.jJ4R.iiSH.x- on Mon Oct 19, 2009 2:19 pm

i use mk v10 Smile And what is the hook for Socom FTB2 US?
avatar
-x.jJ4R.iiSH.x-
Member

Posts : 3
Join date : 2009-10-19

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by aquareplay on Tue Jul 06, 2010 4:19 pm

Is a subroutine a section of code you want to be constantly executed?
avatar
aquareplay
Member

Posts : 3
Join date : 2010-07-06

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Battle Star on Thu Jul 08, 2010 2:02 am

Nice guide man Very Happy
avatar
Battle Star
Senior Member

Posts : 105
Join date : 2009-07-18
Age : 24
Location : Germany

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by pspguy1234290 on Fri Jul 23, 2010 4:02 pm

BUMP

No one ever made the hook guide? Im a little better a coding now can someone make one please?
avatar
pspguy1234290
Member

Posts : 3
Join date : 2009-11-10

Back to top Go down

Re: Ps2dis begginers guide - how to make a basic subroutine

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum