Multiply Rotation Matrix r4 by Input Vector r5
Revision as of 05:41, 4 November 2022 by Talcall (talk | contribs) (Talcall moved page 0001c9e0 - 0001cb00 to Multiply Rotation Matrix r4 by Input Vector r5)
r4 = 3x3 rotation matrix R r5 = input matrix (x, y, z) 0001c9e0: 8c880000 lw r8,0x0000(r4) R11 & R21 0001c9e4: 8cab0000 lw r11,0x0000(r5) x 0001c9e8: 3109ffff andi r9,r8,0xffff R11 0001c9ec: 00094c00 sll r9,r9,0x10 0001c9f0: 00094c03 sra r9,r9,0x10 0001c9f4: 012b0019 multu r9,r11 R11 * x? 0001c9f8: 00085403 sra r10,r8,0x10 r10 = R21 0001c9fc: 8cac0004 lw r12,0x0004(r5) y 0001ca00: 8cad0008 lw r13,0x0008(r5) z 0001ca04: 8c880004 lw r8,0x0004(r4) R31 & R12 0001ca08: 00801021 addu r2,r4,r0 0001ca0c: 00004812 mflo r9 0001ca10: 00094b03 sra r9,r9,0x0c divide by 4096, this is just because cos of an angle can't be stored with decimal places. 0001ca14: 3129ffff andi r9,r9,0xffff 0001ca18: 014b0019 multu r10,r11 R21 * x 0001ca1c: 00005012 mflo r10 0001ca20: 000a5303 sra r10,r10,0x0c R21 * x proper 0001ca24: 000a5400 sll r10,r10,0x10 0001ca28: 012a4825 or r9,r9,r10 [(R11 * x, R21 * x)] 0001ca2c: ac890000 sw r9,0x0000(r4) store new R11 and R21 values 0001ca30: 3109ffff andi r9,r8,0xffff R31 0001ca34: 00094c00 sll r9,r9,0x10 0001ca38: 00094c03 sra r9,r9,0x10 0001ca3c: 012b0019 multu r9,r11 R31 * x 0001ca40: 00085403 sra r10,r8,0x10 R12 0001ca44: 8c880008 lw r8,0x0008(r4) R22 & R23 0001ca48: 00004812 mflo r9 0001ca4c: 00094b03 sra r9,r9,0x0c R31 * x proper 0001ca50: 3129ffff andi r9,r9,0xffff 0001ca54: 014c0019 multu r10,r12 R12 * y 0001ca58: 00005012 mflo r10 0001ca5c: 000a5303 sra r10,r10,0x0c R12 * y proper 0001ca60: 000a5400 sll r10,r10,0x10 0001ca64: 012a4825 or r9,r9,r10 [(R31 * x),(R12 * y)] 0001ca68: ac890004 sw r9,0x0004(r4) Store new Matrix R31 and R12 0001ca6c: 3109ffff andi r9,r8,0xffff R22 0001ca70: 00094c00 sll r9,r9,0x10 0001ca74: 00094c03 sra r9,r9,0x10 0001ca78: 012c0019 multu r9,r12 R22 * y 0001ca7c: 00085403 sra r10,r8,0x10 R23 0001ca80: 8c88000c lw r8,0x000c(r4) R31 & R32 0001ca84: 00004812 mflo r9 0001ca88: 00094b03 sra r9,r9,0x0c 0001ca8c: 3129ffff andi r9,r9,0xffff 0001ca90: 014c0019 multu r10,r12 R23 * y 0001ca94: 00005012 mflo r10 0001ca98: 000a5303 sra r10,r10,0x0c 0001ca9c: 000a5400 sll r10,r10,0x10 0001caa0: 012a4825 or r9,r9,r10 [(R22 * y, R23 * y)] 0001caa4: ac890008 sw r9,0x0008(r4) Store new matrix R22 and R23 0001caa8: 3109ffff andi r9,r8,0xffff R31 0001caac: 00094c00 sll r9,r9,0x10 0001cab0: 00094c03 sra r9,r9,0x10 0001cab4: 012d0019 multu r9,r13 R31 * z 0001cab8: 00085403 sra r10,r8,0x10 R32 0001cabc: 8c880010 lw r8,0x0010(r4) R33 & null 0001cac0: 00004812 mflo r9 0001cac4: 00094b03 sra r9,r9,0x0c R31 * z proper 0001cac8: 3129ffff andi r9,r9,0xffff 0001cacc: 014d0019 multu r10,r13 0001cad0: 00005012 mflo r10 0001cad4: 000a5303 sra r10,r10,0x0c R32 * z proper 0001cad8: 000a5400 sll r10,r10,0x10 0001cadc: 012a4825 or r9,r9,r10 [(R31 * z, R32 * z)] 0001cae0: ac89000c sw r9,0x000c(r4) Store new R31 and R32 0001cae4: 3109ffff andi r9,r8,0xffff R33 0001cae8: 00094c00 sll r9,r9,0x10 0001caec: 00094c03 sra r9,r9,0x10 0001caf0: 012d0019 multu r9,r13 R33 * z 0001caf4: 00004812 mflo r9 0001caf8: 00094b03 sra r9,r9,0x0c [(R33 * z)] 0001cafc: 03e00008 jr r31 0001cb00: ac890010 sw r9,0x0010(r4) Store new R33