Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* $s2: origin */
- la $s0, 0x80120000
- /* create a vi message queue */
- addiu $a0, $sp, 0x0010 /* mq */
- addiu $a1, $sp, 0x0028 /* msg */
- la $a2, 1
- /* hijack vi event from audio thread */
- sw $a0, 0x0180($s0) /* mq_list.mq for audio irq */
- jal 0x80004220 /* osCreateMesgQueue(mq, msg, 1) */
- .Lloop:
- /* wait for vertical retrace */
- addiu $a0, $sp, 0x0010 /* mq */
- la $a1, 0
- /* $a2 is not clobbered by osCreateMesgQueue or osRecvMesg, so reuse it */
- jal 0x80002030 /* osRecvMesg(mq, NULL, OS_MESG_BLOCK) */
- /* copy controller data */
- lw $t0, -0x28D0($s0) /* z64_input_direct[0].raw */
- lhu $t1, -0x289E($s0) /* z64_input_direct[2].raw.x / y */
- sh $t0, 0x003C($s2)
- sh $t1, 0x003E($s2)
- addiu $s2, $s2, 0x0004
- bne $t0, $zero, .Lloop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement