Difference between revisions of "Load party data into Formation screen data"
Jump to navigation
Jump to search
RetroTypes (talk | contribs) m |
RetroTypes (talk | contribs) m |
||
Line 1: | Line 1: | ||
+ | |||
+ | #See also: | ||
+ | #[[ATTACK.OUT Copy Unit Data to Status Billboard]] | ||
+ | #[[BUNIT.OUT Copy Unit Data to Status Billboard]] | ||
+ | #BATTLE.BIN [[Copy Unit Data to Status Billboard]] | ||
+ | #[[WORLD.BIN Copy Unit Data to Status Billboard]] | ||
+ | |||
00120bb0: 27bdffd8 addiu r29,r29,0xffd8 # | 00120bb0: 27bdffd8 addiu r29,r29,0xffd8 # | ||
00120bb4: afb1001c sw r17,0x001c(r29) # | 00120bb4: afb1001c sw r17,0x001c(r29) # |
Latest revision as of 10:37, 20 April 2025
#See also: #ATTACK.OUT Copy Unit Data to Status Billboard #BUNIT.OUT Copy Unit Data to Status Billboard #BATTLE.BIN Copy Unit Data to Status Billboard #WORLD.BIN Copy Unit Data to Status Billboard
00120bb0: 27bdffd8 addiu r29,r29,0xffd8 # 00120bb4: afb1001c sw r17,0x001c(r29) # 00120bb8: 00808821 addu r17,r4,r0 #r17 = Stack address 00120bbc: afb00018 sw r16,0x0018(r29) # 00120bc0: 00a08021 addu r16,r5,r0 #r16 = Formation screen pointer 00120bc4: afb20020 sw r18,0x0020(r29) # 00120bc8: 00c09021 addu r18,r6,r0 #r18 = Unit data pointer 00120bcc: 02002021 addu r4,r16,r0 #r4 = Formation screen pointer 00120bd0: 00002821 addu r5,r0,r0 #r5 = 0 00120bd4: afbf0024 sw r31,0x0024(r29) # 00120bd8: 0c0088bf jal 0x000222fc #0002228c - 00022b94 (Clear first 0x128 bytes in formation screen data) 00120bdc: 34060128 ori r6,r0,0x0128 #r6 = 0x128 00120be0: 92420016 lbu r2,0x0016(r18) #r2 = Unit Level from party data 00120be4: 00000000 nop # 00120be8: 2c420064 sltiu r2,r2,0x0064 #Compare to 0x64 (100) 00120bec: 10400002 beq r2,r0,0x00120bf8 #If greater than 100 /Else Branch if less than 100 00120bf0: 34030063 ori r3,r0,0x0063 #r3 = 0x63 (99) 00120bf4: 92430016 lbu r3,0x0016(r18) #r3 = Unit Level from party data 00120bf8: 00000000 nop # 00120bfc: a6030000 sh r3,0x0000(r16) #Store Unit Level to Formation screen 00120c00: 92220002 lbu r2,0x0002(r17) #r2 = Party Index 00120c04: 00000000 nop # 00120c08: 2c420010 sltiu r2,r2,0x0010 #Compare Party Index to 0x10 00120c0c: 14400003 bne r2,r0,0x00120c1c #If Party Index greater than 0x10 /Else Branch 00120c10: 34030063 ori r3,r0,0x0063 #r3 = 0x63 (99) 00120c14: 34020002 ori r2,r0,0x0002 #r2 = 2 00120c18: a6020002 sh r2,0x0002(r16) #Store 0x02 to Formation screen (Guest) 00120c1c: 92420015 lbu r2,0x0015(r18) #r2 = Unit's Experience 00120c20: 00000000 nop # 00120c24: 2c420064 sltiu r2,r2,0x0064 #Compare to 0x64 (100) 00120c28: 10400002 beq r2,r0,0x00120c34 #If greater than 100 /Else Branch if less than 100 00120c2c: 00000000 nop # 00120c30: 92430015 lbu r3,0x0015(r18) #r3 = Unit's Experience 00120c34: 00000000 nop # 00120c38: a6030008 sh r3,0x0008(r16) #Store Unit's Experience to Formation screen 00120c3c: 92220002 lbu r2,0x0002(r17) #r2 = Party Index 00120c40: 00000000 nop # 00120c44: a602000a sh r2,0x000a(r16) #Store Party Index to Formation screen (Portrait) 00120c48: 9622002a lhu r2,0x002a(r17) #r2 = Unit's HP 00120c4c: 00000000 nop # 00120c50: 2c4203e8 sltiu r2,r2,0x03e8 #Compare to 0x03e8 (1000) 00120c54: 10400002 beq r2,r0,0x00120c60 #If greater than 1000 /Else Branch if less than 1000 00120c58: 340303e7 ori r3,r0,0x03e7 #r3 = 0x03e7 (999) 00120c5c: 9623002a lhu r3,0x002a(r17) #r3 = Unit's HP 00120c60: 00000000 nop # 00120c64: a603000c sh r3,0x000c(r16) #Store Unit's HP to Formation screen (Current HP) 00120c68: 9622002a lhu r2,0x002a(r17) #r2 = Unit's HP 00120c6c: 00000000 nop # 00120c70: 2c4203e8 sltiu r2,r2,0x03e8 #Compare to 0x03e8 (1000) 00120c74: 10400002 beq r2,r0,0x00120c80 #If greater than 1000 /Else Branch if less than 1000 00120c78: 340303e7 ori r3,r0,0x03e7 #r3 = 0x03e7 (999) 00120c7c: 9623002a lhu r3,0x002a(r17) #r3 = Unit's HP 00120c80: 00000000 nop # 00120c84: a6030010 sh r3,0x0010(r16) #Store Unit's HP to Formation screen (Max HP) 00120c88: 9622002e lhu r2,0x002e(r17) #r2 = Unit's MP 00120c8c: 00000000 nop # 00120c90: 2c4203e8 sltiu r2,r2,0x03e8 #Compare to 0x03e8 (1000) 00120c94: 10400002 beq r2,r0,0x00120ca0 #If greater than 1000 /Else Branch if less than 1000 00120c98: 340303e7 ori r3,r0,0x03e7 #r3 = 0x03e7 (999) 00120c9c: 9623002e lhu r3,0x002e(r17) #r3 = Unit's MP 00120ca0: 00000000 nop # 00120ca4: a6030012 sh r3,0x0012(r16) #Store Unit's MP to Formation screen (Current MP) 00120ca8: 9622002e lhu r2,0x002e(r17) #r2 = Unit's MP 00120cac: 00000000 nop # 00120cb0: 2c4203e8 sltiu r2,r2,0x03e8 00120cb4: 10400002 beq r2,r0,0x00120cc0 #If greater than 1000 /Else Branch if less than 1000 00120cb8: 340303e7 ori r3,r0,0x03e7 #r3 = 0x03e7 (999) 00120cbc: 9623002e lhu r3,0x002e(r17) #r3 = Unit's MP 00120cc0: 00000000 nop # 00120cc4: a6030016 sh r3,0x0016(r16) #Store Unit's MP to Formation screen (Max MP) 00120cc8: 92220039 lbu r2,0x0039(r17) #r2 = Unit's CT 00120ccc: 00000000 nop # 00120cd0: 2c420065 sltiu r2,r2,0x0065 #Compare to 0x65 (101) 00120cd4: 10400002 beq r2,r0,0x00120ce0 #If greater than 101 /Else Branch if less than 101 00120cd8: 34030064 ori r3,r0,0x0064 #r3 = 0x64 (100) 00120cdc: 92230039 lbu r3,0x0039(r17) #r3 = Unit's CT 00120ce0: 34020064 ori r2,r0,0x0064 #r2 = 0x64 (100) 00120ce4: a6030018 sh r3,0x0018(r16) #Store Unit's CT to Formation screen (Current CT) 00120ce8: a602001c sh r2,0x001c(r16) #Store 100 to Formation screen (Max CT) 00120cec: 92220002 lbu r2,0x0002(r17) #r2 = Party Index 00120cf0: 00000000 nop # 00120cf4: a6020022 sh r2,0x0022(r16) #Store Party Index to Formation screen (Name) 00120cf8: 92420002 lbu r2,0x0002(r18) #r2 = Unit's Job ID 00120cfc: 00000000 nop # 00120d00: a6020024 sh r2,0x0024(r16) #Store job ID to Formation screen 00120d04: 92220024 lbu r2,0x0024(r17) #r2 = Unit's Brave 00120d08: 00000000 nop # 00120d0c: a6020026 sh r2,0x0026(r16) #Store Unit's Brave to Formation screen 00120d10: 92220026 lbu r2,0x0026(r17) #r2 = Unit's Faith 00120d14: 00000000 nop # 00120d18: a6020028 sh r2,0x0028(r16) #Store Unit's Faith to Formation screen 00120d1c: 96220008 lhu r2,0x0008(r17) #r2 = Unit's Birthday/Zodiac 00120d20: 00000000 nop # 00120d24: 00021302 srl r2,r2,0x0c #Isolate Birthday 00120d28: a602002a sh r2,0x002a(r16) #Store Unit's Birthday to Formation screen 00120d2c: 92220002 lbu r2,0x0002(r17) #r2 = Party Index 00120d30: 00000000 nop # 00120d34: a602002c sh r2,0x002c(r16) #Store Party Index to Formation screen 00120d38: 9222003a lbu r2,0x003a(r17) #r2 = Unit's Move 00120d3c: 00000000 nop # 00120d40: a6020030 sh r2,0x0030(r16) #Store Unit's Move to Formation screen 00120d44: 92220038 lbu r2,0x0038(r17) #r2 = Unit's Speed 00120d48: 00000000 nop # 00120d4c: a6020032 sh r2,0x0032(r16) #Store Unit's Speed to Formation screen 00120d50: 9222003b lbu r2,0x003b(r17) #r2 = Unit's Jump 00120d54: 00000000 nop # 00120d58: a6020034 sh r2,0x0034(r16) #Store Unit's Jump to Formation screen 00120d5c: 9222003c lbu r2,0x003c(r17) #r2 = Unit's RH Weapon Power 00120d60: 00000000 nop # 00120d64: a6020036 sh r2,0x0036(r16) #Store Unit's RH Weapon Power to Formation screen 00120d68: 9222003d lbu r2,0x003d(r17) #r2 = Unit's LH Weapon Power 00120d6c: 00000000 nop # 00120d70: a6020038 sh r2,0x0038(r16) #Store Unit's LH Weapon Power to Formation screen 00120d74: 9222003e lbu r2,0x003e(r17) #r2 = Unit's RH Weapon Evasion 00120d78: 00000000 nop # 00120d7c: a602003a sh r2,0x003a(r16) #Store Unit's RH Weapon Evasion to Formation screen 00120d80: 9222003f lbu r2,0x003f(r17) #r2 = Unit's LH Weapon Evasion 00120d84: 00000000 nop # 00120d88: a602003c sh r2,0x003c(r16) #Store Unit's LH Weapon Evasion to Formation screen 00120d8c: 92220012 lbu r2,0x0012(r17) #r2 = Unit's Primary Skillset 00120d90: 00000000 nop # 00120d94: 24420050 addiu r2,r2,0x0050 #r2 = Unit's Primary Skillset + 0x50 00120d98: 304200ff andi r2,r2,0x00ff #Isolate bottom 2 bits (Generic Monster check) 00120d9c: 2c440030 sltiu r4,r2,0x0030 #Compare to 30 (Generic Monster Skillsets will be less than 0x30 after the ANDI 0xFF) 00120da0: a604003e sh r4,0x003e(r16) #Store 1 or 0 to Formation screen (1 = Generic Monster, 0 otherwise) 00120da4: 92220036 lbu r2,0x0036(r17) #r2 = Unit's PA 00120da8: 00000000 nop # 00120dac: a6020042 sh r2,0x0042(r16) #Store Unit's PA to Formation screen 00120db0: 92220043 lbu r2,0x0043(r17) #r2 = Unit's Physical Class Evasion (P-C-Ev) 00120db4: 00000000 nop # 00120db8: a6020044 sh r2,0x0044(r16) #Store Unit's P-C-Ev to Formation screen 00120dbc: 92230041 lbu r3,0x0041(r17) #r3 = Right(?) hand P-S-Ev 00120dc0: 92240042 lbu r4,0x0042(r17) #r4 = Left(?) hand P-S-Ev 00120dc4: 00000000 nop # 00120dc8: 0064102b sltu r2,r3,r4 #Compare Left and Right hand P-S-Ev 00120dcc: 10400002 beq r2,r0,0x00120dd8 #If Right(?) hand P-S-Ev is greater /Else Branch if Left(?) hand P-S-Ev is greater 00120dd0: 00000000 nop # 00120dd4: 00801821 addu r3,r4,r0 #r3 = Left(?) hand P-S-Ev 00120dd8: a6030046 sh r3,0x0046(r16) #Store P-S-Ev to Formation screen 00120ddc: 92220040 lbu r2,0x0040(r17) #r2 = Unit's P-A-Ev 00120de0: 00000000 nop # 00120de4: a6020048 sh r2,0x0048(r16) #Store P-A-Ev to Formation screen 00120de8: 92220037 lbu r2,0x0037(r17) #r2 = Unit's MA 00120dec: a600004e sh r0,0x004e(r16) #Store 0 M-C-Ev to Formation screen 00120df0: a602004c sh r2,0x004c(r16) #Store Unit's MA to Formation screen 00120df4: 92230045 lbu r3,0x0045(r17) #r3 = Right(?) hand Magical Shield Evasion (M-S-Ev) 00120df8: 92240046 lbu r4,0x0046(r17) #r4 = Left(?) hand M-S-Ev 00120dfc: 00000000 nop # 00120e00: 0064102b sltu r2,r3,r4 #Compare Left and Right hand M-S-Ev 00120e04: 10400002 beq r2,r0,0x00120e10 #If Right(?) hand M-S-Ev is greater /Else Branch if Left(?) hand P-S-Ev is greater 00120e08: 00000000 nop # 00120e0c: 00801821 addu r3,r4,r0 #r3 = Left(?) hand M-S-Ev 00120e10: a6030050 sh r3,0x0050(r16) #Store M-S-Ev to Formation screen 00120e14: 92220044 lbu r2,0x0044(r17) #r2 = Unit's M-A-Ev 00120e18: 8603003e lh r3,0x003e(r16) #r3 = Generic Monster Byte (0 or 1 from earlier) 00120e1c: 00000000 nop # 00120e20: 10600013 beq r3,r0,0x00120e70 #If Generic Monster /Else Branch if not Generic Monster 00120e24: a6020052 sh r2,0x0052(r16) #Store M-A-Ev to Formation screen 00120e28: 92240012 lbu r4,0x0012(r17) #r4 = Unit's Primary Skillset 00120e2c: 0c01698e jal 0x0005a638 #Store Skillset's Abilities 00120e30: 34050001 ori r5,r0,0x0001 #r5 = 1 (Store Action abilities) 00120e34: 00002021 addu r4,r0,r0 #r4 = 0 (counter) 00120e38: 00403021 addu r6,r2,r0 #r6 = Ability list pointer of Monster abilities 00120e3c: 02002821 addu r5,r16,r0 #r5 = Formation screen pointer #Loop Start 00120e40: 84c20000 lh r2,0x0000(r6) #r2 = Monster ability 00120e44: 00000000 nop # 00120e48: 10400003 beq r2,r0,0x00120e58 #If not null/attack /Else Branch if null 00120e4c: 00401821 addu r3,r2,r0 #r3 = Monster ability 00120e50: a4a3005e sh r3,0x005e(r5) #Store Monster ability to Formation Screen (Monster abilities list) 00120e54: 24a50002 addiu r5,r5,0x0002 #Increment Formation Screen (Monster abilities list) pointer 00120e58: 24840001 addiu r4,r4,0x0001 #counter++ 00120e5c: 28820003 slti r2,r4,0x0003 #Compate to 3 00120e60: 1440fff7 bne r2,r0,0x00120e40 #Loop 3 times 00120e64: 24c60002 addiu r6,r6,0x0002 #Increment Monster ability list pointer 00120e68: 080483da j 0x00120f68 #Jump past Human section below 00120e6c: 00000000 nop # 00120e70: 92220012 lbu r2,0x0012(r17) #r2 = Unit's Skillset 00120e74: 86030024 lh r3,0x0024(r16) #r3 = Unit's Job ID 00120e78: a602005e sh r2,0x005e(r16) #Store Unit's Skillset to Formation Screen 00120e7c: 3402005d ori r2,r0,0x005d #r2 = 0x5d (Mime Job ID) 00120e80: 10620039 beq r3,r2,0x00120f68 #If not Mime /Else Branch if Mime 00120e84: 340200ff ori r2,r0,0x00ff #r2 = 0xFF 00120e88: 92430011 lbu r3,0x0011(r18) #r3 = RH Weapon ID 00120e8c: 00000000 nop # 00120e90: 10620004 beq r3,r2,0x00120ea4 #If RH Weapon is not 0xFF (Fist) /Else Branch if no RH Weapon (Fist) 00120e94: 00000000 nop # 00120e98: 92420011 lbu r2,0x0011(r18) #r2 = RH Weapon ID 00120e9c: 080483ac j 0x00120eb0 # 00120ea0: a6020054 sh r2,0x0054(r16) #Store RH Weapon to Formation Screen 00120ea4: 92420012 lbu r2,0x0012(r18) #r2 = RH Shield ID 00120ea8: 00000000 nop # 00120eac: a6020054 sh r2,0x0054(r16) #Store RH Shield to Formation Screen 00120eb0: 92430013 lbu r3,0x0013(r18) #r3 = LH Weapon ID 00120eb4: 340200ff ori r2,r0,0x00ff #r2 = 0xFF 00120eb8: 10620004 beq r3,r2,0x00120ecc #If LH Weapon is not 0xFF (Fist) /Else Branch if no LH Weapon (Fist) 00120ebc: 00000000 nop # 00120ec0: 92420013 lbu r2,0x0013(r18) #r2 = LH Weapon ID 00120ec4: 080483b6 j 0x00120ed8 # 00120ec8: a6020056 sh r2,0x0056(r16) #Store LH Weapon to Formation Screen 00120ecc: 92420014 lbu r2,0x0014(r18) #r2 = LH Shield ID 00120ed0: 00000000 nop # 00120ed4: a6020056 sh r2,0x0056(r16) #Store LH Shield to Formation Screen 00120ed8: 9242000e lbu r2,0x000e(r18) #r2 = Helmet ID 00120edc: 00000000 nop # 00120ee0: a6020058 sh r2,0x0058(r16) #Store Helmet to Formation Screen 00120ee4: 9242000f lbu r2,0x000f(r18) #r2 = Armor ID 00120ee8: 00002021 addu r4,r0,r0 #r4 = 0 (counter) 00120eec: a602005a sh r2,0x005a(r16) #Store Armor to Formation Screen 00120ef0: 92420010 lbu r2,0x0010(r18) #r2 = Accessory ID 00120ef4: 02001821 addu r3,r16,r0 #r3 = Formation Screen pointer 00120ef8: a602005c sh r2,0x005c(r16) #Store Accessory to Formation Screen #Loop Start 00120efc: 94620054 lhu r2,0x0054(r3) #r2 = Equipment from Formation Screen 00120f00: 00000000 nop # 00120f04: 2c4200fe sltiu r2,r2,0x00fe #Compare to 0xFE 00120f08: 14400002 bne r2,r0,0x00120f14 #If invalid Equipment ID /Else Branch if valid 00120f0c: 24840001 addiu r4,r4,0x0001 #counter++ 00120f10: a4600054 sh r0,0x0054(r3) #Store no Equipment 00120f14: 28820005 slti r2,r4,0x0005 #Compare to 5 00120f18: 1440fff8 bne r2,r0,0x00120efc #Loop 5 times (validate all equipment) 00120f1c: 24630002 addiu r3,r3,0x0002 #Increment Formation Screen pointer to next Equipment slot 00120f20: 92420007 lbu r2,0x0007(r18) #r2 = Secondary Skillset 00120f24: 00000000 nop # 00120f28: a6020060 sh r2,0x0060(r16) #Store Secondary Skillset to Formation Screen 00120f2c: 92420009 lbu r2,0x0009(r18) #r2 = Reaction ID (upper) 00120f30: 92430008 lbu r3,0x0008(r18) #r2 = Reaction ID (lower) 00120f34: 00021200 sll r2,r2,0x08 #Move upper half of ID to correct bits 00120f38: 00621821 addu r3,r3,r2 #r3 = Reaction ability 00120f3c: a6030062 sh r3,0x0062(r16) #Store Reaction ability to Formation Screen 00120f40: 9242000b lbu r2,0x000b(r18) #r2 = Support ID (upper) 00120f44: 9243000a lbu r3,0x000a(r18) #r2 = Support ID (lower) 00120f48: 00021200 sll r2,r2,0x08 #Move upper half of ID to correct bits 00120f4c: 00621821 addu r3,r3,r2 #r3 = Support ability 00120f50: a6030064 sh r3,0x0064(r16) #Store Support ability to Formation Screen 00120f54: 9242000d lbu r2,0x000d(r18) #r2 = Movement ID (upper) 00120f58: 9243000c lbu r3,0x000c(r18) #r2 = Movement ID (lower) 00120f5c: 00021200 sll r2,r2,0x08 #Move upper half of ID to correct bits 00120f60: 00621821 addu r3,r3,r2 #r3 = Movement ability 00120f64: a6030066 sh r3,0x0066(r16) #Store Movement ability to Formation Screen 00120f68: 92240003 lbu r4,0x0003(r17) #r4 = Current Job 00120f6c: 0c0482e4 jal 0x00120b90 #Special monster check (1 if so) 00120f70: 00000000 nop # 00120f74: 14400005 bne r2,r0,0x00120f8c #If not Special Monster /Else Branch if Special Monster 00120f78: 26240096 addiu r4,r17,0x0096 #r4 = Stack address + 0x96 (data pointer?) 00120f7c: 8602003e lh r2,0x003e(r16) #r2 = Generic Monster byte 00120f80: 00000000 nop # 00120f84: 10400006 beq r2,r0,0x00120fa0 #If Generic Monster /Else Branch if not Generic Monster 00120f88: 00000000 nop # 00120f8c: 26050077 addiu r5,r16,0x0077 #r5 = Formation Screen pointer + 0x77 (Unlocked Jobs data) 00120f90: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy bytes) 00120f94: 34060003 ori r6,r0,0x0003 #r6 = 3 (copy 3 bytes) 00120f98: 080483f3 j 0x00120fcc #Jump past non-Generic-Monster jobs stuff below 00120f9c: 2624004a addiu r4,r17,0x004a #r4 = Stack address + 0x4a ? 00120fa0: 92250006 lbu r5,0x0006(r17) #r5 = Gender? 00120fa4: 262400d2 addiu r4,r17,0x00d2 #r4 = Stack address + 0xd2 ? 00120fa8: 0c017705 jal 0x0005dc14 #Calculate Unlocked Jobs 00120fac: 30a500c0 andi r5,r5,0x00c0 #Human Gender check? 00120fb0: 00402021 addu r4,r2,r0 #r4 = Unlocked Jobs data pointer 00120fb4: 00041403 sra r2,r4,0x10 #Move data to correct bits 00120fb8: a2020077 sb r2,0x0077(r16) #Store Unlocked Jobs 1 to Formation Screen 00120fbc: 00041203 sra r2,r4,0x08 #Move data to correct bits 00120fc0: a2020078 sb r2,0x0078(r16) #Store Unlocked Jobs 2 to Formation Screen 00120fc4: a2040079 sb r4,0x0079(r16) #Store Unlocked Jobs 3 to Formation Screen 00120fc8: 2624004a addiu r4,r17,0x004a #r4 = Stack address + 0x4a ? 00120fcc: 92420004 lbu r2,0x0004(r18) #r2 = Unit's Gender 00120fd0: 26050073 addiu r5,r16,0x0073 #r5 = Formation Screen pointer + 0x73 (Equippable Items data) 00120fd4: a2020070 sb r2,0x0070(r16) #Store Unit's Gender to Formation Screen 00120fd8: 92420000 lbu r2,0x0000(r18) #r2 = Unit's Sprite Set 00120fdc: 34060004 ori r6,r0,0x0004 #r6 = 0x4 (length) 00120fe0: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy Equippable Items bytes) 00120fe4: a2020072 sb r2,0x0072(r16) #Store Sprite Set to Formation Screen 00120fe8: 2644002b addiu r4,r18,0x002b #r4 = Known Abilities address (Party Data) 00120fec: 2605007a addiu r5,r16,0x007a #r5 = Known Abilities address (Formation Screen data) 00120ff0: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy bytes) 00120ff4: 34060039 ori r6,r0,0x0039 #r6 = 0x39 (length) 00120ff8: 26440064 addiu r4,r18,0x0064 #r4 = Job Levels address (Party Data) 00120ffc: 260500b3 addiu r5,r16,0x00b3 #r5 = Job Levels address (Formation Screen Data) 00121000: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy bytes) 00121004: 3406000a ori r6,r0,0x000a #r6 = 0x0a (length) 00121008: 2644006e addiu r4,r18,0x006e #r4 = JP amounts address (Party Data) 0012100c: 260500be addiu r5,r16,0x00be #r5 = JP Amounts address (Formation Screen Data) 00121010: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy bytes) 00121014: 34060028 ori r6,r0,0x0028 #r6 = 0x28 (length) 00121018: 26440096 addiu r4,r18,0x0096 #r4 = Total JP amounts address (Party Data) 0012101c: 260500e6 addiu r5,r16,0x00e6 #r5 = Total JP Amounts address (Formation Screen Data) 00121020: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy bytes) 00121024: 34060028 ori r6,r0,0x0028 #r6 = 0x28 (length) 00121028: 00002021 addu r4,r0,r0 #r4 = 0 0012102c: 3405270f ori r5,r0,0x270f #r5 = 0x270f 00121030: 02001821 addu r3,r16,r0 #r3 = Formation screen pointer #Loop Start 00121034: 946200be lhu r2,0x00be(r3) #r2 = Job JP 00121038: 00000000 nop # 0012103c: 2c422710 sltiu r2,r2,0x2710 #Compare to 10000 00121040: 14400002 bne r2,r0,0x0012104c #If less than 10000 /Else Branch if greater than 10000 00121044: 00000000 nop # 00121048: a46500be sh r5,0x00be(r3) #Cap JP at 9999 0012104c: 946200e6 lhu r2,0x00e6(r3) #r2 = Job Total JP 00121050: 00000000 nop # 00121054: 2c422710 sltiu r2,r2,0x2710 #Compare to 10000 00121058: 14400002 bne r2,r0,0x00121064 #If less than 10000 /Else Branch if greater than 10000 0012105c: 24840001 addiu r4,r4,0x0001 #counter++ 00121060: a46500e6 sh r5,0x00e6(r3) #Cap Total JP at 9999 00121064: 28820014 slti r2,r4,0x0014 #Compare counter to 0x14 00121068: 1440fff2 bne r2,r0,0x00121034 #Loop 19 times (all jobs) 0012106c: 24630002 addiu r3,r3,0x0002 #Increment Formation screen pointer to next Job 00121070: 264400be addiu r4,r18,0x00be #r4 = Unit data pointer + 0xbe (Unit Name) 00121074: 2605010e addiu r5,r16,0x010e #r5 = Formation screen pointer + 0x010e (Unit Name) 00121078: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy Unit Name) 0012107c: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (length) 00121080: 2624008f addiu r4,r17,0x008f #r4 = Stack address + 0x008f (Equipped Supports) 00121084: 26050124 addiu r5,r16,0x0124 #r5 = Formation screen pointer + 0x124 (Equipped Supports) 00121088: 0c0088b7 jal 0x000222dc #0002228c - 00022b94 (Copy Equipped Supports) 0012108c: 34060004 ori r6,r0,0x0004 #r6 = 0x04 (length) 00121090: 924200d0 lbu r2,0x00d0(r18) #r2 = Proposition Byte 00121094: 00000000 nop # 00121098: a202011f sb r2,0x011f(r16) #Store Proposition Byte to Formation Screen 0012109c: 9222015e lbu r2,0x015e(r17) #r2 = Graphic? 001210a0: 26040054 addiu r4,r16,0x0054 #r4 = Formation screen pointer + 0x0054 (RH Equipment) 001210a4: a202011e sb r2,0x011e(r16) #Store Graphic? to Formation Screen 001210a8: 96220008 lhu r2,0x0008(r17) #r2 = Birthday/Zodiac 001210ac: 92050126 lbu r5,0x0126(r16) #r5 = Supports 3 001210b0: 304201ff andi r2,r2,0x01ff #Isolate Birthday 001210b4: a6020120 sh r2,0x0120(r16) #Store Birthday to Formation Screen 001210b8: 924200d2 lbu r2,0x00d2(r18) #r2 = Egg data? 001210bc: 30a50002 andi r5,r5,0x0002 #Check for Two Hands support 001210c0: 0c0482bf jal 0x00120afc #Two hands check for equipping weapons 001210c4: a6020122 sh r2,0x0122(r16) #Store Egg data? to Formation Screen 001210c8: a6020040 sh r2,0x0040(r16) #Store Two Hands byte to Formation Screen 001210cc: 8fbf0024 lw r31,0x0024(r29) # 001210d0: 8fb20020 lw r18,0x0020(r29) # 001210d4: 8fb1001c lw r17,0x001c(r29) # 001210d8: 8fb00018 lw r16,0x0018(r29) # 001210dc: 27bd0028 addiu r29,r29,0x0028 # 001210e0: 03e00008 jr r31 # 001210e4: 00000000 nop #