Jazz 2 Music Format
The J2B format is just a container for the custom format of the Galaxy Sound System, RIFF AMFF or RIFF AM.
The file header is 24 bytes long:
|UINT32LE||format subtype||0xDEADBEAF (RIFF AM) or 0xDEADBABE (RIFF AMFF); indicates the file content, but is pretty useless (you should not rely on this at all!)|
|UINT32LE||size||Size of the complete file|
|UINT32LE||checksum||Checksum of the data block (before decompression)|
|UINT32LE||compressed size||Length of the data block before decompression (should be file size - 24 bytes)|
|UINT32LE||uncompressed size||Length of the data block after decompression|
|char||music data||This is the actual music file in either RIFF AMFF or RIFF AM format; It's compressed using standard zlib compression. Simply use zlib's "uncompress" macro to read this.|
The uncompressed data body contains a module in either RIFF AMFF or RIFF AM format. Both formats are rather similar, but RIFF AM follows the RIFF conventions more strictly. RIFF AMFF was only used in early versions of Jazz Jackrabbit 2, which explains why RIFF AM is generally the more advanced format of the two. RIFF AMFF is internally very close to the XM format, with a few additions to support some S3M / IT commands.
The following tools are able to work with files in this format.
|Name||Platform||Play?||Create new?||Modify?||Convert/export to other?||Import from other?||Access hidden data?||Edit metadata?||Notes|
|mod2j2b||Windows||No||Yes||No||No||MOD, XM, S3M, IT, MTM, 669||No||No||Some formats are converted rather poorly (e.g. MTM, 669). There are two different mod2j2b executables for AM and AMFF files.|