Credit: Warlock
============
lui t0, $(First four of the controller address)
lui t1, $(First four code address +0880)
lh t2, $(Second four controller address)(t0)
addiu t3, zero, $(Increase Button)
bne t2, t3, $(Address of the next bne)
lw t4, $(Second four code address)(t1)
nop
addiu t5, zero, $(Increment rate I use 0020)
add t6, t4, t5
sw t6, $(Second four code address)(t1)
beq zero, zero, $(Address of the jr ra)
addiu t4, zero, $(Decrease Button)
bne t2, t4, $(Address of the the jr ra)
lw t5, $(Second four code address)(t1)
nop
addiu t6, zero, $(Decrement rate I use 0020)
sub t7, t5, t6
sw t7, $Second four code address(t1)
nop
Jr ra
============
And of course you need a hook