Difference between revisions of "Permanent brave/faith changes, leaving party warning"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Reformatted code based on pSX r3000 debugger)
Line 1: Line 1:
  [0x001c3fa4] addiu r29,r29,-0x0038
+
  001c3fa4: 27bdffc8 addiu r29,r29,0xffc8
  [0x001c3fa8] sw r17,0x001c(r29)
+
  001c3fa8: afb1001c sw r17,0x001c(r29)
  [0x001c3fac] addu r17,r0,r0
+
  001c3fac: 00008821 addu r17,r0,r0
  [0x001c3fb0] sw r16,0x0018(r29)
+
  001c3fb0: afb00018 sw r16,0x0018(r29)
  [0x001c3fb4] addu r16,r0,r0
+
  001c3fb4: 00008021 addu r16,r0,r0
  [0x001c3fb8] sw r20,0x0028(r29)
+
  001c3fb8: afb40028 sw r20,0x0028(r29)
  [0x001c3fbc] lui r20,0x51eb
+
  001c3fbc: 3c1451eb lui r20,0x51eb
  [0x001c3fc0] ori r20,r20,0x851f
+
  001c3fc0: 3694851f ori r20,r20,0x851f
  [0x001c3fc4] sw r19,0x0024(r29)
+
  001c3fc4: afb30024 sw r19,0x0024(r29)
  [0x001c3fc8] lui r19,0x6666
+
  001c3fc8: 3c136666 lui r19,0x6666
  [0x001c3fcc] ori r19,r19,0x6667
+
  001c3fcc: 36736667 ori r19,r19,0x6667
  [0x001c3fd0] sw r21,0x002c(r29)
+
  001c3fd0: afb5002c sw r21,0x002c(r29)
  [0x001c3fd4] lui r21,0x801d
+
  001c3fd4: 3c15801d lui r21,0x801d
  [0x001c3fd8] addiu r21,r21,0x0a00
+
  001c3fd8: 26b50a00 addiu r21,r21,0x0a00
  [0x001c3fdc] sw r18,0x0020(r29)
+
  001c3fdc: afb20020 sw r18,0x0020(r29)
  [0x001c3fe0] lui r18,0x801d
+
  001c3fe0: 3c12801d lui r18,0x801d
  [0x001c3fe4] addiu r18,r18,0x71f8
+
  001c3fe4: 265271f8 addiu r18,r18,0x71f8
  [0x001c3fe8] sw r31,0x0030(r29)
+
  001c3fe8: afbf0030 sw r31,0x0030(r29)
  [0x001c3fec] lui r1,0x801d
+
  001c3fec: 3c01801d lui r1,0x801d
  [0x001c3ff0] sw r0,0x0b34(r1)
