Difference between revisions of "Special Status Flag Enabling"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Special Status Flag Enabling? 00068e80: 27bdffe0 addiu r29,r29,0xffe0 00068e84: afb10014 sw r17,0x0014(r29) 00068e88: 00808821 addu r17,r4,r0 r17 = Counter2 00068e8c: af...")
 
Line 21: Line 21:
 
  00068ecc: 16000083 bne r16,r0,0x000690dc Branch if value is negative (error check)
 
  00068ecc: 16000083 bne r16,r0,0x000690dc Branch if value is negative (error check)
 
  00068ed0: 34020001 ori r2,r0,0x0001 r2 = 1
 
  00068ed0: 34020001 ori r2,r0,0x0001 r2 = 1
 +
 +
*Status Flag Removal*
 +
00068ed4: 2623ffff addiu r3,r17,0xffff r3 = Counter2 - 1 (C2 starts at 1)
 +
00068ed8: 2c620020 sltiu r2,r3,0x0020
 +
00068edc: 10400028 beq r2,r0,0x 00068f80 Branch if Counter2 >= 20
 +
00068ee0: 00031080 sll r2,r3,0x02 r2 = (Counter2 - 1) * 4
 +
00068ee4: 3c018006 lui r1,0x8006
 +
00068ee8: 00220821 addu r1,r1,r2
 +
00068eec: 8c227038 lw r2,0x7038(r1) Load Code Pointer
 +
00068ef0: 00000000 nop
 +
00068ef4: 00400008 jr r2
 +
00068ef8: 00000000 nop
 +
 +
Crystal/Chicken
 +
00068efc: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00068f00: 00000000 nop
 +
00068f04: 34420002 ori r2,r2,0x0002 Enable Crystal
 +
00068f08: aca20154 sw r2,0x0154(r5) Store Statuses to Remove
 +
00068f0c: 8ca2014c lw r2,0x014c(r5) load Statuses to Add
 +
00068f10: 0801a3dd j 0x 00068f74
 +
00068f14: 2403fffd addiu r3,r0,0xfffd Disable Crystal
 +
 +
Frog
 +
00068f18: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00068f1c: 02402021 addu r4,r18,r0 r4 = Unit's ID
 +
00068f20: 34420004 ori r2,r2,0x0004 Enable Frog
 +
00068f24: aca20154 sw r2,0x0154(r5) Store new Statuses to Remove
 +
00068f28: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add 5
 +
00068f2c: 2403fffb addiu r3,r0,0xfffb Disable Frog
 +
00068f30: 00431024 and r2,r2,r3
 +
00068f34: 0c0667b2 jal 0x00199ec8 Usable Ability Setting/ENTD AI Calcs.
 +
00068f38: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
00068f3c: 0801a437 j 0x 000690dc
 +
00068f40: 34020001 ori r2,r0,0x0001 r2 = 1
 +
 +
Jump/Float/Transparent
 +
00068f44: 3c028009 lui r2,0x8009
 +
00068f48: 24424a40 addiu r2,r2,0x4a40
 +
00068f4c: 00112080 sll r4,r17,0x02 r4 = Counter2 * 4
 +
00068f50: 00822021 addu r4,r4,r2
 +
00068f54: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00068f58: 8c830000 lw r3,0x0000(r4) Load Status' Flags
 +
00068f5c: 00000000 nop
 +
00068f60: 00431025 or r2,r2,r3 Enable Status' Flags
 +
00068f64: aca20154 sw r2,0x0154(r5) Store new Statuses to Remove
 +
00068f68: 8c820000 lw r2,0x0000(r4) Load Status' Flags
 +
00068f6c: 8ca3014c lw r3,0x014c(r5) Load Statuses to Add
 +
00068f70: 00021027 nor r2,r0,r2 Disable Status' Flags
 +
00068f74: 00431024 and r2,r2,r3
 +
00068f78: 0801a436 j 0x 000690d8
 +
00068f7c: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
 +
Other statuses
 +
00068f80: 3c028009 lui r2,0x8009
 +
00068f84: 24424a40 addiu r2,r2,0x4a40
 +
00068f88: 00112080 sll r4,r17,0x02 r4 = Counter2 * 4
 +
00068f8c: 00822021 addu r4,r4,r2
 +
00068f90: 8ca20150 lw r2,0x0150(r5) Load Statuses to Remove
 +
