VRAM stuff

From Final Fantasy Hacktics Wiki
Revision as of 01:45, 14 May 2015 by Choto (talk | contribs) (Created page with "<font face='Courier New'> Item Previews Item Equip Preview r17 = 0x801f0688 ; r18 = 0x801f0620 00122f9c: 27bdffd8 addiu r29,r29,0xffd8 00122fa0: afb00010 sw r16,0x0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Item Previews Item Equip Preview

r17 = 0x801f0688 ; r18 = 0x801f0620
00122f9c: 27bdffd8 addiu r29,r29,0xffd8        
00122fa0: afb00010 sw r16,0x0010(r29)          
00122fa4: 00808021 addu r16,r4,r0              
00122fa8: afb20018 sw r18,0x0018(r29)          
00122fac: 00a09021 addu r18,r5,r0              
00122fb0: afb10014 sw r17,0x0014(r29)          
00122fb4: 00c08821 addu r17,r6,r0              
00122fb8: afb3001c sw r19,0x001c(r29)          
00122fbc: 00e09821 addu r19,r7,r0              
00122fc0: 02402021 addu r4,r18,r0              
00122fc4: afbf0020 sw r31,0x0020(r29)          
00122fc8: 0c048b90 jal 0x00122e40               Clear data from r17 and r18
00122fcc: 02202821 addu r5,r17,r0              
00122fd0: 321003ff andi r16,r16,0x03ff         
00122fd4: 2602ffff addiu r2,r16,0xffff         
00122fd8: 2c4200fd sltiu r2,r2,0x00fd          
00122fdc: 10400073 beq r2,r0,0x001231ac         Branch if equiped item is a "Chemist Item"
00122fe0: 00101040 sll r2,r16,0x01              Item ID * 2
00122fe4: 00501021 addu r2,r2,r16               Item ID * 3
00122fe8: 00021880 sll r3,r2,0x02               Item ID * C
00122fec: 3c018006 lui r1,0x8006                0x80060000
00122ff0: 00230821 addu r1,r1,r3                0x80060000 + Item ID * C       
00122ff4: 90242ebf lbu r4,0x2ebf(r1)            Load Item Attributes
00122ff8: 2a020080 slti r2,r16,0x0080          
00122ffc: 10400014 beq r2,r0,0x00123050         Branch if equiped Item is not a Weapon
00123000: 2a020090 slti r2,r16,0x0090          
00123004: 3c018006 lui r1,0x8006               
00123008: 00230821 addu r1,r1,r3               
0012300c: 90222ebc lbu r2,0x2ebc(r1)            Load Item Second Table ID
00123010: 00000000 nop                         
00123014: 000210c0 sll r2,r2,0x03               ID * 8
00123018: 3c018006 lui r1,0x8006                0x80060000
0012301c: 00220821 addu r1,r1,r2                0x80060000 + ID * 8
00123020: 90233abc lbu r3,0x3abc(r1)            Load Item's Weapon Power
00123024: 3c018006 lui r1,0x8006                0x80060000
00123028: 00220821 addu r1,r1,r2               
0012302c: 90223abd lbu r2,0x3abd(r1)            Load Item's Weapon Evade
00123030: 12600004 beq r19,r0,0x00123044        Branch if r19 (addu r19,r7,r0) = 0
00123034: 00000000 nop                         
00123038: a6230008 sh r3,0x0008(r17)            Store Weapon Power into address at r17
0012303c: 08048c4e j 0x00123138                
00123040: a622000c sh r2,0x000c(r17)            Store Evade into address at r17
00123044: a6230006 sh r3,0x0006(r17)            Store Weapon Power into address at r17
00123048: 08048c4e j 0x00123138                
0012304c: a622000a sh r2,0x000a(r17)            Store Evade into address at r17
00123050: 10400015 beq r2,r0,0x001230a8         Branch if equipment is not a shield
00123054: 2a0200d0 slti r2,r16,0x00d0          
00123058: 3c018006 lui r1,0x8006                0x80060000
0012305c: 00230821 addu r1,r1,r3                0x80060000 + Item ID * C
00123060: 90222ebc lbu r2,0x2ebc(r1)            Load Item Second Table ID
00123064: 00000000 nop                         
00123068: 00021040 sll r2,r2,0x01               Second Table ID * 2
0012306c: 3c018006 lui r1,0x8006                0x80060000
00123070: 00220821 addu r1,r1,r2                0x80060000 + Second Table ID * 2
00123074: 90223eb8 lbu r2,0x3eb8(r1)            Load Shield Physical Evade
00123078: 00000000 nop                         
0012307c: a6220016 sh r2,0x0016(r17)            Store Shield Physical Evade into address at r17
00123080: 3c018006 lui r1,0x8006                0x80060000
00123084: 00230821 addu r1,r1,r3                0x80060000 + Item ID * C
00123088: 90222ebc lbu r2,0x2ebc(r1)            Load Item Second Table ID
0012308c: 00000000 nop                         
00123090: 00021040 sll r2,r2,0x01               Second Table ID * 2
00123094: 3c018006 lui r1,0x8006                0x80060000
00123098: 00220821 addu r1,r1,r2                0x80060000 + Second Table ID * 2
0012309c: 90223eb9 lbu r2,0x3eb9(r1)            Load Shield Magical Evade
001230a0: 08048c4e j 0x00123138                
001230a4: a6220020 sh r2,0x0020(r17)            Store Shield Magical Evade into address at r17
001230a8: 1040000c beq r2,r0,0x001230dc         Branch if Item is not Headgear or Bodygear
001230ac: 2602ff70 addiu r2,r16,0xff70          Item ID - 0x8F
001230b0: 00021040 sll r2,r2,0x01               Item ID * 2
001230b4: 3c018006 lui r1,0x8006                0x80060000
001230b8: 00220821 addu r1,r1,r2                0x80060000 + Item ID * 2
001230bc: 90233ed8 lbu r3,0x3ed8(r1)            Load Item HP Bonus
001230c0: 00000000 nop                         
001230c4: a643000e sh r3,0x000e(r18)            Store Item HP Bonus into address at r18
001230c8: 3c018006 lui r1,0x8006                0x80060000
001230cc: 00220821 addu r1,r1,r2                0x80060000 + Item ID * 2
001230d0: 90223ed9 lbu r2,0x3ed9(r1)            Load Item MP Bonus
001230d4: 08048c4e j 0x00123138                
001230d8: a6420014 sh r2,0x0014(r18)            Store Item MP Bonus into address at r18
001230dc: 2a0200f0 slti r2,r16,0x00f0  
001230e0: 10400016 beq r2,r0,0x0012313c         Branch if Item is not an accessory
001230e4: 00041040 sll r2,r4,0x01               Item Attributes ID (?) * 2
001230e8: 3c018006 lui r1,0x8006                0x80060000
001230ec: 00230821 addu r1,r1,r3                0x80060000 + Item ID * 12
001230f0: 90222ebc lbu r2,0x2ebc(r1)            Load Item Second Table ID
001230f4: 00000000 nop                         
001230f8: 00021040 sll r2,r2,0x01               Second Table ID * 2
001230fc: 3c018006 lui r1,0x8006                0x80060000
00123100: 00220821 addu r1,r1,r2                0x80060000 + Second Table ID * 2
00123104: 90223f58 lbu r2,0x3f58(r1)            Load Accessory Physical Evade
00123108: 00000000 nop                         
0012310c: a6220018 sh r2,0x0018(r17)            Store Physical Evade into address at r17
00123110: 3c018006 lui r1,0x8006                0x80060000
00123114: 00230821 addu r1,r1,r3                0x80060000 + Item ID * 12
00123118: 90222ebc lbu r2,0x2ebc(r1)            Load Item Second Table ID
0012311c: 00000000 nop                         
00123120: 00021040 sll r2,r2,0x01               Item Second Table ID * 2
00123124: 3c018006 lui r1,0x8006                0x80060000
00123128: 00220821 addu r1,r1,r2                0x80060000 + Second Table ID * 2
0012312c: 90223f59 lbu r2,0x3f59(r1)            Load Accessory Magical Evade
00123130: 00000000 nop                         
00123134: a6220022 sh r2,0x0022(r17)            Store Magical Evade into address at r17
00123138: 00041040 sll r2,r4,0x01               Item Attributes ID (?) * 2
0012313c: 00441021 addu r2,r2,r4                ID * 3
00123140: 000210c0 sll r2,r2,0x03               ID * 18
00123144: 00441021 addu r2,r2,r4                ID * 19
00123148: 3c018006 lui r1,0x8006                0x80060000
0012314c: 00220821 addu r1,r1,r2                0x80060000 + Item Attributes ID * 19
00123150: 902342c7 lbu r3,0x42c7(r1)            Load Attribute's Move
00123154: 00000000 nop                         
00123158: a6230000 sh r3,0x0000(r17)            Store Move into address at r17
0012315c: 3c018006 lui r1,0x8006                0x80060000
00123160: 00220821 addu r1,r1,r2                0x80060000 + Item Attributes ID * 19
00123164: 902342c6 lbu r3,0x42c6(r1)            Load Attribute's Speed
00123168: 00000000 nop                         
0012316c: a6230002 sh r3,0x0002(r17)            Store Speed into address at r17
00123170: 3c018006 lui r1,0x8006                0x80060000
00123174: 00220821 addu r1,r1,r2                0x80060000 + Item Attributes ID * 19
00123178: 902342c8 lbu r3,0x42c8(r1)            Load Attribute's Jump
0012317c: 00000000 nop                         
00123180: a6230004 sh r3,0x0004(r17)            Store Jump into address at r17
00123184: 3c018006 lui r1,0x8006                0x80060000
00123188: 00220821 addu r1,r1,r2                0x80060000 + Item Attributes ID * 19
0012318c: 902342c4 lbu r3,0x42c4(r1)            Load Attribute's PA
00123190: 00000000 nop                         
00123194: a6230012 sh r3,0x0012(r17)            Store PA into address at r17
00123198: 3c018006 lui r1,0x8006                0x80060000
0012319c: 00220821 addu r1,r1,r2                0x80060000 + Item Attributes ID * 19
001231a0: 902242c5 lbu r2,0x42c5(r1)            Load Attribute's MA
001231a4: 00000000 nop                         
001231a8: a622001c sh r2,0x001c(r17)            Store MA into address at r17
001231ac: 8fbf0020 lw r31,0x0020(r29)          
001231b0: 8fb3001c lw r19,0x001c(r29)          
001231b4: 8fb20018 lw r18,0x0018(r29)          
001231b8: 8fb10014 lw r17,0x0014(r29)          
001231bc: 8fb00010 lw r16,0x0010(r29)          
001231c0: 27bd0028 addiu r29,r29,0x0028        
001231c4: 03e00008 jr r31                      
001231c8: 00000000 nop