News: 11 March 2016 - Forum Rules

Author Topic: Phantasy Star IV - Figuring out tables / compression  (Read 2723 times)


  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • Phantasy Star Generation 4 + "Found in Fanslation" Podcast
Phantasy Star IV - Figuring out tables / compression
« on: September 06, 2018, 12:14:59 pm »
Hi all,

I've been using basic methods to decipher tables for PSIV, but there must be something else going on than DTE.

Like I've confirmed that F4 can = er but elsewhere in the same line F4 obviously means something different.

Please check out this NPC line: "Did you see the quicksand?  It's spreading and spreading!  How long is this town going to last?"

In this sentence it seemed maybe there's code to say "this word 'spreading' will repeat", but this is my first project and I'm not sure how to proceed, even after doing a lot of crosschecking.

At minimum I want to fix a few translation errors, at max rework the script.

I'm def willing to learn and experiment on my own, but just knowing what this means and what resources I can use to solve text tables would be helpful. I'm using an 2 existing tables but most of the script is like the example above.

Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast


  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: Phantasy Star IV - Figuring out tables / compression
« Reply #1 on: September 07, 2018, 05:14:54 pm »
At first glance, I'd be tempted to guess that the text is compressed using some variety of LZ77 - all of the text that shows up garbled is contained earlier in the string, e.g. the "e " from "the " shows up earlier in "see ", "and" shows up earlier in "quicksand", " spreading" shows up earlier in " spreading", "ng " also shows up earlier in "spreading ", etc.

I'm not really familiar with Genesis hacking, but I see there are some translations out there, so you could try (nicely!) asking some of those people for advice directly. If all else fails, you should be able to use a debugging emulator, set a read breakpoint on that text, play the game until it tries to display that text, and then trace through the game's code to find out exactly what it's doing (it looks like there's also a disassembly that might be helpful). This will probably be a lot of work if you also have to learn about the Genesis hardware, ASM, and the debugger's features before you can get started, but the good news is that those skills are all highly transferable to other Genesis games and still pretty relevant for other systems too.


  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Terminus Traductions
Re: Phantasy Star IV - Figuring out tables / compression
« Reply #2 on: September 08, 2018, 04:06:14 pm »
According to Segaretro this game uses the Kosinski compression.


  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
    • mteam
Re: Phantasy Star IV - Figuring out tables / compression
« Reply #3 on: September 10, 2018, 03:30:14 pm »
Phantasy Star IV indeed uses the Kosinski compression for the dialogue and there are some tools for both compressing and decompressing available. Other things like graphics use the Nemesis compression.

There is also a modified disassembly of the game, which does away with the dialogue compression, if you're willing to go that route.