PSP Coding


 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 [HELP] How to Sub DMA code?

Go down 
AuthorMessage
Brian_000

avatar

Posts : 33
Points : 45
Reputation : 0
Join date : 2010-10-02
Age : 28
Location : Brgy. Binan Pagsanjan Laguna, Philippines

PostSubject: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 2:03 am

[HELP] How to Sub DMA code?

Thanks. xD
Back to top Go down
View user profile http://www.onehitgamer.com/forum/
-LeetGamer-
Admin


Posts : 247
Points : 397
Reputation : 4
Join date : 2010-09-29
Age : 25

PostSubject: Re: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 2:12 am

Code:

1) Lui t0 $Upper 16bits of pointer + 0x0880
2) Lw t0 $Lower 16bits of pointer(t0)
3) Lui t1 $Upper 16bits of code value
4) Ori t1 t1 $Lower 16bits of code value
5) Sw t1 $Offset(t0)
6) Jr ra

Line 1 - 2: Loads the value of your pointer into t0
Line 3 - 4: Loads your hex value into t1
Line 5: Stores your hex value to your dma address, making the code turn on
Line 6: Jump to the ra, just think of this as the end of the code

You will also need a hook, if you don't know how to write a basic subroutine (Not dma) then try that first, let me know if you have any questions (Also let me know if you are completely new to this, if so I will reply with a lot more information, this post is already assuming that you know how to write a basic subroutine)

EDIT:

Example code:

0xFFFFFFFF 0x00123456
0x00000040 0xABCDEF11

MIPS:

Lui t0 $0892
Lw t0 $3456
Lui t1 $ABCD
Ori t1 t1 $EF11
Sw t1 $0040(t0)
Jr ra

EDIT TWO:

You said you wanted a real code example on the chatbox so here:

#Kill Everything
;By TheEliteOne aka -LeetGamer-
;Soldiers, pesants, even bosses die.
;Might freeze when you exit/enter a movie.
;Or change areas.
0xFFFFFFFF 0x002A9D14
0x00000160 0x00000000

#Kill Everything - No Freeze
;By TheEliteOne aka -LeetGamer-
;Soldiers, pesants, even bosses die.
;you can't turn & run at the same time.
0x0000F064 0x0e2a0683
0x00281A0C 0x3c0808ab
0x00281A10 0x8d089d14
0x00281A14 0x3c090000
0x00281A18 0xad090160
0x00281A1C 0x03e00008

That is for assassin's creed bloodlines. Let me know if you need anything.
Back to top Go down
View user profile
Brian_000

avatar

Posts : 33
Points : 45
Reputation : 0
Join date : 2010-10-02
Age : 28
Location : Brgy. Binan Pagsanjan Laguna, Philippines

PostSubject: Re: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 3:10 am

-LeetGamer- wrote:
#Kill Everything - No Freeze
;By TheEliteOne aka -LeetGamer-
;Soldiers, pesants, even bosses die.
;you can't turn & run at the same time.
0x0000F064 0x0e2a0683
0x00281A0C 0x3c0808ab
0x00281A10 0x8d089d14
0x00281A14 0x3c090000
0x00281A18 0xad090160
0x00281A1C 0x03e00008
Red -Is that the value of the Sub DMA?
tell me if only 16 bytes is the value if you change the DMA into DMA Subroutine?
Shocked lol!
Back to top Go down
View user profile http://www.onehitgamer.com/forum/
-LeetGamer-
Admin


Posts : 247
Points : 397
Reputation : 4
Join date : 2010-09-29
Age : 25

PostSubject: Re: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 3:13 am

That is the value, in red here:

#Kill Everything
;By TheEliteOne aka -LeetGamer-
;Soldiers, pesants, even bosses die.
;Might freeze when you exit/enter a movie.
;Or change areas.
0xFFFFFFFF 0x002A9D14
0x00000160 0x00000000

I should of used the MIPS like this though:

Lui t0 $08AB
Lw t0 $9D14(t0)
Sw zero $0160(t0)
Jr ra

That would of saved me some time, because the zero register always holds the value 0 as I explain here:

https://www.youtube.com/watch?v=-xS9YD8j4fA
Back to top Go down
View user profile
Brian_000

avatar

Posts : 33
Points : 45
Reputation : 0
Join date : 2010-10-02
Age : 28
Location : Brgy. Binan Pagsanjan Laguna, Philippines

PostSubject: Re: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 3:23 am

i see only first half of the value of hex.
plz post the second half of the value of hex.

thanks. Razz
Back to top Go down
View user profile http://www.onehitgamer.com/forum/
-LeetGamer-
Admin


Posts : 247
Points : 397
Reputation : 4
Join date : 2010-09-29
Age : 25

PostSubject: Re: [HELP] How to Sub DMA code?   Mon Oct 04, 2010 3:26 am

Brian_000 wrote:
i see only first half of the value of hex.
plz post the second half of the value of hex.

thanks. Razz

That is because when we do this: (Note: This is not part of the code above, just an example)

Ori t0 zero $0000

t0 holds the value 0x00000000

So if I store that value it will store the full value of 0x00000000 (The default value of a temporary register is 0x00000000 so if we bitwise or 0000 to it the result is still 00000000, watch my video tutorials on registers and bitwise or to understand what I just said Razz)

That clear it up?
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: [HELP] How to Sub DMA code?   

Back to top Go down
 
[HELP] How to Sub DMA code?
Back to top 
Page 1 of 1
 Similar topics
-
» Emoticon Code from Neopets!
» JOIN THE MOST BEASTLY DOJO WITH THE CODE: AFAEAHGE
» New Cheerleading Move Code
» Animal ID code not working?
» First Code from Ds game Welcome to Hugsville

Permissions in this forum:You cannot reply to topics in this forum
PSP Coding :: PSP Section :: PSP Chat :: PSP Coding Help-
Jump to: