Difference between revisions of "0008ec70 - 0008ef20"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0008ec70: 27bdffd8 addiu r29,r29,0xffd8 0008ec74: afb1001c sw r17,0x001c(r29) 0008ec78: 00808821 addu r17,r4,r0 0008ec7c: afb00018 sw r16,0x001...")
 
 
Line 3: Line 3:
 
  0008ec70: 27bdffd8 addiu r29,r29,0xffd8
 
  0008ec70: 27bdffd8 addiu r29,r29,0xffd8
 
  0008ec74: afb1001c sw r17,0x001c(r29)
 
  0008ec74: afb1001c sw r17,0x001c(r29)
  0008ec78: 00808821 addu r17,r4,r0
+
  0008ec78: 00808821 addu r17,r4,r0 script var 0x33 (current map.)
 
  0008ec7c: afb00018 sw r16,0x0018(r29)
 
  0008ec7c: afb00018 sw r16,0x0018(r29)
 
  0008ec80: 00a08021 addu r16,r5,r0
 
  0008ec80: 00a08021 addu r16,r5,r0
  0008ec84: 2e02000d sltiu r2,r16,0x000d
+
  0008ec84: 2e02000d sltiu r2,r16,0x000d d...? (init. func?)
 
  0008ec88: 1040009f beq r2,r0,0x0008ef08
 
  0008ec88: 1040009f beq r2,r0,0x0008ef08
 
  0008ec8c: afbf0020 sw r31,0x0020(r29)
 
  0008ec8c: afbf0020 sw r31,0x0020(r29)
Line 16: Line 16:
 
  0008eca4: 00400008 jr r2
 
  0008eca4: 00400008 jr r2
 
  0008eca8: 00000000 nop
 
  0008eca8: 00000000 nop
 +
Return table:
 +
0: 8008ecac (initialise map & map palette data?)
 +
1: 8008ef04 (err)
 +
2: 8008ed08 (load new map)
 +
3: 8008ed24
 +
4: 8008ed40
 +
5: 8008ed58 (prepare unit data loading)
 +
6: 8008ed9c (load non-boss SHP/SEQ data)
 +
7: 8008edcc (load Lucavia SHP/SEQ data)
 +
8: 8008edfc
 +
9: 8008ee28
 +
a: 8008ee4c
 +
b: 8008ee64
 +
c: 8008eecc
 +
 +
initialise map + map palette:
 
  0008ecac: 0c01103d jal 0x000440f4
 
  0008ecac: 0c01103d jal 0x000440f4
 
  0008ecb0: 00000000 nop
 
  0008ecb0: 00000000 nop
  0008ecb4: 0c02391a jal 0x0008e468
+
  0008ecb4: 0c02391a jal 0x0008e468 [[0008e468 - 0008e53c|Initialise map before loading?]]
 
  0008ecb8: 00000000 nop
 
  0008ecb8: 00000000 nop
  0008ecbc: 0c024c12 jal 0x00093048
+
  0008ecbc: 0c024c12 jal 0x00093048 [[00093048 - 00093114|Seems to initialise more data]]
 
  0008ecc0: 00000000 nop
 
  0008ecc0: 00000000 nop
 
  0008ecc4: 3c038004 lui r3,0x8004
 
  0008ecc4: 3c038004 lui r3,0x8004
Line 26: Line 42:
 
  0008eccc: 34020001 ori r2,r0,0x0001
 
  0008eccc: 34020001 ori r2,r0,0x0001
 
  0008ecd0: 14620003 bne r3,r2,0x0008ece0
 
  0008ecd0: 14620003 bne r3,r2,0x0008ece0
  0008ecd4: 26100001 addiu r16,r16,0x0001
+
  0008ecd4: 26100001 addiu r16,r16,0x0001 counter? + 1
  0008ecd8: 0c023a03 jal 0x0008e80c
+
  0008ecd8: 0c023a03 jal 0x0008e80c
 
  0008ecdc: 00000000 nop
 
  0008ecdc: 00000000 nop
 
  0008ece0: 3c048009 lui r4,0x8009
 
  0008ece0: 3c048009 lui r4,0x8009
  0008ece4: 24844b84 addiu r4,r4,0x4b84
+
  0008ece4: 24844b84 addiu r4,r4,0x4b84 pointer to map palette?
  0008ece8: 34050002 ori r5,r0,0x0002
