//Controller half //ROM address: 0x00C18E90 //RAM address: 0x803EA190 .set noat .set noreorder .global controls .ent controls controls: addiu $t5, $sp, 0x0044 lui $v0, 0xFFFF lui $t6, 0x8016 ori $t6, $t6, 0x6AF0 lb $t7, 0x001F ($s0) sll $t7, $t7, 0x3 add $t6, $t7, $t6 sll $t7, $t7, 0x1 add $t6, $t6, $t7 // I know i could have done "ori mul mfhi add", but I like bitshifts lh $t7, 0x0000 ($t6) // Buttons sll $t7, $t7, 0x10 sw $t7, 0x000C ($t5) lh $t7, 0x0002 ($t6) // Analog sll $t7, $t7, 0x10 sw $t7, 0x0014 ($t5) nop nop nop nop nop .end controls .set at .set reorder