Noise Packer v3 format Created by Twins / Phenomena (1991) Analysed by Asle / ReDoX (asle@mygale.org) Source: - four NP3 packed files sent by Gryzor ! (thx) - own MODs converted with the packer (sent by Gryzor !) - tons of intros/demos/musicdisks ... Note: Lotsa similarities with NP2 ... . Some reorder in the sample headers and the repacking of the notes. Heh, a track is no more always 192 bytes long ... it can even be only 1 byte !. Offset size (byte) Comment ------ ----------- ------- 0 2 Number of sample + $C. 2 2 Size of pattern list (/2 to get real size) 4 2 ?!? 6 2 track data size *************************************** * the following is repeated NOS times * * with 16 bytes description for 1 smp * ****************************************************** * 8 1 ? Finetune (0 -> F) * 9 1 Volume (0 - 40h) * 10 (0Ah) 4 ?!? * (looks like it's always) * (four 00h ...) * 14 (Eh) 2 Sample Size / 2 * 16 (10h) 4 ??? * (looks like it's always) * (four 00h ...) * 20 (14h) 2 Loop Size / 2 * 22 (16h) 2 Loop Start / 2 * * ****************************************************** ? 2 Size of pattern list (again !?) ? 2 ?!? ? ? Pattern list (words) (*8) ? ? Track list per pattern. 2 bytes for one track address and then, 8 bytes for one pattern. Since the track datas begin right after, you have to add TDA (track data address). This TDA is the number of bytes you'll have read AFTER this list. You can calculate it if you want ... that way: 8 + (NumberOfSample*16) + 4 + (PatternListSize*2) Note: Beware because this list is reversed !. Meaning that one pattern first contains the address of its track 4, then of track 3 ... . TDA ? Track datas. Each track is saved after another and the maximum size 192 (C0h) bytes long. * Each track consists of 64 notes, 1 or 3 bytes each. * Follows the description of one note : case 1: - description bit set to 0 / / sample number | / \ | | | 0000 0000 0000 0000 0000 0000 | | | | | | \ / \/ \ / relative effect effect note nbr parameter case 2: - description bit set to 1 / | 0000 0000 | | \ / number of empty row (substract this value to 80h !) NOTE : First bit of 'relative note number' and lst of 'sample number' are the same bit ... but a note number is *2, so this bit is never used by the note number. NOTE : The Arpeggio effect is remapped to the effect number #8. The Volume slide effect is remapped to the effect number #7 BUT with signed value !! (7FE -> A01). Now, don't forget to place correctly the slide up ... so when converting just donc forget to <<4 ! (704 -> A40) The Vibrato + Volume slide effect (6) is signed !. So, same as volume slide : 6FA -> 606 and 604 -> 640 The portamento + Volume slide effect (5) is signed !. So, same as volume slide : 5FA -> 506 and 504 -> 540 The set filter command (E0) is changed (EFF -> E01) The pattern jump 'seems' to be *2 and starts at FC !. So jump to pattern 0 is BFC, to pattern 1 BFE, to pattern 2 B00 etc. ... . Protracker note period table C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453 C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226 C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113 Noisepacker v3 relative note numbers C-1 to B-1 : 02,04,06,08,0a,0c,0e,10,12,14,16,18 C-2 to B-2 : 1a,1c,1e,20,22,24,26,28,2a,2c,2e,30 C-3 to B-3 : 32,34,36,38,3a,3c,3e,40,42,44,46,48 Follows Sample datas stored like Protracker. Nothing is packed.. Note: The sample data start address is ALWAYS even !. That means that you have to bypass one byte if the current address is not even !!.