+
  0008ece8: 34050002 ori r5,r0,0x0002 Section ID = 2
 
  0008ecec: 00003021 addu r6,r0,r0
 
  0008ecec: 00003021 addu r6,r0,r0
  0008ecf0: 0c0249b6 jal 0x000926d8
+
  0008ecf0: 0c0249b6 jal 0x000926d8 [[Get Palette Data]]
  0008ecf4: 00003821 addu r7,r0,r0
+
  0008ecf4: 00003821 addu r7,r0,r0 only load 1 palette?
 
  0008ecf8: 3c018005 lui r1,0x8005
 
  0008ecf8: 3c018005 lui r1,0x8005
 
  0008ecfc: ac209c18 sw r0,-0x63e8(r1)
 
  0008ecfc: ac209c18 sw r0,-0x63e8(r1)
 
  0008ed00: 08023bc3 j 0x0008ef0c
 
  0008ed00: 08023bc3 j 0x0008ef0c
  0008ed04: 02001021 addu r2,r16,r0
+
  0008ed04: 02001021 addu r2,r16,r0 Return counter
  0008ed08: 02202021 addu r4,r17,r0
+
 
  0008ed0c: 0c03cdc6 jal 0x000f3718
+
Load map + Map GNS data
  0008ed10: 34050075 ori r5,r0,0x0075
+
  0008ed08: 02202021 addu r4,r17,r0 Current Map
 +
  0008ed0c: 0c03cdc6 jal 0x000f3718 [[000f3718 - 000f4ac8]]
 +
  0008ed10: 34050075 ori r5,r0,0x0075 map load func. 0x75 (load new map + GNS)
 
  0008ed14: 1040007d beq r2,r0,0x0008ef0c
 
  0008ed14: 1040007d beq r2,r0,0x0008ef0c
  0008ed18: 02001021 addu r2,r16,r0
+
  0008ed18: 02001021 addu r2,r16,r0 return init. func + 1
 
  0008ed1c: 08023bc2 j 0x0008ef08
 
  0008ed1c: 08023bc2 j 0x0008ef08
 
  0008ed20: 26100001 addiu r16,r16,0x0001
 
  0008ed20: 26100001 addiu r16,r16,0x0001
 +
 +
 
  0008ed24: 02202021 addu r4,r17,r0
 
  0008ed24: 02202021 addu r4,r17,r0
  0008ed28: 0c03cdc6 jal 0x000f3718
+
  0008ed28: 0c03cdc6 jal 0x000f3718 [[000f3718 - 000f4ac8]]
  0008ed2c: 34050076 ori r5,r0,0x0076
+
  0008ed2c: 34050076 ori r5,r0,0x0076 Map load func. 0x76 (immediately load interrupted? map load)
 
  0008ed30: 14400076 bne r2,r0,0x0008ef0c
 
  0008ed30: 14400076 bne r2,r0,0x0008ef0c
 
  0008ed34: 02001021 addu r2,r16,r0
 
  0008ed34: 02001021 addu r2,r16,r0
 
  0008ed38: 08023bc2 j 0x0008ef08
 
  0008ed38: 08023bc2 j 0x0008ef08
 
  0008ed3c: 26100001 addiu r16,r16,0x0001
 
  0008ed3c: 26100001 addiu r16,r16,0x0001
  0008ed40: 0c0239b6 jal 0x0008e6d8
+
 
 +
 
 +
  0008ed40: 0c0239b6 jal 0x0008e6d8 [[0008e6d8 - 0008e7b4]] - event initialisation?
 
  0008ed44: 00000000 nop
 
  0008ed44: 00000000 nop
 
  0008ed48: 10400070 beq r2,r0,0x0008ef0c
 
  0008ed48: 10400070 beq r2,r0,0x0008ef0c
 
  0008ed4c: 02001021 addu r2,r16,r0
 
  0008ed4c: 02001021 addu r2,r16,r0
 
  0008ed50: 08023bc2 j 0x0008ef08
 
  0008ed50: 08023bc2 j 0x0008ef08
  0008ed54: 26100001 addiu r16,r16,0x0001
+
  0008ed54: 26100001 addiu r16,r16,0x0001 increment init. func
 +
 
 +
Prepare unit data loading:
 
  0008ed58: 0c0239ee jal 0x0008e7b8
 
  0008ed58: 0c0239ee jal 0x0008e7b8
 
  0008ed5c: 00000000 nop
 
  0008ed5c: 00000000 nop
Line 66: Line 90:
 
  0008ed6c: 8c426114 lw r2,0x6114(r2)
 
  0008ed6c: 8c426114 lw r2,0x6114(r2)
 
  0008ed70: 00000000 nop
 
  0008ed70: 00000000 nop
  0008ed74: 10400005 beq r2,r0,0x0008ed8c
+
  0008ed74: 10400005 beq r2,r0,0x0008ed8c
 
  0008ed78: 00000000 nop
 
  0008ed78: 00000000 nop
  0008ed7c: 0c022210 jal 0x00088840
+
  0008ed7c: 0c022210 jal 0x00088840 reset load func., file func., USN, and file RAM pointer to 0
 
  0008ed80: 02202021 addu r4,r17,r0
 
  0008ed80: 02202021 addu r4,r17,r0
 
  0008ed84: 08023bc2 j 0x0008ef08
 
  0008ed84: 08023bc2 j 0x0008ef08
 
  0008ed88: 34100007 ori r16,r0,0x0007
 
  0008ed88: 34100007 ori r16,r0,0x0007
 +
 
  0008ed8c: 0c022006 jal 0x00088018
 
  0008ed8c: 0c022006 jal 0x00088018
 
  0008ed90: 26100001 addiu r16,r16,0x0001
 
  0008ed90: 26100001 addiu r16,r16,0x0001
 
  0008ed94: 08023bc3 j 0x0008ef0c
 
  0008ed94: 08023bc3 j 0x0008ef0c
 
  0008ed98: 02001021 addu r2,r16,r0
 
  0008ed98: 02001021 addu r2,r16,r0
  0008ed9c: 0c02204c jal 0x00088130
+
 
 +
Load unit SHP, SEQ, and some spritesheet data to RAM:
 +
  0008ed9c: 0c02204c jal 0x00088130 [[Load unit SHP & SEQ data to RAM]]
 
  0008eda0: 00000000 nop
 
  0008eda0: 00000000 nop
 
  0008eda4: 34030008 ori r3,r0,0x0008
 
  0008eda4: 34030008 ori r3,r0,0x0008
  0008eda8: 14430058 bne r2,r3,0x0008ef0c
+
  0008eda8: 14430058 bne r2,r3,0x0008ef0c branch if file func. index != 8 (not yet loaded all files into ram)
 
  0008edac: 02001021 addu r2,r16,r0
 
  0008edac: 02001021 addu r2,r16,r0
  0008edb0: 34020001 ori r2,r0,0x0001
+
  0008edb0: 34020001 ori r2,r0,0x0001
 
  0008edb4: 3c018009 lui r1,0x8009
 
  0008edb4: 3c018009 lui r1,0x8009
  0008edb8: ac226114 sw r2,0x6114(r1)
+
  0008edb8: ac226114 sw r2,0x6114(r1) store value as 1?
  0008edbc: 0c022210 jal 0x00088840
+
  0008edbc: 0c022210 jal 0x00088840 reset load func., file func., USN, and file RAM pointer to 0
  0008edc0: 02202021 addu r4,r17,r0
+
  0008edc0: 02202021 addu r4,r17,r0 parse r4 (not used)
 
  0008edc4: 08023bc2 j 0x0008ef08
 
  0008edc4: 08023bc2 j 0x0008ef08
  0008edc8: 26100001 addiu r16,r16,0x0001
+
  0008edc8: 26100001 addiu r16,r16,0x0001 increment r16?
  0008edcc: 0c04ed64 jal 0x0013b590
+
 
 +
 
 +
  0008edcc: 0c04ed64 jal 0x0013b590 [[Get Script Variable]] 0x1fe (next battle is debug?)
 
  0008edd0: 340401fe ori r4,r0,0x01fe
 
  0008edd0: 340401fe ori r4,r0,0x01fe
  0008edd4: 1440004b bne r2,r0,0x0008ef04
+
  0008edd4: 1440004b bne r2,r0,0x0008ef04 branch if returns non-zero
 
  0008edd8: 34110002 ori r17,r0,0x0002
 
  0008edd8: 34110002 ori r17,r0,0x0002
  0008eddc: 0c022241 jal 0x00088904
+
  0008eddc: 0c022241 jal 0x00088904 [[Load lucavi SHP & SEQ data to RAM]]
 
  0008ede0: 00000000 nop
 
  0008ede0: 00000000 nop
  0008ede4: 1051fffd beq r2,r17,0x0008eddc
+
  0008ede4: 1051fffd beq r2,r17,0x0008eddc Loop until return != 2
 
  0008ede8: 00000000 nop
 
  0008ede8: 00000000 nop
  0008edec: 14400047 bne r2,r0,0x0008ef0c
+
  0008edec: 14400047 bne r2,r0,0x0008ef0c branch if return != 0
 
  0008edf0: 02001021 addu r2,r16,r0
 
  0008edf0: 02001021 addu r2,r16,r0
 
  0008edf4: 08023bc2 j 0x0008ef08
 
  0008edf4: 08023bc2 j 0x0008ef08
 
  0008edf8: 26100001 addiu r16,r16,0x0001
 
  0008edf8: 26100001 addiu r16,r16,0x0001
 +
 +
 
  0008edfc: 3c02800e lui r2,0x800e
 
  0008edfc: 3c02800e lui r2,0x800e
 
  0008ee00: 8c426aa4 lw r2,0x6aa4(r2)
 
  0008ee00: 8c426aa4 lw r2,0x6aa4(r2)
Line 111: Line 142:
 
  0008ee20: 08023bc3 j 0x0008ef0c
 
  0008ee20: 08023bc3 j 0x0008ef0c
 
  0008ee24: 02001021 addu r2,r16,r0
 
  0008ee24: 02001021 addu r2,r16,r0
 +
 +
 
  0008ee28: 34110002 ori r17,r0,0x0002
 
  0008ee28: 34110002 ori r17,r0,0x0002
  0008ee2c: 0c022241 jal 0x00088904
+
  0008ee2c: 0c022241 jal 0x00088904 [[Load lucavi SHP & SEQ data to RAM]]
 
  0008ee30: 00000000 nop
 
  0008ee30: 00000000 nop
  0008ee34: 1051fffd beq r2,r17,0x0008ee2c
+
  0008ee34: 1051fffd beq r2,r17,0x0008ee2c loop until != 2
 
  0008ee38: 00000000 nop
 
  0008ee38: 00000000 nop
  0008ee3c: 14400033 bne r2,r0,0x0008ef0c
+
  0008ee3c: 14400033 bne r2,r0,0x0008ef0c branch if != 0
 
  0008ee40: 02001021 addu r2,r16,r0
 
  0008ee40: 02001021 addu r2,r16,r0
 
  0008ee44: 08023bc2 j 0x0008ef08
 
  0008ee44: 08023bc2 j 0x0008ef08
 
  0008ee48: 26100001 addiu r16,r16,0x0001
 
  0008ee48: 26100001 addiu r16,r16,0x0001
 +
 +
 
  0008ee4c: 14c0002f bne r6,r0,0x0008ef0c
 
  0008ee4c: 14c0002f bne r6,r0,0x0008ef0c
 
  0008ee50: 02001021 addu r2,r16,r0
 
  0008ee50: 02001021 addu r2,r16,r0
Line 126: Line 161:
 
  0008ee5c: 08023bc3 j 0x0008ef0c
 
  0008ee5c: 08023bc3 j 0x0008ef0c
 
  0008ee60: 02001021 addu r2,r16,r0
 
  0008ee60: 02001021 addu r2,r16,r0
 +
 +
 
  0008ee64: 3c038004 lui r3,0x8004
 
  0008ee64: 3c038004 lui r3,0x8004
 
  0008ee68: 8c635978 lw r3,0x5978(r3)
 
  0008ee68: 8c635978 lw r3,0x5978(r3)
Line 131: Line 168:
 
  0008ee70: 10620005 beq r3,r2,0x0008ee88
 
  0008ee70: 10620005 beq r3,r2,0x0008ee88
 
  0008ee74: 00000000 nop
 
  0008ee74: 00000000 nop
  0008ee78: 0c04ed64 jal 0x0013b590
+
  0008ee78: 0c04ed64 jal 0x0013b590 get script variable 1fe, debug battle check?
 
  0008ee7c: 340401fe ori r4,r0,0x01fe
 
  0008ee7c: 340401fe ori r4,r0,0x01fe
 
  0008ee80: 10400020 beq r2,r0,0x0008ef04
 
  0008ee80: 10400020 beq r2,r0,0x0008ef04