00068f94: 8c830000 lw r3,0x0000(r4) Load Status' Flags
 +
00068f98: 00000000 nop
 +
00068f9c: 00431025 or r2,r2,r3 Enable Status' Flags
 +
00068fa0: aca20150 sw r2,0x0150(r5) Store new Statuses to Remove
 +
00068fa4: 8c820000 lw r2,0x0000(r4) Load Status' Flags
 +
00068fa8: 8ca30148 lw r3,0x0148(r5) Load Statuses to Add
 +
00068fac: 00021027 nor r2,r0,r2 Disable Status' Flags
 +
00068fb0: 00431024 and r2,r2,r3
 +
00068fb4: 0801a436 j 0x 000690d8
 +
00068fb8: aca20148 sw r2,0x0148(r5) Store new Statuses to Add
 +
 +
*Status Flag Enabling*
 +
00068fbc: 2623ffff addiu r3,r17,0xffff Counter - 1 (C2 starts at 1)
 +
00068fc0: 2c620020 sltiu r2,r3,0x0020
 +
00068fc4: 10400036 beq r2,r0,0x 000690a0 Branch if Counter - 1 >= 0x20
 +
00068fc8: 00031080 sll r2,r3,0x02 (Counter - 1) * 4
 +
00068fcc: 3c018006 lui r1,0x8006
 +
00068fd0: 00220821 addu r1,r1,r2
 +
00068fd4: 8c2270b8 lw r2,0x70b8(r1) Load Code Pointer
 +
00068fd8: 00000000 nop
 +
00068fdc: 00400008 jr r2
 +
00068fe0: 00000000 nop
 +
 +
Crystal
 +
00068fe4: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add
 +
00068fe8: 00000000 nop
 +
00068fec: 34420001 ori r2,r2,0x0001 Enable Crystal
 +
00068ff0: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
00068ff4: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00068ff8: 0801a425 j 0x 00069094
 +
00068ffc: 2403fffe addiu r3,r0,0xfffe Disable Crystal
 +
 +
Chicken
 +
00069000: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add
 +
00069004: 00000000 nop
 +
00069008: 34420002 ori r2,r2,0x0002 Enable Chicken
 +
0006900c: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
00069010: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00069014: 0801a425 j 0x 00069094
 +
00069018: 2403fffd addiu r3,r0,0xfffd Disable Chicken
 +
 +
Frog
 +
0006901c: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add
 +
00069020: 02402021 addu r4,r18,r0 r4 = Unit's ID
 +
00069024: 34420004 ori r2,r2,0x0004 Enable Frog
 +
00069028: aca2014c sw r2,0x014c(r5) Store New Statuses to Add
 +
0006902c: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
00069030: 2403fffb addiu r3,r0,0xfffb Disable Frog
 +
00069034: 00431024 and r2,r2,r3
 +
00069038: 0c0667b2 jal 0x00199ec8 Usable Ability Setting/ENTD AI Calcs.
 +
0006903c: aca20154 sw r2,0x0154(r5) Store new Statuses to Remove
 +
00069040: 0801a437 j 0x 000690dc
 +
00069044: 34020001 ori r2,r0,0x0001
 +
 +
Treasure
 +
00069048: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add
 +
0006904c: 00000000 nop
 +
00069050: 34420008 ori r2,r2,0x0008 Enable Treasure
 +
00069054: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
00069058: 8ca20154 lw r2,0x0154(r5) Load Statuses to Remove
 +
0006905c: 0801a425 j 0x 00069094
 +
00069060: 2403fff7 addiu r3,r0,0xfff7 Disable Treasure
 +
 +
Jump/Float/Transparent
 +
00069064: 3c028009 lui r2,0x8009
 +
00069068: 24424a40 addiu r2,r2,0x4a40
 +
0006906c: 00112080 sll r4,r17,0x02 Counter2 * 4
 +
00069070: 00822021 addu r4,r4,r2
 +
00069074: 8ca2014c lw r2,0x014c(r5) Load Statuses to Add
 +
00069078: 8c830000 lw r3,0x0000(r4) Load Status' Flags
 +
0006907c: 00000000 nop
 +
00069080: 00431025 or r2,r2,r3 Enable Status' Flags
 +
00069084: aca2014c sw r2,0x014c(r5) Store new Statuses to Add
 +
