Difference between revisions of "00086dc4 - 00086f28"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00086b44: 27bdffb8 addiu r29,r29,0xffb8 00086b48: afb00038 sw r16,0x0038(r29) 00086b4c: 3c10800a lui r16,0x800a 00086b50: 26108a24 addiu r16,r1...")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
+
 
  00086b44: 27bdffb8 addiu r29,r29,0xffb8
+
  00086dc4: lui r3, 0x8009
  00086b48: afb00038 sw r16,0x0038(r29)
+
  00086dc8: lw r3, 0x60e4(r3)
  00086b4c: 3c10800a lui r16,0x800a
+
  00086dcc: addiu r29, r29, 0xffe8
00086b50: 26108a24 addiu r16,r16,0x8a24 GPU Rotation matrix
+
  00086dd0: sw r31, 0x0014(r29)
00086b54: 02002021 addu r4,r16,r0
+
  00086dd4: sltiu r2, r3, 0x001c
  00086b58: afbf0044 sw r31,0x0044(r29)
+
  00086dd8: beq r2, r0, 0x00086ee4
  00086b5c: afb20040 sw r18,0x0040(r29)
+
  00086ddc: sw r16, 0x0010(r29)
00086b60: 0c00742a jal 0x0001d0a8 store rotation matrix elements
+
  00086de0: sll r2, r3, 0x02
00086b64: afb1003c sw r17,0x003c(r29)
+
  00086de4: lui r1, 0x8007
  00086b68: 0c00744e jal 0x0001d138 store translation vectors
+
  00086de8: addu r1, r1, r2
00086b6c: 02002021 addu r4,r16,r0
+
  00086dec: lw r2, -0x7ec8(r1)
00086b70: 3c11800a lui r17,0x800a
+
  00086df0: nop
  00086b74: 8e318a54 lw r17,-0x75ac(r17) load misc data
+
  00086df4: jr r2
  00086b78: 00000000 nop
+
  00086df8: nop
00086b7c: 1220008a beq r17,r0,0x00086da8
+
  00086dfc: lui r2, 0x8009
  00086b80: 3c129249 lui r18,0x9249
+
  00086e00: lw r2, 0x60cc(r2)
00086b84: 36522493 ori r18,r18,0x2493
+
  00086e04: nop
00086b88: 27b00020 addiu r16,r29,0x0020
+
  00086e08: bne r2, r0, 0x00086edc
r17 = next units misc data <loop>
+
  00086e0c: ori r2, r0, 0x003c
  00086b8c: 02002021 addu r4,r16,r0
+
  00086e10: lui r2, 0x8009
  00086b90: 0c01ee5b jal 0x0007b96c store some X/Y/Height
+
  00086e14: lw r2, 0x60d4(r2)
00086b94: 02202821 addu r5,r17,r0
+
  00086e18: nop
00086b98: 02002021 addu r4,r16,r0
+
  00086e1c: bne r2, r0, 0x00086edc
00086b9c: 27a50010 addiu r5,r29,0x0010
+
  00086e20: ori r2, r0, 0x003c
00086ba0: 0c00755e jal 0x0001d578 multiply vectors/matrix
+
  00086e24: lui r2, 0x8009
00086ba4: 2626012c addiu r6,r17,0x012c r6 = misc data + 0x12c
+
  00086e28: lw r2, 0x60c8(r2)
00086ba8: 96220012 lhu r2,0x0012(r17) load byte 0x12
+
  00086e2c: nop
  00086bac: 00000000 nop
+
  00086e30: bne r2, r0, 0x00086edc
  00086bb0: 30420002 andi r2,r2,0x0002
+
  00086e34: ori r2, r0, 0x003c
00086bb4: 10400005 beq r2,r0,0x00086bcc branch if not 0x02 (reflecting?)
+
  00086e38: lui r2, 0x800a
  00086bb8: 00000000 nop
+
  00086e3c: lw r2, 0x1c48(r2)
  if reflecting?
+
  00086e40: lui r3, 0x800a
00086bbc: 97a20010 lhu r2,0x0010(r29) load ??
+
  00086e44: lw r3, 0x1c4c(r3)
  00086bc0: 96230058 lhu r3,0x0058(r17) load ??
+
  00086e48: lui r4, 0x800a
  00086bc4: 08021af7 j 0x00086bdc
+
  00086e4c: lw r4, 0x1c50(r4)
  00086bc8: 00431023 subu r2,r2,r3
+
  00086e50: or r2, r2, r3
if not reflecting
+
  00086e54: or r2, r2, r4
  00086bcc: 97a20010 lhu r2,0x0010(r29)
+
  00086e58: bne r2, r0, 0x00086ed8
00086bd0: 96230058 lhu r3,0x0058(r17)
+
  00086e5c: nop
  00086bd4: 00000000 nop
