Difference between revisions of "YMX"
From Sega Retro
m (7 revisions: because of a red link) |
(Updated YMX format) |
||
Line 4: | Line 4: | ||
===Specifications=== | ===Specifications=== | ||
− | The official specifications for the YMX format have been released by [[saxman]] | + | The official specifications for the YMX format have been released by [[saxman]]. |
− | ==== | + | <pre>=================================== |
− | + | YMX revision 1 format specification | |
− | + | Created by Damian Grove | |
− | + | 08/03/2011 | |
− | + | =================================== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The original YMX format is sufficient for most uses, but I wanted to update | |
− | 2 - | + | the format to make it a little more versatile and add support for the GEMS FM |
− | + | voice format so the YMX format could be extended to non-SMPS games. The new | |
− | + | group feature will allow you to categorize your voices, so if you have voices | |
− | + | from multiple levels or games, or if you want to group together all the types | |
− | 6 - | + | of instruments (e.g. woodwind, brass, etc.), you can do that. You can also |
− | 7 - | + | have up to 65535 voices now, a vast improvement over the 128 limit from the |
− | + | original specification. | |
− | + | ||
− | 10 - | + | All word and dword values described in this specification are little-endian. |
− | + | Any implementation of this revision should also support the original format. | |
− | + | SMPS voices are in the Sonic 2 format and are 25 bytes in length. GEMS PSG | |
− | + | voices are not supported. Only the FM-based GEMS voices are supported, and | |
− | + | they are 39 bytes in length. All strings are in ASCII format. Voice and group | |
− | + | names should use 0x20 for empty characters. Strings do not use any special | |
− | + | terminating characters. | |
− | + | ||
− | + | ||
− | + | ||
− | + | Below is the structure of a YMX revision 1 file: | |
− | + | ||
− | + | ||
− | + | HEADER: | |
− | + | string[6] "YM2612" | |
− | 25 | + | byte revision (0x01) |
− | + | word number of voices (up to 65535 voices) | |
+ | byte number of groups (up to 255 groups) | ||
+ | dword pointer to voice pointers | ||
+ | dword pointer to group list | ||
+ | bits[8] (76543210) | ||
+ | 0 -- Voice format (0=SMPS[S2], 1=GEMS) | ||
+ | 1-7 -- RESERVED | ||
+ | byte length of description | ||
+ | string[0-255] bank description | ||
+ | |||
+ | |||
+ | FOR EACH VOICE: | ||
+ | dword pointer to voice | ||
+ | |||
+ | |||
+ | FOR EACH VOICE: | ||
+ | byte group (0=none) | ||
+ | byte[25-39] voice data | ||
+ | string[10] voice name | ||
+ | byte length of description | ||
+ | string[0-255] voice description | ||
+ | |||
+ | |||
+ | FOR EACH GROUP: | ||
+ | string[10] group name | ||
+ | |||
+ | |||
+ | |||
+ | Below is the original YMX format: | ||
+ | |||
+ | |||
+ | HEADER: | ||
+ | string[6] "YM2612" | ||
+ | byte revision (0x00) | ||
+ | byte number of voices (0=0xFF, 1=0x00, 2=0x01; up to 128=0x7F) | ||
+ | |||
+ | FOR EACH VOICE: | ||
+ | byte[25] voice data (SMPS Sonic 2 format) | ||
+ | string[10] voice name | ||
+ | </pre>It should be noted that the voices are stored in the format used by ''[[Sonic 2]]'', so some [[:Image:VoiceOperators.png|byte swaps]] are needed to use those voices in the other Sonic games that use [[SMPS]].[[Category:Data Formats]][[Category:Music]] |
Revision as of 23:47, 2 August 2011
YMX is a voice bank format which contains a collection of YM2612 voices, invented by saxman for use in his Sonic QX program. It has since been implemented in other music-related hacking programs, such as Sonic One Music Editor, xm3smps, and xm4smps. Support for it is also being considered for the ProSonic game engine.
Its name is a combination of letters from "YM2612" and "DX", the latter referring to Yamaha's line of FM synthesizers from the '80s.
Specifications
The official specifications for the YMX format have been released by saxman.
=================================== YMX revision 1 format specification Created by Damian Grove 08/03/2011 =================================== The original YMX format is sufficient for most uses, but I wanted to update the format to make it a little more versatile and add support for the GEMS FM voice format so the YMX format could be extended to non-SMPS games. The new group feature will allow you to categorize your voices, so if you have voices from multiple levels or games, or if you want to group together all the types of instruments (e.g. woodwind, brass, etc.), you can do that. You can also have up to 65535 voices now, a vast improvement over the 128 limit from the original specification. All word and dword values described in this specification are little-endian. Any implementation of this revision should also support the original format. SMPS voices are in the Sonic 2 format and are 25 bytes in length. GEMS PSG voices are not supported. Only the FM-based GEMS voices are supported, and they are 39 bytes in length. All strings are in ASCII format. Voice and group names should use 0x20 for empty characters. Strings do not use any special terminating characters. Below is the structure of a YMX revision 1 file: HEADER: string[6] "YM2612" byte revision (0x01) word number of voices (up to 65535 voices) byte number of groups (up to 255 groups) dword pointer to voice pointers dword pointer to group list bits[8] (76543210) 0 -- Voice format (0=SMPS[S2], 1=GEMS) 1-7 -- RESERVED byte length of description string[0-255] bank description FOR EACH VOICE: dword pointer to voice FOR EACH VOICE: byte group (0=none) byte[25-39] voice data string[10] voice name byte length of description string[0-255] voice description FOR EACH GROUP: string[10] group name Below is the original YMX format: HEADER: string[6] "YM2612" byte revision (0x00) byte number of voices (0=0xFF, 1=0x00, 2=0x01; up to 128=0x7F) FOR EACH VOICE: byte[25] voice data (SMPS Sonic 2 format) string[10] voice name
It should be noted that the voices are stored in the format used by Sonic 2, so some byte swaps are needed to use those voices in the other Sonic games that use SMPS.