Jump to content

[GBA FE] Decoding Text


lushen124
 Share

Recommended Posts

I know this is a solved problem via FEditor Adv, but how does one decode text from the ROM and make it readable? Presumably there is a table that's just pointers to text in the game somewhere, but I heard the text is encoded/compressed. How do I decompress/decode this into something readable? Maybe there's documentation archived somewhere about this?

For context, I'm trying to add a feature to the randomizer that does changelog and will eventually need it to support fine-grained control on characters/class randomization (and hopefully have it support randomizing hacks properly).

Link to comment
Share on other sites

It's Huffman compressed. There's a Java file in the FEditor source that decompresses it straight from the ROM and there's plenty of decompressors online if you make a binary file out of the compressed data

Link to comment
Share on other sites

  • 2 weeks later...

So I have it mostly working. I was able to decode text properly for FE7 and FE8. I tried it on TLP and it also pulled names out properly, so it seems like uncompressed data should work.

However...

I loaded up FE6 with the localization patch found here and I got back what seems like incorrectly encoded text (like UTF-16 surrogate pairs encoded as UTF-8)

3xxARIp.png

Is there something I'm missing? I'm looking at the hex, and the pointers there are marked as uncompressed (i.e. bitmasked with 0x80000000 or xx xx xx 88) so FEditor seems to just read from them directly, byte-for-byte, until it reaches a null 00 terminator, which is good, but then when I jump to the actual address, it doesn't look like ASCII/UTF-8.

EDIT: Wait, I see what's going on, though I'd like an explanation. FE6 has codes to replace [0x82][0x??] with real characters. I can implement this, but I'm just curious why.

Edited by lushen124
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...