So basically this will let you hook as many routines as you'd like. Starting at $00080000. Currently hooks constantly, so if you want a routine to execute once you can add a boolean inside your routine to check if routine has ran already.
Code:
// SOCOM II Core Hook address $20404F2C hexcode $000801F0 address $200801F0 addiu sp, sp, $ffe0 sd ra, $0020(sp) sq s1, $0010(sp) sq s0, $0000(sp) lui s1, $0008 loop: lw s0, $0000(s1) beq s0, zero, :end nop lw v0, $0000(s0) beq v0, zero, :end nop jalr s0 nop addiu s1, s1, $0004 beq zero, zero, :loop nop end: ld ra, $0020(sp) lq s1, $0010(sp) lq s0, $0000(sp) j $002CE9E0 addiu sp, sp, $0020 // Hook starts at $00080000 // Will check for a nop at first line, to prevent freezing if you dont have anything written there // Ex: // Fnc Address address $20080000 hexcode $000c0000 address $20080004 hexcode $000c0010 // Fnc 1 address $200c0000 hexcode $03e00008 // Fnc 2 address $200c0010 hexcode $03e00008
Code:
20404F2C 000801F0 200801F0 27BDFFE0 200801F4 FFBF0020 200801F8 7FB10010 200801FC 7FB00000 20080200 3C110008 20080204 8E300000 20080208 12000009 2008020C 00000000 20080210 8E020000 20080214 10400006 20080218 00000000 2008021C 0200F809 20080220 00000000 20080224 26310004 20080228 1000FFF6 2008022C 00000000 20080230 DFBF0020 20080234 7BB10010 20080238 7BB00000 2008023C 080B3A78 20080240 27BD0020