Difference between revisions of "0x1a4de8"
Jump to navigation
Jump to search
(Created page with " # Parameters: # r4 = (p1) ? # r5 = (p2) ? (Sometimes 0) # Returns: # r2 = ? 801a4de8: 2484000f addiu r4,r4,0x000f # p1 + 15 801a...") |
m |
||
Line 11: | Line 11: | ||
801a4df8: 8ce769a8 lw r7,0x69a8(r7) # *0x801b69a8 | 801a4df8: 8ce769a8 lw r7,0x69a8(r7) # *0x801b69a8 | ||
801a4dfc: 000540c0 sll r8,r5,0x03 # p2 * 8 | 801a4dfc: 000540c0 sll r8,r5,0x03 # p2 * 8 | ||
− | 801a4e00: 8ce30000 lw r3,0x0000(r7) # v3 = *(*0x801b69a8) | + | 801a4e00: 8ce30000 lw r3,0x0000(r7) # v3 = *(*0x801b69a8) // this is just a pointer to itself...? palette data, according to Xifanie. in the file this looks completely irrelevant? |
# while (true) { | # while (true) { | ||
801a4e04: 00000000 nop | 801a4e04: 00000000 nop | ||
− | 801a4e08: 94660004 lhu r6,0x0004(r3) # v6 = *(v3 + 4) | + | 801a4e08: 94660004 lhu r6,0x0004(r3) # v6 = *(v3 + 4) // |
801a4e0c: 00000000 nop | 801a4e0c: 00000000 nop | ||
801a4e10: 00c4102b sltu r2,r6,r4 | 801a4e10: 00c4102b sltu r2,r6,r4 | ||
− | 801a4e14: 1440001b bne r2,r0,0x801a4e84 # if (v6 >= v4) { | + | 801a4e14: 1440001b bne r2,r0,0x801a4e84 # if (v6 >= v4) { // |
801a4e18: 00000000 nop | 801a4e18: 00000000 nop | ||
801a4e1c: 14c40004 bne r6,r4,0x801a4e30 # if (v6 == v4) { | 801a4e1c: 14c40004 bne r6,r4,0x801a4e30 # if (v6 == v4) { | ||
Line 49: | Line 49: | ||
# } | # } | ||
801a4e84: 00603821 addu r7,r3,r0 # v7 = v3 | 801a4e84: 00603821 addu r7,r3,r0 # v7 = v3 | ||
− | 801a4e88: 8c630000 lw r3,0x0000(r3) # v3 = *v3 | + | 801a4e88: 8c630000 lw r3,0x0000(r3) # v3 = *v3 // continues to reload the same pointer...? |
801a4e8c: 08069381 j 0x801a4e04 | 801a4e8c: 08069381 j 0x801a4e04 | ||
801a4e90: 00000000 nop # } | 801a4e90: 00000000 nop # } | ||
801a4e94: 03e00008 jr r31 | 801a4e94: 03e00008 jr r31 | ||
801a4e98: 00000000 nop | 801a4e98: 00000000 nop |
Latest revision as of 00:13, 21 March 2022
# Parameters: # r4 = (p1) ? # r5 = (p2) ? (Sometimes 0) # Returns: # r2 = ? 801a4de8: 2484000f addiu r4,r4,0x000f # p1 + 15 801a4dec: 000420c2 srl r4,r4,0x03 # v4 = (p1 + 15) >> 3 801a4df0: 00804821 addu r9,r4,r0 # (p1 + 15) >> 3 801a4df4: 3c07801b lui r7,0x801b 801a4df8: 8ce769a8 lw r7,0x69a8(r7) # *0x801b69a8 801a4dfc: 000540c0 sll r8,r5,0x03 # p2 * 8 801a4e00: 8ce30000 lw r3,0x0000(r7) # v3 = *(*0x801b69a8) // this is just a pointer to itself...? palette data, according to Xifanie. in the file this looks completely irrelevant? # while (true) { 801a4e04: 00000000 nop 801a4e08: 94660004 lhu r6,0x0004(r3) # v6 = *(v3 + 4) // 801a4e0c: 00000000 nop 801a4e10: 00c4102b sltu r2,r6,r4 801a4e14: 1440001b bne r2,r0,0x801a4e84 # if (v6 >= v4) { // 801a4e18: 00000000 nop 801a4e1c: 14c40004 bne r6,r4,0x801a4e30 # if (v6 == v4) { 801a4e20: 00000000 nop 801a4e24: 8c620000 lw r2,0x0000(r3) # *v3 801a4e28: 08069395 j 0x801a4e54 801a4e2c: ace20000 sw r2,0x0000(r7) # *v7 = *v3 # } else { 801a4e30: 94620004 lhu r2,0x0004(r3) # *(v3 + 4) 801a4e34: 00000000 nop 801a4e38: 00441023 subu r2,r2,r4 # *(v3 + 4) - v4 801a4e3c: a4620004 sh r2,0x0004(r3) # *(v3 + 4) = *(v3 + 4) - v4 801a4e40: 94620004 lhu r2,0x0004(r3) # *(v3 + 4) 801a4e44: 00000000 nop 801a4e48: 000210c0 sll r2,r2,0x03 # *(v3 + 4) * 8 801a4e4c: 00621821 addu r3,r3,r2 # v3 + (*(v3 + 4) * 8) 801a4e50: a4690004 sh r9,0x0004(r3) # *(v3 + (*(v3 + 4) * 8) + 4) = (p1 + 15) >> 3 # } 801a4e54: a4650006 sh r5,0x0006(r3) # *(v3 + 6) = p2 801a4e58: 3c01801c lui r1,0x801c 801a4e5c: 00280821 addu r1,r1,r8 801a4e60: 8c228968 lw r2,-0x7698(r1) # *(0x801b8968 + (p2 * 8)) 801a4e64: 3c01801b lui r1,0x801b 801a4e68: ac2769a8 sw r7,0x69a8(r1) # *0x801b69a8 = v7 801a4e6c: ac620000 sw r2,0x0000(r3) # *v3 = *(0x801b8968 + (p2 * 8)) 801a4e70: 3c01801c lui r1,0x801c 801a4e74: 00280821 addu r1,r1,r8 801a4e78: ac238968 sw r3,-0x7698(r1) # *(0x801b8968 + (p2 * 8)) = v3 801a4e7c: 080693a5 j 0x801a4e94 # return v3 + 8; 801a4e80: 24620008 addiu r2,r3,0x0008 # } 801a4e84: 00603821 addu r7,r3,r0 # v7 = v3 801a4e88: 8c630000 lw r3,0x0000(r3) # v3 = *v3 // continues to reload the same pointer...? 801a4e8c: 08069381 j 0x801a4e04 801a4e90: 00000000 nop # } 801a4e94: 03e00008 jr r31 801a4e98: 00000000 nop