Forum: Official PS2rd Forums - PS2rd is a collection of open source tools to debug commercial PS2 games remotely over Ethernet.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: ASM code to write to memory with ps2rd
  

Results 1 to 1 of 1
  1. #1 ASM code to write to memory with ps2rd 
    bungholio is offline Member
    Join Date
    Aug 2010
    Posts
    112
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    2
    This is just a tiny little thing I made in about 5 minutes and tested. It works perfectly. Just use it with ps2rd to write codes to memory while playing, since ps2rd doesn't have that ability yet. It's only 41 lines of code, which surprises me because I kept thinking something this simple would have been twice that size.

    Code:
    2??????? 0803c000
    200efff0 0???????
    200f0000 3c19000f
    200f0004 8f38fff4
    200f0008 8f2ffff8
    200f000c 8f2efffc
    200f0010 8f2dfff0
    200f0014 340cfeef
    400f0018 00040002
    118d000f 00000000
    200f001c 340cfedf
    200f0024 340cfebf
    200f002c 340cfe7f
    200f0034 340cfdef
    200f0038 118d0012
    200f003c 340cfddf
    200f0040 118d0017
    200f0044 340cfdbf
    200f0048 118d0018
    400f0050 00040002
    03e00008 00000000
    200f005c af0f0000
    200f0064 a70f0000
    200f006c a30f0000
    200f0070 af20fff4
    200f0074 af20fff8
    200f0078 34180001
    200f007c 03e00008
    200f0080 af38fffc
    200f0084 000e7040
    200f0088 34180001
    200f008c 3c0f0800
    200f0090 15f8fffe
    200f0094 27180001
    400f0098 00030003
    03e00008 00000000
    200f009c af2efffc
    200f00a0 030ec025
    200f00a8 af38fff4
    200f00ac 01ee7825
    200f00b4 af2ffff8
    That can be copied and pasted to every game if you want. Only the first and second lines are different from game to game.

    The first line is the address that jumps to this function. Just load the game's ELF file, invoke the analyzer, and use labelmates to find "scesifsendcmd". Whatever address its "jr ra" is is the address you should use to jump to this function. For example, it would be 20119c04 0803c000 for "Obscure: The Aftermath NTSC".

    The second line is the address of the joker/pad address. For "Obscure: The Aftermath NTSC" it would be 200efff0 00552b02.

    Buttons:
    L2 + Up = Write 4 bytes to address
    L2 + Right = Write 2 bytes to address
    L2 + Down = Write 1 byte to address
    L2 + Left = Reset Address & Value to 0, reset ORed value to 1
    R2 + Up = Shift ORed bit left 1 bit
    R2 + Right = OR the OR value to the address
    R2 + Down = OR the OR value to the value

    R2 + Up will intentionally pause the game for about 1 second. It's that way so you don't shift the bit left 50 times in an instant.

    You start by pressing L2 + Left. Once you know the address and value you want to write to the address, you use R2 + Up to shift the bit, and R2 + Right & R2 + Down to OR that bit to create the address and value you want write to that address. If you mess up, just Press L2 + Left and restart. Use ps2cc or whatever to see the memory in case you aren't sure of what you are doing. All you would need to look at are addresses 000efff4 (your address), 000efff8 (your value), and 000efffc (the value you OR to the address and value to create them).
    Attached Thumbnails Attached Thumbnails asm-memory-writer-ps2rd.png  
    Reply With Quote  

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •