PhaPacker format (also called ProPacker V1.0 by NoiseConverter & Exotic Ripper) (also called HanniPacker and/or StrangePlayer) Created by Azatoth / Phenomena Analysed by Asle / ReDoX (asle@mygale.org) Source : - "In The Kitchen" demo by Anarchy - "Deja Vu" demo by Anarchy Offset size (byte) Comment ------ ----------- ------- *************************************** * the following is repeated 31 times * * with 14 bytes description for 1 smp * ****************************************************** * 0 2 Sample Size / 2 * 2 1 ?? * 3 1 Volume (0 - 40h) * 4 2 Loop Start / 2 * 6 2 Loop Size / 2 * 8 4 address of this sample * 12 ($C) 1 finetune - $b (?seems ok?) * 13 ($D) 1 ?? * * ****************************************************** 434 ($1B2) 14 ?!?!?!? Couldn't understand nothing out of these bytes. Though, it's fairly safe to say that there might be the number of pattern in pattern list ... . It's possible to convert without this info, but it's VERY hard !. 448 ($1C0) 512 ($200) pattern list (128 dword) it's a table of pointers which points at the adresses of the pattern data in the "PhaPacked" file. So, the pattern 0 will be the one starting right after the smp data. Beware of the unused patterns when converting !. 960 ($3C0) ?? sample data stored the same way as Protracker. ?? ?? pattern data Stored like protracker .. meaning: row 01: voice 1 | voice 2 | voice 3 | voice 4 row 02: voice 1 | voice 2 | voice 3 | voice 4 ... each voice is 4 bytes (ot two bytes .. see below). Two cases depending of first byte: 0000-0000 0000-0000 \ / \ / $ff value If the first byte is $ff, then the following byte is the number of times the previous value in THIS row will be re-used. Well, in fact, it's ($ff-value) number of times !. example : 01-02-0A-0A 00-00-0F-06 02-00-00-37 FF-F5 1st four bytes : Sample #1, Note #1, Fx Vol Slide, FxArg $0A. 2nd four bytes : no sample, no note, Fx Set Speed, FxArg $06. 3rd four bytes : sample #2, no note, no Fx or arpeggio, FxArg $37. 4th block : $ff meaning previous block (02-00-00-37) will be repeated FF-F5=0A times IN THE VOICE #3 !!!. 0000-0000 0000-0000 0000-0000 0000-0000 ||\ / \ / | | \ / \ / ||sample relative \/ Fx Fx Arg ||number note unused || number || description bits, both set to 0 in this case. 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 : (Pha Packer) C-1 to B-1 : 02,04,06,08,0a,0c,0e,10,13,15,17,19 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