home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 25 / GNOME_DEMO.iso / amiga / music / dbooster.lzx / DigiBooster / Sources / DIGI-FORM.TXT
Text File  |  1997-02-18  |  6KB  |  118 lines

  1. ----------------------------------------------------------------------------
  2.  
  3.          Digi Booster 1.x - module format
  4.              ----------------
  5.  
  6. There  is  one  DB  format,  but  the old is a little bit different (but is
  7. compatible with the new one). Here you have describtion:
  8. ([1] - data stored as one byte)
  9. ([2] - data stored as two bytes - word)
  10. ([4] - data stored as four bytes - long word)
  11.  
  12. offset |bytes| contents   | meaning
  13. -------+-----+------------+-------------------------------------------------
  14. 000000 |   4 | "DIGI"     | char Magic[4]
  15.        |     |            | If you support different music file types
  16.        |     |            | check these letters.
  17. -------+-----+------------+-------------------------------------------------
  18. 000004 |  16 | some texts | Not very important[16]
  19. -------+-----+------------+-------------------------------------------------
  20.        |     |            | There is a version of Digi Booster which
  21. 000020 |   4 | "V1.x"     | made this file [4] - stored as ASCI
  22.        |     |            |
  23. -------+-----+------------+-------------------------------------------------
  24. 000024 |   1 |            | Once again version of DB but stored as hex[1]
  25.        |     |            | (protection against lamers).
  26.        |     |            | eg. $14 means version 1.4.
  27.        |     |            |
  28. 000025 |   1 |    (8)     | Number of channels used in module (always 8) [1]
  29.        |     |            |
  30. 000026 |   1 |            | Pack pointer [1]
  31.        |     |            | If 'Pack pointer' is zero, the pattern data
  32.        |     |            | isn't crunched.
  33.        |     |            | 1 means that is crunched
  34.        |     |            | 
  35. 000027 |  19 |            | Reserved[19]
  36. -------+-----+------------+-------------------------------------------------
  37.        |     |            | PatNum[1]
  38. 000046 |  1  |            | It specifies the number of different 
  39.        |     |            | patterns this module has.
  40. -------+-----+------------+-------------------------------------------------
  41.        |     |            | OrdNum[1]
  42. 000047 |  1  |            | It specifies the number of different 
  43.        |     |            | orders (in editor POSITIONS) this module has.
  44. -------+-----+------------+------------------------------------------------- 
  45. 000048 | 128 |            | Orders[1]
  46.        |     |            | Here you have stored numbers of patterns which
  47.        |     |            | the player will play
  48. -------+-----+------------+-------------------------------------------------
  49. 000176 | 124 |            | SamLens[4]
  50.        |     |            | Here you have a sample lenghts
  51.        |     |            | Number of samples in module is 31.
  52. -------+-----+------------+-------------------------------------------------
  53. 000300 | 124 |            | SamReps[4]
  54.        |     |            | Here you have a sample repeat starts
  55. -------+-----+------------+-------------------------------------------------
  56. 000424 | 124 |            | SamRepLens[4]
  57.        |     |            | Here you have a sample repeat lenghts
  58. -------+-----+------------+-------------------------------------------------
  59. 000548 | 31  |            | SamVols[1]
  60.        |     |            | Sample volumes.
  61. -------+-----+------------+-------------------------------------------------
  62. 000579 | 31  |            | SamFins[1]
  63.        |     |            | Sample finetunes.
  64.        |     |            | The old format (versions 1.0-1.3) hasn't play
  65.        |     |            | finetunes but has store it in module.
  66.        |     |            | So. if version of mod. is 1.0-1.3 you have
  67.        |     |            | to clear finetunes otherwise the new player
  68.        |     |            | will play samples with stored finetunes.
  69.        |     |            | (the voice will be out of order)
  70. -------+-----+------------+-------------------------------------------------
  71. 000610 | 32  |            | Song name ended with 0 [32]
  72. -------+-----+------------+-------------------------------------------------
  73. 000642 | 930 |            | Sample names [30]
  74.        |     |            | Each sample name has 30 bytes ended with 0
  75.        |     |            | You have 31 samples in module.
  76. -------+-----+------------+-------------------------------------------------
  77. 001572 | ... |            | Patterns.
  78.        |     |            | 
  79.        |     |            | 
  80.        |     |            | 
  81.        |     |            | Patterns can be packed and not packed 
  82.        |     |            | Each not packed pattern takes 2048 bytes
  83.        |     |            | So lenght of this hunk (all patterns) you can
  84.        |     |            | calculate such like this: PatNum*2048 (easy?)
  85.        |     |            | 
  86.        |     |            | If the patterns are packed...
  87.        |     |            | Each packed pattern at beginning has stored
  88.        |     |            | its length[2]
  89.        |     |            | Address of next pattern you can calculate in
  90.        |     |            | this way:
  91.        |     |            | - take a length of last packed pattern
  92.        |     |            | - and add (2)
  93.        |     |            | How to depack pattern read below
  94. -------+-----+------------+-------------------------------------------------
  95.  ....  | ... |            | Samples stored as signed 8bit RAW
  96. -------+-----+------------+-------------------------------------------------
  97.  
  98.  
  99. Packed pattern format:
  100.  
  101. offset |bytes| contents   | meaning
  102. -------+-----+------------+-------------------------------------------------
  103. 000000 |   2 |            | Length of packed pattern[2]
  104. -------+-----+------------+-------------------------------------------------
  105. 000002 |  64 |            | Pack table (stored as bits)
  106.        |     |            | If bit is set you have to take a four bytes
  107.        |     |            | (long word) from packed datas
  108.        |     |            | IF bit is clean you have to clear four bytes.
  109.        |     |            | That's all... (very easy?)
  110. -------+-----+------------+-------------------------------------------------
  111. 000066 | ... |            | Packed datas
  112. -------+-----+------------+-------------------------------------------------
  113.  
  114. - Each depacked pattern has 64 positions, 8 tracks.
  115. - Depacked pattern has following structure:
  116.  
  117. CHN1ADAT, CHN1BDAT, CHN2ADAT, CHN2BDAT,CHN3ADAT, CHN3BDAT, CHN4ADAT, CHN4BDAT
  118.