Im not going to go in full detail on how to use this because you either get it or you dont.... Good luck
-Requirements:
1.)You must know the basic of mips
2.)How to find functions...
What Im about to show you is only a different way on how to joker... In stacks! Its only use for calling on functions within game. (Im going to be using Socom Fireteam Bravo II as a example)
-Hook <--- I would recommend the 98 hook because ive recently found out the other ones are funny acting with this method)
addiu sp, sp -20 <---- sets aside 20 bits so that way we can save it to 0000 (negative 20 bits is FFE0)
sw a0, $0000(sp) <---- Saved a0 to the stack at offset 0000
sw s0, $0004(sp) <--- Saved s0 to the stack at offset 0004
lui a0, $09A8 <---- load our 1st four controller address here
lh a0, $E1E4 <----- load last four controller address
addiu s0, zero, $8000 <---- store our button value, which is square
and a0, a0, s0 <---- this will allow us to use our joker, while we stil can press other buttons
bne s0, a0, $0002 <----- we branch if square isnt press in
sw ra, $0008(sp) <---- alway got to use this command before a JAL, if not you freeze)
jal $function or routine <--- this is like your hook to wateva function or routine you have)
lw a0, $0000(sp) <---- this will restore a0 back when we use it
lw s0, $0004(sp) <---- this will restore s0 back when we use it
lw ra, $0008(sp) <---- we need this to load, if not there then you crash
jr ra
addiu sp, sp, $0020 <---add the 20 bit back to the stack
Im not going to show how it suppose to be in a code but heres the hex values for each line that your making your code...
0x27BDFFE0
0xAFA40000
0xAFB00004
0x3C0409A8
0x8484E1E4
0x24108000
0x00902024
0x16040002
0xAFBF0008
0xE2000000 <------ Hook to your function or routine
0x8FA40000
0x8FB00004
0x8FBF0008
0x03E00008
0x27BD0020