Difference between revisions of "001a5ea4 - 001a600c"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 001a5d74: 27bdffe8 addiu r29,r29,0xffe8 001a5d78: afb00010 sw r16,0x0010(r29) 001a5d7c: 00a08021 addu r16,r5,r0 001a5d80: 00042400 sll r4,r4,0x...")
 
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 
   
 
   
  001a5d74: 27bdffe8 addiu r29,r29,0xffe8
+
  effect vector matrix routine?
  001a5d78: afb00010 sw r16,0x0010(r29)
+
  001a5d7c: 00a08021 addu r16,r5,r0
+
001a5ea4: 27bdffd0 addiu r29,r29,0xffd0
  001a5d80: 00042400 sll r4,r4,0x10
+
  001a5ea8: afb00028 sw r16,0x0028(r29)
  001a5d84: 00042403 sra r4,r4,0x10
+
  001a5eac: 00a08021 addu r16,r5,r0 r5 is... I dunno. way outside the bounds of any known table - but also not a stack pointer?
  001a5d88: 00041140 sll r2,r4,0x05
+
  001a5eb0: afbf002c sw r31,0x002c(r29)
  001a5d8c: 00441023 subu r2,r2,r4
+
  001a5eb4: 8e02000c lw r2,0x000c(r16)
  001a5d90: 000210c0 sll r2,r2,0x03
+
  001a5eb8: 8e030054 lw r3,0x0054(r16) r3 = current effect parameter pointer
  001a5d94: 3c03801c lui r3,0x801c
+
  001a5ebc: 00021303 sra r2,r2,0x0c
  001a5d98: 2463f02c addiu r3,r3,0xf02c
+
  001a5ec0: a462000c sh r2,0x000c(r3) Store XX
  001a5d9c: afbf0014 sw r31,0x0014(r29)
+
001a5ec4: 8e020010 lw r2,0x0010(r16)
  001a5da0: 8e040004 lw r4,0x0004(r16)
+
  001a5ec8: 8e030054 lw r3,0x0054(r16) r3 = current effect parameter pointer
  001a5da4: 00000000 nop
+
  001a5ecc: 00021303 sra r2,r2,0x0c
  001a5da8: 10800004 beq r4,r0,0x001a5dbc
+
  001a5ed0: a462000e sh r2,0x000e(r3) Store YY
  001a5dac: 00432821 addu r5,r2,r3
+
  001a5ed4: 8e020014 lw r2,0x0014(r16)
  001a5db0: 8e020000 lw r2,0x0000(r16)
+
  001a5ed8: 8e030054 lw r3,0x0054(r16) r3 = current effect parameter pointer. again. Christ 3 times?
  001a5db4: 00000000 nop
+
  001a5edc: 00021303 sra r2,r2,0x0c
  001a5db8: ac820000 sw r2,0x0000(r4)
+
  001a5ee0: a4620010 sh r2,0x0010(r3) Store ZZ
  001a5dbc: 8e030000 lw r3,0x0000(r16)
+
  001a5ee4: 9602004c lhu r2,0x004c(r16)
  001a5dc0: 00000000 nop
+
  001a5ee8: 00000000 nop
  001a5dc4: 10600004 beq r3,r0,0x001a5dd8
+
  001a5eec: 30420002 andi r2,r2,0x0002 check for flag 2
  001a5dc8: 00000000 nop
+
  001a5ef0: 1040001d beq r2,r0,0x001a5f68 branch if flag 2 doesn't exist (don't translate from map plane to projection on screen? (or vice versa?))
  001a5dcc: 8e020004 lw r2,0x0004(r16)
+
  001a5ef4: 00000000 nop
  001a5dd0: 08069779 j 0x001a5de4
+
  001a5ef8: 3c04800a lui r4,0x800a
  001a5dd4: ac620004 sw r2,0x0004(r3)
+
001a5efc: 24848a24 addiu r4,r4,0x8a24 0x80098a24 (Rotation matrix vector pointer?)
  001a5dd8: 8e020004 lw r2,0x0004(r16)