+
  001c3ff0: ac200b34 sw r0,0x0b34(r1)
  [0x001c3ff4] jal 0x00180afc                 [[Get Unit's Data Pointer]]
+
  001c3ff4: 0c0602bf jal 0x00180afc [[Get Unit's Data Pointer]]
  [0x001c3ff8] addu r4,r16,r0
+
  001c3ff8: 02002021 addu r4,r16,r0
  [0x001c3ffc] lbu r4,0x0161(r2)
+
  001c3ffc: 90440161 lbu r4,0x0161(r2)
  [0x001c4000] jal 0x00180c90                 [[Unit Existence/crystaltreasure check]]
+
  001c4000: 0c060324 jal 0x00180c90 [[Unit Existence/crystaltreasure check]]
  [0x001c4004] addiu r5,r29,0x0010
+
  001c4004: 27a50010 addiu r5,r29,0x0010
  [0x001c4008] lw r3,0x0010(r29)
+
  001c4008: 8fa30010 lw r3,0x0010(r29)
  [0x001c400c] nop
+
  001c400c: 00000000 nop
  [0x001c4010] bltz r3,0x001c4378
+
  001c4010: 046000d9 bltz r3,0x001c4378
  [0x001c4014] addu r7,r2,r0
+
  001c4014: 00403821 addu r7,r2,r0
  [0x001c4018] bne r16,r3,0x001c4378
+
  001c4018: 160300d7 bne r16,r3,0x001c4378
  [0x001c401c] ori r2,r0,0x00ff
+
  001c401c: 340200ff ori r2,r0,0x00ff
  [0x001c4020] lbu r3,0x0002(r7)
+
  001c4020: 90e30002 lbu r3,0x0002(r7)
  [0x001c4024] nop
+
  001c4024: 00000000 nop
  [0x001c4028] beq r3,r2,0x001c4378
+
  001c4028: 106200d3 beq r3,r2,0x001c4378
  [0x001c402c] nop
+
  001c402c: 00000000 nop
  [0x001c4030] lbu r2,0x0161(r7)
+
  001c4030: 90e20161 lbu r2,0x0161(r7)
  [0x001c4034] nop
+
  001c4034: 00000000 nop
  [0x001c4038] beq r2,r0,0x001c4378
+
  001c4038: 104000cf beq r2,r0,0x001c4378
  [0x001c403c] nop
+
  001c403c: 00000000 nop
  [0x001c4040] lbu r5,0x0023(r7)             Load original brave
+
  001c4040: 90e50023 lbu r5,0x0023(r7) Load original brave
  [0x001c4044] lbu r4,0x0024(r7)             Load current brave
+
  001c4044: 90e40024 lbu r4,0x0024(r7) Load current brave
  [0x001c4048] nop
+
  001c4048: 00000000 nop
  [0x001c404c] subu r3,r4,r5                 Current brave - original brave
+
  001c404c: 00851823 subu r3,r4,r5 Current brave - original brave
  [0x001c4050] sll r2,r3,0x05
+
  001c4050: 00031140 sll r2,r3,0x05
  [0x001c4054] subu r2,r2,r3
+
  001c4054: 00431023 subu r2,r2,r3
  [0x001c4058] sll r2,r2,0x02
+
  001c4058: 00021080 sll r2,r2,0x02
  [0x001c405c] addu r2,r2,r3
+
  001c405c: 00431021 addu r2,r2,r3
  [0x001c4060] sll r2,r2,0x01
+
  001c4060: 00021040 sll r2,r2,0x01
  [0x001c4064] mult r2,r20
+
  001c4064: 00540018 mult r2,r20
  [0x001c4068] sra r2,r2,0x1f
+
  001c4068: 000217c3 sra r2,r2,0x1f
  [0x001c406c] mfhi r3
+
  001c406c: 00001810 mfhi r3
  [0x001c4070] sra r3,r3,0x05
+
  001c4070: 00031943 sra r3,r3,0x05
  [0x001c4074] subu r4,r3,r2
+
  001c4074: 00622023 subu r4,r3,r2
  [0x001c4078] mult r4,r19
+
  001c4078: 00930018 mult r4,r19
  [0x001c407c] sra r3,r4,0x1f
+
  001c407c: 00041fc3 sra r3,r4,0x1f
  [0x001c4080] lbu r4,0x0026(r7)             Load current faith
+
  001c4080: 90e40026 lbu r4,0x0026(r7) Load current faith
  [0x001c4084] mfhi r2
+
  001c4084: 00001010 mfhi r2
  [0x001c4088] sra r2,r2,0x02
+
  001c4088: 00021083 sra r2,r2,0x02
  [0x001c408c] subu r2,r2,r3
+
  001c408c: 00431023 subu r2,r2,r3
  [0x001c4090] addu r6,r5,r2
+
  001c4090: 00a23021 addu r6,r5,r2
  [0x001c4094] lbu r5,0x0025(r7)             Load original faith
+
  001c4094: 90e50025 lbu r5,0x0025(r7) Load original faith
  [0x001c4098] nop
+
  001c4098: 00000000 nop
  [0x001c409c] subu r3,r4,r5                 Current faith - original faith
+
  001c409c: 00851823 subu r3,r4,r5 Current faith - original faith
  [0x001c40a0] sll r2,r3,0x05
+
  001c40a0: 00031140 sll r2,r3,0x05
  [0x001c40a4] subu r2,r2,r3
+
  001c40a4: 00431023 subu r2,r2,r3
  [0x001c40a8] sll r2,r2,0x02
+
  001c40a8: 00021080 sll r2,r2,0x02
  [0x001c40ac] addu r2,r2,r3
+
  001c40ac: 00431021 addu r2,r2,r3
  [0x001c40b0] sll r2,r2,0x01
+
  001c40b0: 00021040 sll r2,r2,0x01
  [0x001c40b4] mult r2,r20
+
  001c40b4: 00540018 mult r2,r20
  [0x001c40b8] sra r2,r2,0x1f
+
  001c40b8: 000217c3 sra r2,r2,0x1f
  [0x001c40bc] mfhi r3
+
  001c40bc: 00001810 mfhi r3
  [0x001c40c0] sra r3,r3,0x05
+
  001c40c0: 00031943 sra r3,r3,0x05
  [0x001c40c4] subu r4,r3,r2
+
  001c40c4: 00622023 subu r4,r3,r2
  [0x001c40c8] mult r4,r19
+
  001c40c8: 00930018 mult r4,r19
  [0x001c40cc] sb r6,0x0023(r7)
+
  001c40cc: a0e60023 sb r6,0x0023(r7)
  [0x001c40d0] sb r6,0x0024(r7)               Store new brave
+
  001c40d0: a0e60024 sb r6,0x0024(r7) Store new brave
  [0x001c40d4] sra r2,r4,0x1f
+
  001c40d4: 000417c3 sra r2,r4,0x1f
  [0x001c40d8] mfhi r3
+
  001c40d8: 00001810 mfhi r3
  [0x001c40dc] sra r3,r3,0x02
+
  001c40dc: 00031883 sra r3,r3,0x02
  [0x001c40e0] subu r3,r3,r2
+
  001c40e0: 00621823 subu r3,r3,r2
  [0x001c40e4] lbu r2,0x0002(r7)
+
  001c40e4: 90e20002 lbu r2,0x0002(r7)
  [0x001c40e8] addu r9,r5,r3
+
  001c40e8: 00a34821 addu r9,r5,r3
  [0x001c40ec] sb r9,0x0025(r7)               Store new faith
+
  001c40ec: a0e90025 sb r9,0x0025(r7) Store new faith
  [0x001c40f0] sltiu r2,r2,0x0010
+
  001c40f0: 2c420010 sltiu r2,r2,0x0010
  [0x001c40f4] beq r2,r0,0x001c4378           Branch if faith isn't too high/brave isn't too low?      
+
  001c40f4: 104000a0 beq r2,r0,0x001c4378 Branch if faith isn't too high/brave isn't too low?
  [0x001c40f8] sb r9,0x0026(r7)
+
  001c40f8: a0e90026 sb r9,0x0026(r7)
  [0x001c40fc] lbu r3,0x0000(r7)
+
  001c40fc: 90e30000 lbu r3,0x0000(r7)
  [0x001c4100] nop
+
  001c4100: 00000000 nop
  [0x001c4104] beq r3,r0,0x001c4114
+
  001c4104: 10600003 beq r3,r0,0x001c4114
  [0x001c4108] sltiu r2,r3,0x0004
+
  001c4108: 2c620004 sltiu r2,r3,0x0004
  [0x001c410c] bne r2,r0,0x001c4378
+
  001c410c: 1440009a bne r2,r0,0x001c4378
  [0x001c4110] nop
+
  001c4110: 00000000 nop
  [0x001c4114] lbu r5,0x0161(r7)
+
  001c4114: 90e50161 lbu r5,0x0161(r7)
  [0x001c4118] nop
+
  001c4118: 00000000 nop
  [0x001c411c] beq r5,r0,0x001c412c
+
  001c411c: 10a00003 beq r5,r0,0x001c412c
  [0x001c4120] sltiu r2,r5,0x0004
+
  001c4120: 2ca20004 sltiu r2,r5,0x0004
  [0x001c4124] bne r2,r0,0x001c4378
+
  001c4124: 14400094 bne r2,r0,0x001c4378
  [0x001c4128] nop
+
  001c4128: 00000000 nop
  [0x001c412c] addiu r2,r6,-0x0006
+
  001c412c: 24c2fffa addiu r2,r6,0xfffa
  [0x001c4130] sltiu r2,r2,0x000a
+
  001c4130: 2c42000a sltiu r2,r2,0x000a
  [0x001c4134] beq r2,r0,0x001c424c
+
  001c4134: 10400045 beq r2,r0,0x001c424c
  [0x001c4138] sltiu r2,r3,0x0080
+
  001c4138: 2c620080 sltiu r2,r3,0x0080
  [0x001c413c] beq r2,r0,0x001c41f4
+
  001c413c: 1040002d beq r2,r0,0x001c41f4
  [0x001c4140] addu r6,r0,r0
+
  001c4140: 00003021 addu r6,r0,r0
  [0x001c4144] addu r8,r3,r0
+
  001c4144: 00604021 addu r8,r3,r0
  [0x001c4148] addu r5,r21,r0
+
  001c4148: 02a02821 addu r5,r21,r0
  [0x001c414c] addu r3,r0,r0
+
  001c414c: 00001821 addu r3,r0,r0
  [0x001c4150] addu r4,r5,r0
+
  001c4150: 00a02021 addu r4,r5,r0
  [0x001c4154] lbu r2,0x0000(r4)
+
  001c4154: 90820000 lbu r2,0x0000(r4)
  [0x001c4158] nop
+
  001c4158: 00000000 nop
  [0x001c415c] beq r8,r2,0x001c4178
+
  001c415c: 11020006 beq r8,r2,0x001c4178
  [0x001c4160] ori r2,r0,0x0003
+
  001c4160: 34020003 ori r2,r0,0x0003
  [0x001c4164] addiu r3,r3,0x0001
+
  001c4164: 24630001 addiu r3,r3,0x0001
  [0x001c4168] slti r2,r3,0x0003
+
  001c4168: 28620003 slti r2,r3,0x0003
  [0x001c416c] bne r2,r0,0x001c4154
+
  001c416c: 1440fff9 bne r2,r0,0x001c4154
  [0x001c4170] addiu r4,r4,0x0001
+
  001c4170: 24840001 addiu r4,r4,0x0001
  [0x001c4174] ori r2,r0,0x0003
+
  001c4174: 34020003 ori r2,r0,0x0003
  [0x001c4178] bne r3,r2,0x001c4194
+
  001c4178: 14620006 bne r3,r2,0x001c4194
  [0x001c417c] ori r2,r0,0x0049
+
  001c417c: 34020049 ori r2,r0,0x0049
  [0x001c4180] addiu r6,r6,0x0001
+
  001c4180: 24c60001 addiu r6,r6,0x0001
  [0x001c4184] slti r2,r6,0x0049
+
  001c4184: 28c20049 slti r2,r6,0x0049
  [0x001c4188] bne r2,r0,0x001c414c
+
  001c4188: 1440fff0 bne r2,r0,0x001c414c
  [0x001c418c] addiu r5,r5,0x0003
+
  001c418c: 24a50003 addiu r5,r5,0x0003
  [0x001c4190] ori r2,r0,0x0049
+
  001c4190: 34020049 ori r2,r0,0x0049
  [0x001c4194] bne r6,r2,0x001c41a0
+
  001c4194: 14c20002 bne r6,r2,0x001c41a0
  [0x001c4198] ori r2,r0,0x0047
+
  001c4198: 34020047 ori r2,r0,0x0047
  [0x001c419c] addu r6,r0,r0
+
  001c419c: 00003021 addu r6,r0,r0
  [0x001c41a0] bne r6,r2,0x001c41ac
+
  001c41a0: 14c20002 bne r6,r2,0x001c41ac
  [0x001c41a4] addiu r17,r17,0x0001
+
  001c41a4: 26310001 addiu r17,r17,0x0001
  [0x001c41a8] ori r6,r0,0x0048
+
  001c41a8: 34060048 ori r6,r0,0x0048
  [0x001c41ac] lui r4,0x801d
+
  001c41ac: 3c04801d lui r4,0x801d
  [0x001c41b0] lw r4,0x0b34(r4)
+
  001c41b0: 8c840b34 lw r4,0x0b34(r4)
  [0x001c41b4] nop
+
  001c41b4: 00000000 nop
  [0x001c41b8] sll r3,r4,0x02
+
  001c41b8: 00041880 sll r3,r4,0x02
  [0x001c41bc] addu r2,r3,r18
+
  001c41bc: 00721021 addu r2,r3,r18
  [0x001c41c0] sw r8,0x0000(r2)
+
  001c41c0: ac480000 sw r8,0x0000(r2)
  [0x001c41c4] addiu r2,r6,0x0818
+
  001c41c4: 24c20818 addiu r2,r6,0x0818
  [0x001c41c8] addiu r4,r4,0x0001
+
  001c41c8: 24840001 addiu r4,r4,0x0001
  [0x001c41cc] lui r1,0x801d
+
  001c41cc: 3c01801d lui r1,0x801d
  [0x001c41d0] addu r1,r1,r3
+
  001c41d0: 00230821 addu r1,r1,r3
  [0x001c41d4] sw r2,0x72c0(r1)
+
  001c41d4: ac2272c0 sw r2,0x72c0(r1)
  [0x001c41d8] lui r1,0x801d
+
  001c41d8: 3c01801d lui r1,0x801d
  [0x001c41dc] addu r1,r1,r3
+
  001c41dc: 00230821 addu r1,r1,r3
  [0x001c41e0] sw r16,0x7388(r1)
+
  001c41e0: ac307388 sw r16,0x7388(r1)
  [0x001c41e4] lui r1,0x801d
+
  001c41e4: 3c01801d lui r1,0x801d
  [0x001c41e8] sw r4,0x0b34(r1)
+
  001c41e8: ac240b34 sw r4,0x0b34(r1)
  [0x001c41ec] j 0x001c4250
+
  001c41ec: 08071094 j 0x001c4250
  [0x001c41f0] addiu r2,r9,-0x0055
+
  001c41f0: 2522ffab addiu r2,r9,0xffab
  [0x001c41f4] lui r3,0x801d
+
  001c41f4: 3c03801d lui r3,0x801d
  [0x001c41f8] lw r3,0x0b34(r3)
+
  001c41f8: 8c630b34 lw r3,0x0b34(r3)
  [0x001c41fc] nop
+
  001c41fc: 00000000 nop
  [0x001c4200] sll r4,r3,0x02
+
  001c4200: 00032080 sll r4,r3,0x02
  [0x001c4204] addu r2,r4,r18
+
  001c4204: 00921021 addu r2,r4,r18
  [0x001c4208] sw r5,0x0000(r2)
+
  001c4208: ac450000 sw r5,0x0000(r2)
  [0x001c420c] lbu r2,0x0000(r7)
+
  001c420c: 90e20000 lbu r2,0x0000(r7)
  [0x001c4210] addiu r3,r3,0x0001
+
  001c4210: 24630001 addiu r3,r3,0x0001
  [0x001c4214] lui r1,0x801d
+
  001c4214: 3c01801d lui r1,0x801d
  [0x001c4218] sw r3,0x0b34(r1)
+
  001c4218: ac230b34 sw r3,0x0b34(r1)
  [0x001c421c] andi r3,r16,0x0003
+
  001c421c: 32030003 andi r3,r16,0x0003
  [0x001c4220] lui r1,0x801d
+
  001c4220: 3c01801d lui r1,0x801d
  [0x001c4224] addu r1,r1,r4
+
  001c4224: 00240821 addu r1,r1,r4
  [0x001c4228] sw r16,0x7388(r1)
+
  001c4228: ac307388 sw r16,0x7388(r1)
  [0x001c422c] addiu r2,r2,-0x0080
+
  001c422c: 2442ff80 addiu r2,r2,0xff80
  [0x001c4230] sll r2,r2,0x02
+
  001c4230: 00021080 sll r2,r2,0x02
  [0x001c4234] addu r2,r2,r3
+
  001c4234: 00431021 addu r2,r2,r3
  [0x001c4238] addiu r2,r2,0x0800
+
  001c4238: 24420800 addiu r2,r2,0x0800
  [0x001c423c] lui r1,0x801d
+
  001c423c: 3c01801d lui r1,0x801d
  [0x001c4240] addu r1,r1,r4
+
  001c4240: 00240821 addu r1,r1,r4
  [0x001c4244] sw r2,0x72c0(r1)
+
  001c4244: ac2272c0 sw r2,0x72c0(r1)
  [0x001c4248] addiu r17,r17,0x0001
+
  001c4248: 26310001 addiu r17,r17,0x0001
  [0x001c424c] addiu r2,r9,-0x0055
+
  001c424c: 2522ffab addiu r2,r9,0xffab
  [0x001c4250] sltiu r2,r2,0x000a
+
  001c4250: 2c42000a sltiu r2,r2,0x000a
  [0x001c4254] beq r2,r0,0x001c4378
+
  001c4254: 10400048 beq r2,r0,0x001c4378
  [0x001c4258] nop
+
  001c4258: 00000000 nop
  [0x001c425c] lbu r3,0x0000(r7)
+
  001c425c: 90e30000 lbu r3,0x0000(r7)
  [0x001c4260] nop
+
  001c4260: 00000000 nop
  [0x001c4264] sltiu r2,r3,0x0080
+
  001c4264: 2c620080 sltiu r2,r3,0x0080
  [0x001c4268] beq r2,r0,0x001c4320
+
  001c4268: 1040002d beq r2,r0,0x001c4320
  [0x001c426c] addu r6,r0,r0
+
  001c426c: 00003021 addu r6,r0,r0
  [0x001c4270] addu r8,r3,r0
+
  001c4270: 00604021 addu r8,r3,r0
  [0x001c4274] addu r5,r21,r0
+
  001c4274: 02a02821 addu r5,r21,r0
  [0x001c4278] addu r3,r0,r0
+
  001c4278: 00001821 addu r3,r0,r0
  [0x001c427c] addu r4,r5,r0
+
  001c427c: 00a02021 addu r4,r5,r0
  [0x001c4280] lbu r2,0x0000(r4)
+
  001c4280: 90820000 lbu r2,0x0000(r4)
  [0x001c4284] nop
+
  001c4284: 00000000 nop
  [0x001c4288] beq r8,r2,0x001c42a4
+
  001c4288: 11020006 beq r8,r2,0x001c42a4
  [0x001c428c] ori r2,r0,0x0003
+
  001c428c: 34020003 ori r2,r0,0x0003
  [0x001c4290] addiu r3,r3,0x0001
+
  001c4290: 24630001 addiu r3,r3,0x0001
  [0x001c4294] slti r2,r3,0x0003
+
  001c4294: 28620003 slti r2,r3,0x0003
  [0x001c4298] bne r2,r0,0x001c4280
+
  001c4298: 1440fff9 bne r2,r0,0x001c4280
  [0x001c429c] addiu r4,r4,0x0001
+
  001c429c: 24840001 addiu r4,r4,0x0001
  [0x001c42a0] ori r2,r0,0x0003
+
  001c42a0: 34020003 ori r2,r0,0x0003
  [0x001c42a4] bne r3,r2,0x001c42c0
+
  001c42a4: 14620006 bne r3,r2,0x001c42c0
  [0x001c42a8] ori r2,r0,0x0049
+
  001c42a8: 34020049 ori r2,r0,0x0049
  [0x001c42ac] addiu r6,r6,0x0001
+
  001c42ac: 24c60001 addiu r6,r6,0x0001
  [0x001c42b0] slti r2,r6,0x0049
+
  001c42b0: 28c20049 slti r2,r6,0x0049
  [0x001c42b4] bne r2,r0,0x001c4278
+
  001c42b4: 1440fff0 bne r2,r0,0x001c4278
  [0x001c42b8] addiu r5,r5,0x0003
+
  001c42b8: 24a50003 addiu r5,r5,0x0003
  [0x001c42bc] ori r2,r0,0x0049
+
  001c42bc: 34020049 ori r2,r0,0x0049
  [0x001c42c0] bne r6,r2,0x001c42cc
+
  001c42c0: 14c20002 bne r6,r2,0x001c42cc
  [0x001c42c4] ori r2,r0,0x0047
+
  001c42c4: 34020047 ori r2,r0,0x0047
  [0x001c42c8] addu r6,r0,r0
+
  001c42c8: 00003021 addu r6,r0,r0
  [0x001c42cc] bne r6,r2,0x001c42d8
+
  001c42cc: 14c20002 bne r6,r2,0x001c42d8
  [0x001c42d0] addiu r17,r17,0x0001
+
  001c42d0: 26310001 addiu r17,r17,0x0001
  [0x001c42d4] ori r6,r0,0x0048
+
  001c42d4: 34060048 ori r6,r0,0x0048
  [0x001c42d8] lui r5,0x801d
+
  001c42d8: 3c05801d lui r5,0x801d
  [0x001c42dc] lw r5,0x0b34(r5)
+
  001c42dc: 8ca50b34 lw r5,0x0b34(r5)
  [0x001c42e0] lbu r4,0x0161(r7)
+
  001c42e0: 90e40161 lbu r4,0x0161(r7)
  [0x001c42e4] sll r3,r5,0x02
+
  001c42e4: 00051880 sll r3,r5,0x02
  [0x001c42e8] addu r2,r3,r18
+
  001c42e8: 00721021 addu r2,r3,r18
  [0x001c42ec] sw r4,0x0000(r2)
+
  001c42ec: ac440000 sw r4,0x0000(r2)
  [0x001c42f0] addiu r2,r6,0x0862
+
  001c42f0: 24c20862 addiu r2,r6,0x0862
  [0x001c42f4] addiu r5,r5,0x0001
+
  001c42f4: 24a50001 addiu r5,r5,0x0001
  [0x001c42f8] lui r1,0x801d
+
  001c42f8: 3c01801d lui r1,0x801d
  [0x001c42fc] addu r1,r1,r3
+
  001c42fc: 00230821 addu r1,r1,r3
  [0x001c4300] sw r2,0x72c0(r1)
+
  001c4300: ac2272c0 sw r2,0x72c0(r1)
  [0x001c4304] lui r1,0x801d
+
  001c4304: 3c01801d lui r1,0x801d
  [0x001c4308] addu r1,r1,r3
+
  001c4308: 00230821 addu r1,r1,r3
  [0x001c430c] sw r16,0x7388(r1)
+
  001c430c: ac307388 sw r16,0x7388(r1)
  [0x001c4310] lui r1,0x801d
+
  001c4310: 3c01801d lui r1,0x801d
  [0x001c4314] sw r5,0x0b34(r1)
+
  001c4314: ac250b34 sw r5,0x0b34(r1)
  [0x001c4318] j 0x001c437c
+
  001c4318: 080710df j 0x001c437c
  [0x001c431c] addiu r16,r16,0x0001
+
  001c431c: 26100001 addiu r16,r16,0x0001
  [0x001c4320] lui r4,0x801d
+
  001c4320: 3c04801d lui r4,0x801d
  [0x001c4324] lw r4,0x0b34(r4)
+
  001c4324: 8c840b34 lw r4,0x0b34(r4)
  [0x001c4328] lbu r3,0x0161(r7)
+
  001c4328: 90e30161 lbu r3,0x0161(r7)
  [0x001c432c] sll r5,r4,0x02
+
  001c432c: 00042880 sll r5,r4,0x02
  [0x001c4330] addu r2,r5,r18
+
  001c4330: 00b21021 addu r2,r5,r18
  [0x001c4334] addiu r4,r4,0x0001
+
  001c4334: 24840001 addiu r4,r4,0x0001
  [0x001c4338] sw r3,0x0000(r2)
+
  001c4338: ac430000 sw r3,0x0000(r2)
  [0x001c433c] lbu r2,0x0000(r7)
+
  001c433c: 90e20000 lbu r2,0x0000(r7)
  [0x001c4340] andi r3,r16,0x0003
+
  001c4340: 32030003 andi r3,r16,0x0003
  [0x001c4344] lui r1,0x801d
+
  001c4344: 3c01801d lui r1,0x801d
  [0x001c4348] addu r1,r1,r5
+
  001c4348: 00250821 addu r1,r1,r5
  [0x001c434c] sw r16,0x7388(r1)
+
  001c434c: ac307388 sw r16,0x7388(r1)
  [0x001c4350] lui r1,0x801d
+
  001c4350: 3c01801d lui r1,0x801d
  [0x001c4354] sw r4,0x0b34(r1)
+
  001c4354: ac240b34 sw r4,0x0b34(r1)
  [0x001c4358] addiu r2,r2,-0x0080
+
  001c4358: 2442ff80 addiu r2,r2,0xff80
  [0x001c435c] sll r2,r2,0x02
+
  001c435c: 00021080 sll r2,r2,0x02
  [0x001c4360] addu r2,r2,r3
+
  001c4360: 00431021 addu r2,r2,r3
  [0x001c4364] addiu r2,r2,0x080c
+
  001c4364: 2442080c addiu r2,r2,0x080c
  [0x001c4368] lui r1,0x801d
+
  001c4368: 3c01801d lui r1,0x801d
  [0x001c436c] addu r1,r1,r5
+
  001c436c: 00250821 addu r1,r1,r5
  [0x001c4370] sw r2,0x72c0(r1)
+
  001c4370: ac2272c0 sw r2,0x72c0(r1)
  [0x001c4374] addiu r17,r17,0x0001
+
  001c4374: 26310001 addiu r17,r17,0x0001
  [0x001c4378] addiu r16,r16,0x0001
+
  001c4378: 26100001 addiu r16,r16,0x0001
  [0x001c437c] slti r2,r16,0x0015
+
  001c437c: 2a020015 slti r2,r16,0x0015
  [0x001c4380] bne r2,r0,0x001c3ff4
+
  001c4380: 1440ff1c bne r2,r0,0x001c3ff4
  [0x001c4384] addu r2,r17,r0
+
  001c4384: 02201021 addu r2,r17,r0
  [0x001c4388] lw r31,0x0030(r29)
+
  001c4388: 8fbf0030 lw r31,0x0030(r29)
  [0x001c438c] lw r21,0x002c(r29)
+
  001c438c: 8fb5002c lw r21,0x002c(r29)
  [0x001c4390] lw r20,0x0028(r29)
+
  001c4390: 8fb40028 lw r20,0x0028(r29)
  [0x001c4394] lw r19,0x0024(r29)
+
  001c4394: 8fb30024 lw r19,0x0024(r29)
  [0x001c4398] lw r18,0x0020(r29)
+
  001c4398: 8fb20020 lw r18,0x0020(r29)
  [0x001c439c] lw r17,0x001c(r29)
+
  001c439c: 8fb1001c lw r17,0x001c(r29)
  [0x001c43a0] lw r16,0x0018(r29)
+
  001c43a0: 8fb00018 lw r16,0x0018(r29)
  [0x001c43a4] addiu r29,r29,0x0038
+
  001c43a4: 27bd0038 addiu r29,r29,0x0038
  [0x001c43a8] jr r31
+
  001c43a8: 03e00008 jr r31
  [0x001c43ac] nop
+
  001c43ac: 00000000 nop

Revision as of 04:34, 16 June 2022

001c3fa4: 27bdffc8 addiu r29,r29,0xffc8
001c3fa8: afb1001c sw r17,0x001c(r29)
001c3fac: 00008821 addu r17,r0,r0
001c3fb0: afb00018 sw r16,0x0018(r29)
001c3fb4: 00008021 addu r16,r0,r0
001c3fb8: afb40028 sw r20,0x0028(r29)
001c3fbc: 3c1451eb lui r20,0x51eb
001c3fc0: 3694851f ori r20,r20,0x851f
001c3fc4: afb30024 sw r19,0x0024(r29)
001c3fc8: 3c136666 lui r19,0x6666
001c3fcc: 36736667 ori r19,r19,0x6667
001c3fd0: afb5002c sw r21,0x002c(r29)
001c3fd4: 3c15801d lui r21,0x801d
001c3fd8: 26b50a00 addiu r21,r21,0x0a00
001c3fdc: afb20020 sw r18,0x0020(r29)
001c3fe0: 3c12801d lui r18,0x801d
001c3fe4: 265271f8 addiu r18,r18,0x71f8
001c3fe8: afbf0030 sw r31,0x0030(r29)
001c3fec: 3c01801d lui r1,0x801d
001c3ff0: ac200b34 sw r0,0x0b34(r1)
001c3ff4: 0c0602bf jal 0x00180afc				Get Unit's Data Pointer
001c3ff8: 02002021 addu r4,r16,r0
001c3ffc: 90440161 lbu r4,0x0161(r2)
001c4000: 0c060324 jal 0x00180c90				Unit Existence/crystaltreasure check
001c4004: 27a50010 addiu r5,r29,0x0010
001c4008: 8fa30010 lw r3,0x0010(r29)
001c400c: 00000000 nop
001c4010: 046000d9 bltz r3,0x001c4378
001c4014: 00403821 addu r7,r2,r0
001c4018: 160300d7 bne r16,r3,0x001c4378
001c401c: 340200ff ori r2,r0,0x00ff
001c4020: 90e30002 lbu r3,0x0002(r7)
001c4024: 00000000 nop
001c4028: 106200d3 beq r3,r2,0x001c4378
001c402c: 00000000 nop
001c4030: 90e20161 lbu r2,0x0161(r7)
001c4034: 00000000 nop
001c4038: 104000cf beq r2,r0,0x001c4378
001c403c: 00000000 nop
001c4040: 90e50023 lbu r5,0x0023(r7)			Load original brave
001c4044: 90e40024 lbu r4,0x0024(r7)			Load current brave
001c4048: 00000000 nop
001c404c: 00851823 subu r3,r4,r5				Current brave - original brave
001c4050: 00031140 sll r2,r3,0x05
001c4054: 00431023 subu r2,r2,r3
001c4058: 00021080 sll r2,r2,0x02
001c405c: 00431021 addu r2,r2,r3
001c4060: 00021040 sll r2,r2,0x01
001c4064: 00540018 mult r2,r20
001c4068: 000217c3 sra r2,r2,0x1f
001c406c: 00001810 mfhi r3
001c4070: 00031943 sra r3,r3,0x05
001c4074: 00622023 subu r4,r3,r2
001c4078: 00930018 mult r4,r19
001c407c: 00041fc3 sra r3,r4,0x1f
001c4080: 90e40026 lbu r4,0x0026(r7)			Load current faith
001c4084: 00001010 mfhi r2
001c4088: 00021083 sra r2,r2,0x02
001c408c: 00431023 subu r2,r2,r3
001c4090: 00a23021 addu r6,r5,r2
001c4094: 90e50025 lbu r5,0x0025(r7)			Load original faith
001c4098: 00000000 nop
001c409c: 00851823 subu r3,r4,r5				Current faith - original faith
001c40a0: 00031140 sll r2,r3,0x05
001c40a4: 00431023 subu r2,r2,r3
001c40a8: 00021080 sll r2,r2,0x02
001c40ac: 00431021 addu r2,r2,r3
001c40b0: 00021040 sll r2,r2,0x01
001c40b4: 00540018 mult r2,r20
001c40b8: 000217c3 sra r2,r2,0x1f
001c40bc: 00001810 mfhi r3
001c40c0: 00031943 sra r3,r3,0x05
001c40c4: 00622023 subu r4,r3,r2
001c40c8: 00930018 mult r4,r19
001c40cc: a0e60023 sb r6,0x0023(r7)
001c40d0: a0e60024 sb r6,0x0024(r7)			Store new brave
001c40d4: 000417c3 sra r2,r4,0x1f
001c40d8: 00001810 mfhi r3
001c40dc: 00031883 sra r3,r3,0x02
001c40e0: 00621823 subu r3,r3,r2
001c40e4: 90e20002 lbu r2,0x0002(r7)
001c40e8: 00a34821 addu r9,r5,r3
001c40ec: a0e90025 sb r9,0x0025(r7)			Store new faith
001c40f0: 2c420010 sltiu r2,r2,0x0010
001c40f4: 104000a0 beq r2,r0,0x001c4378		Branch if faith isn't too high/brave isn't too low?
001c40f8: a0e90026 sb r9,0x0026(r7)
001c40fc: 90e30000 lbu r3,0x0000(r7)
001c4100: 00000000 nop
001c4104: 10600003 beq r3,r0,0x001c4114
001c4108: 2c620004 sltiu r2,r3,0x0004
001c410c: 1440009a bne r2,r0,0x001c4378
001c4110: 00000000 nop
001c4114: 90e50161 lbu r5,0x0161(r7)
001c4118: 00000000 nop
001c411c: 10a00003 beq r5,r0,0x001c412c
001c4120: 2ca20004 sltiu r2,r5,0x0004
001c4124: 14400094 bne r2,r0,0x001c4378
001c4128: 00000000 nop
001c412c: 24c2fffa addiu r2,r6,0xfffa
001c4130: 2c42000a sltiu r2,r2,0x000a
001c4134: 10400045 beq r2,r0,0x001c424c
001c4138: 2c620080 sltiu r2,r3,0x0080
001c413c: 1040002d beq r2,r0,0x001c41f4
001c4140: 00003021 addu r6,r0,r0
001c4144: 00604021 addu r8,r3,r0
001c4148: 02a02821 addu r5,r21,r0
001c414c: 00001821 addu r3,r0,r0
001c4150: 00a02021 addu r4,r5,r0
001c4154: 90820000 lbu r2,0x0000(r4)
001c4158: 00000000 nop
001c415c: 11020006 beq r8,r2,0x001c4178
001c4160: 34020003 ori r2,r0,0x0003
001c4164: 24630001 addiu r3,r3,0x0001
001c4168: 28620003 slti r2,r3,0x0003
001c416c: 1440fff9 bne r2,r0,0x001c4154
001c4170: 24840001 addiu r4,r4,0x0001
001c4174: 34020003 ori r2,r0,0x0003
001c4178: 14620006 bne r3,r2,0x001c4194
001c417c: 34020049 ori r2,r0,0x0049
001c4180: 24c60001 addiu r6,r6,0x0001
001c4184: 28c20049 slti r2,r6,0x0049
001c4188: 1440fff0 bne r2,r0,0x001c414c
001c418c: 24a50003 addiu r5,r5,0x0003
001c4190: 34020049 ori r2,r0,0x0049
001c4194: 14c20002 bne r6,r2,0x001c41a0
001c4198: 34020047 ori r2,r0,0x0047
001c419c: 00003021 addu r6,r0,r0
001c41a0: 14c20002 bne r6,r2,0x001c41ac
001c41a4: 26310001 addiu r17,r17,0x0001
001c41a8: 34060048 ori r6,r0,0x0048
001c41ac: 3c04801d lui r4,0x801d
001c41b0: 8c840b34 lw r4,0x0b34(r4)
001c41b4: 00000000 nop
001c41b8: 00041880 sll r3,r4,0x02
001c41bc: 00721021 addu r2,r3,r18
001c41c0: ac480000 sw r8,0x0000(r2)
001c41c4: 24c20818 addiu r2,r6,0x0818
001c41c8: 24840001 addiu r4,r4,0x0001
001c41cc: 3c01801d lui r1,0x801d
001c41d0: 00230821 addu r1,r1,r3
001c41d4: ac2272c0 sw r2,0x72c0(r1)
001c41d8: 3c01801d lui r1,0x801d
001c41dc: 00230821 addu r1,r1,r3
001c41e0: ac307388 sw r16,0x7388(r1)
001c41e4: 3c01801d lui r1,0x801d
001c41e8: ac240b34 sw r4,0x0b34(r1)
001c41ec: 08071094 j 0x001c4250
001c41f0: 2522ffab addiu r2,r9,0xffab
001c41f4: 3c03801d lui r3,0x801d
001c41f8: 8c630b34 lw r3,0x0b34(r3)
001c41fc: 00000000 nop
001c4200: 00032080 sll r4,r3,0x02
001c4204: 00921021 addu r2,r4,r18
001c4208: ac450000 sw r5,0x0000(r2)
001c420c: 90e20000 lbu r2,0x0000(r7)
001c4210: 24630001 addiu r3,r3,0x0001
001c4214: 3c01801d lui r1,0x801d
001c4218: ac230b34 sw r3,0x0b34(r1)
001c421c: 32030003 andi r3,r16,0x0003
001c4220: 3c01801d lui r1,0x801d
001c4224: 00240821 addu r1,r1,r4
001c4228: ac307388 sw r16,0x7388(r1)
001c422c: 2442ff80 addiu r2,r2,0xff80
001c4230: 00021080 sll r2,r2,0x02
001c4234: 00431021 addu r2,r2,r3
001c4238: 24420800 addiu r2,r2,0x0800
001c423c: 3c01801d lui r1,0x801d
001c4240: 00240821 addu r1,r1,r4
001c4244: ac2272c0 sw r2,0x72c0(r1)
001c4248: 26310001 addiu r17,r17,0x0001
001c424c: 2522ffab addiu r2,r9,0xffab
001c4250: 2c42000a sltiu r2,r2,0x000a
001c4254: 10400048 beq r2,r0,0x001c4378
001c4258: 00000000 nop
001c425c: 90e30000 lbu r3,0x0000(r7)
001c4260: 00000000 nop
001c4264: 2c620080 sltiu r2,r3,0x0080
001c4268: 1040002d beq r2,r0,0x001c4320
001c426c: 00003021 addu r6,r0,r0
001c4270: 00604021 addu r8,r3,r0
001c4274: 02a02821 addu r5,r21,r0
001c4278: 00001821 addu r3,r0,r0
001c427c: 00a02021 addu r4,r5,r0
001c4280: 90820000 lbu r2,0x0000(r4)
001c4284: 00000000 nop
001c4288: 11020006 beq r8,r2,0x001c42a4
001c428c: 34020003 ori r2,r0,0x0003
001c4290: 24630001 addiu r3,r3,0x0001
001c4294: 28620003 slti r2,r3,0x0003
001c4298: 1440fff9 bne r2,r0,0x001c4280
001c429c: 24840001 addiu r4,r4,0x0001
001c42a0: 34020003 ori r2,r0,0x0003
001c42a4: 14620006 bne r3,r2,0x001c42c0
001c42a8: 34020049 ori r2,r0,0x0049
001c42ac: 24c60001 addiu r6,r6,0x0001
001c42b0: 28c20049 slti r2,r6,0x0049
001c42b4: 1440fff0 bne r2,r0,0x001c4278
001c42b8: 24a50003 addiu r5,r5,0x0003
001c42bc: 34020049 ori r2,r0,0x0049
001c42c0: 14c20002 bne r6,r2,0x001c42cc
001c42c4: 34020047 ori r2,r0,0x0047
001c42c8: 00003021 addu r6,r0,r0
001c42cc: 14c20002 bne r6,r2,0x001c42d8
001c42d0: 26310001 addiu r17,r17,0x0001
001c42d4: 34060048 ori r6,r0,0x0048
001c42d8: 3c05801d lui r5,0x801d
001c42dc: 8ca50b34 lw r5,0x0b34(r5)
001c42e0: 90e40161 lbu r4,0x0161(r7)
001c42e4: 00051880 sll r3,r5,0x02
001c42e8: 00721021 addu r2,r3,r18
001c42ec: ac440000 sw r4,0x0000(r2)
001c42f0: 24c20862 addiu r2,r6,0x0862
001c42f4: 24a50001 addiu r5,r5,0x0001
001c42f8: 3c01801d lui r1,0x801d
001c42fc: 00230821 addu r1,r1,r3
001c4300: ac2272c0 sw r2,0x72c0(r1)
001c4304: 3c01801d lui r1,0x801d
001c4308: 00230821 addu r1,r1,r3
001c430c: ac307388 sw r16,0x7388(r1)
001c4310: 3c01801d lui r1,0x801d
001c4314: ac250b34 sw r5,0x0b34(r1)
001c4318: 080710df j 0x001c437c
001c431c: 26100001 addiu r16,r16,0x0001
001c4320: 3c04801d lui r4,0x801d
001c4324: 8c840b34 lw r4,0x0b34(r4)
001c4328: 90e30161 lbu r3,0x0161(r7)
001c432c: 00042880 sll r5,r4,0x02
001c4330: 00b21021 addu r2,r5,r18
001c4334: 24840001 addiu r4,r4,0x0001
001c4338: ac430000 sw r3,0x0000(r2)
001c433c: 90e20000 lbu r2,0x0000(r7)
001c4340: 32030003 andi r3,r16,0x0003
001c4344: 3c01801d lui r1,0x801d
001c4348: 00250821 addu r1,r1,r5
001c434c: ac307388 sw r16,0x7388(r1)
001c4350: 3c01801d lui r1,0x801d
001c4354: ac240b34 sw r4,0x0b34(r1)
001c4358: 2442ff80 addiu r2,r2,0xff80
001c435c: 00021080 sll r2,r2,0x02
001c4360: 00431021 addu r2,r2,r3
001c4364: 2442080c addiu r2,r2,0x080c
001c4368: 3c01801d lui r1,0x801d
001c436c: 00250821 addu r1,r1,r5
001c4370: ac2272c0 sw r2,0x72c0(r1)
001c4374: 26310001 addiu r17,r17,0x0001
001c4378: 26100001 addiu r16,r16,0x0001
001c437c: 2a020015 slti r2,r16,0x0015
001c4380: 1440ff1c bne r2,r0,0x001c3ff4
001c4384: 02201021 addu r2,r17,r0
001c4388: 8fbf0030 lw r31,0x0030(r29)
001c438c: 8fb5002c lw r21,0x002c(r29)
001c4390: 8fb40028 lw r20,0x0028(r29)
001c4394: 8fb30024 lw r19,0x0024(r29)
001c4398: 8fb20020 lw r18,0x0020(r29)
001c439c: 8fb1001c lw r17,0x001c(r29)
001c43a0: 8fb00018 lw r16,0x0018(r29)
001c43a4: 27bd0038 addiu r29,r29,0x0038
001c43a8: 03e00008 jr r31
001c43ac: 00000000 nop