Page 1 of 1

GameCube QB.PRG

Posted: Mon Jun 20, 2016 12:24 pm
by Catarax

I would like to compile/decompile a qb.prg from the gamecube version of THPS4.
Is there some tools for this format?


Re: GameCube QB.PRG

Posted: Mon Jun 20, 2016 1:50 pm
by %.gone.
should just be a pre file
if you upload one i'll look at it and tell you if it's the same structure or not.
The third letter of the extension typically indicates the language.

Re: GameCube QB.PRG

Posted: Mon Jun 20, 2016 6:56 pm
by Catarax
here's a sample : Download, thanks

Re: GameCube QB.PRG

Posted: Tue Jun 21, 2016 5:04 am
by %.gone.
It's a pre2 version, meaning each items header doesn't contain the checksum of the items name like pre3/pre4 files do.
The issue with these files is they're in big endian form and none of the tools out support big endian files.
If you're unfamiliar with the structure.
pre file header
4 byte uint file size
4 byte uint version
4 byte uint item count

pre item
4 byte uint uncompressed size
4 byte uint compressed size
4 byte uint file name length
if pre3 or pre4 - 4 byte file name checksum
string file name, usually padded %4 some games pad with random bytes and not just null
file data if compressed uses lzss compression