Calculate AT List and Get Specific Unit ID
Jump to navigation
Jump to search
Runs after choosing a specific entry on the AT List.
00183544: 27bdff48 addiu r29,r29,0xff48 Stack Pointer -= 0x58 00183548: afb000b0 sw r16,0x00b0(r29) 0018354c: 00808021 addu r16,r4,r0 r16 = AT List ID 00183550: 27a40010 addiu r4,r29,0x0010 r4 = Stack Pointer + 0x10 00183554: afbf00b4 sw r31,0x00b4(r29) 00183558: 0c060dc3 jal 0x 0018370c Calculate AT List 0018355c: 00002821 addu r5,r0,r0 r5 = 0 00183560: 00108080 sll r16,r16,0x02 AT List ID * 4 00183564: 03b01021 addu r2,r29,r16 AT List ID * 4 + Stack Pointer 00183568: 90440010 lbu r4,0x0010(r2) Load Unit ID 0018356c: 3402001f ori r2,r0,0x001f r2 = 0x1f 00183570: 3083001f andi r3,r4,0x001f 00183574: 14620003 bne r3,r2,0x00183584 Branch if Unit ID != 0x1f 00183578: 30820040 andi r2,r4,0x0040 0018357c: 08060d65 j 0x 00183594 00183580: 2402fffc addiu r2,r0,0xfffc r2 = -4 00183584: 10400003 beq r2,r0,0x00183594 Branch if Unit isn't charging an ability 00183588: 00601021 addu r2,r3,r0 r2 = Unit ID 0018358c: 24630100 addiu r3,r3,0x0100 Unit ID += 0x100 00183590: 00601021 addu r2,r3,r0 r2 = Unit ID 00183594: 8fbf00b4 lw r31,0x00b4(r29) 00183598: 8fb000b0 lw r16,0x00b0(r29) 0018359c: 27bd00b8 addiu r29,r29,0x00b8 001835a0: 03e00008 jr r31 001835a4: 00000000 nop