QSF Format
This is a variant of the
PSF Format, using a version byte of 0x41, for Capcom QSound sequenced music.
Contents
Program section: Tagged image containing Z80/sample ROMs and decryption key
Reserved section: Not used. May be ignored, removed, etc.
File Extensions
- qsf (self-contained image)
- miniqsf (image relying on extra library data)
- qsflib (library for use with miniqsf files)
Description
The program section of a QSF file, once decompressed, contains a series of data blocks of the form:
3 bytes - ASCII section name tag
4 bytes - Starting offset (LSB-first)
4 bytes - Length (N) (LSB-first)
N bytes - Data
The data is then loaded to the given starting offset in the section described by the ASCII tag.
The following sections are defined:
- "KEY" - Kabuki decryption key. This section should be 11 bytes and contain the following:
- 4 bytes - swap_key1 (MSB-first)
- 4 bytes - swap_key2 (MSB-first)
- 2 bytes - addr_key (MSB-first)
- 1 bytes - xor_key
- "Z80" - Z80 program ROM.
- "SMP" - QSound sample ROM.
If the KEY section isn't given or both swap_keys are zero, then it is assumed that no encryption is used.
The Z80 program ROM must play the desired song on its own without receiving any commands via shared RAM. (Generally a few minor edits to the interrupt handler are sufficient for this.)
No predefined limit is given on the Z80 or SMP sections, but KEY must not exceed 11 bytes.
MiniQSF follows the same loading behavior as
MiniPSF.
CategoryPSF