God of Thunder Music Format

From ModdingWiki
Jump to: navigation, search
God of Thunder Music Format
Format typeMusic
Notation typeOPL
InstrumentsOPL
Max channel count9 or 11
Max track count1
Tags?Unknown
GamesGod of Thunder
God of Thunder stores its music in this format. It is a raw Adlib format, containing the exact register and data pairs to send to the OPL chip.

Contents

File format

The file begins with a header of unknown purpose.

Data type Description
UINT16LE header Always 0x0001

This is then immediately followed by a variable number of three byte chunks.

Data type Description
BYTE delay Number of ticks to wait *after* the data has been sent
BYTE reg OPL register to write to
BYTE val Value to write

The very last chunk has all values set to zero, plus a final 0x00 byte.

Timing

Each song is played at a different tempo (i.e. each delay tick lasts a different length of time) however it is not currently known how to obtain the correct tempo for a given song.

Known song lengths (based on Teppic's PCM recordings of in-game Adlib playback) are:

Song Length Notes
menu(?) 1:15,759 two versions of this song?
song01 1:41,457
song02 2:07,676
song03 1:07,647
song04 0:59,884
song21 1:19,258
song22 1:27,120
song23 0:34,845
song24 1:06,350
song25 1:39,959
song31 0:55,890
song32 0:58,659
 ??? 1:19,821 Story song - slow version of song33
song33 1:13,730 in-game version of the story song
song34 1:11,795
song35 1:19,315
song36 0:47,887
winsong 0:32,918
bosssong 0:26,169

Utilities

The following utilities work with this file format.

Utility/Description Play Convert to Create from
Wombat No IMF (incorrect tempo) None
GromPE's GoT unpacker No IMF (incorrect tempo) None

Credits

This file format was reverse engineered by Malvineous. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)

Personal tools
programming