Tracker Packer v1 format Created by Crazy Crack / MEXX Analysed by Asle / ReDoX (asle@mygale.org) Source : - One TP1 file sent by Gryzor (thx !) Offset size (byte) Comment ------ ----------- ------- 0 4 ID "MEXX" 4 4 size of the module 8 20 (14h) title 28 4 address of the sample data (in the file !) (1Ch) *************************************** * the following is repeated 31 times * * with 8 bytes description for 1 smp * ****************************************************** * 32 1 Finetune (0 -> F) * (20h) * 33 1 Volume (0 - 40h) * (21h) * 34 2 Sample Size / 2 * (22h) * 36 2 Loop Start / 2 * (24h) * 38 2 Loop Size / 2 * (26h) * * ****************************************************** 280 1 ?!? ($00) (118h) 281 1 size of the pattern list (119h) 282 512 pattern addresses (+10000h !) (11Ah) (200h) 794 ? pattern data (31Ah) we get something like pattern 0 : row 0 | voice 1 | voice 2 | voice 3 | voice 4 | row 1 | voice 1 | voice 2 | voice 3 | voice 4 | row 2 ... row 63| voice 1 | voice 2 | voice 3 | voice 4 | pattern 1 : ... the size of each pattern is variable and is between 100h and 300h bytes. One voice can be 1,2 or 3 bytes long. it depends if bit 7 of first byte is set to 1. If so, you have to check if the bit 6 is also set to 1 or not. If it is set to 1, then it's an empty row. If not, then, there's only an effect and its value. 1100-0000 || if these bits are set, nothing follows and this is an empty note. it meens for PTK four bytes set to 00h. -description bit set to 0 / | 1000-0000 0000-0000 | | | | | | \ / \ / | effect effect value \ -description bit set to 1 if first bit is set to 0, follows the description 0000-0000 0000-0000 0000-0000 || | | | | | | / \ / \ / \/ \ / | relative sample effect effect | note number value | number |------------description bit set to 0 Note: the first bit of 'relative note number' and the last of 'sample number' are the same but can only be used by the sample number because the note value is even ... thus, its first bit is never used. relative note number: (ProTracker) 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 : (TP1) 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..