- Amusic supports two kinds of modules. The packed module and the normal
- module format. The normal format is easier to code but modules are bigger
- in size (often 10 times bigger!!!).
- Adlib-MOD-Format: (c)23.8.1995 - 20:10:30 by Conqueror :)
- -----------------
- hex - dec - function
- 000h 0 name of song + nullbyte
- 018h 24 name of autor + nullbyte
- 030h 48 [...] 26 instruments (26*34 byte)
- 3A4h 932 songlen
- 3A5h 933 number of patterns-1
- 3A6h 934 patterntable (128 Byte)
- 426h 1062 id: "<oïQUîRoR"
- 42Fh 1071 version 10h=normal module
- 11h=packed module
- if the module isn't packed:
- 430h 1072 all patterns (count*9*3*64 Bytes)
- END!!!
- if the module is packed:
- 430h 1072 table with Trax (ptncount*9*2)
- - A pattern is divided into 9 tracks. Here comes a table that contains a
- number (offset) for each track saved in the file.
- This is because many tracks in the song can be identical copies of only
- one track saved in the file.
- xxxx xxxx number of trax (WORD)
- xxxx+2 xxxx+2 [...] traxdatas
- END!!!
- A track is written in the following manner: First comes a word that
- contains the position of the track in song. (pattern*9+tracknr)
- Then follows the events. One event takes 3 bytes. But empty events
- takes only 1 byte! You can distinguish real events from empty events
- with the most significant bit of the first saved byte of the event.
- If the bit is zero than you have a real event. But if the bit isn't
- zero than you have to create some empty events in your current track.
- To get the number of empty events just read the lower 7 bits of the byt
Raw Paste