Super Packer 1.0
Super Packer v1.0 (C) 1993 BeWe-Soft
- By Jiri Bernasek
- File cruncher/depacker
- DOS file
SUPER PACKER V 1.0
——————
(SUPERPCK.COM)By BEWESOFT (Jiri Bernasek)
INTRODUCTION
Finally is there a packer from BEWESOFT! SUPER PACKER 1.0 can pack almost every DOS files, and it can be also used as a linker or simple file-format editor.
I’ll not say that my packer is great or fantastic there – you’ll not believe… But I can present serious facts and numbers:
I compared my packer with the best of another packers which I have – Magnus’s Cruncher 5.0. Another packers (FPACK, PLINK) are more user-friendly, but they give bad results (because they are using RLE method only).
I packed 10 programs (5 demos, 4 games, and one “serious” program: ATMAS II macroassembler) randomly selected from my disk-box with both the packers, and there are results:
– With SUPER PACKER 1.0 I was working exactly as described in “SIMPLE WAY” part of this manual. Every packed programs worked well.– In Magnus’s Cruncher 5.0 I used the most common Offset 4. I must make changes in 4 programs before packing (Inits in the file…), and the Cruncher wasn’t able to load two of the programs at all (because of effects in VBI while loading). This Cruncher isn’t very easy to use.
And now numbers: The difference in length of packed files was in range -5%…+15% (So both the packers are good).
Difference in packing time (including loading, saving etc.) was between -15%…+25% (So Magnus’s Cruncher is faster a little bit; but with “Length tests” OFF the SUPER PACKER 1.0 will get more speed).
Difference in depacking time (including loading) was between -50%…+10% (So in this point SUPER PACKER 1.0 is better).
Another differences: SUPER PACKER 1.0 is more user-friendly, and it can pack “serious” programs too. (The depacker from Magnus’s Cruncher is destroying DOS, so it’s good only for demos and games…) My packer is working with almost any DOS (I tested it with SpartaDOS and DOS 2.5), while Magnus’s Cruncher is a Boot-disk.
SUPER PACKER 1.0 is not as colorful, as other packers (it looks quite unprofessional), but it still displays colors to the screen a little bit. That’s because without of color-effects the computer seems to be locked-up while depacking.SIMPLE WAY
How to pack a working program with this packer (the simplest way)…
– Start the packer, and oad the program for packing. In the left part of your screen you’ll see the structure of the program-file.
– Set adress of Depacker and its Buffer if necessary (use – Packer setup). Mostly the default adress (Depacker at $500, and Bu
ffer in screen-memory at $BD00) will be OK, so if you are not a programmer – don’t worry about this, probably it’ll work.
In general: Depacker and Buffer area must be different, and it must be between $400-$6FF or cca.$2000-$BFFF ($C00-$BFFF for a Micro-DOS). Of course this area can’t be used by the packed program – see structure of the file.
If you haven’t any place for Buffer – disable Huffman packing. In this case the Buffer will not be used, so you needn’t to worry about its adress.– Try to [P]ack every “Data” segments, and then [S]ave the final file.
– Test if the packed program works. If is it simply locking up, then it’s probably necessary to change Depacker adress.
COMMANDS
The list of possible commands is in the upper-right corner of your screen. In the left part of the screen you’ll see structure of the program-file in memory. Use arrows to move the cursor in this “file-map”, and press a letter key to execute a command.
What you can see in the “file-map”:Data XXXX-YYYY *1
Packed XXXX-YYYY>ZZZZ *2
INIT XXXX *3
RUN XXXX *4
Copy XXXX-YYYY->ZZZZ *5
End *6*1 is a simple data-segment. *2 is a packed segment; the number after “>” is the length of packed data. *3 and *4 are the INIT and
RUN adresses, and *5 is the COPY function (explanation later). *6 is the end of file.The commands:
[D]isk Directory – Enter drive number and search spec. (or press RETURN for D1:*.*), and you’ll see disk directory…
[L]oad DOS file – With this function you’ll load the program for packing. It’ll load a file, and insert its contents at the cursor-position.
When you’ll load a file made by this packer, you’ll get the same structure including packed segments, COPY functions, and Depacker/Buffer adresses, as before saving the file.[F]- Load data-file – This allows you to link data-files (Pictures, texts etc.) into your program. After loading the file you’ll be asked for its target adress, and it’ll become as a new segment in the file-structure.
[S]ave – This will save the final file (including depacker if there are some packed data).
[P]ack segment – The main function of the packer. It’ll try to pack the segment at cursor-position. You’ll see only a single line on your screen while packing (because of speed). Press HELP to turn the main screen on/off if you want.
See “Packing method” part of this manual for more info.[E]rase segment – This will delete the segment at cursor-position.
[R],[I] – Add RUN, INIT – This allows you to add RUN or INIT adress to your program.
[C] – Insert COPY – With this function you can insert a little copy-routine into the program-file. For example: You want to load a segment at $E000-$E0FF (Under ROM-OS). Because it’s impossible to load it directly, you need to load it into “normal” memory, and then copy it under ROM-OS. So, change the adress of your segment for example to $8000-$80FF, and then add “Copy $8000-$80FF->$E000” after this segment – the packer will make the copy-routine for you. Note that this routine (less than $40 bytes long) will be placed at “Buffer” adress!
The copy-process is going from begin to end of the memory-block to copy.[A] – Change adress – You can edit loading adress of any segment, RUN or INIT adress, or parameters of COPY.
– Packer setup – After pressing the key “M”, you can enter some parameters for the packer:
– you can edit Depacker adress (Adress, where the depacker will be while loading the packed program)
– you can edit Buffer adress (Adress of buffer for depacking with Huffman method, and for COPY routine)
– you can disable some of the three packing methods (Type “Y”, “N”, or RETURN)
– you can also disable length tests (see “Packing method”).– Clear ALL!, and
[Q]uit to DOS – Clear enough, I think…PACKING METHOD
This packer is using three packing methods: Run Length Encoding, Lempel Ziv 1977 (size of data-window is 1kB), and Static Huffman. So, it’s working in 3-pass process.
If you know which methods should be used for your data (for example if you have packed your data many times before while testing your program), you can disable “Length tests” in setup, and set the correct method(s) there. The packing-time will be shorter then – 50% or even less!
But don’t think that you can pack everything with “Length tests” OFF! If the length of packed data will be greater than source length after any packing-method, you’ll see the message “Can’t pack this”, and your segment will disappear! (So you need to load the file again!) – With “Length tests” ON the packing-time is long, but this danger is not there.While packing, the slowest method is Lempel Ziv. So, if you want to pack a file quickly, turn the Lempel Ziv method OFF in setup. But you’ll not get the best results of course!
The free memory is only cca. 31kB, but you can pack your programs in this way: Load a segment (or data-file), pack it, then load
another one, etc…
Or you can append packed files with several parts of your program. If you’ve selected the same Depacker and Buffer adresses while saving separate files, you can delete the segment with depacker from every parts of your program excepting the first one.
You can do this with another programs (games etc.) too – you only need to divide them into several small files first…WHEN THE PROGRAM DOESN’T WORK…
Sometimes it can happen, that the packed program doesn’t work. It can lock up with the Depacker at a wrong adress (so try to change this adress!), or you can see a nice “color-chaos” on your screen. This colorful effect means that the depacker is not able to depack a segment. (It’s using checksum to detect errors in the packing / depacking process.) What to do now? The simplest way is to leave such a file non-packed, but it’s not a very good idea.
So, how to get the best possible results in this case? First you need to know in which segment the problem is. So, pack the file segment by segment, and try if the program still works. (Load, Pack one segment, Save, Try to start the program, Load, Pack another segment etc…)
Then try which packing method caused the problem – pack the segment again and again with different packing methods disabled, till the program works.
And finally pack the file again, but disable the wrong method before packing the problematic segment. (Then enable it again.)———————————–
You can make as many copies of this packer as you want, and give them to your friends etc. But don’t make any changes in the program!
———————————–
Well, enjoy the SUPER PACKER 1.0 ! I hope that you will like it…
Jiri Bernasek (BEWESOFT)
Prague, 93-11-14
Bootable disk (ATR / 7-Zip): Super Packer 1.0
People’s Thoughts