PMD 3 (P.acked-M.oD.ule) pattern packer by The Sirius Cybernetics Corporation [web]
PMD3-Infotext *=------------- As I want to release it finally (it seems to be 100% Bug-Free) I think it is important to write some lines about the packer and the format. So that maybe someone else than me will use it.... I. What is it? *=------------- PMD3 is my (Dynacore/TSCC) own little patterncompressed moduleformat, which allows to depack the module in realtime while playing without (nearly) any loss of CPU-time. PMD3.PRG for 4-Channel mods and PMD3_V8.PRG for 8-Channel mods (Sorry that both are quite slow, but it's pure GfA-Basic code...) II. What means PMD3? *=------------- This one is called PMD3 (P.acked-M.oD.ule, Version 3), because this is the third change in the DEPACKER-Code. The idea of a patterncompressor came from BLADE/Newcore, who did such a thing for own purposes and released it together with the Octalyser. I heard of it and began to code my own: The first patternpacker was written for DYNABUSTERS+ to save the rare memory. It was a simple run-lenght packer and so the compressionrates were quite bad (around 80% of the orginal patternsize). But then I had another idea, which allows a packrate of around 30%. Well, this packer then was the used patternpacker for DYNABUSTERS+. As Scy registered for Octalyser, I finally had the possibility to compare Blades packer with mine. Dissapointing for me: Blades one was better... So I thought about another method, or how to improve my algorithms. Well, I created a sequencelist, that saves any doubles -> And that really helped a lot!! So here is PMD3! And it beats Blades packer is all cases I compared them!!! III. The Format *=------------- File-Description for Module-Patterncompressor v3.0 Offsets |Lenght | Meaning ----------+---------+-------------------------------------------------- 0 | 1080 |= Orginal ProTracker-Header ----------+---------+-------------------------------------------------- 1080 | 4 | ID: 'PMD3' - 4 Channels | | 'PMd3' - 8 Channels | | 'pMD3' - 4 Channels / Delta-Samples | | 'pMd3' - 8 Channels / Delta-Samples ----------+---------+-------------------------------------------------- 1084 | 4 | Control-Len 1088 | 4 | Data-Len ----------+---------+-------------------------------------------------- 1092 |p*trcks*8| For every pattern: | | For all tracks: Control-Offs .l (C-Offs) | | Data-Offs .l (D-Offs) ----------+---------+-------------------------------------------------- How you can find the other needed addresses: 1092+p*tracks*8 --> Control-Bytes (C-Adr) 1092+p*tracks*8+Control-Len --> Data-Longs (D-Adr) 1092+p*tracks*8+Control-Len+Data-Len --> Samples ----------+---------+-------------------------------------------------- (C-Adr)+(C-Offs) --> Address of the Control-Bytes-Start for Track (D-Adr)+(D-Offs) --> Address of the Data-Longs-Start for Track ----------+---------+-------------------------------------------------- How the data is encoded: The Controlbytes are coded that way: 76543210 ||||||++--- Runlenght ++++++----- Data-Offset Mask out the upper six Bits and you get how often you have to repeat the Data-Long (like for DBRA, that means: 0=One time, 3=Four times!) To get the Data-Long just mask out the lower two Bits and add that value to the Data-Long-Startadr of the Track you want to depack. Track is finished when 64 Longs are depacked. A depacked pattern is absolutely identical to a normal pattern, so you don't have to rewrite your player completely if you really want to use my compressed format. IV. The Sampleprepacker (PMD3_SPP.PRG) *=------------- Well, this prepacker just creates Deltasamples using a logharitmic table, so that the sample will sound a bit different. You can enter how many different delta-values will be used to create deltasamples. The deltas are stored as bytes. That's why it becomes just a kind of prepacker, 'coz the size of a PMD3-Module doesn't get smaller by simply using the PMD3_SPP.PRG Just if you use a 'REAL' packer afterwards you can see how the samples can be packed better than without it. Here's a little algorithm to show how the deltasample can be converted to eight bit samples again: moveq #0,D0 delta_to_8bit: add.b (a0),d0 ;a0 points to samplestart move.b d0,(a0)+ subq.l #1,d1 ;d1 is the samplelenght bgt.s delta_to_8bit V. Address *=------------- DYNACORE ANDREAS JOHN SCHULZENSTR.36 76771 HRDT GERMANY MAUSNET: Andreas John@KA E-MAIL: andreas_john@ka.maus.de CALL .tSCc. WHQ: NIGHTBOX: +49 (0) 8974995006 (mail to TSCC)
[ back to the prod ]