Difference between revisions of "0008f08c - 0008f280"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0008f08c: 27bdffd8 addiu r29,r29,0xffd8 0008f090: 2484ffe8 addiu r4,r4,0xffe8 0008f094: 2c820013 sltiu r2,r4,0x0013 0008f098: afbf0020 sw r31,0...")
 
m
 
(One intermediate revision by the same user not shown)
Line 64: Line 64:
 
  0008f180: 12000038 beq r16,r0,0x0008f264
 
  0008f180: 12000038 beq r16,r0,0x0008f264
 
  0008f184: 00001021 addu r2,r0,r0
 
  0008f184: 00001021 addu r2,r0,r0
  0008f188: 0c0088c3 jal 0x0002230c
+
  0008f188: 0c0088c3 jal 0x0002230c [[Random Number Generator]]
 
  0008f18c: 00000000 nop
 
  0008f18c: 00000000 nop
 
  0008f190: 00021840 sll r3,r2,0x01
 
  0008f190: 00021840 sll r3,r2,0x01
Line 71: Line 71:
 
  0008f19c: 00621821 addu r3,r3,r2
 
  0008f19c: 00621821 addu r3,r3,r2
 
  0008f1a0: 00031880 sll r3,r3,0x02
 
  0008f1a0: 00031880 sll r3,r3,0x02
  0008f1a4: 00031bc3 sra r3,r3,0x0f
+
  0008f1a4: 00031bc3 sra r3,r3,0x0f r3 = RNG result * 0x64 / 0x8000
 
  0008f1a8: 0203102a slt r2,r16,r3
 
  0008f1a8: 0203102a slt r2,r16,r3
  0008f1ac: 1440002d bne r2,r0,0x0008f264
+
  0008f1ac: 1440002d bne r2,r0,0x0008f264 If r16 was less than r3, branch to end; else trigger random battle
 
  0008f1b0: 00001021 addu r2,r0,r0
 
  0008f1b0: 00001021 addu r2,r0,r0
 
  0008f1b4: 92310004 lbu r17,0x0004(r17)
 
  0008f1b4: 92310004 lbu r17,0x0004(r17)
Line 87: Line 87:
 
  0008f1dc: 1440fff9 bne r2,r0,0x0008f1c4
 
  0008f1dc: 1440fff9 bne r2,r0,0x0008f1c4
 
  0008f1e0: 00911007 srav r2,r17,r4
 
  0008f1e0: 00911007 srav r2,r17,r4
  0008f1e4: 0c0088c3 jal 0x0002230c
+
  0008f1e4: 0c0088c3 jal 0x0002230c [[Random Number Generator]]
 
  0008f1e8: 00000000 nop
 
  0008f1e8: 00000000 nop
 
  0008f1ec: 00500018 mult r2,r16
 
  0008f1ec: 00500018 mult r2,r16

Latest revision as of 16:46, 14 January 2024