+
  001a5f00: 0c00742a jal 0x0001d0a8 [[Store Rotation matrix elements to GTE]] return MX
  001a5ddc: 00000000 nop
+
001a5f04: 00000000 nop
  001a5de0: aca200d0 sw r2,0x00d0(r5)
+
  001a5f08: 3c04801c lui r4,0x801c
  001a5de4: 94a2001c lhu r2,0x001c(r5)
+
001a5f0c: 24848a0c addiu r4,r4,0x8a0c 0x801b8a0c (translation vector pointer?)
  001a5de8: 00000000 nop
+
001a5f10: 0c00744e jal 0x0001d138 [[Store Translation Vectors to GTE]] return CV (bets on the acronym here being "camera vector" which is never explained.)
  001a5dec: 2442ffff addiu r2,r2,0xffff
+
  001a5f14: 00000000 nop
  001a5df0: a4a2001c sh r2,0x001c(r5)
+
  001a5f18: 8e020018 lw r2,0x0018(r16) load Vector X
  001a5df4: 8602004c lh r2,0x004c(r16)
+
  001a5f1c: 27a40010 addiu r4,r29,0x0010 pointer to vector x (0x10, half) y (0x12, half) and z (0x14, word)
  001a5df8: 00000000 nop
+
  001a5f20: 000210c3 sra r2,r2,0x03
  001a5dfc: 3043f000 andi r3,r2,0xf000
+
  001a5f24: a7a20010 sh r2,0x0010(r29) store vector X
  001a5e00: 34022000 ori r2,r0,0x2000
+
  001a5f28: 8e02001c lw r2,0x001c(r16) load Vector Y
  001a5e04: 10620010 beq r3,r2,0x001a5e48
+
  001a5f2c: 27a50018 addiu r5,r29,0x0018 return value pointer = sp + 0x18
  001a5e08: 28622001 slti r2,r3,0x2001
+
  001a5f30: 000210c3 sra r2,r2,0x03 vector Y / 8
  001a5e0c: 10400007 beq r2,r0,0x001a5e2c
+
  001a5f34: a7a20012 sh r2,0x0012(r29) store vector Y
  001a5e10: 00000000 nop
+
  001a5f38: 8e020020 lw r2,0x0020(r16) load Vector Z (word)
  001a5e14: 1060000c beq r3,r0,0x001a5e48
+
  001a5f3c: 27a60024 addiu r6,r29,0x0024 return value pointer = sp + 0x24
  001a5e18: 34021000 ori r2,r0,0x1000
+
  001a5f40: 000210c3 sra r2,r2,0x03 Z / 8
  001a5e1c: 1062000a beq r3,r2,0x001a5e48
+
  001a5f44: 0c00755e jal 0x0001d578 [[Get vector*matrix from GTE]] return CV + ([x;y;z] * MX)
  001a5e20: 00000000 nop
+
001a5f48: a7a20014 sh r2,0x0014(r29) store vector Z
  001a5e24: 0806979a j 0x001a5e68
+
001a5f4c: 8fa4001c lw r4,0x001c(r29) ΔY
  001a5e28: 00000000 nop
+
001a5f50: 8fa50018 lw r5,0x0018(r29) ΔX
  001a5e2c: 34023000 ori r2,r0,0x3000
+
  001a5f54: 0c00763a jal 0x0001d8e8 [[Get Angle Value via ArcTan Table]] Atan(r4/r5)
  001a5e30: 10620005 beq r3,r2,0x001a5e48
+
001a5f58: 00000000 nop
  001a5e34: 34024000 ori r2,r0,0x4000
+
001a5f5c: 8e030054 lw r3,0x0054(r16) load effect parameter pointer
  001a5e38: 10620008 beq r3,r2,0x001a5e5c
+
001a5f60: 00000000 nop
  001a5e3c: 00000000 nop
+
  001a5f64: a4620012 sh r2,0x0012(r3) store angle between units at 0x12
  001a5e40: 0806979a j 0x001a5e68
+
  001a5f68: 9602004e lhu r2,0x004e(r16) ?
  001a5e44: 00000000 nop
