11 March 2016 - Forum Rules

Main Menu

Help with PSX compression

Started by theflyingzamboni, April 16, 2018, 03:49:47 PM

Previous topic - Next topic


In The Legend of Dragoon, the text for menus, items, weapons, etc. is stored in files with a .OV_ extension, and is compressed somehow. Here's a snippet:

That's the weapon list. It reads, in order:

QuoteBroad Sword Bastard Sword Heat Blade Falchion Mind Crush Fairy Sword Claymore Soul Eater Axe Tomahawk Battle Axe Great Axe Indora's Axe Rapier Shadow Cutter Dancing Dagger Flamberge Gladius Dragon Buster Demon Stiletto Spear Lance Glaive Spear of Terror Partisan Halberd Twister Glaive Short Bow Sparkle Arrow Long Bow Bemusing Arrow Virulent Arrow Detonating Arrow Arrow of Force Mace Morning Star War Hammer Heavy Mace Basher Pretty Hammer Iron Knuckle Beast Fang Diamond Claw Thunder Fist Destroyer Mace Brass Knuckle

I looked it up in the RAM dump. It decompresses to this in-game, with a massive pointer table at the end of each text block that points to absolute positions in RAM:

It's some sort of dictionary compression, I just don't know how it works. For instance, there's a sequence at the end of this text block in RAM that's 0xFFA0000000000100 repeated five times, and that spot in the original file has 0xB5 repeated five times, so 0xB5 is clearly a dictionary key to that particular sequence of bytes. The game includes the I guess standard English dictionary table sequence of 0x00-0x7F, as well, so I know that's the start of the dictionary.

Does anyone know what type of compression this is and how I can decompress it?
ROM wasn't hacked in a day.