+
  00086e60: lui r3, 0x80009
00086bd8: 00431021 addu r2,r2,r3
+
  00086e64: lw r3, 0x6130(r3)
  00086bdc: a6220120 sh r2,0x0120(r17) store difference / sum
+
  00086e68: nop
00086be0: 96220012 lhu r2,0x0012(r17)
+
  00086e6c: beq r3, r0, 0x00086ea4
  00086be4: 00000000 nop
+
  00086e70: nop
  00086be8: 30420004 andi r2,r2,0x0004
+
00086e74: lui r2, 0x8004
  00086bec: 10400005 beq r2,r0,0x00086c04 branch if not ??
+
  00086e78: lw r2, 0x5980(r2)
  00086bf0: 00000000 nop
+
  00086e7c: nop
00086bf4: 97a20014 lhu r2,0x0014(r29)
+
  00086e80: subu r2, r3, r2
  00086bf8: 9623005a lhu r3,0x005a(r17)
+
  00086e84: lui r1, 0x8009
  00086bfc: 08021b05 j 0x00086c14 skip next
+
  00086e88: sw r2, 0x6130(r1)
  00086c00: 00431023 subu r2,r2,r3
+
  00086e8c: bgtz r2, 0x00086ee4
if 0x04 active
+
  00086e90: nop
  00086c04: 97a20014 lhu r2,0x0014(r29)
+
  00086e94: lui r2, 0x8009
00086c08: 9623005a lhu r3,0x005a(r17)
+
  00086e98: sw r0, 0x6130(r1)
  00086c0c: 00000000 nop
+
  00086e9c: j 0x00086ee4
00086c10: 00431021 addu r2,r2,r3 ?? + ??
+
  00086ea0: nop
  00086c14: a6220122 sh r2,0x0122(r17)
+
  00086ea4: lui r16, r0, 0x800a
00086c18: 96220040 lhu r2,0x0040(r17) load X mod
+
  00086ea8: lw r16, -0x75ac(r16)
  00086c1c: 00000000 nop
+
  00086eac: nop
00086c20: 00021400 sll r2,r2,0x10
+
  00086eb0: beq r16, r0, 0x00086ee4
  00086c24: 00022c03 sra r5,r2,0x10
+
  00086eb4: nop
00086c28: 00b20018 mult r5,r18 Xmod * 92494293
+
  00086eb8: jal 0x000865a4
00086c2c: 96230044 lhu r3,0x0044(r17) load Y mod
+
  00086ebc: addu r4, r16, r0
  00086c30: 00002010 mfhi r4
+
  00086ec0: lw r16, 0x0000(r16)
00086c34: 00031c00 sll r3,r3,0x10
+
  00086ec4: nop
  00086c38: 00033c03 sra r7,r3,0x10
+
  00086ec8: beq r16, r0, 0x00086ee4
00086c3c: 00f20018 mult r7,r18 Ymod * 92494293
+
  00086ecc: nop
00086c40: 9226007e lbu r6,0x007e(r17) load map level
+
  00086ed0: j 0x00086eb8
  00086c44: 000217c3 sra r2,r2,0x1f
+
  00086ed4: nop
00086c48: 00031fc3 sra r3,r3,0x1f
+
  00086ed8: ori r2, r0, 0x003c
  00086c4c: 00852021 addu r4,r4,r5
+
  00086edc: lui r1, 0x8009
00086c50: 00042103 sra r4,r4,0x04
+
  00086ee0: sw r2, 0x6130(r1)
  00086c54: 00822023 subu r4,r4,r2
+
  00086ee4: jal 0x00085234
00086c58: 00042400 sll r4,r4,0x10
+
  00086ee8: nop
  00086c5c: 00042403 sra r4,r4,0x10
+
  00086eec: lui r16, 0x800a
  00086c60: 00002810 mfhi r5
+
  00086ef0: lw r16, -0x75ac(r16)
00086c64: 00a72821 addu r5,r5,r7
+
  00086ef4: nop
00086c68: 00052903 sra r5,r5,0x04
+
  00086ef8: beq r16, r0, 0x00086f18
00086c6c: 00a32823 subu r5,r5,r3
+
  00086efc: nop
00086c70: 00052c00 sll r5,r5,0x10
+
  00086f00: jal 0x00086640
  00086c74: 0c060fed jal 0x00183fb4 get tile's data pointer
+
  00086f04: addu r4, r16, r0
00086c78: 00052c03 sra r5,r5,0x10
+
  00086f08: lw r16, 0x0000(r16)
00086c7c: 9223007f lbu r3,0x007f(r17) load ??
+
  00086f0c: nop
  00086c80: 00000000 nop
+
  00086f10: bne r16, r0, 0x00086f00
  00086c84: 1060000e beq r3,r0,0x00086cc0 branch if ??
