lushen124 Posted September 20, 2015 Share Posted September 20, 2015 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). Quote Link to comment Share on other sites More sharing options...
Brendor Posted September 20, 2015 Share Posted September 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
lushen124 Posted September 20, 2015 Author Share Posted September 20, 2015 Oh, I didn't realize FEditor came with the code. Thanks, I'll look in there. Quote Link to comment Share on other sites More sharing options...
lushen124 Posted September 30, 2015 Author Share Posted September 30, 2015 (edited) 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) 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 September 30, 2015 by lushen124 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.