Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lui $t9, 0x0C07 # setup self to run every frame, by replacing the function that zeroes out controller 2
- addiu $t1, $t9, 0x741A
- lui $t6, 0x800A
- sw $t1, 0x2634($t6)
- # a0 is already set up by the function we hook into to point at controller 2 buttons
- lw $t0 0x0006($a0) # load controller 3 buttons into upper half of word
- srl $t8, $t0, 0xA
- lw $a1 0x000A($a0) # load controller 4 buttons into lower half of word, with upper half as zeroes
- lui $t9, 0x8000
- or $a2, $t9, $t8
- lb $t1 0x0000($a0) # load upper byte of controller 2 buttons (A/B/Z/Start/D)
- lb $t0 0x0001($a0) # load lower byte of controller 2 buttons (L/R/C)
- beq $t0, $r0, 0x2 # write value only if controller 2 has pressed C button or L/R
- or $t8, $a2, $a1
- sb $t1, 0x0000($t8) # *((controller3 << 6) | controller4) = controller2
- jr $ra
- nop
- 3C 19 0C 07
- 27 29 74 1A
- 3C 0E 80 0A
- AD C9 26 34
- 8C 88 00 06
- 00 08 C2 82
- 8C 85 00 0A
- 3C 19 80 00
- 03 38 30 25
- 80 89 00 00
- 80 88 00 01
- 11 00 00 02
- 00 C5 C0 25
- A3 09 00 00
- 03 E4 00 08
- 00 00 00 00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement