what you need
- a ram dump
- a hook
- a controller address
- a code to joker

finding your controller address -
hold down one of the buttons listed bellow and search the corresponding value.
if this dost work search for an unknown 32 bit value. hold a button and search greater,
then let go and search less.

Select button = 0001
Start button = 0008
Up D-Pad button = 0010
Right D-Pad button = 0020
Down D-Pad button = 0040
Left D-Pad button = 0080
Left trigger = 0100
Right trigger = 0200
Triangle button = 1000
Circle button = 2000
Cross button = 4000
Square button = 8000

now we need a hook, finding a hook i quite simple just search in hex "03e0008" then copy the results nop them if it freezes you it means its an active hook. hooks can be jr ra, jals and j's. but for now we a just going to stick with J $.

finding your hooks value. open up ps2dis and enter "J $" after the $ put the first line of your routine in real addressing.

here's the mips template.

lui t0 $First half of controller real addressing
lw t0 $second half of controller(t0)
lui t1 $first half of code address real addressing
ori t2 zero $inc button value
ori t3 zero $dec button value
bne t0 t2 $next bne
nop
lw t4 $second half of code address(t1)
ori t5 zero $increase amount
add t6 t4 t5
sw t6 $second half of code address(t1)
bne t0 t3 $jr ra
nop
lw t7 $second half of code address(t1)
ori t8 zero $decrease amount
sub t9 t7 t8
sw t9 $second half of code address(t1)
jr ra
hook

understand the mips :

lui
lui : load upper immediate
loads the first 16bits of your controller address in to t0

lw
lw : load word
loads a word in to your register

ori
ori : bitwise or immediate
checks to see if increase/decrease button is being pressed

bne
bne : branch on not equal
branches to the next bne when button is not being pressed

nop
nop : no operation
acts as delay slot

add
add : add
adds value to registers and then stores results

sub
sub : subtract
subtracts value from registers and then stores results