

                          F R E S H   T H R A S H

                                    of

                              C E R B E R U S

                           is proud to present:

                       /---------------------------\
                      <   C R U N C H - M A N I A   >
                       \---------------------------/
                                   V1.4
Release-Date:                    29.09.91

----------------------------
----«««<< Contents >>»»»----
----------------------------
I.	Introduction
I.1	Copyright
I.2	Recommended Hardware

II.	General Information
II.1	Outward Appearance
II.2	Numbers Input/Output
II.3	Command-Line Options
II.4	Menu Options
II.5	Other Information

III.	Packing in the Address-Mode
III.1	Loading
III.2	Crunching
III.3	Saving
III.3.1	Data-Files
III.3.2	Normal Decruncher
III.3.3	Professional Decruncher

IV.	Packing in the Link-Mode
IV.1	Loading
IV.2	Crunching
IV.3	Saving

V.	Packing in the Reloc-Mode
V.1	Loading
V.2	Packing
V.3	Saving
V.3.1	Simple Decruncher
V.3.2	Normal Decruncher

VI.	Trivialities

VII.	History

*************************************************

I.	Introduction
=====================

I.1	Copyright
------------------
This Proggy is (still) Public-Domain. It may (should) be spread, as long as
the following is observed:

	- No fee may be charged for this Program.

	- This Doc-File and the Data-Decrucher Source has always to be
	  spread with the Executable.

	- In professional Productions (e.g. Games) the Use of this Cruncher
	  has to be mentioned noticeable.

I.2	Recommended Hardware
-----------------------------
For packing small Files 512KB may suffice but The full Power of this Program
can only be obtained with at least 1MB Memory resulting from a 300KB
Speed-Table in the Lightspeed-Mode. Two Drives are comfortable but not
necessary.


II.	General Information
============================

II.1	Outward Appearance
---------------------------
The Program opens a Screen or a Window and uses the Intuition-Library for
full multitasking Compatiblity. It is self-detaching so you do not need to
call it with "run". You can either run it from CLI or from the Workbench
whereby you have to dran an Icon first.
The Program is controlled by Gadgets and Menus. On the right Side there is
an Area for Tables and Error-Messages and at the bottom there is a Statusline
which indicates what the Packer is just doing.

II.2	Numbers Input/Output
-----------------------------
Input:	You can enter hex and decimal Numbers where hex Num are only
	recognized with a leading "$". To get negative Nums put a "-" at the
	Beginning of the Line. An empty Gadget has the same Effect as one
	with a Zero. Some extra Functions can be reached by entering chars
	instead of Nums. 
Output:	The Output follows the same rules as the Input: a "$" indicates a hex
	Num, the Rest is decimal. But there is an exception: While loading
	Executables in the Address- or Link-Mode the Dehunker displays hex
	Nums without a "$". This has not been forgotten but left out as a
	result of lack of Space.

II.3	Command-Line Options
-----------------------------
-w	Do not open a Screen to get a little more Mem.
-ennnnn	nnnnn specifies the Size of the Mem which is allocated in Addition
	to the FileLen. This is necessary when the Packer does not find
	something to pack at he beginning and the Result gets longer than
	the Original. To prevent Errors some Space is left between the
	Result and the Original.

II.4	Menu Options
---------------------
Free Mem update		In the Titlebar the just free Mem is displayed and
			updated every 1/10 Second. This can be disabled to
	speed up packing or other Proggies running at the same Time.
Req.library		The Requester-Library is used for the File-Requester,
			the Overwrite-Verify and the Extra Mem Input. With
	this Option you can open and close the Library. By closing you may
	get some more Mem but the above Features are no longer available.
	Sometimes the Program failes to open the Library the first Time. You
	can try to open the Library yourself or reopen it after having closed
	it.
Segment-Ptrs		This has only an Effect in the Address- or Link-Mode.
			Most Dehunkers fix the Executables to a certain
	Address and correct the Reloc-Offsets but they forget the enchainment
	of the Hunks in the Mem. This is the first Dehunker which pays
	attention to this Feature of DOS.
Extra Mem		Here you can enter the Amount of extra Mem with a
			Req-Lib Requester. The Function of this Option is
	expalined ein II.4.

II.5	Other Information
--------------------------
There are no known Bugs. Nevertheless the Programmer is in no way liable for
any Errors and Gurus invoked by the Packer. In most Cases the User himself
produces the Errors by misusing the Packer.
This Document will only deal with the important Things. Understanding
minor Details like Filelen is expected. These Things are left out.


III.	Packing in the Address-Mode
====================================

In the Address-Mode this Packer is quite like Bytekiller. You can crunch all
position-dependent and relocatible Files as well as Data-Files. I recomend to
use this Mode only with Proggies which do not return to the CLI because
important System-Parameters and -Tables may be destroyed.

III.1	Loading
----------------
Normally the entire File is loaded. In case of an Executable the
"Load/Fix File to"-Gadget specifies the Treatment of the File. "Load"
indicates, that it will be considered as a Data-File. "Fix" will fix the File
to the in the next Gadget given Address. While loading the Hunkstructure and
the Addresses of the Hunks after decrunching are displayed.
Range is the Part the entire Hunk occupies and Len is the Len of the actual
Data in the Hunk. 

III.2	Packing
----------------
Turbo-Mode	You should use this Mode only in case of a Memory shortage.
		In needs max. 70KB Memory depending on the Crunchoffset.
