Im looking for some help with Toy Commanders .GHQ files. I have done the QuickBMS Scan and although there was no conclusive results, i had 2 results that look promising, both using different algorithms. SCPACK and LZFU_RAW.
Im not really sure where to go from here, I have attached 2 different GHQ files, maybe there are some similarities i cannot see?
get OFFSET long xmath MIN_OFF "OFFSET - 6" for CUR_OFF = 0 < MIN_OFF get NEXT_OFFSET long if NEXT_OFFSET != 0 xmath SIZE "NEXT_OFFSET - OFFSET" log "" OFFSET SIZE math OFFSET = NEXT_OFFSET endif next CUR_OFF + 4
Thanks for the quick reply, I see what you mean about the file contents, as far as I'm aware, they should be PVR textures, but i imagine there would be other files inside too. There is a thread on assemblergames.com that mentions LZSS, memory address (0x8C04C930 & 0x8C04C928) along with the picture attached.
So the only missing thing is the compression algorithm, I tried to use my scanner but got nothing interesting. The format of each file is simple, SIZE, ZSIZE and a 16bit value equal to 2 (probably the compression type).
In that thread they say to have found the decompression function so it's just a matter of understanding what it does.
To be honest LZSS gives a result that is not so bad, in fact there are some 32bit integers in the output but I don't think it's the correct PVR you need. If you want to try, the following is a script that extract and uncompress the files (the previous script + lzss unpack):
Ive just extracted a couple of different GHQ files with that script and ive noticed a couple of things, It always finds 9 files (coincidence or issue?), and all of the dat files extracted from the GHQ files have a PVRT header in them, but as you predicted, its not the correct ones, they are all just a garbled mess.