Line 152: Line 189:
 
  0008eec4: 08023bc3 j 0x0008ef0c
 
  0008eec4: 08023bc3 j 0x0008ef0c
 
  0008eec8: 02001021 addu r2,r16,r0
 
  0008eec8: 02001021 addu r2,r16,r0
 +
 +
 
  0008eecc: 0c03d67c jal 0x000f59f0
 
  0008eecc: 0c03d67c jal 0x000f59f0
 
  0008eed0: 00000000 nop
 
  0008eed0: 00000000 nop
Line 162: Line 201:
 
  0008eeec: 0c024be6 jal 0x00092f98
 
  0008eeec: 0c024be6 jal 0x00092f98
 
  0008eef0: 00000000 nop
 
  0008eef0: 00000000 nop
  0008eef4: 0c0609fc jal 0x001827f0
+
  0008eef4: 0c0609fc jal 0x001827f0 [[In between turn control routine]] initialising
 
  0008eef8: 34040001 ori r4,r0,0x0001
 
  0008eef8: 34040001 ori r4,r0,0x0001
  0008eefc: 0c066748 jal 0x00199d20
+
  0008eefc: 0c066748 jal 0x00199d20 [[Store hardcoded AI stuff (blood suck, frog, berserk abilities)]]
 
  0008ef00: 00000000 nop
 
  0008ef00: 00000000 nop
 
  0008ef04: 26100001 addiu r16,r16,0x0001
 
  0008ef04: 26100001 addiu r16,r16,0x0001

Latest revision as of 04:27, 4 April 2023

0008ec70: 27bdffd8 addiu r29,r29,0xffd8
0008ec74: afb1001c sw r17,0x001c(r29)
0008ec78: 00808821 addu r17,r4,r0			script var 0x33 (current map.)
0008ec7c: afb00018 sw r16,0x0018(r29)
0008ec80: 00a08021 addu r16,r5,r0
0008ec84: 2e02000d sltiu r2,r16,0x000d			d...? (init. func?)
0008ec88: 1040009f beq r2,r0,0x0008ef08
0008ec8c: afbf0020 sw r31,0x0020(r29)
0008ec90: 00101080 sll r2,r16,0x02
0008ec94: 3c018007 lui r1,0x8007
0008ec98: 00220821 addu r1,r1,r2
0008ec9c: 8c228298 lw r2,-0x7d68(r1)
0008eca0: 00000000 nop
0008eca4: 00400008 jr r2
0008eca8: 00000000 nop
		Return table:
		0: 8008ecac (initialise map & map palette data?)
		1: 8008ef04 (err)
		2: 8008ed08 (load new map)
		3: 8008ed24 
		4: 8008ed40 
		5: 8008ed58 (prepare unit data loading)
		6: 8008ed9c (load non-boss SHP/SEQ data)
		7: 8008edcc (load Lucavia SHP/SEQ data)
		8: 8008edfc 
		9: 8008ee28 
		a: 8008ee4c 
		b: 8008ee64 
		c: 8008eecc 

initialise map + map palette:

0008ecac: 0c01103d jal 0x000440f4
0008ecb0: 00000000 nop
0008ecb4: 0c02391a jal 0x0008e468		Initialise map before loading?
0008ecb8: 00000000 nop
0008ecbc: 0c024c12 jal 0x00093048		Seems to initialise more data
0008ecc0: 00000000 nop
0008ecc4: 3c038004 lui r3,0x8004
0008ecc8: 8c635978 lw r3,0x5978(r3)
0008eccc: 34020001 ori r2,r0,0x0001
0008ecd0: 14620003 bne r3,r2,0x0008ece0
0008ecd4: 26100001 addiu r16,r16,0x0001	counter? + 1
0008ecd8: 0c023a03 jal 0x0008e80c		
0008ecdc: 00000000 nop
0008ece0: 3c048009 lui r4,0x8009
0008ece4: 24844b84 addiu r4,r4,0x4b84		pointer to map palette?
0008ece8: 34050002 ori r5,r0,0x0002		Section ID = 2
0008ecec: 00003021 addu r6,r0,r0
0008ecf0: 0c0249b6 jal 0x000926d8		Get Palette Data
0008ecf4: 00003821 addu r7,r0,r0		only load 1 palette?
0008ecf8: 3c018005 lui r1,0x8005
0008ecfc: ac209c18 sw r0,-0x63e8(r1)
0008ed00: 08023bc3 j 0x0008ef0c
0008ed04: 02001021 addu r2,r16,r0		Return counter

