Difference between revisions of "00089748 - 000897d8"
Jump to navigation
Jump to search
m |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<font face='Courier New'> | <font face='Courier New'> | ||
− | + | unused and unfinished. never resolves. | |
− | |||
if 0x87 = 2 | if 0x87 = 2 | ||
00089748: 00802821 addu r5,r4,r0 r5 = misc unit data pointer | 00089748: 00802821 addu r5,r4,r0 r5 = misc unit data pointer | ||
0008974c: 8ca6008c lw r6,0x008c(r5) distortion variable | 0008974c: 8ca6008c lw r6,0x008c(r5) distortion variable | ||
− | 00089750: 8ca30088 lw r3,0x0088(r5) | + | 00089750: 8ca30088 lw r3,0x0088(r5) distortion phase |
00089754: 8ca40090 lw r4,0x0090(r5) altered height mod | 00089754: 8ca40090 lw r4,0x0090(r5) altered height mod | ||
− | 00089758: 10600005 beq r3,r0,0x00089770 branch if | + | 00089758: 10600005 beq r3,r0,0x00089770 branch if phase is initialisation |
0008975c: 34020001 ori r2,r0,0x0001 | 0008975c: 34020001 ori r2,r0,0x0001 | ||
− | 00089760: 1062000b beq r3,r2,0x00089790 branch if | + | 00089760: 1062000b beq r3,r2,0x00089790 branch if phase is executing |
00089764: 00000000 nop | 00089764: 00000000 nop | ||
00089768: 080225f5 j 0x000897d4 do nothing otherwise. | 00089768: 080225f5 j 0x000897d4 do nothing otherwise. | ||
0008976c: aca6008c sw r6,0x008c(r5) restore 0x8c into itself. | 0008976c: aca6008c sw r6,0x008c(r5) restore 0x8c into itself. | ||
− | + | Initialising | |
00089770: 3c03fffd lui r3,0xfffd | 00089770: 3c03fffd lui r3,0xfffd | ||
− | 00089774: 3463c000 ori r3,r3,0xc000 r3 = 0xfffdc000 | + | 00089774: 3463c000 ori r3,r3,0xc000 r3 = 0xfffdc000 ( ~= 0x1/0x1) |
00089778: 0066001a div r3,r6 | 00089778: 0066001a div r3,r6 | ||
− | 0008977c: 00003012 mflo r6 | + | 0008977c: 00003012 mflo r6 0x1 / (0x1 * var.) |
− | 00089780: 8ca4001c lw r4,0x001c(r5) height mod of unit * | + | 00089780: 8ca4001c lw r4,0x001c(r5) height mod of unit * 0x1000 |
00089784: 34020001 ori r2,r0,0x0001 | 00089784: 34020001 ori r2,r0,0x0001 | ||
− | 00089788: aca20088 sw r2,0x0088(r5) store | + | 00089788: aca20088 sw r2,0x0088(r5) store phase as initialised |
− | 0008978c: 00832021 addu r4,r4,r3 height | + | 0008978c: 00832021 addu r4,r4,r3 (height - 0x24) * 0x1000 |
− | + | Executing & Initialising return | |
− | 00089790: 8ca3001c lw r3,0x001c(r5) height mod | + | 00089790: 8ca3001c lw r3,0x001c(r5) height mod * 0x1000 |
00089794: 00000000 nop | 00089794: 00000000 nop | ||
− | 00089798: 0083102a slt r2,r4,r3 | + | 00089798: 0083102a slt r2,r4,r3 true if height - 0x24 < height |
− | 0008979c: 10400003 beq r2,r0,0x000897ac branch if | + | 0008979c: 10400003 beq r2,r0,0x000897ac branch if height - 0x24 > height (error check?) |
− | 000897a0: 00c31021 addu r2,r6,r3 r2 = | + | 000897a0: 00c31021 addu r2,r6,r3 r2 = height mod * 0x1000 + 0x1 / (0x1 * var.) |
000897a4: 080225ed j 0x000897b4 | 000897a4: 080225ed j 0x000897b4 | ||
000897a8: aca2001c sw r2,0x001c(r5) store new height mod | 000897a8: aca2001c sw r2,0x001c(r5) store new height mod | ||
+ | |||
+ | Error handling (probably ignorable) | ||
+ | 000897ac: aca4001c sw r4,0x001c(r5) store (height - 0x24) * 0x1000 as height mod if error occurs and this value is larger than height * 0x1000 | ||
+ | 000897b0: a0a00087 sb r0,0x0087(r5) clear distortion anim ID | ||
− | |||
− | |||
000897b4: 8ca2001c lw r2,0x001c(r5) load height mod | 000897b4: 8ca2001c lw r2,0x001c(r5) load height mod | ||
000897b8: 00000000 nop | 000897b8: 00000000 nop | ||
000897bc: 04410002 bgez r2,0x000897c8 branch if greater than 0 | 000897bc: 04410002 bgez r2,0x000897c8 branch if greater than 0 | ||
000897c0: 00000000 nop | 000897c0: 00000000 nop | ||
− | 000897c4: 24420fff addiu r2,r2,0x0fff rounds properly if negative | + | 000897c4: 24420fff addiu r2,r2,0x0fff rounds properly if negative |
− | 000897c8: 00021303 sra r2,r2,0x0c divide by | + | 000897c8: 00021303 sra r2,r2,0x0c divide by 0x1000 |
− | 000897cc: a4a20042 sh r2,0x0042(r5) store | + | 000897cc: a4a20042 sh r2,0x0042(r5) store as height |
− | 000897d0: aca6008c sw r6,0x008c(r5) store | + | 000897d0: aca6008c sw r6,0x008c(r5) store 0x1 / (0x1 * var) for reiteration |
000897d4: 03e00008 jr r31 | 000897d4: 03e00008 jr r31 | ||
− | 000897d8: aca40090 sw r4,0x0090(r5) store height mod here for | + | 000897d8: aca40090 sw r4,0x0090(r5) store height mod here for reiteration. this routine doesn't seem to actually do anything functional. |
</font> | </font> |
Latest revision as of 22:31, 4 December 2023
unused and unfinished. never resolves. if 0x87 = 2 00089748: 00802821 addu r5,r4,r0 r5 = misc unit data pointer 0008974c: 8ca6008c lw r6,0x008c(r5) distortion variable 00089750: 8ca30088 lw r3,0x0088(r5) distortion phase 00089754: 8ca40090 lw r4,0x0090(r5) altered height mod 00089758: 10600005 beq r3,r0,0x00089770 branch if phase is initialisation 0008975c: 34020001 ori r2,r0,0x0001 00089760: 1062000b beq r3,r2,0x00089790 branch if phase is executing 00089764: 00000000 nop 00089768: 080225f5 j 0x000897d4 do nothing otherwise. 0008976c: aca6008c sw r6,0x008c(r5) restore 0x8c into itself. Initialising 00089770: 3c03fffd lui r3,0xfffd 00089774: 3463c000 ori r3,r3,0xc000 r3 = 0xfffdc000 ( ~= 0x1/0x1) 00089778: 0066001a div r3,r6 0008977c: 00003012 mflo r6 0x1 / (0x1 * var.) 00089780: 8ca4001c lw r4,0x001c(r5) height mod of unit * 0x1000 00089784: 34020001 ori r2,r0,0x0001 00089788: aca20088 sw r2,0x0088(r5) store phase as initialised 0008978c: 00832021 addu r4,r4,r3 (height - 0x24) * 0x1000 Executing & Initialising return 00089790: 8ca3001c lw r3,0x001c(r5) height mod * 0x1000 00089794: 00000000 nop 00089798: 0083102a slt r2,r4,r3 true if height - 0x24 < height 0008979c: 10400003 beq r2,r0,0x000897ac branch if height - 0x24 > height (error check?) 000897a0: 00c31021 addu r2,r6,r3 r2 = height mod * 0x1000 + 0x1 / (0x1 * var.) 000897a4: 080225ed j 0x000897b4 000897a8: aca2001c sw r2,0x001c(r5) store new height mod
Error handling (probably ignorable) 000897ac: aca4001c sw r4,0x001c(r5) store (height - 0x24) * 0x1000 as height mod if error occurs and this value is larger than height * 0x1000 000897b0: a0a00087 sb r0,0x0087(r5) clear distortion anim ID 000897b4: 8ca2001c lw r2,0x001c(r5) load height mod 000897b8: 00000000 nop 000897bc: 04410002 bgez r2,0x000897c8 branch if greater than 0 000897c0: 00000000 nop 000897c4: 24420fff addiu r2,r2,0x0fff rounds properly if negative 000897c8: 00021303 sra r2,r2,0x0c divide by 0x1000 000897cc: a4a20042 sh r2,0x0042(r5) store as height 000897d0: aca6008c sw r6,0x008c(r5) store 0x1 / (0x1 * var) for reiteration 000897d4: 03e00008 jr r31 000897d8: aca40090 sw r4,0x0090(r5) store height mod here for reiteration. this routine doesn't seem to actually do anything functional.