+
  001a5f6c: 00000000 nop
  001a5e48: 8e040054 lw r4,0x0054(r16)
+
  001a5f70: 30420040 andi r2,r2,0x0040 check for 0x40 flag
  001a5e4c: 0c06a83a jal 0x001aa0e8
+
001a5f74: 1040001c beq r2,r0,0x001a5fe8 branch if no 0x40 flag (does not have custom colour?)
  001a5e50: 00000000 nop
+
  001a5f78: 34050080 ori r5,r0,0x0080 blue = 0x80
  001a5e54: 0806979a j 0x001a5e68
+
  001a5f7c: 92030046 lbu r3,0x0046(r16) math transform function?
  001a5e58: 00000000 nop
+
001a5f80: 8e040054 lw r4,0x0054(r16) r4 = current effect parameter pointer
  001a5e5c: 8e040054 lw r4,0x0054(r16)
+
  001a5f84: 3c07801c lui r7,0x801c
  001a5e60: 0c0693a7 jal 0x001a4e9c
+
  001a5f88: 8ce7bf7c lw r7,-0x4084(r7) 0x801cbf7c (effect math transformation on input value?)
  001a5e64: 00000000 nop
+
  001a5f8c: 86080050 lh r8,0x0050(r16) math input?
001a5e68: 3c03801c lui r3,0x801c
+
  001a5f90: 00031080 sll r2,r3,0x02
  001a5e6c: 8c639270 lw r3,-0x6d90(r3)
+
  001a5f94: 00431021 addu r2,r2,r3
  001a5e70: 3c02801c lui r2,0x801c
+
  001a5f98: 00021140 sll r2,r2,0x05 table length is 0xA0 per entry
  001a5e74: 8c42bf68 lw r2,-0x4098(r2)
+
  001a5f9c: 00471021 addu r2,r2,r7 points to math transform table of function
  001a5e78: 3c01801c lui r1,0x801c
+
  001a5fa0: 00481021 addu r2,r2,r8 + r8
  001a5e7c: ac309270 sw r16,-0x6d90(r1)
+
  001a5fa4: 92030047 lbu r3,0x0047(r16) second function set...?
  001a5e80: 2442ffff addiu r2,r2,0xffff
+
  001a5fa8: 90450004 lbu r5,0x0004(r2) loads blue value (loads function(input))
  001a5e84: ae030004 sw r3,0x0004(r16)
+
  001a5fac: 00031080 sll r2,r3,0x02
  001a5e88: 3c01801c lui r1,0x801c
+
  001a5fb0: 00431021 addu r2,r2,r3
  001a5e8c: ac22bf68 sw r2,-0x4098(r1)
+
  001a5fb4: 00021140 sll r2,r2,0x05 0xA0 per entry
  001a5e90: 8fbf0014 lw r31,0x0014(r29)
+
  001a5fb8: 00471021 addu r2,r2,r7
  001a5e94: 8fb00010 lw r16,0x0010(r29)
+
  001a5fbc: 00481021 addu r2,r2,r8
  001a5e98: 27bd0018 addiu r29,r29,0x0018
+
  001a5fc0: 92030048 lbu r3,0x0048(r16) third function set?
  001a5e9c: 03e00008 jr r31
+
  001a5fc4: 90460004 lbu r6,0x0004(r2) Loads green value (function_2(input))
  001a5ea0: 00000000 nop
+
  001a5fc8: 00031080 sll r2,r3,0x02
 +
  001a5fcc: 00431021 addu r2,r2,r3
 +
  001a5fd0: 00021140 sll r2,r2,0x05
 +
  001a5fd4: 00471021 addu r2,r2,r7
 +
  001a5fd8: 00481021 addu r2,r2,r8
 +
  001a5fdc: 90470004 lbu r7,0x0004(r2) Loads red value (function_3(input))
 +
  001a5fe0: 080697fd j 0x001a5ff4
 +