00069088: 8c820000 lw r2,0x0000(r4) Load Status' Flags
 +
0006908c: 8ca30154 lw r3,0x0154(r5) Load Statuses to Remove
 +
00069090: 00021027 nor r2,r0,r2 Disable Status' Flags
 +
00069094: 00431024 and r2,r2,r3
 +
00069098: 0801a436 j 0x 000690d8
 +
0006909c: aca20154 sw r2,0x0154(r5) Store new Statuses to Remove
 +
 +
Other statuses
 +
000690a0: 3c028009 lui r2,0x8009
 +
000690a4: 24424a40 addiu r2,r2,0x4a40
 +
000690a8: 00112080 sll r4,r17,0x02 Counter * 4
 +
000690ac: 00822021 addu r4,r4,r2
 +
000690b0: 8ca20148 lw r2,0x0148(r5) Load Statuses to Add
 +
000690b4: 8c830000 lw r3,0x0000(r4) Load Status' Flags
 +
000690b8: 00000000 nop
 +
000690bc: 00431025 or r2,r2,r3 Enable Status' Flags
 +
000690c0: aca20148 sw r2,0x0148(r5) Store new Statuses to Add
 +
000690c4: 8c820000 lw r2,0x0000(r4) Load Status' Flags
 +
000690c8: 8ca30150 lw r3,0x0150(r5) Load Statuses to Remove
 +
000690cc: 00021027 nor r2,r0,r2
 +
000690d0: 00431024 and r2,r2,r3 Disable Status' Flags
 +
000690d4: aca20150 sw r2,0x0150(r5) Store new Statuses to Remove
 +
 +
Unused/Invite/Treasure (disabling)/Wall
 +
000690d8: 34020001 ori r2,r0,0x0001 r2 = 1
 +
000690dc: 8fbf001c lw r31,0x001c(r29)
 +
000690e0: 8fb20018 lw r18,0x0018(r29)
 +
000690e4: 8fb10014 lw r17,0x0014(r29)
 +
000690e8: 8fb00010 lw r16,0x0010(r29)
 +
000690ec: 27bd0020 addiu r29,r29,0x0020
 +
000690f0: 03e00008 jr r31
 +
000690f4: 00000000 nop

Revision as of 20:26, 8 October 2012

