Post by Deleted on Mar 13, 2013 14:06:05 GMT -5
Last night, Sakura was helping me get set up for assembly modding on Skype. She got me hooked up with with nice tool called Renegade and a python script she wrote that converts the output to a Nemu ini file
Unfortunately....didn't get far really...she was trying to set me up with OoT dbg and I was using 1.0 ( U) lol.
Anyway, while I was waiting for her to get on today, I figured it out on my own! The steps I took were this:
and voila! Link had max health ^_^
Unfortunately....didn't get far really...she was trying to set me up with OoT dbg and I was using 1.0 ( U) lol.
Anyway, while I was waiting for her to get on today, I figured it out on my own! The steps I took were this:
- I set a breakpoint on the BEQ instruction
- I made a list of all the addresses BEQ $R0, $R0, XXXX appeared (because $R0 is always 0, so this is an unconditional jump)
- I took the most commonly appearing instruction on the list; which was 'beq $r0, $r0, 0x80003BCC' and disassembled the memory at that address.
LW RA, 0x0014 (SP)
ADDIU SP, SP, 0x0018
JR RA
NOP
NOP
- I decided to place my hook here, and place my stub in some empty ram at 0x80170000. I set my hook up as
.org 0x80003BCC
j 0x80170000
nop
- Next, I wrote the code for my stub, and added the code that used to be were my hook was to the end of it
.org 0x80170000
_start:
lui $k0, 0x8011
ori $k0, $k0, 0xA5FE
lwi $k1, 0x0140
sh $k1, 0 ($k0)
lw $ra, 0x0014 ($sp)
addiu $sp, $sp, 0x0018
jr $ra
nop
- Then I assembled it to a gameshark code
81003BCC 0805
81003BCE C000
81003BD0 2400
81170000 3C1A
81170002 8011
81170004 375A
81170006 A5FE
81170008 3C1B
8117000A 0000
8117000C 377B
8117000E 0140
81170010 A75B
81170012 0000
81170014 8FBF
81170016 0014
81170018 27BD
8117001A 0018
8117001C 03E0
8117001E 0008
81170020 2400
81170024 2400
- Set a breakpoint on 0x80003BCC (where my hook was)
and voila! Link had max health ^_^