Load map + Map GNS data

0008ed08: 02202021 addu r4,r17,r0		Current Map
0008ed0c: 0c03cdc6 jal 0x000f3718		000f3718 - 000f4ac8
0008ed10: 34050075 ori r5,r0,0x0075		map load func. 0x75 (load new map + GNS)
0008ed14: 1040007d beq r2,r0,0x0008ef0c
0008ed18: 02001021 addu r2,r16,r0		return init. func + 1
0008ed1c: 08023bc2 j 0x0008ef08
0008ed20: 26100001 addiu r16,r16,0x0001


0008ed24: 02202021 addu r4,r17,r0
0008ed28: 0c03cdc6 jal 0x000f3718		000f3718 - 000f4ac8
0008ed2c: 34050076 ori r5,r0,0x0076		Map load func. 0x76 (immediately load interrupted? map load)
0008ed30: 14400076 bne r2,r0,0x0008ef0c
0008ed34: 02001021 addu r2,r16,r0
0008ed38: 08023bc2 j 0x0008ef08
0008ed3c: 26100001 addiu r16,r16,0x0001


0008ed40: 0c0239b6 jal 0x0008e6d8		0008e6d8 - 0008e7b4 - event initialisation?
0008ed44: 00000000 nop
0008ed48: 10400070 beq r2,r0,0x0008ef0c
0008ed4c: 02001021 addu r2,r16,r0
0008ed50: 08023bc2 j 0x0008ef08
0008ed54: 26100001 addiu r16,r16,0x0001	increment init. func

Prepare unit data loading:

0008ed58: 0c0239ee jal 0x0008e7b8
0008ed5c: 00000000 nop
0008ed60: 1440006a bne r2,r0,0x0008ef0c
0008ed64: 02001021 addu r2,r16,r0
0008ed68: 3c028009 lui r2,0x8009
0008ed6c: 8c426114 lw r2,0x6114(r2)
0008ed70: 00000000 nop
0008ed74: 10400005 beq r2,r0,0x0008ed8c		
0008ed78: 00000000 nop
0008ed7c: 0c022210 jal 0x00088840			reset load func., file func., USN, and file RAM pointer to 0
0008ed80: 02202021 addu r4,r17,r0
0008ed84: 08023bc2 j 0x0008ef08
0008ed88: 34100007 ori r16,r0,0x0007
0008ed8c: 0c022006 jal 0x00088018
0008ed90: 26100001 addiu r16,r16,0x0001
0008ed94: 08023bc3 j 0x0008ef0c
0008ed98: 02001021 addu r2,r16,r0

Load unit SHP, SEQ, and some spritesheet data to RAM:

0008ed9c: 0c02204c jal 0x00088130			Load unit SHP & SEQ data to RAM
0008eda0: 00000000 nop
0008eda4: 34030008 ori r3,r0,0x0008
0008eda8: 14430058 bne r2,r3,0x0008ef0c		branch if file func. index != 8 (not yet loaded all files into ram)
0008edac: 02001021 addu r2,r16,r0
0008edb0: 34020001 ori r2,r0,0x0001			
0008edb4: 3c018009 lui r1,0x8009
0008edb8: ac226114 sw r2,0x6114(r1)			store value as 1?
0008edbc: 0c022210 jal 0x00088840			reset load func., file func., USN, and file RAM pointer to 0
0008edc0: 02202021 addu r4,r17,r0			parse r4 (not used)
0008edc4: 08023bc2 j 0x0008ef08
0008edc8: 26100001 addiu r16,r16,0x0001		increment r16?


0008edcc: 0c04ed64 jal 0x0013b590			Get Script Variable 0x1fe (next battle is debug?)
0008edd0: 340401fe ori r4,r0,0x01fe
0008edd4: 1440004b bne r2,r0,0x0008ef04		branch if returns non-zero
0008edd8: 34110002 ori r17,r0,0x0002
0008eddc: 0c022241 jal 0x00088904			Load lucavi SHP & SEQ data to RAM
0008ede0: 00000000 nop
0008ede4: 1051fffd beq r2,r17,0x0008eddc		Loop until return != 2
0008ede8: 00000000 nop
0008edec: 14400047 bne r2,r0,0x0008ef0c		branch if return != 0
0008edf0: 02001021 addu r2,r16,r0
0008edf4: 08023bc2 j 0x0008ef08
0008edf8: 26100001 addiu r16,r16,0x0001


