MOGG File Format
Revision as of 05:25, 6 June 2022 by InvoxiPlayGames (talk | contribs) (Add basic information about encryption)
MOGG files are often used in Harmonix games for all platforms except for PS2 and DS. They are an extension of the OGG Vorbis container with an extra header prepending it, and almost all official MOGGs starting with Rock Band shipped on-disk and as DLC are encrypted.
The version value in the MOGG header is used to indicate which encryption key and format should be used for decryption.
Structure
MOGG Header
Name | Type | Size | Function |
---|---|---|---|
Version | Integer (LE) | 4 bytes | Version of the MOGG file. Related to encryption (10 / 0xA = unencrypted) |
Header Size | Integer (LE) | 4 bytes | Length of the MOGG header / offset in the file where the OGG begins. |
Map Version | Integer (LE) | 4 bytes | Version of the MOGG map. (usually 16 / 0x10) |
Buffer Size | Integer (LE) | 4 bytes | Usually 20000 / 0x4E20. (TODO: what purpose?) |
Entry Count | Integer (LE) | 4 bytes | The number of entries in the MOGG header. |
Entries | #MOGG Entry Array | sizeof(MOGG Entry) * Entry Count | Presumably a table to help the game stream the OGG file from disk. |
AES Key | Byte Array | 16 bytes | An AES key used to encrypt the file. Only present if MOGG version is >= 11 / 0xB. |
MOGG Entry
TODO: is this correct?
Entry | Type | Size | Function |
---|---|---|---|
Byte Offset | Integer (LE) | 4 bytes | Offset into the file that the entry starts. |
Sample | Integer (LE) | 4 bytes | The sample in the OGG stream that corresponds to the byte offset. |
OGG File
Past this point is a regular OGG Vorbis format file containing multiple tracks. The tracks corresponding to instruments are defined in the songs.dta file.
Encryption
Generation | Info | Games |
---|---|---|
10 / 0xA | Unencrypted. Lacks key in MOGG header. | Used in Guitar Hero 2 |
11 / 0xB | 128-bit AES EBC encryption with a static key. Uses key in MOGG header as IV. | Used in Rock Band on-disc songs |
Tools
Several tools are available for working with MOGG files (creation/extraction, encryption, etc)
- Onyx Music Game Toolkit
- Magma
- ArkTool
- C3 CON Tools
- Audacity (supports reading smaller unencrypted MOGG files directly)