King's Bounty Music Format
Jump to navigation
Jump to search
King's Bounty Music Format
Format type | Music |
---|---|
Notation type | Custom |
Instruments | PC Speaker |
Max channel count | 1 |
Max track count | 1 |
Max pattern count | 1 |
Max order count | 0 |
Tags? | None |
Games |
King's Bounty stores its PC speaker music in the EXE file.
- Note: The 1990 version of the EXE is compressed, offsets listed here are taken after uncompressing it with unexecomp and unexepack.
Offset 1990 | Offset 1995 | Data Type | Description |
---|---|---|---|
0x18997 | 0x18B5D | BYTE str[] | Tunes (2 bytes per note, 0xFF marks end) |
0x189D1 | 0x18B97 | UINT16LE freq[] | Note palette (frequencies) |
0x18A81 | 0x18C47 | UINT16LE delay[] | Duration palette |
0x18AA1 | 0x18C67 | UINT16LE offsets[10] | Offsets into tunes (add 0x15690 or 0x15850) |
For example, in 95 version, tune #0's offset (at 0x18C67) is 0x330D, which leads us to 0x18B5D (0x15850+0x330D). There, we see:
0x28 0x07 0xFF
Which are: index into note palette, index into duration palette, end marker. In default palettes, note 0x28 is 65 hz, and duration 0x07 is a 15 ms delay.