TEXT   21
Amusic supports two kinds of modules
Guest on 8th February 2023 02:53:06 AM


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

Raw Paste

Login or Register to edit or fork this paste. It's free.