0008f08c: 27bdffd8 addiu r29,r29,0xffd8
0008f090: 2484ffe8 addiu r4,r4,0xffe8
0008f094: 2c820013 sltiu r2,r4,0x0013
0008f098: afbf0020 sw r31,0x0020(r29)
0008f09c: afb3001c sw r19,0x001c(r29)
0008f0a0: afb20018 sw r18,0x0018(r29)
0008f0a4: afb10014 sw r17,0x0014(r29)
0008f0a8: 1040006d beq r2,r0,0x0008f260
0008f0ac: afb00010 sw r16,0x0010(r29)
0008f0b0: 3c138009 lui r19,0x8009
0008f0b4: 8e736a40 lw r19,0x6a40(r19)
0008f0b8: 000410c0 sll r2,r4,0x03
0008f0bc: 00441021 addu r2,r2,r4
0008f0c0: 000290c0 sll r18,r2,0x03
0008f0c4: 00002021 addu r4,r0,r0
0008f0c8: 02401821 addu r3,r18,r0
0008f0cc: 02631021 addu r2,r19,r3
0008f0d0: 90420000 lbu r2,0x0000(r2)
0008f0d4: 00000000 nop
0008f0d8: 10450006 beq r2,r5,0x0008f0f4
0008f0dc: 34020003 ori r2,r0,0x0003
0008f0e0: 24840001 addiu r4,r4,0x0001
0008f0e4: 28820003 slti r2,r4,0x0003
0008f0e8: 1440fff8 bne r2,r0,0x0008f0cc
0008f0ec: 24630018 addiu r3,r3,0x0018
0008f0f0: 34020003 ori r2,r0,0x0003
0008f0f4: 1082005a beq r4,r2,0x0008f260
0008f0f8: 00041040 sll r2,r4,0x01
0008f0fc: 00441021 addu r2,r2,r4
0008f100: 000210c0 sll r2,r2,0x03
0008f104: 02429021 addu r18,r18,r2
0008f108: 02531821 addu r3,r18,r19
0008f10c: 90620001 lbu r2,0x0001(r3)
0008f110: 00000000 nop
0008f114: 24420200 addiu r2,r2,0x0200
0008f118: 3c01800a lui r1,0x800a
0008f11c: ac22f248 sw r2,-0x0db8(r1)
0008f120: 90640017 lbu r4,0x0017(r3)
0008f124: 0c03bc6a jal 0x000ef1a8
0008f128: 00000000 nop
0008f12c: 00402821 addu r5,r2,r0
0008f130: 00002021 addu r4,r0,r0
0008f134: 02401821 addu r3,r18,r0
0008f138: 00731021 addu r2,r3,r19
0008f13c: 90420002 lbu r2,0x0002(r2)
0008f140: 00000000 nop
0008f144: 0045102a slt r2,r2,r5
0008f148: 10400006 beq r2,r0,0x0008f164
0008f14c: 34020004 ori r2,r0,0x0004
0008f150: 24840001 addiu r4,r4,0x0001
0008f154: 28820004 slti r2,r4,0x0004
0008f158: 1440fff7 bne r2,r0,0x0008f138
0008f15c: 24630003 addiu r3,r3,0x0003
0008f160: 34020004 ori r2,r0,0x0004
0008f164: 1082003e beq r4,r2,0x0008f260
0008f168: 00041040 sll r2,r4,0x01
0008f16c: 00441021 addu r2,r2,r4
0008f170: 00521021 addu r2,r2,r18
0008f174: 00538821 addu r17,r2,r19
0008f178: 92300003 lbu r16,0x0003(r17)
0008f17c: 00000000 nop
0008f180: 12000038 beq r16,r0,0x0008f264
0008f184: 00001021 addu r2,r0,r0
0008f188: 0c0088c3 jal 0x0002230c			Random Number Generator
0008f18c: 00000000 nop
0008f190: 00021840 sll r3,r2,0x01
0008f194: 00621821 addu r3,r3,r2
0008f198: 000318c0 sll r3,r3,0x03
0008f19c: 00621821 addu r3,r3,r2
0008f1a0: 00031880 sll r3,r3,0x02
0008f1a4: 00031bc3 sra r3,r3,0x0f			r3 = RNG result * 0x64 / 0x8000
0008f1a8: 0203102a slt r2,r16,r3
0008f1ac: 1440002d bne r2,r0,0x0008f264		If r16 was less than r3, branch to end; else trigger random battle
0008f1b0: 00001021 addu r2,r0,r0
0008f1b4: 92310004 lbu r17,0x0004(r17)
0008f1b8: 00008021 addu r16,r0,r0
0008f1bc: 00002021 addu r4,r0,r0
0008f1c0: 00911007 srav r2,r17,r4
0008f1c4: 30420001 andi r2,r2,0x0001
0008f1c8: 10400002 beq r2,r0,0x0008f1d4
0008f1cc: 00000000 nop
0008f1d0: 26100001 addiu r16,r16,0x0001
0008f1d4: 24840001 addiu r4,r4,0x0001
0008f1d8: 28820008 slti r2,r4,0x0008
0008f1dc: 1440fff9 bne r2,r0,0x0008f1c4
0008f1e0: 00911007 srav r2,r17,r4
0008f1e4: 0c0088c3 jal 0x0002230c			Random Number Generator
0008f1e8: 00000000 nop
0008f1ec: 00500018 mult r2,r16
0008f1f0: 00002021 addu r4,r0,r0
0008f1f4: 00003012 mflo r6
0008f1f8: 000613c3 sra r2,r6,0x0f
0008f1fc: 24430001 addiu r3,r2,0x0001
0008f200: 00911007 srav r2,r17,r4
0008f204: 30420001 andi r2,r2,0x0001
0008f208: 10400004 beq r2,r0,0x0008f21c
0008f20c: 00000000 nop
0008f210: 2463ffff addiu r3,r3,0xffff
0008f214: 10600005 beq r3,r0,0x0008f22c
0008f218: 2482ffeb addiu r2,r4,0xffeb
0008f21c: 24840001 addiu r4,r4,0x0001
0008f220: 28820008 slti r2,r4,0x0008
0008f224: 1440fff6 bne r2,r0,0x0008f200
0008f228: 2482ffeb addiu r2,r4,0xffeb
0008f22c: 02421023 subu r2,r18,r2
0008f230: 02621021 addu r2,r19,r2
0008f234: 90420000 lbu r2,0x0000(r2)
0008f238: 00000000 nop
0008f23c: 3c01800d lui r1,0x800d
0008f240: ac22456c sw r2,0x456c(r1)
0008f244: 02531021 addu r2,r18,r19
0008f248: 90430016 lbu r3,0x0016(r2)
0008f24c: 00000000 nop
0008f250: 3c01800d lui r1,0x800d
0008f254: ac23483c sw r3,0x483c(r1)
0008f258: 08023c99 j 0x0008f264
0008f25c: 34020001 ori r2,r0,0x0001
0008f260: 00001021 addu r2,r0,r0
0008f264: 8fbf0020 lw r31,0x0020(r29)
0008f268: 8fb3001c lw r19,0x001c(r29)
0008f26c: 8fb20018 lw r18,0x0018(r29)
0008f270: 8fb10014 lw r17,0x0014(r29)
0008f274: 8fb00010 lw r16,0x0010(r29)
0008f278: 27bd0028 addiu r29,r29,0x0028
0008f27c: 03e00008 jr r31
0008f280: 00000000 nop