+
  00086f14: nop
  00086c88: 00408021 addu r16,r2,r0
+
  00086f18: lw r31, 0x0014(r29)
  00086c8c: 92020000 lbu r2,0x0000(r16) load tile type?
+
  00086f1c: lw r16, 0x0010(r29)
  00086c90: 00000000 nop
+
  00086f20: addiu r29, r29, 0x0018
  00086c94: 30420040 andi r2,r2,0x0040
+
  00086f24: jr r31
00086c98: 10400005 beq r2,r0,0x00086cb0 branch if not 0x40?
+
  00086f28: nop
  00086c9c: 27a40020 addiu r4,r29,0x0020
+
=== Return Locations ===
If tile = 0x40
+
'''Battle.bin '''
  00086ca0: 0c01edaa jal 0x0007b6a8 some calculations
+
00188d94: [[Free Cursor Controller Input|Free Cursor Controller Input]]
00086ca4: 27a50028 addiu r5,r29,0x0028
 
00086ca8: 08021b3b j 0x00086cec
 
00086cac: 00000000 nop
 
00086cb0: 0c01eda2 jal 0x0007b688 same as 7b6a8 but different input value
 
00086cb4: 27a50028 addiu r5,r29,0x0028
 
00086cb8: 08021b3b j 0x00086cec
 
00086cbc: 00000000 nop
 
  00086cc0: 92020000 lbu r2,0x0000(r16) load tile type
 
  00086cc4: 00000000 nop
 
  00086cc8: 30420040 andi r2,r2,0x0040
 
  00086ccc: 10400005 beq r2,r0,0x00086ce4 branch if not 0x40
 
00086cd0: 27a40020 addiu r4,r29,0x0020
 
00086cd4: 0c01ee53 jal 0x0007b94c distance calculations?
 
  00086cd8: 27a50028 addiu r5,r29,0x0028
 
00086cdc: 08021b3b j 0x00086cec
 
  00086ce0: 00000000 nop
 
  00086ce4: 0c01ee4b jal 0x0007b92c some calculation based on 80097786
 
00086ce8: 27a50028 addiu r5,r29,0x0028
 
Move in water
 
  00086cec: 8e240134 lw r4,0x0134(r17) load unit data
 
  00086cf0: 00000000 nop
 
  00086cf4: 1080001d beq r4,r0,0x00086d6c
 
  00086cf8: 00000000 nop
 
  00086cfc: 0c05fc08 jal 0x0017f020 float/fly movements
 
00086d00: 00000000 nop
 
  00086d04: 00401821 addu r3,r2,r0
 
  00086d08: 30620010 andi r2,r3,0x0010
 
00086d0c: 10400009 beq r2,r0,0x00086d34 branch if not move in water?
 
00086d10: 30620040 andi r2,r3,0x0040
 
00086d14: 92020003 lbu r2,0x0003(r16) load depth
 
  00086d18: 00000000 nop
 
  00086d1c: 304200e0 andi r2,r2,0x00e0 remove some depth flag
 
00086d20: 10400013 beq r2,r0,0x00086d70 branch if depth = 0?
 
  00086d24: 27a40028 addiu r4,r29,0x0028
 
00086d28: 97a2002a lhu r2,0x002a(r29)
 
  00086d2c: 08021b5a j 0x00086d68
 
  00086d30: 2442fff4 addiu r2,r2,0xfff4
 
  00086d34: 1440000e bne r2,r0,0x00086d70 branch if has float?
 
  00086d38: 27a40028 addiu r4,r29,0x0028
 
  00086d3c: 30620020 andi r2,r3,0x0020
 
00086d40: 1440000c bne r2,r0,0x00086d74 branch if has walk on water?
 
00086d44: 27a50010 addiu r5,r29,0x0010
 
00086d48: 92020003 lbu r2,0x0003(r16) load depth
 
  00086d4c: 00000000 nop
 
  00086d50: 00021142 srl r2,r2,0x05
 
  00086d54: 00021840 sll r3,r2,0x01
 
00086d58: 00621821 addu r3,r3,r2
 
00086d5c: 97a2002a lhu r2,0x002a(r29)
 
00086d60: 00031880 sll r3,r3,0x02
 
00086d64: 00431023 subu r2,r2,r3
 
00086d68: a7a2002a sh r2,0x002a(r29)
 
00086d6c: 27a40028 addiu r4,r29,0x0028
 
  00086d70: 27a50010 addiu r5,r29,0x0010
 
00086d74: 0c00755e jal 0x0001d578 multiply translation vector/matrix
 
00086d78: 27a60030 addiu r6,r29,0x0030
 
00086d7c: 8fa20018 lw r2,0x0018(r29)
 
  00086d80: 00000000 nop
 
  00086d84: 04410002 bgez r2,0x00086d90
 
  00086d88: 00000000 nop
 
  00086d8c: 24420003 addiu r2,r2,0x0003
 
  00086d90: 00021083 sra r2,r2,0x02
 
