Difference between revisions of "Get Unit's Data Pointer"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " 00180afc: 2c820015 sltiu r2,r4,0x0015 00180b00: 10400007 beq r2,r0,0x00180b20 Branch if ID >= 0x15 00180b04: 000410c0 sll r2,r4,0x03 ID * 8 00180b08: 00441023 subu r2,r2...")
 
m (Notes return location)
Line 1: Line 1:
 +
Parameters : r4 = Unit ID
 +
Returns r2 = unit data pointer ( 0x801908cc + Unit ID * 0x1c0)
 +
        r2 = 0x00 if Unit ID is invalid
 +
---------------------------------------------------------------------------
 
  00180afc: 2c820015 sltiu r2,r4,0x0015
 
  00180afc: 2c820015 sltiu r2,r4,0x0015
 
  00180b00: 10400007 beq r2,r0,0x00180b20 Branch if ID >= 0x15
 
  00180b00: 10400007 beq r2,r0,0x00180b20 Branch if ID >= 0x15
Line 11: Line 15:
 
  00180b24: 03e00008 jr r31
 
  00180b24: 03e00008 jr r31
 
  00180b28: 00000000 nop
 
  00180b28: 00000000 nop
 +
===Return locations===
 +
'''!!! Warning this 60 returns locations were extracted from TLW (not vanilla) - they mostly might be ok, but some of them may point to a hack.!!!'''
 +
0008D0A0:
 +
0012D96C:
 +
0012DA6C:
 +
0012DB40:
 +
0012DF58:
 +
00133198:
 +
001331D4:
 +
00133268:
 +
00133348:
 +
00133414:
 +
001334DC:
 +
001336E4:
 +
0013377C:
 +
001337B0:
 +
00133CA8:
 +
00133D84:
 +
00134198:
 +
00134268:
 +
001342EC:
 +
00134300:
 +
00135310:
 +
00136214:
 +
00136BF8:
 +
00139298:
 +
0013BE4C:
 +
0013C58C:
 +
0013E78C:
 +
0013EE8C:
 +
0013F914:
 +
00141734:
 +
0014179C:
 +
00141A9C:
 +
00141B78:
 +
00142554:
 +
0014259C:
 +
0014286C:
 +
00142AB4:
 +
00144064:
 +
00144070:
 +
00144120:
 +
001441AC:
 +
001441B8:
 +
00144440:
 +
00145790:
 +
00145858:
 +
00147A1C:
 +
00147D30:
 +
00147DE0:
 +
00147EB4:
 +
001484B0:
 +
001485C4:
 +
00148910:
 +
00148D70:
 +
00148F20:
 +
00149140:
 +
00149260:
 +
001AF7B4: [[001af770_-_001af8b0]]
 +
001B0290:
 +
001B02A4:
 +
001B0328:

Revision as of 20:57, 8 December 2021

Parameters : r4 = Unit ID
Returns r2 = unit data pointer ( 0x801908cc + Unit ID * 0x1c0) 
        r2 = 0x00 if Unit ID is invalid
---------------------------------------------------------------------------
00180afc: 2c820015 sltiu r2,r4,0x0015
00180b00: 10400007 beq r2,r0,0x00180b20		Branch if ID >= 0x15
00180b04: 000410c0 sll r2,r4,0x03		ID * 8
00180b08: 00441023 subu r2,r2,r4		ID * 7
00180b0c: 00021180 sll r2,r2,0x06		ID * 448
00180b10: 3c038019 lui r3,0x8019
00180b14: 246308cc addiu r3,r3,0x08cc
00180b18: 080602c9 j 0x00180b24
00180b1c: 00431021 addu r2,r2,r3		r2 = Unit's Data Pointer
00180b20: 00001021 addu r2,r0,r0		r2 = 0
00180b24: 03e00008 jr r31
00180b28: 00000000 nop

Return locations

!!! Warning this 60 returns locations were extracted from TLW (not vanilla) - they mostly might be ok, but some of them may point to a hack.!!!
0008D0A0:
0012D96C:
0012DA6C:
0012DB40:
0012DF58:
00133198:
001331D4:
00133268:
00133348:
00133414:
001334DC:
001336E4:
0013377C:
001337B0:
00133CA8:
00133D84:
00134198:
00134268:
001342EC:
00134300:
00135310:
00136214:
00136BF8:
00139298:
0013BE4C:
0013C58C:
0013E78C:
0013EE8C:
0013F914:
00141734:
0014179C:
00141A9C:
00141B78:
00142554:
0014259C:
0014286C:
00142AB4:
00144064:
00144070:
00144120:
001441AC:
001441B8:
00144440:
00145790:
00145858:
00147A1C:
00147D30:
00147DE0:
00147EB4:
001484B0:
001485C4:
00148910:
00148D70:
00148F20:
00149140:
00149260:
001AF7B4: 001af770_-_001af8b0
001B0290:
001B02A4:
001B0328: