Effect prep, default to cure if invalid LBA Sector
Jump to navigation
Jump to search
001a13bc: 3c028001 lui r2,0x8001 001a13c0: 8c420008 lw r2,0x0008(r2) starting Address of RAM blocks for dedication to files/data 001a13c4: 3c03801c lui r3,0x801c 001a13c8: 846324d0 lh r3,0x24d0(r3) load effect 001a13cc: 27bdffd0 addiu r29,r29,0xffd0 001a13d0: afbf0028 sw r31,0x0028(r29) 001a13d4: afb10024 sw r17,0x0024(r29) 001a13d8: afb00020 sw r16,0x0020(r29) 001a13dc: 0460006e bltz r3,0x001a1598 branch if invalid 001a13e0: 24513500 addiu r17,r2,0x3500 r17 = 0x801b3500 001a13e4: 3c03801c lui r3,0x801c 001a13e8: 906324c8 lbu r3,0x24c8(r3) load ?? 001a13ec: 34020001 ori r2,r0,0x0001 001a13f0: 10620032 beq r3,r2,0x001a14bc branch if ?? = 1 (reload map state code?) 001a13f4: 28620002 slti r2,r3,0x0002 001a13f8: 10400005 beq r2,r0,0x001a1410 branch if ?? > 2 (load ability effect?) 001a13fc: 00000000 nop 001a1400: 1060000a beq r3,r0,0x001a142c branch if ?? = 0 001a1404: 00000000 nop 001a1408: 0806855c j 0x001a1570 001a140c: 00000000 nop 001a1410: 34020002 ori r2,r0,0x0002 001a1414: 10620032 beq r3,r2,0x001a14e0 001a1418: 34020003 ori r2,r0,0x0003 001a141c: 1062004f beq r3,r2,0x001a155c 001a1420: 00000000 nop 001a1424: 0806855c j 0x001a1570 001a1428: 00000000 nop 001a142c: 3c02801c lui r2,0x801c 001a1430: 9042bf64 lbu r2,-0x409c(r2) effect target ID 001a1434: 00000000 nop 001a1438: 10400005 beq r2,r0,0x001a1450 branch if no effect target 001a143c: 3402003c ori r2,r0,0x003c 001a1440: 3c01801c lui r1,0x801c 001a1444: a422895c sh r2,-0x76a4(r1) 801b895c = 3C 001a1448: 08068517 j 0x001a145c 001a144c: 27a50010 addiu r5,r29,0x0010 001a1450: 3c01801c lui r1,0x801c 001a1454: a420895c sh r0,-0x76a4(r1) 801b895c = 0 001a1458: 27a50010 addiu r5,r29,0x0010 r5 = stack + 0x10 (LBA) 001a145c: 27b00014 addiu r16,r29,0x0014 001a1460: 3c04801c lui r4,0x801c 001a1464: 848424d0 lh r4,0x24d0(r4) load ability effect ID 001a1468: 0c0684a9 jal 0x001a12a4 Load LBA sector and Byte length of effect 001a146c: 02003021 addu r6,r16,r0 r6 = stack + 0x14 (file length) 001a1470: 8fa20014 lw r2,0x0014(r29) load file length 001a1474: 00000000 nop 001a1478: 14400007 bne r2,r0,0x001a1498 branch if valid 001a147c: 34020001 ori r2,r0,0x0001 default to cure 001a1480: 3c01801c lui r1,0x801c 001a1484: a42224d0 sh r2,0x24d0(r1) store ability effect 001a1488: 34040001 ori r4,r0,0x0001 001a148c: 27a50010 addiu r5,r29,0x0010 001a1490: 0c0684a9 jal 0x001a12a4 load cure's data if defaulted 001a1494: 02003021 addu r6,r16,r0 001a1498: 8fa40010 lw r4,0x0010(r29) load LBA 001a149c: 8fa50014 lw r5,0x0014(r29) load File type length 001a14a0: 0c0111a5 jal 0x00044694 Load Data From Disc (0x44694) 001a14a4: 02203021 addu r6,r17,r0 r6 = start of effect data address 001a14a8: 00402021 addu r4,r2,r0 001a14ac: 14800030 bne r4,r0,0x001a1570 branch if successfully loaded effect file 001a14b0: 34020001 ori r2,r0,0x0001 r2 = 1 001a14b4: 08068534 j 0x001a14d0 001a14b8: 00000000 nop 001a14bc: 0c0111b2 jal 0x000446c8 001a14c0: 00000000 nop 001a14c4: 00402021 addu r4,r2,r0 001a14c8: 14800029 bne r4,r0,0x001a1570 001a14cc: 34020002 ori r2,r0,0x0002 001a14d0: 3c01801c lui r1,0x801c 001a14d4: a02224c8 sb r2,0x24c8(r1) 001a14d8: 0806855c j 0x001a1570 001a14dc: 34040001 ori r4,r0,0x0001 001a14e0: 3c02801c lui r2,0x801c 001a14e4: 8442895c lh r2,-0x76a4(r2) 801b895c (how have I still not figured this one out? I've seen it like 3 times) 001a14e8: 00000000 nop 001a14ec: 14400022 bne r2,r0,0x001a1578 001a14f0: 34040001 ori r4,r0,0x0001 001a14f4: 3c04801c lui r4,0x801c 001a14f8: 9084bf64 lbu r4,-0x409c(r4) load effect target ID 001a14fc: 00000000 nop 001a1500: 10800003 beq r4,r0,0x001a1510 branch if no target 001a1504: 00000000 nop 001a1508: 0c06b6c3 jal 0x001adb0c force secondary effect to finish 001a150c: 00000000 nop 001a1510: 3c04801c lui r4,0x801c 001a1514: 848424d0 lh r4,0x24d0(r4) 001a1518: 34020003 ori r2,r0,0x0003 001a151c: 3c01801c lui r1,0x801c 001a1520: a02224c8 sb r2,0x24c8(r1) store directive? 001a1524: 0c068466 jal 0x001a1198 Get ?? section address 001a1528: 00000000 nop 001a152c: 3c02801c lui r2,0x801c 001a1530: 8c42acc8 lw r2,-0x5338(r2) load that section address 001a1534: 00000000 nop 001a1538: 8c420000 lw r2,0x0000(r2) load first word 001a153c: 00000000 nop 001a1540: 30420010 andi r2,r2,0x0010 001a1544: 1040ffe4 beq r2,r0,0x001a14d8 branch if first byte doesn't have 0x10 001a1548: 34040040 ori r4,r0,0x0040 001a154c: 0c010ed5 jal 0x00043b54 001a1550: 340500f0 ori r5,r0,0x00f0 001a1554: 0806855c j 0x001a1570 001a1558: 34040001 ori r4,r0,0x0001 001a155c: 3c04801c lui r4,0x801c 001a1560: 9084bf64 lbu r4,-0x409c(r4) load effect target ID 001a1564: 0c06b6b8 jal 0x001adae0 load secondary effect phase 001a1568: 00000000 nop 001a156c: 0002202b sltu r4,r0,r2 If secondary effect exists, r4 = 0 (prevents unit from animating until things such as a shot arrow, or thrown stone finish displaying numbers/effects.) 001a1570: 3c02801c lui r2,0x801c 001a1574: 8442895c lh r2,-0x76a4(r2) 801b895c 001a1578: 00000000 nop 001a157c: 18400004 blez r2,0x001a1590 branch if <= 0 001a1580: 00401821 addu r3,r2,r0 001a1584: 2462ffff addiu r2,r3,0xffff byte - 1 001a1588: 3c01801c lui r1,0x801c 001a158c: a422895c sh r2,-0x76a4(r1) store new 801b895c 001a1590: 08068567 j 0x001a159c 001a1594: 0004102b sltu r2,r0,r4 001a1598: 00001021 addu r2,r0,r0 001a159c: 8fbf0028 lw r31,0x0028(r29) 001a15a0: 8fb10024 lw r17,0x0024(r29) 001a15a4: 8fb00020 lw r16,0x0020(r29) 001a15a8: 27bd0030 addiu r29,r29,0x0030 001a15ac: 03e00008 jr r31 001a15b0: 00000000 nop