00086d94: ae220128 sw r2,0x0128(r17)
 
  00086d98: 8e310000 lw r17,0x0000(r17) get previous units misc data
 
  00086d9c: 00000000 nop
 
  00086da0: 1620ff7a bne r17,r0,0x00086b8c branch if not first unit
 
  00086da4: 27b00020 addiu r16,r29,0x0020
 
  00086da8: 8fbf0044 lw r31,0x0044(r29)
 
00086dac: 8fb20040 lw r18,0x0040(r29)
 
  00086db0: 8fb1003c lw r17,0x003c(r29)
 
00086db4: 8fb00038 lw r16,0x0038(r29)
 
  00086db8: 27bd0048 addiu r29,r29,0x0048
 
  00086dbc: 03e00008 jr r31
 
  00086dc0: 00000000 nop
 
 
</font>
 
</font>

Latest revision as of 06:14, 23 January 2024

00086dc4: lui r3, 0x8009
00086dc8: lw r3, 0x60e4(r3)
00086dcc: addiu r29, r29, 0xffe8
00086dd0: sw r31, 0x0014(r29)
00086dd4: sltiu r2, r3, 0x001c
00086dd8: beq r2, r0, 0x00086ee4
00086ddc: sw r16, 0x0010(r29)
00086de0: sll r2, r3, 0x02
00086de4: lui r1, 0x8007
00086de8: addu r1, r1, r2
00086dec: lw r2, -0x7ec8(r1)
00086df0: nop
00086df4: jr r2
00086df8: nop
00086dfc: lui r2, 0x8009
00086e00: lw r2, 0x60cc(r2)
00086e04: nop
00086e08: bne r2, r0, 0x00086edc
00086e0c: ori r2, r0, 0x003c
00086e10: lui r2, 0x8009
00086e14: lw r2, 0x60d4(r2)
00086e18: nop
00086e1c: bne r2, r0, 0x00086edc
00086e20: ori r2, r0, 0x003c
00086e24: lui r2, 0x8009
00086e28: lw r2, 0x60c8(r2)
00086e2c: nop
00086e30: bne r2, r0, 0x00086edc
00086e34: ori r2, r0, 0x003c
00086e38: lui r2, 0x800a
00086e3c: lw r2, 0x1c48(r2)
00086e40: lui r3, 0x800a
00086e44: lw r3, 0x1c4c(r3)
00086e48: lui r4, 0x800a
00086e4c: lw r4, 0x1c50(r4)
00086e50: or r2, r2, r3
00086e54: or r2, r2, r4
00086e58: bne r2, r0, 0x00086ed8
00086e5c: nop
00086e60: lui r3, 0x80009
00086e64: lw r3, 0x6130(r3)
00086e68: nop
00086e6c: beq r3, r0, 0x00086ea4
00086e70: nop
00086e74: lui r2, 0x8004
00086e78: lw r2, 0x5980(r2)
00086e7c: nop
00086e80: subu r2, r3, r2
00086e84: lui r1, 0x8009
00086e88: sw r2, 0x6130(r1)
00086e8c: bgtz r2, 0x00086ee4
00086e90: nop
00086e94: lui r2, 0x8009
00086e98: sw r0, 0x6130(r1)
00086e9c: j 0x00086ee4
00086ea0: nop
00086ea4: lui r16, r0, 0x800a
00086ea8: lw r16, -0x75ac(r16)
00086eac: nop
00086eb0: beq r16, r0, 0x00086ee4
00086eb4: nop
00086eb8: jal 0x000865a4
00086ebc: addu r4, r16, r0
00086ec0: lw r16, 0x0000(r16)
00086ec4: nop
00086ec8: beq r16, r0, 0x00086ee4
00086ecc: nop
00086ed0: j 0x00086eb8
00086ed4: nop
00086ed8: ori r2, r0, 0x003c
00086edc: lui r1, 0x8009
00086ee0: sw r2, 0x6130(r1)
00086ee4: jal 0x00085234
00086ee8: nop
00086eec: lui r16, 0x800a
00086ef0: lw r16, -0x75ac(r16)
00086ef4: nop
00086ef8: beq r16, r0, 0x00086f18
00086efc: nop
00086f00: jal 0x00086640
00086f04: addu r4, r16, r0
00086f08: lw r16, 0x0000(r16)
00086f0c: nop
00086f10: bne r16, r0, 0x00086f00
00086f14: nop
00086f18: lw r31, 0x0014(r29)
00086f1c: lw r16, 0x0010(r29)
00086f20: addiu r29, r29, 0x0018
00086f24: jr r31
00086f28: nop

Return Locations

Battle.bin 
00188d94: Free Cursor Controller Input