Open WORLD spritesheets and move to frame buffer

From Final Fantasy Hacktics Wiki
Revision as of 07:23, 28 June 2024 by Talcall (talk | contribs)
Jump to navigation Jump to search

001061e0: 3c028004 lui r2,0x8004
001061e4: 904273a8 lbu r2,0x73a8(r2)
001061e8: 27bdffe0 addiu r29,r29,0xffe0
001061ec: afb20018 sw r18,0x0018(r29)
001061f0: 00809021 addu r18,r4,r0
001061f4: afbf001c sw r31,0x001c(r29)
001061f8: afb10014 sw r17,0x0014(r29)
001061fc: 1440001c bne r2,r0,0x00106270
00106200: afb00010 sw r16,0x0010(r29)
00106204: 34041899 ori r4,r0,0x1899               ITEM.BIN LBA
00106208: 3c028004 lui r2,0x8004
0010620c: 24424990 addiu r2,r2,0x4990             
00106210: 3c01801d lui r1,0x801d
00106214: ac22d78c sw r2,-0x2874(r1)
00106218: 0c0400e1 jal 0x00100384
0010621c: 34058800 ori r5,r0,0x8800               ITEM.BIN filesize (or close enough to.)
00106220: 00408021 addu r16,r2,r0
00106224: 3c048017 lui r4,0x8017
00106228: 2484ed64 addiu r4,r4,0xed64
0010622c: 0c00923f jal 0x000248fc                 SYS LoadImage < move spritesheet to frame buffer
00106230: 02002821 addu r5,r16,r0
00106234: 3c048017 lui r4,0x8017
00106238: 2484ed8c addiu r4,r4,0xed8c
0010623c: 34058000 ori r5,r0,0x8000
00106240: 0c00923f jal 0x000248fc                 SYS LoadImage < move palette data to frame buffer
00106244: 02052821 addu r5,r16,r5
00106248: 0c0091b5 jal 0x000246d4                 SYS DrawSync
0010624c: 00002021 addu r4,r0,r0                  wait for drawing
00106250: 0c011273 jal 0x000449cc                 C52 Free but with extra steps
00106254: 02002021 addu r4,r16,r0
00106258: 3c028004 lui r2,0x8004
0010625c: 904273a8 lbu r2,0x73a8(r2)
00106260: 00000000 nop
00106264: 24420001 addiu r2,r2,0x0001
00106268: 3c018004 lui r1,0x8004
0010626c: a02273a8 sb r2,0x73a8(r1)
00106270: 3c048017 lui r4,0x8017
00106274: 2484ed84 addiu r4,r4,0xed84
00106278: 3c058019 lui r5,0x8019
0010627c: 24a59cac addiu r5,r5,0x9cac
00106280: 0c00923f jal 0x000248fc                 SYS LoadImage
00106284: 00000000 nop
00106288: 0c0091b5 jal 0x000246d4                 SYS DrawSync
0010628c: 00002021 addu r4,r0,r0
00106290: 34040e68 ori r4,r0,0x0e68               FRAME.BIN
00106294: 3c118004 lui r17,0x8004
00106298: 26314990 addiu r17,r17,0x4990
0010629c: 3c01801d lui r1,0x801d
001062a0: ac31d78c sw r17,-0x2874(r1)
001062a4: 0c0400e1 jal 0x00100384
001062a8: 34059800 ori r5,r0,0x9800               FRAME.BIN filesize
001062ac: 00408021 addu r16,r2,r0
001062b0: 3c048017 lui r4,0x8017
001062b4: 2484ed54 addiu r4,r4,0xed54
001062b8: 0c00923f jal 0x000248fc                 SYS LoadImage < move sheet to frame buffer
001062bc: 26051000 addiu r5,r16,0x1000
001062c0: 3c048017 lui r4,0x8017
001062c4: 2484ed44 addiu r4,r4,0xed44
001062c8: 34059000 ori r5,r0,0x9000
001062cc: 0c00923f jal 0x000248fc                 SYS LoadImage < move palette data to frame buffer
001062d0: 02052821 addu r5,r16,r5
001062d4: 3c048017 lui r4,0x8017
001062d8: 2484ed4c addiu r4,r4,0xed4c
001062dc: 34059200 ori r5,r0,0x9200
001062e0: 0c00923f jal 0x000248fc                 SYS LoadImage < move the *rest* of the palette data to the frame buffer. frame.bin is wonky.
001062e4: 02052821 addu r5,r16,r5
001062e8: 3c04801d lui r4,0x801d
001062ec: 8c84d830 lw r4,-0x27d0(r4)
001062f0: 0c03c148 jal 0x000f0520
001062f4: 24841000 addiu r4,r4,0x1000
001062f8: 0c0091b5 jal 0x000246d4                 SYS DrawSync
001062fc: 00002021 addu r4,r0,r0
00106300: 0c011273 jal 0x000449cc                 C52 Free but with extra steps
00106304: 02002021 addu r4,r16,r0
00106308: 12400013 beq r18,r0,0x00106358
0010630c: 3404166b ori r4,r0,0x166b               UNIT.BIN LBA
00106310: 3c01801d lui r1,0x801d
00106314: ac31d78c sw r17,-0x2874(r1)
00106318: 0c0400e1 jal 0x00100384
0010631c: 3c050001 lui r5,0x0001                  UNIT.BIN filesize
00106320: 00408021 addu r16,r2,r0
00106324: 3c048017 lui r4,0x8017
00106328: 2484ed94 addiu r4,r4,0xed94
0010632c: 0c00923f jal 0x000248fc                 SYS LoadImage < move sheet to frame buffer
00106330: 02002821 addu r5,r16,r0
00106334: 3c048017 lui r4,0x8017
00106338: 2484ed9c addiu r4,r4,0xed9c
0010633c: 34058000 ori r5,r0,0x8000
00106340: 0c00923f jal 0x000248fc                 SYS LoadImage < move palette data to frame buffer
00106344: 02052821 addu r5,r16,r5
00106348: 0c0091b5 jal 0x000246d4                 SYS DrawSync
0010634c: 00002021 addu r4,r0,r0
00106350: 0c011273 jal 0x000449cc                 C52 Free but with extra steps
00106354: 02002021 addu r4,r16,r0
00106358: 8fbf001c lw r31,0x001c(r29)
0010635c: 8fb20018 lw r18,0x0018(r29)
00106360: 8fb10014 lw r17,0x0014(r29)
00106364: 8fb00010 lw r16,0x0010(r29)
00106368: 27bd0020 addiu r29,r29,0x0020
0010636c: 03e00008 jr r31
00106370: 00000000 nop