Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Toy Commander .GHQ Dreamcast.

Featured Replies

  • Author
  • Localization

Gumbo, posted Sun Oct 05, 2014 4:11 pm (765)


Hi Everyone,

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?

Any help would be fantastic. :D
  • Author
  • Localization

aluigi, posted Sun Oct 05, 2014 4:46 pm (766)


An idea of script can be the following, but the extracted data is not a known file format, it seems just raw data:
Code:
    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
  • Author
  • Localization

Gumbo, posted Sun Oct 05, 2014 5:42 pm (768)


Hi aluigi,

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.

If its OK, i will post a link to the thread.

I'm not sure if that's any help at all?
  • Author
  • Localization

aluigi, posted Sun Oct 05, 2014 6:15 pm (771)


Yes, post the link.
  • Author
  • Localization

aluigi, posted Sun Oct 05, 2014 6:28 pm (773)


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).
  • Author
  • Localization

Gumbo, posted Sun Oct 05, 2014 6:34 pm (775)


Hmmm, If there anyway of finding that out? or is it something that cant be found?
  • Author
  • Localization

aluigi, posted Sun Oct 05, 2014 6:40 pm (776)


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):
Code:
    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"

        savepos TMP
        goto OFFSET
        get SIZE long
        get ZSIZE long
        get TYPE short
        savepos OFFSET
        goto TMP

        if TYPE == 2
            comtype lzss "12 4 2 2 0"
            clog "" OFFSET ZSIZE SIZE
        else
            log "" OFFSET SIZE
        endif

        math OFFSET = NEXT_OFFSET
    endif
next CUR_OFF 4
  • Author
  • Localization

Gumbo, posted Sun Oct 05, 2014 6:52 pm (777)


Thanks for taking the time to run through this :)

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.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.