Promizer v4.0 format Created by MC68000 (Frank Hlsmann) (1994) Analysed by Asle / ReDoX (asle@mygale.org) Source: - Two PM40 sent by Gryzor (Thx !). Note: Very similar to the version 2.0 of the same named packer. I noticed five main modifications ... . First, there's no more this replay code routine at the beginning :). Second, the finetune is no more *2. Third, the sample number is no more *4 in the packed notes. fourth, the releative note number is no more *2 (in the packed notes too). and last, the note 00-00h (empty note) is no more saved in the reference table. There's also these 4 empty bytes before the sample data which have been removed ... . Offset size (byte) Comment ------ ----------- ------- 0 4 "PM40" Id. 4 3 ?!? ($00-00-00) 7 1 size of the pattern list 8 256 128 word pattern table. (100h) it 'seems' to be * 200h .. but then, what are all those $98 in PM40.Numb_Movement ?!?!?. I guess it's not very important if you handle this list like Gryzor did ... generate an entirely new pattern list starting at 0. *************************************** * the following is repeated 31 times * * with 8 bytes description for 1 smp * ****************************************************** * 264 (108h) 2 Sample Size / 2 * 266 (10Ah) 1 Finetune (0 -> F) * 267 (10Bh) 1 Volume (0 - 40h) * 268 (10Ch) 2 Loop Start / 2 * 270 (10Eh) 2 Loop Size / 2 * * ****************************************************** 512 4 Address of sample data (add 4) (200h) (I call it ADD#1) 516 4 Address of the reference table (add 8) (204h) (I call it ADD#2) 520 ? pattern data. Each pattern is 512 bytes long. Though, (208h) that's the theory because some patterns may NOT be that long. In fact, you'll have to check if the note isn't a PATTERN BREAK command or a PATTERN JUMP. If so, the pattern ends and another begins ... therefore, its size is less than the 512 'standard bytes'. Now, whatever the pattern size is, its meaning does not vary :). In fact, those data are some values which refer to a "reference table" (description is right below). RMQ: first value is 00h. it is an empty note which is NOT saved in the reference table ! ADD#2 ? the "reference table" which contains the standard PTK pattern data. Its size is easy to calculate since it consists of blocks of 4 bytes, knowing that there are 'n' blocks ('n' is the highest value in the pattern data). * Here's a quick description of these four bytes 0000-0000 0000-0000 0000-0000 0000-0000 |||| | | | |||| | | | | ||| \ / \ / |||| \/ \ / |||sample relative ||/ effect effect ||| note nbr |/ value \\\ / ---- unused -------- relative note number (PTK): 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 becomes (PM40): C-1 to B-1 : 01,02,03,04,05,06,07,08,09,0a,0b,0c C-2 to B-2 : 0d,0e,0f,10,11,12,13,14,15,16,17,18 C-3 to B-3 : 19,1a,1b,1c,1d,1e,1f,20,21,22,23,24 ADD#1 ? Sample datas. Stored like Protracker ... .