0008edfc: 3c02800e lui r2,0x800e
0008ee00: 8c426aa4 lw r2,0x6aa4(r2)
0008ee04: 00000000 nop
0008ee08: 10400040 beq r2,r0,0x0008ef0c
0008ee0c: 02001021 addu r2,r16,r0
0008ee10: 0c02221a jal 0x00088868
0008ee14: 26100001 addiu r16,r16,0x0001
0008ee18: 3c018009 lui r1,0x8009
0008ee1c: ac206108 sw r0,0x6108(r1)
0008ee20: 08023bc3 j 0x0008ef0c
0008ee24: 02001021 addu r2,r16,r0


0008ee28: 34110002 ori r17,r0,0x0002
0008ee2c: 0c022241 jal 0x00088904			Load lucavi SHP & SEQ data to RAM
0008ee30: 00000000 nop
0008ee34: 1051fffd beq r2,r17,0x0008ee2c		loop until != 2
0008ee38: 00000000 nop
0008ee3c: 14400033 bne r2,r0,0x0008ef0c		branch if != 0
0008ee40: 02001021 addu r2,r16,r0
0008ee44: 08023bc2 j 0x0008ef08
0008ee48: 26100001 addiu r16,r16,0x0001


0008ee4c: 14c0002f bne r6,r0,0x0008ef0c
0008ee50: 02001021 addu r2,r16,r0
0008ee54: 0c070ec0 jal 0x001c3b00
0008ee58: 26100001 addiu r16,r16,0x0001
0008ee5c: 08023bc3 j 0x0008ef0c
0008ee60: 02001021 addu r2,r16,r0


0008ee64: 3c038004 lui r3,0x8004
0008ee68: 8c635978 lw r3,0x5978(r3)
0008ee6c: 34020001 ori r2,r0,0x0001
0008ee70: 10620005 beq r3,r2,0x0008ee88
0008ee74: 00000000 nop
0008ee78: 0c04ed64 jal 0x0013b590		get script variable 1fe, debug battle check?
0008ee7c: 340401fe ori r4,r0,0x01fe
0008ee80: 10400020 beq r2,r0,0x0008ef04
0008ee84: 00000000 nop
0008ee88: 0c010fd4 jal 0x00043f50
0008ee8c: 00000000 nop
0008ee90: 0c01103d jal 0x000440f4
0008ee94: 00000000 nop
0008ee98: 0c0088c3 jal 0x0002230c
0008ee9c: 00000000 nop
0008eea0: 04410002 bgez r2,0x0008eeac
0008eea4: 00000000 nop
0008eea8: 24421fff addiu r2,r2,0x1fff
0008eeac: 00021343 sra r2,r2,0x0d
0008eeb0: 3c018009 lui r1,0x8009
0008eeb4: 00220821 addu r1,r1,r2
0008eeb8: 90244a3c lbu r4,0x4a3c(r1)
0008eebc: 0c010fe2 jal 0x00043f88
0008eec0: 26100001 addiu r16,r16,0x0001
0008eec4: 08023bc3 j 0x0008ef0c
0008eec8: 02001021 addu r2,r16,r0


0008eecc: 0c03d67c jal 0x000f59f0
0008eed0: 00000000 nop
0008eed4: 0c024b70 jal 0x00092dc0
0008eed8: 00000000 nop
0008eedc: 0c024ba6 jal 0x00092e98
0008eee0: 00000000 nop
0008eee4: 0c024bc6 jal 0x00092f18
0008eee8: 00000000 nop
0008eeec: 0c024be6 jal 0x00092f98
0008eef0: 00000000 nop
0008eef4: 0c0609fc jal 0x001827f0		In between turn control routine initialising
0008eef8: 34040001 ori r4,r0,0x0001
0008eefc: 0c066748 jal 0x00199d20		Store hardcoded AI stuff (blood suck, frog, berserk abilities)
0008ef00: 00000000 nop
0008ef04: 26100001 addiu r16,r16,0x0001
0008ef08: 02001021 addu r2,r16,r0
0008ef0c: 8fbf0020 lw r31,0x0020(r29)
0008ef10: 8fb1001c lw r17,0x001c(r29)
0008ef14: 8fb00018 lw r16,0x0018(r29)
0008ef18: 27bd0028 addiu r29,r29,0x0028
0008ef1c: 03e00008 jr r31
0008ef20: 00000000 nop