Lightspeed-Mode	This is the faster Mode but it also requires more Memory.
		256KB are always allocated plus max. 70KB depending on the
		Crunchoffset.
Higher Crunchoffsets produce better Results but also longer Crunchtimes.
Offset "0" is equal with "$4200" (for the lazy ones). When there is not
enough Memory available firstly the Mode is changed and the if necessary the
Offset is reduced.

III.3	Saving
---------------
You can choose between a Normal or Professional Decruncher and Data-Files.
Normally the Normal Decruncher should suffice, only in extreme cases the
Pro Decr necessary.
Note: The different Option can be let out by clearing the Gadget responsible
      for that. This Packer saves only the really necessary Parts and not
      an ultimate Decuncher where only some values are changed and much
      senseless Code is dragged along.

III.3.1	Data-Files
- - - - - - - - - -
Only a 14-Bytes Header which is explained in the Decruncher Source and the
crunched Data is saved.

III.3.2	Normal Decruncher
- - - - - - - - - - - - -
The "Decrunch To"-Address specifies the Address where the Data is decrunched
to. By entering here a "p" no special Address is taken. Instead of this some
Mem is allocated (in the Hunk-Header) and there the Data will be decrunched
to. "c" has the same almost Effect but here it will be in Chip-Mem (e.g. for
Proggies with internal Copperlist).
"Jump to" is the Address where the Decruncher will jump to after decrunching.
In most cases this is the same Address as the Decrunch-Address. Is there a
"p" or "c" as the Decrunch-Address, the Jump-Address is relative to the
Beginning of the Data. By entering here a "r" the Decruncher will return to
the calling Code after decrunching.

III.3.3	Professional Decruncher
- - - - - - - - - - - - - - - -
This Mode has the same Options as the above one and several additional more
powerful ones which all can be let out by clearing the Gadget.
The Stackaddress is written into a7 (Stackpointer) as the first Action before
decrunching.
The Decruncher can copy itself to a safe Position which is fixed by "Decr at".
Now there are two Columns starting with the two "Stop Drives"-Gadgets. The
Options of the left Column will be executed before decrunching, the right
ones after.
There are three Ways of stopping the Drives: "Not" is eveident, the Motors of
"Lame" stopped Drives are off but the Drive-LED is still glimming, the LEDs
are darkened with "Pro".
Further down there are five rows with two times two columns each. This is to
write certain values to special Addresses outa the data Range. In the first
Column there is the value which can be wordened with a follow .w (e.g. $0.w)
and in the second one there are the Addresses which are automatically
shortened if possible.
Finally the Status Register (SR) can be changed before entering the Program.


IV.	Packing in the Link-Mode
=================================

The Advantage of this Mode is to load several Files into one Memoryblock
and to save a Linker-Run.
The Range is set with LoMem and HiMem where both Addresses have to be even
and HiMem higher than  LoMem. The allocated Mem is cleared, so no undesirable
Data will be crunched.

IV.1	Loading
----------------
This goes the same way as in the Address-Mode with the difference that with
the "Load/Fix File to"-Address an Offset to the Start of the Range is
calculated, so you have to fill in this Parameter also with Data-Files. This
Address has to be inside the Range and the File must not end outa it.

IV.2	Packing
----------------
see III.2

IV.3	Saving
---------------
You should take the LoMem-Address as the Decrunch-Address, so that the
absolute Addresses are correct. For Options see III.3


V.	Packing in the Reloc-Mode
==================================

Here you can pack all Executables except Overlayed Files. The Hunkstructure
is entirely preserved, so that there is the same sourrounding after decruch-
ing as without packing.

V.1	Loading
----------------
The selected File is loaded and the Hunkstructure is checked and displayed
in the Output-Field. Hunk_Ends and the Rest of superfluous stuff are skipped.
Reloc-Tables will be sorted and precompensated.

V.2	Packing
----------------
see III.2

V.3	Saving
---------------
Currently there are two types of Decrunchers but only the second one is
recommended to use. Further ones will be added.

V.3.1	Simple Decruncher
- - - - - - - - - - - - -
This Type uses a lot of Memory (twice as necessary).

V.3.2	Normal Decruncher
- - - - - - - - - - - - -
This Decruncher is basically equal to the Simple Decruncher but it frees the
unused Memory after decrunching.
If you "Kill the Decruncher" the Decruncher is eliminated outa the Mem and
"cli_module" Field in the "pr_CLI" Structure in the Process-Structure is set
to the first Hunk of the Program. In know only one (1) Program which needs
this Option, it is the magnificent Texteditor CED.

VI.	Trivialities
=====================

Many Thanx may reach:
  Commodore for this fantastic Computer with Multitasking
  Cygnus Software for CED
  Buddha/Corsair for Masterseka V1.7/8
  Rune Gram-Madson for AsmOne V1.0
  E.o.L. for Beta-Testing

Gritinx and Handsheix fly over to:
  The Fly
  Earl of Lennox / Tarkus Team
    and the Rest of the Brain-Cells-Killers
  Assassins
  MFCG


VII.	History
================

***** V1.3 ********
First Release Version, with almost all Options as V1.4
not bugfree (Crunch-Routine could produce Shit without a clear Stack)

***** V1.4 ********
Intuition Interface added, now callable from Workbench, self-detaching,
Req-Lib FileRequester
some Bugs fixed (all code was totally overworked)

               ^
              /B\
             /ye \
            /for n\
           /ow!!! S\
          <ee you la>
           \ater, G/
            \uys!!/
             \!!!/