Special Status Flag Enabling?
00068e80: 27bdffe0 addiu r29,r29,0xffe0
00068e84: afb10014 sw r17,0x0014(r29)
00068e88: 00808821 addu r17,r4,r0		r17 = Counter2
00068e8c: afb00010 sw r16,0x0010(r29)
00068e90: 00a08021 addu r16,r5,r0		r16 = 1 = status present, 0 = not present?
00068e94: afb20018 sw r18,0x0018(r29)
00068e98: 00c09021 addu r18,r6,r0		r18 = Unit's ID
00068e9c: afbf001c sw r31,0x001c(r29)
00068ea0: 0c01e9c9 jal 0x0007a724		Find Misc Unit Pointer (r4 = Unit)?
00068ea4: 3244ffff andi r4,r18,0xffff		r4 = Unit's ID
00068ea8: 00402821 addu r5,r2,r0		r5 = Misc Unit Data Pointer?
00068eac: 14a00003 bne r5,r0,0x 00068ebc		Branch if Pointer exists
00068eb0: 34020001 ori r2,r0,0x0001		r2 = 1
00068eb4: 0801a437 j 0x000690dc
00068eb8: 00001021 addu r2,r0,r0		r2 = 0
00068ebc: 1202003f beq r16,r2,0x 00068fbc	Branch if status is present?
00068ec0: 2a020002 slti r2,r16,0x0002
00068ec4: 10400084 beq r2,r0,0x000690d8		Branch if value >= 2 (error check)
00068ec8: 00000000 nop
00068ecc: 16000083 bne r16,r0,0x000690dc	Branch if value is negative (error check)
00068ed0: 34020001 ori r2,r0,0x0001		r2 = 1
*Status Flag Removal*
00068ed4: 2623ffff addiu r3,r17,0xffff		r3 = Counter2 - 1 (C2 starts at 1)
00068ed8: 2c620020 sltiu r2,r3,0x0020
00068edc: 10400028 beq r2,r0,0x 00068f80		Branch if Counter2 >= 20
00068ee0: 00031080 sll r2,r3,0x02		r2 = (Counter2 - 1) * 4
00068ee4: 3c018006 lui r1,0x8006
00068ee8: 00220821 addu r1,r1,r2
00068eec: 8c227038 lw r2,0x7038(r1)		Load Code Pointer
00068ef0: 00000000 nop
00068ef4: 00400008 jr r2
00068ef8: 00000000 nop
Crystal/Chicken
00068efc: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00068f00: 00000000 nop
00068f04: 34420002 ori r2,r2,0x0002		Enable Crystal
00068f08: aca20154 sw r2,0x0154(r5)		Store Statuses to Remove
00068f0c: 8ca2014c lw r2,0x014c(r5)		load Statuses to Add
00068f10: 0801a3dd j 0x 00068f74
00068f14: 2403fffd addiu r3,r0,0xfffd		Disable Crystal
Frog
00068f18: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00068f1c: 02402021 addu r4,r18,r0		r4 = Unit's ID
00068f20: 34420004 ori r2,r2,0x0004		Enable Frog
00068f24: aca20154 sw r2,0x0154(r5)		Store new Statuses to Remove
00068f28: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add 5
00068f2c: 2403fffb addiu r3,r0,0xfffb		Disable Frog
00068f30: 00431024 and r2,r2,r3
00068f34: 0c0667b2 jal 0x00199ec8		Usable Ability Setting/ENTD AI Calcs.
00068f38: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
00068f3c: 0801a437 j 0x 000690dc
00068f40: 34020001 ori r2,r0,0x0001		r2 = 1
Jump/Float/Transparent
00068f44: 3c028009 lui r2,0x8009
00068f48: 24424a40 addiu r2,r2,0x4a40
00068f4c: 00112080 sll r4,r17,0x02		r4 = Counter2 * 4
00068f50: 00822021 addu r4,r4,r2
00068f54: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00068f58: 8c830000 lw r3,0x0000(r4)		Load Status' Flags
00068f5c: 00000000 nop
00068f60: 00431025 or r2,r2,r3			Enable Status' Flags
00068f64: aca20154 sw r2,0x0154(r5)		Store new Statuses to Remove
00068f68: 8c820000 lw r2,0x0000(r4)		Load Status' Flags
00068f6c: 8ca3014c lw r3,0x014c(r5)		Load Statuses to Add
00068f70: 00021027 nor r2,r0,r2			Disable Status' Flags
00068f74: 00431024 and r2,r2,r3
00068f78: 0801a436 j 0x 000690d8
00068f7c: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
Other statuses
00068f80: 3c028009 lui r2,0x8009
00068f84: 24424a40 addiu r2,r2,0x4a40
00068f88: 00112080 sll r4,r17,0x02		r4 = Counter2 * 4
00068f8c: 00822021 addu r4,r4,r2
00068f90: 8ca20150 lw r2,0x0150(r5)		Load Statuses to Remove
00068f94: 8c830000 lw r3,0x0000(r4)		Load Status' Flags
00068f98: 00000000 nop
00068f9c: 00431025 or r2,r2,r3			Enable Status' Flags
00068fa0: aca20150 sw r2,0x0150(r5)		Store new Statuses to Remove
00068fa4: 8c820000 lw r2,0x0000(r4)		Load Status' Flags
00068fa8: 8ca30148 lw r3,0x0148(r5)		Load Statuses to Add
00068fac: 00021027 nor r2,r0,r2			Disable Status' Flags
00068fb0: 00431024 and r2,r2,r3
00068fb4: 0801a436 j 0x 000690d8
00068fb8: aca20148 sw r2,0x0148(r5)		Store new Statuses to Add
*Status Flag Enabling*
00068fbc: 2623ffff addiu r3,r17,0xffff		Counter - 1 (C2 starts at 1)
00068fc0: 2c620020 sltiu r2,r3,0x0020
00068fc4: 10400036 beq r2,r0,0x 000690a0		Branch if Counter - 1 >= 0x20
00068fc8: 00031080 sll r2,r3,0x02		(Counter - 1) * 4
00068fcc: 3c018006 lui r1,0x8006
00068fd0: 00220821 addu r1,r1,r2
00068fd4: 8c2270b8 lw r2,0x70b8(r1)		Load Code Pointer
00068fd8: 00000000 nop
00068fdc: 00400008 jr r2
00068fe0: 00000000 nop
Crystal
00068fe4: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add
00068fe8: 00000000 nop
00068fec: 34420001 ori r2,r2,0x0001		Enable Crystal
00068ff0: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
00068ff4: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00068ff8: 0801a425 j 0x 00069094
00068ffc: 2403fffe addiu r3,r0,0xfffe		Disable Crystal
Chicken
00069000: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add
00069004: 00000000 nop
00069008: 34420002 ori r2,r2,0x0002		Enable Chicken
0006900c: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
00069010: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00069014: 0801a425 j 0x 00069094
00069018: 2403fffd addiu r3,r0,0xfffd		Disable Chicken
Frog
0006901c: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add
00069020: 02402021 addu r4,r18,r0		r4 = Unit's ID
00069024: 34420004 ori r2,r2,0x0004		Enable Frog
00069028: aca2014c sw r2,0x014c(r5)		Store New Statuses to Add
0006902c: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
00069030: 2403fffb addiu r3,r0,0xfffb		Disable Frog
00069034: 00431024 and r2,r2,r3
00069038: 0c0667b2 jal 0x00199ec8		Usable Ability Setting/ENTD AI Calcs.
0006903c: aca20154 sw r2,0x0154(r5)		Store new Statuses to Remove
00069040: 0801a437 j 0x 000690dc
00069044: 34020001 ori r2,r0,0x0001
Treasure
00069048: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add
0006904c: 00000000 nop
00069050: 34420008 ori r2,r2,0x0008		Enable Treasure
00069054: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
00069058: 8ca20154 lw r2,0x0154(r5)		Load Statuses to Remove
0006905c: 0801a425 j 0x 00069094
00069060: 2403fff7 addiu r3,r0,0xfff7		Disable Treasure
Jump/Float/Transparent
00069064: 3c028009 lui r2,0x8009
00069068: 24424a40 addiu r2,r2,0x4a40
0006906c: 00112080 sll r4,r17,0x02		Counter2 * 4
00069070: 00822021 addu r4,r4,r2
00069074: 8ca2014c lw r2,0x014c(r5)		Load Statuses to Add
00069078: 8c830000 lw r3,0x0000(r4)		Load Status' Flags
0006907c: 00000000 nop
00069080: 00431025 or r2,r2,r3			Enable Status' Flags
00069084: aca2014c sw r2,0x014c(r5)		Store new Statuses to Add
00069088: 8c820000 lw r2,0x0000(r4)		Load Status' Flags
0006908c: 8ca30154 lw r3,0x0154(r5)		Load Statuses to Remove
00069090: 00021027 nor r2,r0,r2			Disable Status' Flags
00069094: 00431024 and r2,r2,r3
00069098: 0801a436 j 0x 000690d8
0006909c: aca20154 sw r2,0x0154(r5)		Store new Statuses to Remove
Other statuses
000690a0: 3c028009 lui r2,0x8009
000690a4: 24424a40 addiu r2,r2,0x4a40
000690a8: 00112080 sll r4,r17,0x02		Counter * 4
000690ac: 00822021 addu r4,r4,r2
000690b0: 8ca20148 lw r2,0x0148(r5)		Load Statuses to Add
000690b4: 8c830000 lw r3,0x0000(r4)		Load Status' Flags
000690b8: 00000000 nop
000690bc: 00431025 or r2,r2,r3			Enable Status' Flags
000690c0: aca20148 sw r2,0x0148(r5)		Store new Statuses to Add
000690c4: 8c820000 lw r2,0x0000(r4)		Load Status' Flags
000690c8: 8ca30150 lw r3,0x0150(r5)		Load Statuses to Remove
000690cc: 00021027 nor r2,r0,r2
000690d0: 00431024 and r2,r2,r3			Disable Status' Flags
000690d4: aca20150 sw r2,0x0150(r5)		Store new Statuses to Remove
Unused/Invite/Treasure (disabling)/Wall
000690d8: 34020001 ori r2,r0,0x0001		r2 = 1
000690dc: 8fbf001c lw r31,0x001c(r29)
000690e0: 8fb20018 lw r18,0x0018(r29)
000690e4: 8fb10014 lw r17,0x0014(r29)
000690e8: 8fb00010 lw r16,0x0010(r29)
000690ec: 27bd0020 addiu r29,r29,0x0020
000690f0: 03e00008 jr r31
000690f4: 00000000 nop