Difference between revisions of "BUNIT.OUT Unit List Display"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "This is found in event/bunit.out, 0x00007e08 - 0x00007f44 [0x00007e08] addiu r29,r29,-0x0038 [0x00007e0c] sw r21,0x002c(r29) [0x00007e10] addu r21,r6,r0 [0x00007e14] sw r...")
 
Line 1: Line 1:
This is found in event/bunit.out, 0x00007e08 - 0x00007f44
+
  001c6df0: 27bdffc8 addiu r29,r29,-0x0038
 
+
  001c6df4: afb5002c sw r21,0x002c(r29)
  [0x00007e08] addiu r29,r29,-0x0038
+
  001c6df8: 00c0a821 addu r21,r6,r0
  [0x00007e0c] sw r21,0x002c(r29)
+
  001c6dfc: afb1001c sw r17,0x001c(r29)
  [0x00007e10] addu r21,r6,r0
+
  001c6e00: 00008821 addu r17,r0,r0
  [0x00007e14] sw r17,0x001c(r29)
+
  001c6e04: afb20020 sw r18,0x0020(r29)
  [0x00007e18] addu r17,r0,r0
+
  001c6e08: 00009021 addu r18,r0,r0
  [0x00007e1c] sw r18,0x0020(r29)
+
  001c6e0c: afb00018 sw r16,0x0018(r29)
  [0x00007e20] addu r18,r0,r0
+
  001c6e10: 00008021 addu r16,r0,r0
  [0x00007e24] sw r16,0x0018(r29)
+
  001c6e14: afb40028 sw r20,0x0028(r29)
  [0x00007e28] addu r16,r0,r0
+
  001c6e18: 3c14801e lui r20,0x801e
  [0x00007e2c] sw r20,0x0028(r29)
+
  001c6e1c: 26944eec addiu r20,r20,0x4eec
  [0x00007e30] lui r20,0x801f
+
  001c6e20: afb30024 sw r19,0x0024(r29)
  [0x00007e34] addiu r20,r20,-0x4d80
+
  001c6e24: 00009821 addu r19,r0,r0
  [0x00007e38] sw r19,0x0024(r29)
+
  001c6e28: afbf0030 sw r31,0x0030(r29)
  [0x00007e3c] addu r19,r0,r0
+
  001c6e2c: 0c05fab2 jal 0x0017eac8
  [0x00007e40] sw r31,0x0030(r29)
