Skip to content

Instantly share code, notes, and snippets.

@beanieaxolotl
Last active June 10, 2024 03:31
Show Gist options
  • Save beanieaxolotl/b433e32c1c80550d74a1cdc7f3cc6c01 to your computer and use it in GitHub Desktop.
Save beanieaxolotl/b433e32c1c80550d74a1cdc7f3cc6c01 to your computer and use it in GitHub Desktop.
GAX .ghx2 project file documentation (WIP)

Shin'en GAX Sound Engine - .ghx2 file format

The .ghx2 file format is typically the original project file, created with the GHX2 editor program. The GAXPlay program is the only program available that can read these files. The documentation is incomplete since there are a ton of unknowns, but I'll post what I have here.

Markdown formatting taken from https://gist.github.com/loveemu/9b3063ffd9a76cb18e379324e43f3251

File header

GHXC chunk

Type Name Comment
ASCII "GHXC" Might stand for "GHX Compressed"
uint32 Uncompressed data size Size of the "LZOD" chunk when uncompressed
uint32 Uncompressed data checksum[?] Actual purpose unknown

LZOD chunk

Uses a currently unknown (likely proprietary) version of Lempel-Ziv-Oberhumer compression.

Type Name Comment
ASCII "LZOD" "Lempel-Ziv-Oberhumer Data"
uint32 Compressed data size Size of the LZOD chunk itself
uint16 Unknown Values I've seen are 0x1900, 0x1500, etc

LZOD chunk data

Extremely heavy WIP. Since the LZOD compression type is unknown, the fields are pure guesswork.

File version

Type Name Comment
ASCII "GHX2", "0153" Maybe for distinguishing between different GHX2 file revisions?

SONG chunk

Header chunk

Type Name
ASCII "SONG"
uint32 Song bank data size(?)

Data chunk (incomplete)

Type Name Comment
Pascal-string Song title
uint32 Number of channels
uint32 Number of steps per pattern
unknown unknown
uint16 Unknown pointer Pointer to somewhere in song data
uint16 Unknown pointer #2 Pointer to somewhere in song data
uint16 Unknown pointer #3
uint32 Master volume (amplification)
uint16 Music mix rate
uint16 FX mix rate
uint8 FX channel count

The rest could very well be pattern data + order list data.

EXP chunk

Type Name Comment
ASCII "EXP" Could mean "Export" or "External Properties"
uint16 Unknown pointer
unknown unknown Seen strings like "Song", and a uint32 pointer
Pascal-string Author's full name

INST chunk

Type Name
ASCII "INST"

Instrument data (incomplete)

Type Name Comment
uint32 Pointer to wave data
unknown unknown
Pascal-string Instrument name Example -> "frenchhorn1 copy (6)"
unknown unknown

WAVE chunk

Type Name
ASCII "WAVE"

TBA

Footer

Type Name Comment
unknown unknown
uint8[5] unknown 0x0000110000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment