Difference between revisions of "Before attack: Load SP2"
Jump to navigation
Jump to search
m |
m (Talcall moved page 000771a0 - 00077310 to Before attack: Load SP2) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
000771b4: 8c638d70 lw r3,-0x7290(r3) | 000771b4: 8c638d70 lw r3,-0x7290(r3) | ||
000771b8: 00000000 nop | 000771b8: 00000000 nop | ||
− | 000771bc: 14600039 bne r3,r0,0x000772a4 | + | 000771bc: 14600039 bne r3,r0,0x000772a4 Branch if there is already an address here |
000771c0: 00408021 addu r16,r2,r0 | 000771c0: 00408021 addu r16,r2,r0 | ||
− | 000771c4: 0c011105 jal 0x00044414 [[ | + | 000771c4: 0c011105 jal 0x00044414 [[Calculate Available RAM Address]] |
− | 000771c8: 34048000 ori r4,r0,0x8000 | + | 000771c8: 34048000 ori r4,r0,0x8000 Request 0x8000 bytes of space (11 0x800 sized blocks) |
000771cc: 3c01800a lui r1,0x800a | 000771cc: 3c01800a lui r1,0x800a | ||
− | 000771d0: ac228d70 sw r2,-0x7290(r1) | + | 000771d0: ac228d70 sw r2,-0x7290(r1) Store Ram address of spritesheet graphics? to store? |
000771d4: 02002021 addu r4,r16,r0 | 000771d4: 02002021 addu r4,r16,r0 | ||
− | 000771d8: 0c01ea10 jal 0x0007a840 [[0007a840 - 0007a964]] | + | 000771d8: 0c01ea10 jal 0x0007a840 [[0007a840 - 0007a964]] Calculate SP2 file to load for unit (exception for worker 8 obviously) |
000771dc: 00402821 addu r5,r2,r0 | 000771dc: 00402821 addu r5,r2,r0 | ||
000771e0: 00401821 addu r3,r2,r0 | 000771e0: 00401821 addu r3,r2,r0 | ||
000771e4: 2402ffff addiu r2,r0,0xffff | 000771e4: 2402ffff addiu r2,r0,0xffff | ||
− | 000771e8: 1462000b bne r3,r2,0x00077218 | + | 000771e8: 1462000b bne r3,r2,0x00077218 Branch if loading from SP1, or no LBA pointer for supposed file. |
000771ec: 00000000 nop | 000771ec: 00000000 nop | ||
000771f0: 3c04800a lui r4,0x800a | 000771f0: 3c04800a lui r4,0x800a | ||
− | 000771f4: 8c848d70 lw r4,-0x7290(r4) | + | 000771f4: 8c848d70 lw r4,-0x7290(r4) pointer to stored graphics |
− | 000771f8: 0c011180 jal 0x00044600 [[00044600 - 0004466c]] | + | 000771f8: 0c011180 jal 0x00044600 [[00044600 - 0004466c]] - if could not load file, restore requested RAM. |
000771fc: 00000000 nop | 000771fc: 00000000 nop | ||
00077200: 3c01800a lui r1,0x800a | 00077200: 3c01800a lui r1,0x800a | ||
− | 00077204: ac208d70 sw r0,-0x7290(r1) | + | 00077204: ac208d70 sw r0,-0x7290(r1) set pointer to null |
00077208: 0c01cfbb jal 0x00073eec [[Set damage display type based on ability]] | 00077208: 0c01cfbb jal 0x00073eec [[Set damage display type based on ability]] | ||
0007720c: 00000000 nop | 0007720c: 00000000 nop | ||
00077210: 0801dcb8 j 0x000772e0 | 00077210: 0801dcb8 j 0x000772e0 | ||
00077214: 00000000 nop | 00077214: 00000000 nop | ||
− | 00077218: 14600031 bne r3,r0,0x000772e0 | + | 00077218: 14600031 bne r3,r0,0x000772e0 branch if there was an error calculating the file data? |
0007721c: 00000000 nop | 0007721c: 00000000 nop | ||
00077220: 3c04800a lui r4,0x800a | 00077220: 3c04800a lui r4,0x800a | ||
00077224: 8c848d70 lw r4,-0x7290(r4) | 00077224: 8c848d70 lw r4,-0x7290(r4) | ||
− | 00077228: 0c011180 jal 0x00044600 [[00044600 - 0004466c]] | + | 00077228: 0c011180 jal 0x00044600 [[00044600 - 0004466c]] - restore requested ram space (wasn't used?) |
0007722c: 00000000 nop | 0007722c: 00000000 nop | ||
00077230: 3c01800a lui r1,0x800a | 00077230: 3c01800a lui r1,0x800a | ||
Line 43: | Line 43: | ||
00077240: 27a40010 addiu r4,r29,0x0010 | 00077240: 27a40010 addiu r4,r29,0x0010 | ||
00077244: 3c05800a lui r5,0x800a | 00077244: 3c05800a lui r5,0x800a | ||
− | 00077248: 8ca58d70 lw r5,-0x7290(r5) | + | 00077248: 8ca58d70 lw r5,-0x7290(r5) pointer to jobstts.out? helpmenu.out? |
− | 0007724c: 92020004 lbu r2,0x0004(r16) | + | 0007724c: 92020004 lbu r2,0x0004(r16) load unit Misc. ID |
00077250: 3c01800a lui r1,0x800a | 00077250: 3c01800a lui r1,0x800a | ||
00077254: 00260821 addu r1,r1,r6 | 00077254: 00260821 addu r1,r1,r6 | ||
Line 51: | Line 51: | ||
00077260: 3c01800a lui r1,0x800a | 00077260: 3c01800a lui r1,0x800a | ||
00077264: 00260821 addu r1,r1,r6 | 00077264: 00260821 addu r1,r1,r6 | ||
− | 00077268: ac2277c4 sw r2,0x77c4(r1) Store unit ID with | + | 00077268: ac2277c4 sw r2,0x77c4(r1) Store unit ID with 0x40 flag to VRAM slot 4 |
0007726c: a7a30010 sh r3,0x0010(r29) | 0007726c: a7a30010 sh r3,0x0010(r29) | ||
00077270: 3c01800a lui r1,0x800a | 00077270: 3c01800a lui r1,0x800a | ||
Line 60: | Line 60: | ||
00077284: 34020100 ori r2,r0,0x0100 | 00077284: 34020100 ori r2,r0,0x0100 | ||
00077288: a7a20016 sh r2,0x0016(r29) | 00077288: a7a20016 sh r2,0x0016(r29) | ||
− | 0007728c: 0c00923f jal 0x000248fc [[000248fc - 0002495c]] | + | 0007728c: 0c00923f jal 0x000248fc [[000248fc - 0002495c]] - very complicated, file loading shenanigans maybe? |
00077290: a7a30012 sh r3,0x0012(r29) | 00077290: a7a30012 sh r3,0x0012(r29) | ||
00077294: 0c01cfbb jal 0x00073eec [[Set damage display type based on ability]] | 00077294: 0c01cfbb jal 0x00073eec [[Set damage display type based on ability]] | ||
Line 74: | Line 74: | ||
000772bc: 3c01800a lui r1,0x800a | 000772bc: 3c01800a lui r1,0x800a | ||
000772c0: 00260821 addu r1,r1,r6 | 000772c0: 00260821 addu r1,r1,r6 | ||
− | 000772c4: 8c2277c4 lw r2,0x77c4(r1) load misc unit ID | + | 000772c4: 8c2277c4 lw r2,0x77c4(r1) load misc unit ID from VRAM |
000772c8: 00000000 nop | 000772c8: 00000000 nop | ||
000772cc: 1044ffdc beq r2,r4,0x00077240 loop if 0xff | 000772cc: 1044ffdc beq r2,r4,0x00077240 loop if 0xff | ||
Line 81: | Line 81: | ||
000772d8: 1440fff8 bne r2,r0,0x000772bc | 000772d8: 1440fff8 bne r2,r0,0x000772bc | ||
000772dc: 24c67564 addiu r6,r6,0x7564 | 000772dc: 24c67564 addiu r6,r6,0x7564 | ||
− | 000772e0: 0c01d2eb jal 0x00074bac [[Free Cursor Controller Input]] | + | 000772e0: 0c01d2eb jal 0x00074bac [[Free Cursor Controller Input]] - if all succeeds? |
000772e4: 00000000 nop | 000772e4: 00000000 nop | ||
− | 000772e8: 0c011298 jal 0x00044a60 [[ | + | 000772e8: 0c011298 jal 0x00044a60 [[Find Address for Polygons by Depth]] - depth table pointer (z direction) |
000772ec: 00000000 nop | 000772ec: 00000000 nop | ||
000772f0: 3c058004 lui r5,0x8004 | 000772f0: 3c058004 lui r5,0x8004 |
Latest revision as of 11:39, 3 August 2023
000771a0: 27bdffe0 addiu r29,r29,0xffe0 000771a4: afbf001c sw r31,0x001c(r29) 000771a8: 0c01e875 jal 0x0007a1d4 Get casting unit's misc data 000771ac: afb00018 sw r16,0x0018(r29) 000771b0: 3c03800a lui r3,0x800a 000771b4: 8c638d70 lw r3,-0x7290(r3) 000771b8: 00000000 nop 000771bc: 14600039 bne r3,r0,0x000772a4 Branch if there is already an address here 000771c0: 00408021 addu r16,r2,r0 000771c4: 0c011105 jal 0x00044414 Calculate Available RAM Address 000771c8: 34048000 ori r4,r0,0x8000 Request 0x8000 bytes of space (11 0x800 sized blocks) 000771cc: 3c01800a lui r1,0x800a 000771d0: ac228d70 sw r2,-0x7290(r1) Store Ram address of spritesheet graphics? to store? 000771d4: 02002021 addu r4,r16,r0 000771d8: 0c01ea10 jal 0x0007a840 0007a840 - 0007a964 Calculate SP2 file to load for unit (exception for worker 8 obviously) 000771dc: 00402821 addu r5,r2,r0 000771e0: 00401821 addu r3,r2,r0 000771e4: 2402ffff addiu r2,r0,0xffff 000771e8: 1462000b bne r3,r2,0x00077218 Branch if loading from SP1, or no LBA pointer for supposed file. 000771ec: 00000000 nop 000771f0: 3c04800a lui r4,0x800a 000771f4: 8c848d70 lw r4,-0x7290(r4) pointer to stored graphics 000771f8: 0c011180 jal 0x00044600 00044600 - 0004466c - if could not load file, restore requested RAM. 000771fc: 00000000 nop 00077200: 3c01800a lui r1,0x800a 00077204: ac208d70 sw r0,-0x7290(r1) set pointer to null 00077208: 0c01cfbb jal 0x00073eec Set damage display type based on ability 0007720c: 00000000 nop 00077210: 0801dcb8 j 0x000772e0 00077214: 00000000 nop 00077218: 14600031 bne r3,r0,0x000772e0 branch if there was an error calculating the file data? 0007721c: 00000000 nop 00077220: 3c04800a lui r4,0x800a 00077224: 8c848d70 lw r4,-0x7290(r4) 00077228: 0c011180 jal 0x00044600 00044600 - 0004466c - restore requested ram space (wasn't used?) 0007722c: 00000000 nop 00077230: 3c01800a lui r1,0x800a 00077234: ac208d70 sw r0,-0x7290(r1) 00077238: 0801dcb8 j 0x000772e0 0007723c: 00000000 nop 00077240: 27a40010 addiu r4,r29,0x0010 00077244: 3c05800a lui r5,0x800a 00077248: 8ca58d70 lw r5,-0x7290(r5) pointer to jobstts.out? helpmenu.out? 0007724c: 92020004 lbu r2,0x0004(r16) load unit Misc. ID 00077250: 3c01800a lui r1,0x800a 00077254: 00260821 addu r1,r1,r6 00077258: 942377d0 lhu r3,0x77d0(r1) 0007725c: 34420040 ori r2,r2,0x0040 00077260: 3c01800a lui r1,0x800a 00077264: 00260821 addu r1,r1,r6 00077268: ac2277c4 sw r2,0x77c4(r1) Store unit ID with 0x40 flag to VRAM slot 4 0007726c: a7a30010 sh r3,0x0010(r29) 00077270: 3c01800a lui r1,0x800a 00077274: 00260821 addu r1,r1,r6 00077278: 942377d2 lhu r3,0x77d2(r1) 0007727c: 34020040 ori r2,r0,0x0040 00077280: a7a20014 sh r2,0x0014(r29) 00077284: 34020100 ori r2,r0,0x0100 00077288: a7a20016 sh r2,0x0016(r29) 0007728c: 0c00923f jal 0x000248fc 000248fc - 0002495c - very complicated, file loading shenanigans maybe? 00077290: a7a30012 sh r3,0x0012(r29) 00077294: 0c01cfbb jal 0x00073eec Set damage display type based on ability 00077298: 00000000 nop 0007729c: 0801dcb8 j 0x000772e0 000772a0: 00000000 nop 000772a4: 0c0111b2 jal 0x000446c8 000446c8 - 000446d4 000772a8: 00000000 nop 000772ac: 1440000c bne r2,r0,0x000772e0 000772b0: 00001821 addu r3,r0,r0 000772b4: 340400ff ori r4,r0,0x00ff 000772b8: 00003021 addu r6,r0,r0 r6 = 0 000772bc: 3c01800a lui r1,0x800a 000772c0: 00260821 addu r1,r1,r6 000772c4: 8c2277c4 lw r2,0x77c4(r1) load misc unit ID from VRAM 000772c8: 00000000 nop 000772cc: 1044ffdc beq r2,r4,0x00077240 loop if 0xff 000772d0: 24630001 addiu r3,r3,0x0001 000772d4: 28620002 slti r2,r3,0x0002 000772d8: 1440fff8 bne r2,r0,0x000772bc 000772dc: 24c67564 addiu r6,r6,0x7564 000772e0: 0c01d2eb jal 0x00074bac Free Cursor Controller Input - if all succeeds? 000772e4: 00000000 nop 000772e8: 0c011298 jal 0x00044a60 Find Address for Polygons by Depth - depth table pointer (z direction) 000772ec: 00000000 nop 000772f0: 3c058004 lui r5,0x8004 000772f4: 8ca55944 lw r5,0x5944(r5) 000772f8: 0c04fd48 jal 0x0013f520 Data setting from menu selections 000772fc: 00402021 addu r4,r2,r0 00077300: 8fbf001c lw r31,0x001c(r29) 00077304: 8fb00018 lw r16,0x0018(r29) 00077308: 27bd0020 addiu r29,r29,0x0020 0007730c: 03e00008 jr r31 00077310: 00000000 nop