+
  001c6e30: 02002021 addu r4,r16,r0
  [0x00007e44] jal 0x00180afc                            [[Get Unit's Data Pointer]]
+
  001c6e34: 00402021 addu r4,r2,r0
  [0x00007e48] addu r4,r16,r0
+
  001c6e38: 10800020 beq r4,r0,0x00007ebc
  [0x00007e4c] addu r4,r2,r0
+
  001c6e3c: 340200ff ori r2,r0,0x00ff
  [0x00007e50] beq r4,r0,0x00007ed4
+
  001c6e40: 90830001 lbu r3,0x0001(r4)                        Load unit ID
  [0x00007e54] ori r2,r0,0x00ff
+
  001c6e44: 00000000 nop
  [0x00007e58] lbu r3,0x0001(r4)                        Load unit ID
+
  001c6e48: 1062001c beq r3,r2,0x00007ebc                    Branch if unit doesn't exist
  [0x00007e5c] nop
+
  001c6e4c: 00000000 nop
  [0x00007e60] beq r3,r2,0x00007ed4                Branch if unit doesn't exist
+
  001c6e50: 90820006 lbu r2,0x0006(r4)                        Load gender byte
  [0x00007e64] nop
+
  001c6e54: 00000000 nop
  [0x00007e68] lbu r2,0x0006(r4)                        Load gender byte
+
  001c6e58: 30420004 andi r2,r2,0x0004
  [0x00007e6c] nop
+
  001c6e5c: 10400003 beq r2,r0,0x00007e6c                    Branch if not ??? stats
  [0x00007e70] andi r2,r2,0x0004
+
  001c6e60: 00000000 nop
  [0x00007e74] beq r2,r0,0x00007e84              Branch if not ??? stats
+
  001c6e64: 08071baf j 0x001c6ebc
  [0x00007e78] nop
+
  001c6e68: 26520001 addiu r18,r18,0x0001
  [0x00007e7c] j 0x001c6ed4
+
  001c6e6c: 90820058 lbu r2,0x0058(r4)                       Current status 1
  [0x00007e80] addiu r18,r18,0x0001
+
  001c6e70: 00000000 nop
  [0x00007e84] lbu r2,0x0058(r4)                       Current status 1
+
  001c6e74: 30420040 andi r2,r2,0x0040
  [0x00007e88] nop
+
  001c6e78: 14400010 bne r2,r0,0x00007ebc                    Branch if crystal
  [0x00007e8c] andi r2,r2,0x0040
+
  001c6e7c: 00000000 nop
  [0x00007e90] bne r2,r0,0x00007ed4              Branch if crystal
+
  001c6e80: 90820059 lbu r2,0x0059(r4)                       Current status 2
  [0x00007e94] nop
+
  001c6e84: 00000000 nop
  [0x00007e98] lbu r2,0x0059(r4)                       Current status 2
+
  001c6e88: 30420001 andi r2,r2,0x0001
  [0x00007e9c] nop
+
  001c6e8c: 1440000b bne r2,r0,0x00007ebc                    Branch if treasure
  [0x00007ea0] andi r2,r2,0x0001
+
  001c6e90: 00000000 nop
  [0x00007ea4] bne r2,r0,0x00007ed4              Branch if treasure
+
  001c6e94: 26520001 addiu r18,r18,0x0001
  [0x00007ea8] nop
+
  001c6e98: 3c05801e lui r5,0x801e
  [0x00007eac] addiu r18,r18,0x0001
+
  001c6e9c: 24a54f1c addiu r5,r5,0x4f1c
  [0x00007eb0] lui r5,0x801f
+
  001c6ea0: 02652821 addu r5,r19,r5
  [0x00007eb4] addiu r5,r5,-0x4d50
+
  001c6ea4: 0c071a0f jal 0x001c683c
  [0x00007eb8] addu r5,r19,r5
+
  001c6ea8: 02203021 addu r6,r17,r0
  [0x00007ebc] jal 0x001c6854                       
+
  001c6eac: a6910000 sh r17,0x0000(r20)
  [0x00007ec0] addu r6,r17,r0
+
  001c6eb0: 26940002 addiu r20,r20,0x0002
  [0x00007ec4] sh r17,0x0000(r20)
+
  001c6eb4: 2673010c addiu r19,r19,0x010c
  [0x00007ec8] addiu r20,r20,0x0002
+
  001c6eb8: 26310001 addiu r17,r17,0x0001
  [0x00007ecc] addiu r19,r19,0x010c
+
  001c6ebc: 26100001 addiu r16,r16,0x0001
  [0x00007ed0] addiu r17,r17,0x0001
+
  001c6ec0: 2a020015 slti r2,r16,0x0015
  [0x00007ed4] addiu r16,r16,0x0001
+
  001c6ec4: 1440ffd9 bne r2,r0,0x00007e2c
  [0x00007ed8] slti r2,r16,0x0015
+
  001c6ec8: 00000000 nop
  [0x00007edc] bne r2,r0,0x00007e44
+
  001c6ecc: 1a200009 blez r17,0x00007ef4
  [0x00007ee0] nop
+
  001c6ed0: 00008021 addu r16,r0,r0
  [0x00007ee4] blez r17,0x00007f0c
+
  001c6ed4: 00001821 addu r3,r0,r0
  [0x00007ee8] addu r16,r0,r0
+
  001c6ed8: 3c01801e lui r1,0x801e
  [0x00007eec] addu r3,r0,r0
+
  001c6edc: 00230821 addu r1,r1,r3
  [0x00007ef0] lui r1,0x801f
+
  001c6ee0: a4324f22 sh r18,0x4f22(r1)
  [0x00007ef4] addu r1,r1,r3
+
  001c6ee4: 26100001 addiu r16,r16,0x0001
  [0x00007ef8] sh r18,-0x4d4a(r1)
+
  001c6ee8: 0211102a slt r2,r16,r17
  [0x00007efc] addiu r16,r16,0x0001
+
  001c6eec: 1440fffa bne r2,r0,0x00007ed8
  [0x00007f00] slt r2,r16,r17
+
  001c6ef0: 2463010c addiu r3,r3,0x010c
  [0x00007f04] bne r2,r0,0x00007ef0
+
  001c6ef4: 3c01801e lui r1,0x801e
  [0x00007f08] addiu r3,r3,0x010c
+
  001c6ef8: a4314f18 sh r17,0x4f18(r1)
  [0x00007f0c] lui r1,0x801f
+
  001c6efc: 0c071bcc jal 0x001c6f30
  [0x00007f10] sh r17,-0x4d54(r1)
+
  001c6f00: 02a02021 addu r4,r21,r0
  [0x00007f14] jal 0x001c6f48
+
  001c6f04: 02201021 addu r2,r17,r0
  [0x00007f18] addu r4,r21,r0
+
  001c6f08: 8fbf0030 lw r31,0x0030(r29)
  [0x00007f1c] addu r2,r17,r0
+
  001c6f0c: 8fb5002c lw r21,0x002c(r29)
  [0x00007f20] lw r31,0x0030(r29)
+
  001c6f10: 8fb40028 lw r20,0x0028(r29)
  [0x00007f24] lw r21,0x002c(r29)
+
  001c6f14: 8fb30024 lw r19,0x0024(r29)
  [0x00007f28] lw r20,0x0028(r29)
+
  001c6f18: 8fb20020 lw r18,0x0020(r29)
  [0x00007f2c] lw r19,0x0024(r29)
+
  001c6f1c: 8fb1001c lw r17,0x001c(r29)
  [0x00007f30] lw r18,0x0020(r29)
+
  001c6f20: 8fb00018 lw r16,0x0018(r29)
  [0x00007f34] lw r17,0x001c(r29)
+
  001c6f24: 27bd0038 addiu r29,r29,0x0038
  [0x00007f38] lw r16,0x0018(r29)
+
  001c6f28: 03e00008 jr r31
  [0x00007f3c] addiu r29,r29,0x0038
+
  001c6f2c: 00000000 nop
  [0x00007f40] jr r31
 
  [0x00007f44] nop
 

Revision as of 10:38, 17 September 2024

001c6df0: 27bdffc8 addiu r29,r29,-0x0038
001c6df4: afb5002c sw r21,0x002c(r29)
001c6df8: 00c0a821 addu r21,r6,r0
001c6dfc: afb1001c sw r17,0x001c(r29)
001c6e00: 00008821 addu r17,r0,r0
001c6e04: afb20020 sw r18,0x0020(r29)
001c6e08: 00009021 addu r18,r0,r0
001c6e0c: afb00018 sw r16,0x0018(r29)
001c6e10: 00008021 addu r16,r0,r0
001c6e14: afb40028 sw r20,0x0028(r29)
001c6e18: 3c14801e lui r20,0x801e
001c6e1c: 26944eec addiu r20,r20,0x4eec
001c6e20: afb30024 sw r19,0x0024(r29)
001c6e24: 00009821 addu r19,r0,r0
001c6e28: afbf0030 sw r31,0x0030(r29)
001c6e2c: 0c05fab2 jal 0x0017eac8
001c6e30: 02002021 addu r4,r16,r0
001c6e34: 00402021 addu r4,r2,r0
001c6e38: 10800020 beq r4,r0,0x00007ebc
001c6e3c: 340200ff ori r2,r0,0x00ff
001c6e40: 90830001 lbu r3,0x0001(r4)                        Load unit ID
001c6e44: 00000000 nop
001c6e48: 1062001c beq r3,r2,0x00007ebc                     Branch if unit doesn't exist
001c6e4c: 00000000 nop
001c6e50: 90820006 lbu r2,0x0006(r4)                        Load gender byte
001c6e54: 00000000 nop
001c6e58: 30420004 andi r2,r2,0x0004
001c6e5c: 10400003 beq r2,r0,0x00007e6c                     Branch if not ??? stats
001c6e60: 00000000 nop
001c6e64: 08071baf j 0x001c6ebc
001c6e68: 26520001 addiu r18,r18,0x0001
001c6e6c: 90820058 lbu r2,0x0058(r4)                        Current status 1
001c6e70: 00000000 nop
001c6e74: 30420040 andi r2,r2,0x0040
001c6e78: 14400010 bne r2,r0,0x00007ebc                     Branch if crystal
001c6e7c: 00000000 nop
001c6e80: 90820059 lbu r2,0x0059(r4)                        Current status 2
001c6e84: 00000000 nop
001c6e88: 30420001 andi r2,r2,0x0001
001c6e8c: 1440000b bne r2,r0,0x00007ebc                     Branch if treasure
001c6e90: 00000000 nop
001c6e94: 26520001 addiu r18,r18,0x0001
001c6e98: 3c05801e lui r5,0x801e
001c6e9c: 24a54f1c addiu r5,r5,0x4f1c
001c6ea0: 02652821 addu r5,r19,r5
001c6ea4: 0c071a0f jal 0x001c683c
001c6ea8: 02203021 addu r6,r17,r0
001c6eac: a6910000 sh r17,0x0000(r20)
001c6eb0: 26940002 addiu r20,r20,0x0002
001c6eb4: 2673010c addiu r19,r19,0x010c
001c6eb8: 26310001 addiu r17,r17,0x0001
001c6ebc: 26100001 addiu r16,r16,0x0001
001c6ec0: 2a020015 slti r2,r16,0x0015
001c6ec4: 1440ffd9 bne r2,r0,0x00007e2c
001c6ec8: 00000000 nop
001c6ecc: 1a200009 blez r17,0x00007ef4
001c6ed0: 00008021 addu r16,r0,r0
001c6ed4: 00001821 addu r3,r0,r0
001c6ed8: 3c01801e lui r1,0x801e
001c6edc: 00230821 addu r1,r1,r3
001c6ee0: a4324f22 sh r18,0x4f22(r1)
001c6ee4: 26100001 addiu r16,r16,0x0001
001c6ee8: 0211102a slt r2,r16,r17
001c6eec: 1440fffa bne r2,r0,0x00007ed8
001c6ef0: 2463010c addiu r3,r3,0x010c
001c6ef4: 3c01801e lui r1,0x801e
001c6ef8: a4314f18 sh r17,0x4f18(r1)
001c6efc: 0c071bcc jal 0x001c6f30
001c6f00: 02a02021 addu r4,r21,r0
001c6f04: 02201021 addu r2,r17,r0
001c6f08: 8fbf0030 lw r31,0x0030(r29)
001c6f0c: 8fb5002c lw r21,0x002c(r29)
001c6f10: 8fb40028 lw r20,0x0028(r29)
001c6f14: 8fb30024 lw r19,0x0024(r29)
001c6f18: 8fb20020 lw r18,0x0020(r29)
001c6f1c: 8fb1001c lw r17,0x001c(r29)
001c6f20: 8fb00018 lw r16,0x0018(r29)
001c6f24: 27bd0038 addiu r29,r29,0x0038
001c6f28: 03e00008 jr r31
001c6f2c: 00000000 nop