Guitar Hero: On Tour - Modern Hits (.qgm chart files)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Lordmau5
Posts: 11
Joined: Wed Jan 31, 2018 4:57 am

Guitar Hero: On Tour - Modern Hits (.qgm chart files)

Post by Lordmau5 »

So there has been a bit of work on trying to get Guitar Hero: On Tour custom songs to work back in... 2008-ish?
Sadly none of the people that worked on that stuff back then is around anymore, so yeah...

Anyway - there are .qgm files in the Nintendo DS archives that correspond to what notes are supposed to be shown and played.
In the very first game, Guitar Hero: On Tour, those were unencrypted.
However, recompiling that NDS ROM is pretty difficult, let alone impossible from what I saw due to how the extractors worked.

What is interesting however is that in Modern Hits, the 2nd game in the series, the files are way more easily accessible.

However... they seem to be encrypted with LZ77...

I've attached an archive with 2 files - one that doesn't have any encryption (RockTheNight_no-encryption.qgm) and one that does have encryption on it (Adrenaline_encryption.qgm).

The QGM file structure is as follows:

Code: Select all

QGM File Structure
- - - - - - - - - - - - -
4 bytes - Offset of gem/note (in milliseconds)
2 bytes - Length of gem/note sustain (in milliseconds)
2 bytes - Information about gem/note (color, if it is a star note, etc)
    It's been awhile since I looked into it last so this will need updating


As for the LZ77 file (encrypted .qgm), this is what one of the people back then figured out:

Code: Select all

LZ77 Compressed Files
- - - - - - - - - - - - - - - -
5 bytes - Magic Number (always 4C 08 00 00 45)
3 bytes - Size of compressed file
1 byte - Type of LZ77 (always 0x10)
3 bytes - Size of original decompressed file
X bytes - The data


If there'd be a way to convert back and forth between this encrypted .qgm format that's all that's needed - the actual note adjustments and such I can easily make with other scripts.



~ Best regards
Lordmau5

// EDIT: Every occurence of "encryption" is probably to be replaced with "compression"; My bad.