Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.
Started by Glain, March 27, 2011, 12:57:58 pm
0x0005cd2c: lbu r14,0x0022(r13)
0x001251c0: lw r8,0x0028(r29)
0x001251bc: lbu r2,0x2ec2(r1) Load in the item's shop availability number... (pSX debugger breakpoint)0x001251c0: lw r8,0x0028(r29) Load the player's shop availability (based on story progression) from the stack0x001251c4: nop0x001251c8: slt r2,r8,r2 If the player's number is less than the item's, the item is too high quality, so...0x001251cc: bne r2,r0,0x00125238 ...skip adding it to the shop item list for purchase.
0x00125128: jal 0x000ef1a8(...)0x00125134: sw r2,0x0028(r29)
0x0005cc9c: 00806821 addu r13,r4,r0 r13 = r4 (reference to unit) 0x0005cca0: 30a500ff andi r5,r5,0xff r5 = (Lowest byte of r5) 0x0005cca4: 34020020 ori r2,r0,0x0020 r2 = 0x0020 0x0005cca8: afbf0094 sw r31,0x0094(r29) (Save return address)
0x0005cc9c: afbf0094 sw r31,0x0094(r29) (Save return address)0x0005cca0: 00806821 addu r13,r4,r0 r13 = r4 (reference to unit)0x0005cca4: 0c062859 jal 0x0018a164 Call my subroutine!0x0005cca8: 34020020 ori r2,r0,0x0020 r2 = 0x0020
0x0018a164: 91ae0169 lbu r14,0x0169(r13) Load in unit offset 0x01690x0018a168: 140e0002 bne r14,r0,0x0018a174 If it's not zero, use it, so jump to the return statement0x0018a16c: 30a500ff andi r5,r5,0xff (Statement from calling subroutine that I cut and wanted to execute here)0x0018a170: 91ae0022 lbu r14,0x0022(r13) Otherwise, load in the unit's level, and0x0018a174: 03e00008 jr r31 Return0x0018a178: 00000000 nop
0x0005cd2c: 91ae0022 lbu r14,0x0022(r13)
0x0005cd2c: 00000000 nop
Quote from: Darkholme on March 27, 2011, 02:26:42 pmThat's really cool.So if you wanted to say: work this into FFT 1.3; you'd have to go through the battles, look at what level each NPC should be by default; and put that number in the box you noticed as unused?I'm impressed; and interested to hear the results of anyone who tries this hack out.
91ae0169 lbu r14,0x0169(r13) Load in unit offset 0x0169140e0002 bne r14,r0,0x0018a174 (Do I know r14 actually has the value I loaded in yet?)
Quote from: Glain on March 29, 2011, 10:38:13 pmSo I'm looking at the ASM I wrote a bit more, and from looking at a few resouces on MIPS, I'm a bit unclear on whether I needed to honor the load delay.
0005cdf0: beq r2,r0,0x0005ce00 If (Item level < Previous item level), skip the next 3 lines0005cdf4: nop 0005cdf8: addu r12,r3,r0 r12 = (Item level)0005cdfc: addu r9,r0,r0 List index (r9) = 00005ce00: addu r3,r9,r0 r3 = r9 0005ce04: addiu r9,r9,0x0001 Increment list index (r9)
0005cdf0: 14020003 bne r2,r0,0x0005ce00 If (Item level >= Previous item level), skip the next 3 lines (This check is reversed)0005cdf4: 00000000 nop0005cdf8: 25290001 addiu r9,r9,0x0001 Increment list index (r9)0005cdfc: 00000000 nop 0005ce00: 00606021 addu r12,r3,r0 r12 = (Item level)0005ce04: 01201821 addu r3,r9,r0 r3 = r9
0005ce28: andi r16,r9,0x00ff r16 = r9 (r9 always < 0xFF)
0005ce28: addiu r16,r9,0x0001 r16 = r9 + 1
0005cd3c: andi r7,r7,0x00ff r7 = (lowest byte of r7) (redundant)
0005cd3c: ori r15,r0,0x0000 r15 = 0 (Start out false... haven't found anything yet)
0005cdf4: ori r15,r0,0x0001 r15 = 1 (We found an item)
0005ce2c: beq r15,r0,0x0005ce60 Skip loading the item if we couldn't find one (Used to be r16 instead of r15)
Page created in 0.067 seconds with 24 queries.