Final Fantasy Tactics Translation Project

String Pointers

So far, I have not found any string pointers on the Final Fantasy Tactics CD. However, I have found string pointers in the PlayStation's RAM by searching through a save state. The pointers are 32-bit little-endian absolute memory addresses. Memory addresses typically look like this: 0x80xxyyzz, so the pointer looks like this: zz yy xx 80. PSXAddress is useful for converting between ePSXe save state addresses and PlayStation RAM addresses if you're going to be working with these pointers.

The pointers I found point to whole blocks of strings, not just individual strings. This fact and some snooping I did with PCSXTrace lead me to conclude that when the game wants a particular string for a line of dialog or the name of an item, it follows this pointer to the beginning of the text block and then counts strings (by looking for 0xFE or 0xFF, which are string terminators) until it finds the one it needs.

This all brings up some interesting questions:

  1. The pointers are not stored on the CD, so how do they get into the RAM? Obviously, the information must be on the CD in some form. Most likely, there is some index of locations of string blocks relative to the beginnings of the files the blocks are contained in, and these positions are translated into memory locations when then blocks are loaded into RAM.
  2. There must also be an index that says, "If I want this particular line of dialog, I need to look for the Xth string in text block Y." Where is this?