001a5fe4: 00000000 nop
 +
  001a5fe8: 8e040054 lw r4,0x0054(r16) load parameter data pointer from r16
 +
  001a5fec: 34060080 ori r6,r0,0x0080 green = 0x80
 +
  001a5ff0: 34070080 ori r7,r0,0x0080 red = 0x80
 +
001a5ff4: 0c06a87e jal 0x001aa1f8 [[Composite frame loading for parameter sets]](current effect param data, blue, green, red)
 +
  001a5ff8: 00000000 nop
 +
001a5ffc: 8fbf002c lw r31,0x002c(r29)
 +
  001a6000: 8fb00028 lw r16,0x0028(r29)
 +
  001a6004: 27bd0030 addiu r29,r29,0x0030
 +
  001a6008: 03e00008 jr r31
 +
  001a600c: 00000000 nop
 
</font>
 
</font>

Latest revision as of 01:46, 9 July 2023

effect vector matrix routine?

001a5ea4: 27bdffd0 addiu r29,r29,0xffd0
001a5ea8: afb00028 sw r16,0x0028(r29)
001a5eac: 00a08021 addu r16,r5,r0			r5 is... I dunno. way outside the bounds of any known table - but also not a stack pointer?
001a5eb0: afbf002c sw r31,0x002c(r29)
001a5eb4: 8e02000c lw r2,0x000c(r16)
001a5eb8: 8e030054 lw r3,0x0054(r16)			r3 = current effect parameter pointer
001a5ebc: 00021303 sra r2,r2,0x0c
001a5ec0: a462000c sh r2,0x000c(r3)			Store XX
001a5ec4: 8e020010 lw r2,0x0010(r16)
001a5ec8: 8e030054 lw r3,0x0054(r16)			r3 = current effect parameter pointer
001a5ecc: 00021303 sra r2,r2,0x0c
001a5ed0: a462000e sh r2,0x000e(r3)			Store YY
001a5ed4: 8e020014 lw r2,0x0014(r16)
001a5ed8: 8e030054 lw r3,0x0054(r16)			r3 = current effect parameter pointer. again. Christ 3 times?
001a5edc: 00021303 sra r2,r2,0x0c
001a5ee0: a4620010 sh r2,0x0010(r3)			Store ZZ
001a5ee4: 9602004c lhu r2,0x004c(r16)
001a5ee8: 00000000 nop
001a5eec: 30420002 andi r2,r2,0x0002			check for flag 2
001a5ef0: 1040001d beq r2,r0,0x001a5f68		branch if flag 2 doesn't exist (don't translate from map plane to projection on screen? (or vice versa?))
001a5ef4: 00000000 nop
001a5ef8: 3c04800a lui r4,0x800a
001a5efc: 24848a24 addiu r4,r4,0x8a24			0x80098a24 (Rotation matrix vector pointer?)
001a5f00: 0c00742a jal 0x0001d0a8			Store Rotation matrix elements to GTE return MX
001a5f04: 00000000 nop
001a5f08: 3c04801c lui r4,0x801c
001a5f0c: 24848a0c addiu r4,r4,0x8a0c			0x801b8a0c (translation vector pointer?)
001a5f10: 0c00744e jal 0x0001d138			Store Translation Vectors to GTE return CV (bets on the acronym here being "camera vector" which is never explained.)
001a5f14: 00000000 nop
001a5f18: 8e020018 lw r2,0x0018(r16)			load Vector X
001a5f1c: 27a40010 addiu r4,r29,0x0010			pointer to vector x (0x10, half) y (0x12, half) and z (0x14, word)
001a5f20: 000210c3 sra r2,r2,0x03
001a5f24: a7a20010 sh r2,0x0010(r29)			store vector X
001a5f28: 8e02001c lw r2,0x001c(r16)			load Vector Y
001a5f2c: 27a50018 addiu r5,r29,0x0018			return value pointer = sp + 0x18
001a5f30: 000210c3 sra r2,r2,0x03			vector Y / 8
001a5f34: a7a20012 sh r2,0x0012(r29)			store vector Y
001a5f38: 8e020020 lw r2,0x0020(r16)			load Vector Z (word)
001a5f3c: 27a60024 addiu r6,r29,0x0024			return value pointer = sp + 0x24
001a5f40: 000210c3 sra r2,r2,0x03			Z / 8
001a5f44: 0c00755e jal 0x0001d578			Get vector*matrix from GTE return CV + ([x;y;z] * MX)
001a5f48: a7a20014 sh r2,0x0014(r29)			store vector Z
001a5f4c: 8fa4001c lw r4,0x001c(r29)			ΔY
001a5f50: 8fa50018 lw r5,0x0018(r29)			ΔX
001a5f54: 0c00763a jal 0x0001d8e8			Get Angle Value via ArcTan Table Atan(r4/r5)
001a5f58: 00000000 nop
001a5f5c: 8e030054 lw r3,0x0054(r16)			load effect parameter pointer
001a5f60: 00000000 nop
001a5f64: a4620012 sh r2,0x0012(r3)			store angle between units at 0x12
001a5f68: 9602004e lhu r2,0x004e(r16)			?
001a5f6c: 00000000 nop
001a5f70: 30420040 andi r2,r2,0x0040			check for 0x40 flag
001a5f74: 1040001c beq r2,r0,0x001a5fe8		branch if no 0x40 flag (does not have custom colour?)
001a5f78: 34050080 ori r5,r0,0x0080			blue = 0x80
001a5f7c: 92030046 lbu r3,0x0046(r16)			math transform function?
001a5f80: 8e040054 lw r4,0x0054(r16)			r4 = current effect parameter pointer
001a5f84: 3c07801c lui r7,0x801c
001a5f88: 8ce7bf7c lw r7,-0x4084(r7)			0x801cbf7c (effect math transformation on input value?)
001a5f8c: 86080050 lh r8,0x0050(r16)			math input?
001a5f90: 00031080 sll r2,r3,0x02			
001a5f94: 00431021 addu r2,r2,r3
001a5f98: 00021140 sll r2,r2,0x05			table length is 0xA0 per entry
001a5f9c: 00471021 addu r2,r2,r7			points to math transform table of function
001a5fa0: 00481021 addu r2,r2,r8			+ r8
001a5fa4: 92030047 lbu r3,0x0047(r16)			second function set...?
001a5fa8: 90450004 lbu r5,0x0004(r2)			loads blue value (loads function(input))
001a5fac: 00031080 sll r2,r3,0x02
001a5fb0: 00431021 addu r2,r2,r3
001a5fb4: 00021140 sll r2,r2,0x05			0xA0 per entry
001a5fb8: 00471021 addu r2,r2,r7
001a5fbc: 00481021 addu r2,r2,r8
001a5fc0: 92030048 lbu r3,0x0048(r16)			third function set?
001a5fc4: 90460004 lbu r6,0x0004(r2)			Loads green value (function_2(input))
001a5fc8: 00031080 sll r2,r3,0x02
001a5fcc: 00431021 addu r2,r2,r3
001a5fd0: 00021140 sll r2,r2,0x05
001a5fd4: 00471021 addu r2,r2,r7
001a5fd8: 00481021 addu r2,r2,r8
001a5fdc: 90470004 lbu r7,0x0004(r2)			Loads red value (function_3(input))
001a5fe0: 080697fd j 0x001a5ff4			
001a5fe4: 00000000 nop
001a5fe8: 8e040054 lw r4,0x0054(r16)			load parameter data pointer from r16
001a5fec: 34060080 ori r6,r0,0x0080			green = 0x80
001a5ff0: 34070080 ori r7,r0,0x0080			red = 0x80
001a5ff4: 0c06a87e jal 0x001aa1f8			Composite frame loading for parameter sets(current effect param data, blue, green, red)
001a5ff8: 00000000 nop
001a5ffc: 8fbf002c lw r31,0x002c(r29)
001a6000: 8fb00028 lw r16,0x0028(r29)
001a6004: 27bd0030 addiu r29,r29,0x0030
001a6008: 03e00008 jr r31
001a600c: 00000000 nop