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

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Commented routine)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
  Parameters: r4 = 0x801aed8c, the table of the offsets of each section
+
  Parameters: r4 = the table of the offsets of each section
 +
  Sometimes 0x801aed8c, sometimes 0x8016ee68
 
   
 
   
 
  000e8660: 00002821 addu r5,r0,r0          # Counter = 0
 
  000e8660: 00002821 addu r5,r0,r0          # Counter = 0
  000e8664: 24860080 addiu r6,r4,0x0080      # r6 = 0x801AEE0C; the beginning of the text data
+
  000e8664: 24860080 addiu r6,r4,0x0080      # r6 = offset table + 0x80; the beginning of the text data
 
  000e8668: 3c03801d lui r3,0x801d
 
  000e8668: 3c03801d lui r3,0x801d
 
  000e866c: 2463d8a4 addiu r3,r3,0xd8a4      # r3 = 0x801CD8A4; the table of section pointers for String Fetching in [[Text Format]]
 
  000e866c: 2463d8a4 addiu r3,r3,0xd8a4      # r3 = 0x801CD8A4; the table of section pointers for String Fetching in [[Text Format]]

Latest revision as of 19:21, 6 May 2025

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

000e8660: 00002821 addu r5,r0,r0           # Counter = 0
000e8664: 24860080 addiu r6,r4,0x0080      # r6 = offset table + 0x80; 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