My First Sub Routine!!! (Inf Health)
WooHoo!!! This is my VERY FIRST sub routine!
After being in the PSP scene for a while, I wanted to learn how to code, but that is a long way from now.
So I wanted to start off small.
I was going to do everything in this order: Porting, Text Mod, Map Mod, Coding.
But I couldn't find a guide/tutorial on making map mods so I went onto sub routines.
I skipped map mods so yeah.
Can someone answer this question: Are sub routines considered coding?
Took me over an hour because I kept messing up. But I got through it and made my first sub routine!
#Inf Health Sub
;Prestige
0x0000004C 0x0A3A0000
0x00680000 0x3C0808CD
0x00680004 0x3C090000
0x00680008 0x35290000
0x0068000C 0xAD099628
0x00680010 0x03E00008
Re: My First Sub Routine!!! (Inf Health)
Nice work, glad to see another person learning. Loading and stroing subrotuines are generally easy to do, but heres a little idea. Im 99% sure that a nop or 00000000 is the EXACT SAME as the byte 00 so that means instead of ori'n (or anddi or addiu works too) you can just load the byte ontot the data.....
lb t1, $00(tX)
Nice work also to increment health find a float and use addiu to add the data to the pointer or fnc when hit.
Re: My First Sub Routine!!! (Inf Health)
Quote:
Originally Posted by
As Known As
Nice work, glad to see another person learning. Loading and stroing subrotuines are generally easy to do, but heres a little idea. Im 99% sure that a nop or 00000000 is the EXACT SAME as the byte 00 so that means instead of ori'n (or anddi or addiu works too) you can just load the byte ontot the data.....
lb t1, $00(tX)
Nice work also to increment health find a float and use addiu to add the data to the pointer or fnc when hit.
Thanks. I was looking at guides and saw ori so that's what I used. And the stuff with floats and increment health, I don't get. But don't worry. I will get there sooner or later. I still havn't learned MIPS yet.
Re: My First Sub Routine!!! (Inf Health)
Quote:
Originally Posted by
Prestige
Thanks. I was looking at guides and saw ori so that's what I used. And the stuff with floats and increment health, I don't get. But don't worry. I will get there sooner or later. I still havn't learned MIPS yet.
Well you can never fully learn MIPS and such and ALOT of it people learn themselves by trial and error such as I do and what YOU just did! Well still I would suggest learning the basic commands and what they and how they can be used for.
There are several great books such as NOFX"s MIPS book from 1.3 that has many great things, or WhoIsYou's MIPS for dummies book which covers other great things which coders should learn..
Well best of luck to you and those books and tuts should help you along the way.. :wink:
Re: My First Sub Routine!!! (Inf Health)
simple searches>>>>turbed to floats and sorts>>>>>turned to dma's>>>>turned to subs and such.
Thts how I figure it
Re: My First Sub Routine!!! (Inf Health)
Re: My First Sub Routine!!! (Inf Health)
would this work too
hook
lui t0, $(first 4 digits of health)
sw zero, $(last 4 digits of health) (t0)
jr ra
It might work and make it easier and shorter, just dont have time to see. Just an idea had to type it down really quick.
Any way Nice job learning how to code Prestige.
Re: My First Sub Routine!!! (Inf Health)
Quote:
Originally Posted by
h3LL
would this work too
hook
lui t0, $(first 4 digits of health)
sw zero, $(last 4 digits of health) (t0)
jr ra
yea,,,
Re: My First Sub Routine!!! (Inf Health)
sweet shit, everyone is learnin MIPS now a days