AC1D packer format Created by Slammer / Anarchy (19??) Analysed by Asle / ReDoX (asle@mygale.org) (NOTE: This is the "dump" version, not the memory rip. There are some few) (differences ... first, the ID string is the other way around ($D1CA), next,) (all the addresses are useless because they point in the memory ... ) Source : - "In The Kitchen" demo by Anarchy Offset size (byte) Comment ------ ----------- ------- 0 1 Number of pattern to play 1 1 Probably the "Noisetracker" byte (7Fh) 2 2 $AC1D ID string 4 4 Address of the sample data *************************************** * the following is repeated 31 times * * with 8 bytes description for 1 smp * ****************************************************** * 8 2 Sample Size / 2 * Ah 1 Finetune (0 -> F) * Bh 1 Volume (0 - 40h) * Ch 2 Loop Start / 2 * Eh 2 Loop Size / 2 * * ****************************************************** 256 512 Pattern addresses table (100h) (200h) 768 128 Pattern order table (300h) (80h) 896 ? Pattern data (380h) we get something like pattern 0 : all the 64 row of voice 0 all the 64 row of voice 1 all the 64 row of voice 2 all the 64 row of voice 3 pattern 1 : ... Each pattern begins with 3 dword. Each is the number of byte to add to find the voice 1, 2 and 3. (Voice 0 starts always at 0). the size of each pattern is variable. It can be up to 300h bytes. One note can be 1 or 3 bytes long, or even 0 bytes :). The first bit of the first byte is a description bit. If it is set to 1, it means there wont be any note during the next (first_byte - $80): * case 1: val / \ 1000 0000 | if this bit is set, follows 'val' empty in the voice. * case 2: 0000 0000 0000 0000 ||\ / \ / \ / / | note Smp2 || |Smp || | bin(0111) | Description bit set to 0. As far as I can tell, it seems Fx Command 7 is not supported by this packer, and, therefore, is used here for another purpose. First, about the 'Smp', it is the sample value (max $1f). Next, the 'bin' value is, in this case, set to 7, meaning there's no effect command, nor effect value. At least, the Note. It seems it is the "standard" relative note number as found in many other packers, save that it supports one more octave. When converting back to Ptk, just remove $C to this value ... and check below the correspondance table. * case 3: if first bit is set to 0, follows the description Sample number / /\ | | | 0000 0000 0000 0000 0000 0000 | | | | | | | -| \ / \/ \ / | relative effect effect | note (!$7) value | number |------------description bit set to 0 As in case 2 , with the effect command != 7. The only difference with previous case is the adding of an effect value. Note: if the Note value is $3F, it means there no note !. On another hand, if Note value is $00, it means the note is C-1 ($358 under Ptk). 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 : (AC1D) C-1 to B-1 : 00,0d,0e,0f,10,11,12,13,14,15,16,17 C-2 to B-2 : 18,19,1a,1b,1c,1d,1e,1f,20,21,22,23 C-3 to B-3 : 24,25,26,27,28,29,2a,2b,2c,2d,2e,2f Follows Sample datas stored like ProTracker. Nothing is packed..