Difference between revisions of "Prepare pointers for Text Format String Fetching"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 000e8660: 00002821 addu r5,r0,r0 000e8664: 24860080 addiu r6,r4,0x0080 000e8668: 3c03801d lui r3,0x801d 000e866c: 2463d8a4 addiu r3,r3,0xd8a4 ...")
 
(Commented routine)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 +
Parameters: r4 = 0x801aed8c, the table of the offsets of each section
 
   
 
   
  000e8660: 00002821 addu r5,r0,r0
+
  000e8660: 00002821 addu r5,r0,r0           # Counter = 0
  000e8664: 24860080 addiu r6,r4,0x0080
+
  000e8664: 24860080 addiu r6,r4,0x0080     # r6 = 0x801AEE0C; the beginning of the text data
 
  000e8668: 3c03801d lui r3,0x801d
 
  000e8668: 3c03801d lui r3,0x801d
  000e866c: 2463d8a4 addiu r3,r3,0xd8a4
+
  000e866c: 2463d8a4 addiu r3,r3,0xd8a4     # r3 = 0x801CD8A4; the table of section pointers for String Fetching in [[Text Format]]
  000e8670: 8c820000 lw r2,0x0000(r4)
+
  000e8670: 8c820000 lw r2,0x0000(r4)       # r2 = current section offset
  000e8674: 24840004 addiu r4,r4,0x0004
+
  000e8674: 24840004 addiu r4,r4,0x0004     # r4 + 4 = next entry for section offsets
  000e8678: 24a50001 addiu r5,r5,0x0001
+
  000e8678: 24a50001 addiu r5,r5,0x0001     # Counter ++
  000e867c: 00c21021 addu r2,r6,r2
+
  000e867c: 00c21021 addu r2,r6,r2           # r2 = Section pointer table + current section offset
  000e8680: ac620000 sw r2,0x0000(r3)
+
  000e8680: ac620000 sw r2,0x0000(r3)       # Save pointer to this section's offset
  000e8684: 28a20020 slti r2,r5,0x0020
+
  000e8684: 28a20020 slti r2,r5,0x0020       # Check if all 0x20 entries have been set
  000e8688: 1440fff9 bne r2,r0,0x000e8670
+
  000e8688: 1440fff9 bne r2,r0,0x000e8670   # Loop back if not
  000e868c: 24630004 addiu r3,r3,0x0004
+
  000e868c: 24630004 addiu r3,r3,0x0004     # r3 + 4 = next entry for section pointers
 
  000e8690: 03e00008 jr r31
 
  000e8690: 03e00008 jr r31
 
  000e8694: 00000000 nop
 
  000e8694: 00000000 nop
 
</font>
 
</font>

Revision as of 19:12, 6 May 2025

Parameters: r4 = 0x801aed8c, the table of the offsets of each section

000e8660: 00002821 addu r5,r0,r0           # Counter = 0
000e8664: 24860080 addiu r6,r4,0x0080      # r6 = 0x801AEE0C; the beginning of the text data
000e8668: 3c03801d lui r3,0x801d
000e866c: 2463d8a4 addiu r3,r3,0xd8a4      # r3 = 0x801CD8A4; the table of section pointers for String Fetching in Text Format
000e8670: 8c820000 lw r2,0x0000(r4)        # r2 = current section offset
000e8674: 24840004 addiu r4,r4,0x0004      # r4 + 4 = next entry for section offsets
000e8678: 24a50001 addiu r5,r5,0x0001      # Counter ++
000e867c: 00c21021 addu r2,r6,r2           # r2 = Section pointer table + current section offset
000e8680: ac620000 sw r2,0x0000(r3)        # Save pointer to this section's offset
000e8684: 28a20020 slti r2,r5,0x0020       # Check if all 0x20 entries have been set
000e8688: 1440fff9 bne r2,r0,0x000e8670    # Loop back if not
000e868c: 24630004 addiu r3,r3,0x0004      # r3 + 4 = next entry for section pointers
000e8690: 03e00008 jr r31
000e8694: 00000000 nop