Crunch-Mania User's Guide Registered / Test Version 1.8 - 03-Nov-92 _____________________________________________________________________________ ___ _____________________________________________________________________ ___ ___/_____________________________________________________________________\___ ___/___ ___\___ ___/___\_____________________________________________________________/___\___ ___/___\___ ____________ ________________ ___ _______________ ___ ___/___\___ ___/___\___/____________\________________/___\_ ___________ _/___\___/___\___ ___/___\___/___ \________________/_____\_ _______ _/_____\___/___\___ ___/___\___/___\_________________________/___ _\_ ___ _/_ ___\___/___\___ ___/___\___/___\____________ ________ ___/___\_/ _\___/_ \_/___\___/___\___ ___/___\___/___\____________/________\___/___\___/ ___ \___/___\___/___\___ ___/___\___/___\____________/___ \___/___\_____/ \_____/___\___/___\___ ___/___\___/___\____________/___\________/___\_______________/___\___/___\___ ___/___\___/___\____________/___\________/___\_______________/___\___/___\___ ___/___\___/___\________ ___/___\________/___\_______________/___\___/___\___ ___/___\___/____________\___/___\________/___\_______________/___\___/___\___ ___/___\___/ \___/ \________/ \_______________/ \___/___\___ ___/___\_____________________________________________________________/___\___ ___/___\_____________________________________________________________/___\___ ___/_____________________________________________________________________\___ ___/ \___ _____________________________________________________________________________ _____________________________________________________________________________ Written by Thomas Schwarz Copyright (c) 1991,92 by Thomas Schwarz All rights reserved Table Of Contents Crunch-Mania V1.8 1 ··········· Introduction 1.1 ······· Copyright & Registration 1.2 ······· Distribution 1.3 ······· Support 1.4 ······· License 1.5 ······· Disclaimer 1.6 ······· Future Plans 1.7 ······· Why buy the registered Version? 2 ··········· General Information 2.1 ······· Outward Appearance 2.2 ······· Numbers Input/Output 2.3 ······· System Requirements 2.4 ······· Other Information 2.5 ······· A Word on the Keys 3 ··········· Functions, Options & Features 3.1 ······· Command Line Options 3.1.1 ··· `?' - CLI Help 3.1.2 ··· `-c' - Set Screen Colors 3.1.3 ··· `-e' - Set Extra Mem Size 3.1.4 ··· `-f' - Enable LED-Flash 3.1.5 ··· `-g' - Enable Segment-BPTR Creation 3.1.6 ··· `-h' - Set Huffman Buffer Size 3.1.7 ··· `-I' - Ignore S:CrM.cfg 3.1.8 ··· `-m' - Enable Sample Encoding 3.1.9 ··· `-n' - Enable Icon copying 3.1.10 ·· `-r' - Enable req.library 3.1.11 ·· `-t' - Enable reqtools.library 3.1.12 ·· `-u' - Enable Free Memory Updating 3.1.13 ·· `-w' - Use Window 3.2 ······· Menu Options 3.2.1 ··· Project Menu 3.2.2 ··· - About 3.2.3 ··· - Load File 3.2.4 ··· - Save File 3.2.5 ··· - Crunch 3.2.6 ··· - Iconify 3.2.7 ··· - Quit 3.2.10 ·· Options Menu 3.2.11 ·· - Free Mem Update 3.2.12 ·· - req.library 3.2.13 ·· - reqtools.library 3.2.14 ·· - Segment-Ptrs 3.2.15 ··

- Priority ------------------------ Here you can set the task priority of Crunch-Mania. There are three given possibilities (-3, 0, 3) without a shortcut plus the custom option invoked by +

. The current task priority is shown behind the double point. Select your priority wisely, because high priorities will interfere multitasking, and that's what makes this machine so powerful! 3.2.16 - - Copy Icons -------------------------- See 3.1.9 for more information, press + as shortcut, default is off. 3.2.17 - - LED-Flash ------------------------- See 3.1.4 for further information. The shortcut is + . Default is on. 3.2.18 - - Sample-Mode --------------------------- See 3.1.8 for more details. Press + as shortcut. Default is off. 3.2.19 - - Extra Mem ------------------------- See 3.1.3 for detailed description. The current value is shown after the double point. You may change it by selecting the menu item or by pressing the shortcut + . The new value will be used when the next file is loaded. Default is 100. 3.2.20 - - Huffman-Buf --------------------------- See 3.1.6 for more details. Shortcut: + . Default size is 16K. 3.3 - Gadgets -------------- 3.3.1 - Quit ------------- Uuh, I forgot the function of this gadget. Well, I think you should not use it, cause it's the end of everything. It's the most senseless gadget of all. Anyway, when pressing it this invokes a requester where you have to confirm your choice. 3.3.2 - Abort -------------- Generally you need this gadget only to stop crunching. But you also have to press this button when you e.g. loaded something in reloc mode and now want to load something in data mode. You will experience that you can't do this unless you press this gadget. You may not change the crunchmode when something is loaded because then the decrunchers would not fit. By pressing this gadget you unlock that feature. 3.3.3 - Iconify ---------------- This closes the main screen (or window) and opens a new small window on the workbench screen. The new window displays the togo-counter, so you can crunch something and see when it has finished. You may return to the main screen by doubleclicking on the gadget or by pressing the right mousebutton when the window is active. 3.3.4 - Crunchmode ------------------- Here you may select between the five (four in test version) crunchmodes. These are: (Switch), Reloc, Data, Address, Link. In the reloc mode you can load any executable except overlayed files (I think there are not too many). The hunk structure is analysed and displayed while loading. Name, Symbol and Debug hunks are skipped, Reloc hunks are sorted and precompensated. This new reloc table format is shorter and even better crunchable than the one DOS uses! The data mode was designed for normal not-executable data files. They are loaded into memory, compressed and then saved with a small header. The address mode is a bit similar to the ByteKiller cruncher. Here you can load executables and fix them to a special address, load position-depentant code or just load pure data. The decruncher then puts this data to a specified memory block and jumps somewhere. This crunchmode is not very DOS-friendly (especially the decruncher) but very handy e.g. for bootloading games. The dehunker displays some hexadecimal numbers without a leading "$", so don't get confused. In this mode the LZH algorithms are not available. The link mode resembles tetrapack/defpack. In this mode you can load several executable and data files into a precleared memory block which you have to define first. Executables are relocated to certain addresses inside the block, data files are loaded to a specified position in the block. In this mode the LZH algorithms are also not available. I recomend to use the last two modes only with proggies which do not return to the CLI because important system-parameters and -tables may be destroyed. The switch mode is a kind of an intelligent mode. It detects whether the loaded file is executable or not, and then decides which mode (reloc or data) is the right one. 3.3.5 - LowMem / HighMem ------------------------- These two gadgets are only available in link mode. They specify the memory block to which the files are loaded. This block is buffered someplace else in memory while loading and crunching, so you don't have to care about crashes. LowMem and HighMem both have to be even addresses and HighMem has to be higher than LowMem. It is recommended to set the "Decrunch to" address to LowMem to avoid unwanted results. 3.3.6 - Load / Fix File to --------------------------- These two gadgets are active in the address and link mode. The "Load / Fix" gadget determines whether an executable is loaded as a data file (Load) or relocated to the address given in the string gadget next to it (Fix). For data files this gadget has no effect. In the address mode the string gadget is only important for executables, it contains the address where to fix them to. In the link mode this gadget affects both executable and data files in the same way: with the address in the gadget an offset to the beginning of the memory block is calculated and the file is then loaded there. The file has to fit completely in the given memory block. 3.3.7 - Load ------------- With the "Load" gadget you may load files in all modes. When there is no filename given in the string gadget next to it, or when the filename in the string gadget has not been changed since the last loading, a req.libray or reqtools.library filerequester apppears (when enabled). After pressing "Load" and then selecting a file the program immediatly begins to load the file. You may select more that one file by holding down the key. Then you will be asked for a destination dir. With the DIR gadget next to the load filename you may select a directory to crunch. When then pressing Load the whole directory (without subdirs) will be packed. You may get the cursor in the load filename by pressing . By pressing again, the cursor will be in the save filename. When loading an executable its hunk structure is displayed in the output field either with decimal numbers (reloc) or with hexadecimal numbers (adress and link), where Range is the part the entire hunk occupies and Len is the length of the actual data in the hunk. The filelenght is shown below the load gadget. In the reloc mode the lenght after everything has been processed is shown next to the "Processed Len:" string. This is the len of the data the cruncher really crunches. When you load a file that has been crunched in reloc or in data mode it is automatically decrunched when you selected the right mode (reloc for executable files and data for data files) so you can recrunch it or save the original file. After it has been decrunched the file is treated as if you had loaded it in its original form. 3.3.8 - Crunchmode (Algorithm) ------------------------------- This is again a rotating gadget. You may select beween these three algorithms: LZ-Huffman, CrM-Normal and Quick-LZH. LZ-Huffman is the best of these algorithms, but not the fastest. Files crunched in this mode need 1248 bytes of additional memory to decrunch. The decruncher is also slightly slower than the one of the CrM-Normal mode. To crunch files in this mode you need continuous memory blocks with the sizes: 128K + 5*Crunchoffset + Huffman Buffer With the default values of $7ffe and 16K this will lead to a memory usage of 304K. The advantage of the CrM-Normal mode is its fast decruncher and its low memory usage. But its results are the worst of the three modes partly caused by the Crunchoffset which is limited to $4200. It needs no additional memory to decrunch. The memory used while crunching is shown in the following table: 128K + 5*Crunchoffset With the default Crunchoffset of $4200 this will lead to a memory usage of 210K. The Quick-LZH mode has the same needs and limitations as the LZ-Huffman mode, but it is a bit faster resulting in less efficiency. 3.3.9 - Crunchoffset --------------------- This value specifies the range in which redundant data is searched and eliminated. Higher values produce better results but it takes also longer. Values range from 1 to $4200 in the CrM-Normal mode and from 1 to $7ffe in the LZH modes. Values which are too high will be automatically reduced to the maximum. 3.3.10 - Crunch ---------------- Now you have started the real crunching process. This will take a while, so be patient. Next to this gadget is the ToGo counter which shows how much data has not yet been processed. This counter is permanently updated and is also shown in the Iconify window. When finished the crunched len of the file is displayed next to the counter. This is not the final length! The decruncher or data header is not yet added. The error "File not crunchable!" indicates that there is not enough space between the original and the crunched data. You may increase Extra Mem to avoid this message, but generally these files become longer when crunched. The message "Min Security-Distance" shows the distance between the source and destination memory block which should be kept to decrunch a file in the same memory block properly. The crunched data has to be in front of the decrunched data. For more information have a look at the decruncher source. 3.3.11 - Decruncher -------------------- With this gadget you can select the decruncher you want. Each crunchmode has other decruncers. By rotating this gadget some others may get ghosted or become visible. There are only those gadgets active which are really necessary for the selected decruncher. First of all there is the data mode. As it is really senseless to put a decruncher before a data file there is only the data option. This will save a 14 bytes data header in front of the encoded data which is necessary for decrunch. This header is described in the decruncher source. Then there is the reloc mode. If you choose the simple decruncher (it's the shortest one with implemented decruncher) you have a pretty low level decruncher. When a crunched program is running, the twice as much memory is used as needed. The decruncher doesn't free the needless memory but lets this do the dos.library after the whole program has done its job. The decruncher you should use is the normal decruncher. It frees the unnecessary memory before running the program. Here you can choose whether to kill the decruncher or not. Killing it will result in a bit more free memory, a longer decruncher and the cli_module in pr_CLI in the process structure pointing on the first hunk of the program (normally it points on the decruncher). Some programs need this (e.g. CygnusEd). The latest decruncher is the library decruncher. It is the shortest one, but you need the crm.library to run a program with that decruncher. With this decruncher you should have no problems with the cli_module pointer. You can use this decruncher to crunch libraries, fonts, devices, handlers (careful with last two, only with KS2.0 because of BCPL code in KS1.2 and KS1.3). The address and link modes have the same decrunchers. Normally it suffices to use the normal decruncher. You can tell him where to decrunch the data and where to jump. The professional decruncher has some more options. You can set the stack as well as locate the decruncher somewhere in memory. You may stop the drives, set the status register and init some important hardware registers or addresses. You may let out some options by clearing their gadget. 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. Finally you can save the files as data files. This has the same effect as just loading them in data mode. 3.3.12 - Decrunch to --------------------- 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 almost the same effect but here it will be in Chip-Mem (e.g. for proggies with internal copperlist). 3.3.13 - Jump to ----------------- "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. 3.3.14 - Stack at ------------------ This gadget specifies where the stack should be put. The Stackaddress is written into a7 (stackpointer) as the first action before decrunching. 3.3.15 - Decruncher at ----------------------- The decruncher can copy itself to a safe position which is fixed by "Decruncher at". Of course this is done before decrunching. 3.3.16 - Stop Drives --------------------- You may stop all floppies either before decrunching or after decrunching (or both). The left column is responsible for all actions before decrunching and the right one for after. Stopping drives "lame" will switch off the motor but not the drive LED. To put it out you have to select "pro". 3.3.17 - SR (Status Reg) ------------------------- The value given in this gadget is written in the status register immediately before the program is entered. 3.3.18 - Move Gadgets ---------------------- These are the twenty gadgets placed in five rows with two times two columns each. They are designed to write certain values to special addresses outa the data range. In the first column there are the values which can be wordened with a following ".w" (e.g. $0.w) and in the second one there are the addresses which are automatically shortened if possible (like in Ass: e.g. move.w #0,$dff180). The first two columns are executed before decrunching and the second two after. E.g. you can change the background color before decrunching to red and when decrunching has finished to black. Or you can turn off all interrupts and DMAs. 3.3.19 - Save -------------- The save filerequester and filename follow the same rules as described in 3.3.7. The save directory may be different to the load directory. You can save the original file before pressing the crunch button or save the crunched file after crunching it. NOTE: decrunched executables are never totally equal to their original state, because some useless hunks are removed, reloc tables are sorted and Hunk_Ends are added. The final file lenght is displayed below the save gadget. When pressing the DIR gadget next to the save filename you may select a destination directory for multiple selected files and for crunching a whole directory. While crunching you can select a new save filename (Save gadget is ghosted). 4 - Supplied Utilities ======================= This section describes the utilities which have to do with this packer and which are supplied with this package. 4.1 - Run-time Data-Decruncher ------------------------------- This utility is very powerful and useful. It patches some (6) vectors of the dos.library, so any loaded datafile will be automatically decrunched. When the file is loaded entirely no extra mem is needed, otherwise the program will allocate a memoryblock as large as the original file and will decrunch it there. In all further read calls the wanted data is only copied from this buffer, so this will also speed up disk-access. In this The current version supports all crunch algorithms (CrM!, CrM2), any Min Security-Len and the sample-mode. In combination with the crm.library you will be able to crunch almost EVERY file without realizing anything (except a little slow-down). 4.2 - The Library ------------------ This program has the option to save crunched execuatables which will use the CrM.library to decrunch. Furthermore this library can be used by any programmer to decrunch data files easily. Each registered user will get the documentation of the library and may use it in his own productions. Registered users also get a faster version of the library. 5 - Trivialities ================= Many Thanx may reach: Commodore for this fantastic Computer with Multitasking my HD for having no head-crashs Datel Electronics for their Action Replay helping me with debugging E.o.L. for Beta-Testing Greetinx and Handsheix fly over to: The Fly Earl of Lennox and the Rest of the Brain-Cell-Killers Ferris 6 - Performance Test ===================== This test was done on my Amiga 500 with 7.14MHz, 512K Chip, 512K fake-Fast, 2M real-Fast, 105M HD, with all files being loaded from dh0:. 1) "PageStream2" - Main program of Pagestream V2.2, crunched as executable 437576 bytes, 110 Hunks, 22369 Reloc Offsets Using Library-Decruncher when available, Times with loading from dh0: Cruncher Crunched Len Crunch Time Decrunch Time CrM 1.8r LZH 178848 235s 12s CrM 1.8t LZH 178848 352s 15s CrM 1.8r Normal 186932 179s 10s CrM 1.8t Normal 186932 303s 10s Imploder 3.0 202672 555s 45s(Impl)/10s(Lib) Imploder 4.0 200376 565s crash Powerpacker 4.2 188796 289s 18s Scrunch!pro 1.0dß 221368 346s crash 2) same file as in (1), but crunched as data file Cruncher Crunched Len Crunch Time Decrunch Time CrM 1.8r LZH 211058 285s 14s CrM 1.8t LZH 211058 429s 18s CrM 1.8r Normal 230344 185s 12s CrM 1.8t Normal 230344 331s 12s Powerpacker 4.2 231080 395s 17s Lha 1.42r 212857 250s 14s Shrink 1.1 195096 473s 356s 3) "Lha.man" - Text File (Doc of Lha 1.42), 122451 bytes Cruncher Crunched Len Crunch Time Decrunch Time CrM 1.8r LZH 36872 55s 2s CrM 1.8t LZH 36872 83s 3s CrM 1.8r Normal 42648 46s 2s CrM 1.8t Normal 42648 79s 2s Powerpacker 4.2 44152 61s 3s Lha 1.42r 38686 35s 3s Shrink 1.1 35017 124s 63s Scrunch!pro 1.0dß 42506 112s 5s Speed and ratio comparisons towards packers like Tetrapack, Defpack and Bytekiller are ridiculous because these packers do not use any tables for speedup and the crunch-algorithms are very old and ineffective thus resulting in long crunch times and larger files. 7 - 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) ********** V1.5 ************** V1.5a: Demo Version, no Saving possible V1.5b: Release Version Both Versions released for the Amiga '91 in Cologne! Crunch-Routine optimized, now 0,5-2%. better Results! Menu-Options "Priority" and "LED-Flash" added! Program sometimes crashed when you quitted it, now fixed V1.5c: Auto-SetComment for run-time Data-Decruncher added ********** V1.6 ************** Decruncher added User-Communication improved Quit-Bug finally removed ********** V1.7 ** 02-Aug-92 ********** First Release with a free Test-Version and a Registered-Version New Crunchalgorithms: LZ-Huffman and Quick-LZH Not available in Address and Link Modes New Crunchmodes: Data to crunch Datafiles easily (not via Address-Mode) Switch which detects Reloc and Data-Files and switches between the Modes (only registered Version) Speed Improvements: Crunching takes now only half the Time! (only reg.) Data-Decruncer added Now Source and Destination Dir can be different Current Dir of Caller is now the CD of CrM (not df0:) 2.0-style Intuition Interface added More CLI-Options (including CLI-Help) New Iconify-Window: shows now ToGo-Counter Minor Bugfixes (various Actions caused Crashes) RTDD now removeable, supports new crunchalgorithms ********** V1.8 ** 02-Nov-92 ********** New Decruncher:Library, uses CrM.library Introducing Library: CrM.library used for executables and data files Registered Users get Documentation of Library! and a faster one. Now supports reqtools.library V38! (still uses req.library) Added Keyboard shortcuts Added Project Menu New Mode: Sample-mode, get better ratios with 8-Bit Samples New Option: Copy Icons (...) Now supports multiple select possibilities of file requesters Whole directories may now be crunched Some changes made to the appearance (Logo, bigger Gads, ...) · · - - -- --- --=- -=-=- -===- -==-==- -===- -=-=- -=-- --- -- - - · · Finito - May the Force be with you!!!

- Priority 3.2.16 ·· - Copy Icons 3.2.17 ·· - LED-Flash 3.2.18 ·· - Sample-Mode 3.2.19 ·· - Extra Mem 3.2.20 ·· - Huffman-Buf 3.3 ······· Gadgets 3.3.1 ··· Quit 3.3.2 ··· Abort 3.3.3 ··· Iconify 3.3.4 ··· Crunchmode 3.3.5 ··· LowMem / HighMem 3.3.6 ··· Load / Fix File to 3.3.7 ··· Load 3.3.8 ··· Crunchmode (Algorithm) 3.3.9 ··· Crunchoffset 3.3.10 ·· Crunch 3.3.11 ·· Decruncher 3.3.12 ·· Decrunch to 3.3.13 ·· Jump to 3.3.14 ·· Stack at 3.3.15 ·· Decruncher at 3.3.16 ·· Stop Drives 3.3.17 ·· SR (Status Reg) 3.3.18 ·· Move Gadgets 3.3.19 ·· Save 4 ··········· supplied Utilities 4.1 ······· Run-time Data-Decruncher 4.2 ······· The Library 5 ··········· Trivialities 6 ··········· Performance Test 7 ··········· History ****************************************************************************** 1 - Introduction ================= 1.1 - Copyright & Registration ------------------------------- Crunch-Mania is Copyright (c) 1989,90,91,92 by Thomas Schwarz. It was released under the concept of "Shareware". All versions until V1.6 are Public Domain, but starting with V1.7 they are Shareware. I have released a test version to be spread and to give you a hint on the program's abilities. If, after a testing period of some weeks, you find this program useful, please register. By cooperating with this concept you help to ensure continued development of this product. Registered Users will receive the latest release version of Crunch-Mania together with decrunch sourcecodes and my run-time-data-decruncher (RTDD, Copyright (c) 1991,92 Thomas Schwarz). The registered Version has more features and is faster. No person(s) or businesses other than the author are authorized to accept any registration or distribution fees in any form whatsoever, except as specified by the author. Only people who have sent US 20, DM 30 or more to the following address will be regarded as registered users. Only these two currencies and only bank-notes will be accepted. Thomas Schwarz Dammstrasse 12 W-7014 Kornwestheim Germany / Europe Just put the money in an envelope together with some piece of paper with your request and your address on it and then post it. Delivery may take two to eight weeks. Usually you will be sent your registered version right away, but if a new version is imminent to be completed, you will get that one as soon as it becomes available. I am still searching for somebody or a company who distributes this program as a commercial product, so I can spend my time in developing new features and not in pasting stamps on envelopes. So be free to contact me to relieve my pain! The req.library this program uses is copyright 1989 by Colin Fox and Bruce Dawson. Great work, Men! Why don't you develop a 2.0 style req.library? I would greatly appreciate it. The reqtools.library this program uses starting with V1.8 is copyright 1991/1992 by Nico François. Thats what I call cool! 1.2 - Distribution ------------------- Basically, the test version of Crunch-Mania may be distributed freely as long as the following conditions are met: The Distributor may only charge a fee up to the costs of obtaining any common public domain disk. The distributor agrees to stop distributing the programs and data involved on request of the author. The distributor may only distribute an unmodified copy of the original program, with all the supplied documentation and copyright notices left intact. 1.3 Support ------------ If you have any suggestions, bug reports or questions, please contact the author at the above address. When sending bug reports, please describe exactly under what circumstances the bug occured, what equipment was used and what happened. If possible also try to give me enough information to reproduce the bug. It is very difficult to find bugs when you don't know exactly what happened. Please don't just send messages like "my machine sometimes crashes when I try to load xxx", that really doesn't help me. If possible, submit the offending file in crunched and original state to me so I can test it myself, or give me a pointer where I can find the files. 1.4 License ------------ 1. This license applies to the product called "Crunch-Mania", a set of programs for the Commodore-Amiga computer, published by Thomas Schwarz under the concepts of ShareWare, and the accompanying documentation, example files and anything else that comes with the original distribution. The terms "Programs" and "Crunch-Mania" below, refer to this product. The licensee is addressed as "you". 2. You may copy and distribute verbatim copies of the programs' executable code and documentation as you receive it, in any medium, provided that you conspicuously and appropriately publish only the original, unmodified programs, with all copyright notices and disclaimers of warranty intact and including all the accompanying documentation, example files and anything else that came with the original. 3. You may not copy and/or distribute these programs without the accompanying documentation and other additional files that came with the original. You may not copy and/or distribute modified versions of these programs. 4. You may not copy, modify, sublicense, distribute or transfer the programs except as expressly provided under this license. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the programs is void, and will automatically terminate your rights to use the programs under this license. However, parties who have received copies, or rights to use copies, from you under this license will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing and/or using the programs you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the programs, the recipient automatically receives a license from the original licensor to copy, distribute and/or use the programs subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. You may not disassemble, decompile, re-source or otherwise reverse engineer the programs. 8. You may use the programs for a period of up to 30 days for testing purposes. After that, you have to register. 9. If you wish to incorporate parts of the programs into other programs, write to the author to ask for permission. 10. You agree to cease distributing the programs and data involved if requested to do so by author. 11. You may charge a fee to recover distribution costs. The fee for diskette distribution may not be more than the cost to obtain any common public domain disk. 12. Only the test version is intended to be distributed, the registered version may only be used by registered users and nobody else. 1.5 - Disclaimer ----------------- THERE IS NO WARRANTY FOR THE PROGRAMS, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAMS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMS IS WITH YOU. SHOULD THE PROGRAMS PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE PROGRAMS AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAMS (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 1.6 - Future Plans ------------------- The program is planned to be a real multi-talent. So a disk archiver and a files archiver will be added as soon as I have any spare time. But my special attention will be given to the development of faster and more effective algorithms. Another goal is to achieve full 2.0 compatibility and a fully 2.0 style user interface. This will lead to the use of the reqtools.library (© Nico François) I also plan to release my own library which will be similar to the explode.libary or the PPLoadSeg patch, so you can crunch fonts and libraries and all the other shit with my cruncher (which is certainly better, hehe). If you register and support my program, you will speed up the release of new and better versions. If there is little demand I may drop this project and start coding something else and that would be a great pity. 1.7 - Why buy the registered Version? -------------------------------------- Well, first of all you should buy the registered version, if you use this program for a longer time. With a registration you will support future releases. The registered version is faster both in crunching and in decrunching. With the registered version you can decrunch reloc files and not only data files. Registered users get my run-time-data-decruncher (RTDD) which is very useful e.g. for crunching icons or include files, they will be automatically decrunched. The source code of the decruncher is also provided to be implemented in your own releases. Registered users receive a library that decrunches faster. A registered user gets the latest version of this product plus the next version as soon as it gets available! A program worth using is a program worth buying! 2 - General Information ======================== 2.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, but you have to draw an Icon first (I hate Icons). 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 program is just doing. 2.2 - Numbers Input/Output --------------------------- Input: You can enter hex and decimal numbers where hexadecimal numbers are only recognized with a leading "$". To get negative numbers 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 numbers. Output: The output follows the same rules as the input: a "$" indicates a hexadecimal number, the rest is decimal. But there is one exception: while loading executables in the Address- or Link-Mode the dehunker displays hexadecimal numbers without a leading "$". This has not been forgotten but left out as a result of lack of space. 2.3 - System Requirements -------------------------- 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 200-400KB of tables depending on the version, the crunchmode and the offset. Two drives are comfortable but not necessary. No problems have occured under Kickstart 1.2 and 2.0, so it should also work under 1.3 and 2.x. 2.4 - Other Information ------------------------ There are no known bugs. Nevertheless the author is in no way liable for any errors and gurus invoked by the Program. In most cases the user himself produces the errors by misusing the Program. This document will only deal with the important things. Understanding minor details like Filelen is expected. These things are left out. 2.5 - A Word on the Keys ------------------------- You may invoke actions by pressing special keys. These actions are the same as the corresponding gadgets would cause. The key that stands for a certain gadget is underlined in the text next to or in the gadget. When pressing a key, the gadget behaves as if you had used the mouse, i.e. it looks like being pressed down. In this state no actions have yet happened, you may cancel your choice by pressing one of the keys. Otherwise the action will be performed as supposed. Only one key at the same time is regarded as pressed, keys that are pressed while an other key is still pressed will be ignored. 3 - Functions, Options & Features ================================== 3.1 - Command Line Options --------------------------- Here is a list of all options and parameters available and adjustable via the CLI. The same options can be used in the configuration file "S:CrM.cfg". This file is processed before the command line, so you can change your defaults via the CLI. A "+" instead of a "-" in front of the option reverses the result. 3.1.1 - `?' - CLI Help ----------------------- This option lists all currently available options in the CLI to give you a brief overview of what you can do there and then asks for a new command line. This option has to be the first in the command line and no other options may be specified with it. EXAMPLE 1> CrM ? Crunch-Mania V1.8r - Copyright (c) 1989,90,91,92 Thomas Schwarz Command Line Options: . : Enter Command Line: (Well with -codes this looks a bit nicer) 3.1.2 - `-c' - Set Screen Colors --------------------------------- With this option followed by four hexadecimal numbers you can set your own personally preferred screen colors fitting your needs. The highest nibble of each number stands for the red part of the color, the mid nibble for the green part and the lowest nibble for the blue part. EXAMPLES 1> CrM -c$889 $2 $ccd $358 ;These are the default colors. or 1> CrM -c$0 $bbb $2a2 $137 3.1.3 - `-e' - Set Extra Mem Size ---------------------------------- As not everybody has 4MB and this program does not support floating compression, the source and destination memory blocks overlap to reduce the memory needed. Extra Mem specifies the distance between the two blocks. The error message "File not crunchable!!!" indicates that the cruncher would have overwritten some data not yet processed with crunched data. Nevertheless you can crunch those files by setting extra mem to a higher value, but the files usually then become longer than the original. Extra Mem may be set by the option `-e' directly followed by a number in the range from 100 to 10000. Default is 100. EXAMPLES 1> CrM -e100 ; Sets Extra Mem to 100 or 1> CrM -e$200 ; Sets Exrta Mem to 512 3.1.4 - `-f' - Enable LED-Flash -------------------------------- While packing the power-LED flashes to show the user that the program is working. As you certainly know, the power-LED also steers the low-pass filter for the four audio channels. As it sounds terrible when listening to a tune while crunching you may disable this with the option `+f', default is on. EXAMPLE 1> CrM -f ;Enable LED-Flash (default) 3.1.5 - `-g' - Segment-BPTR Creation ------------------------------------- This option only comes into effect in the address and link modes. There you can relocate executable to a certain address. The dos.library does the same but it adds the lenght of a hunk and the pointer to the next hunk in memory to all hunks. Normally this is only for internal DOS use, but some programs use these BPTRs to calculate the addresses of their hunks. You can enable the creation of BPTRs with this option so that these programs don't crash any more. As you don't need this option very often the default setting is off. EXAMPLE 1> CrM -g ;now BPTRs are created 3.1.6 - `-h' - Set Huffman Buffer Size --------------------------------------- This option can be used to set the size of the buffer used in LZ-Huffman and Quick-LZH compreesion modes for collecting statistics. The size of this buffer affects the compression ratio in unpredictable ways. As a general rule, keep this at the default, but if you are compressing homogenous data with a relatively fixed relative frequency of symbols (like text files), setting this to a large value will improve compression. Binaries generally compress best with the default setting. The Huffman buffer may be of any size between 4K and 64K and must be specified immediately following the `-h' string, in kilobytes. EXAMPLE 1> CrM -h32 ;Sets the Huffman buffer size to 32768 (32K) bytes The default Huffman buffer size is 16K. 3.1.7 - `-I' - Ignore S:CrM.cfg -------------------------------- In the configuration file "S:CrM.cfg" you may specify your own personal default settings which are loaded immediately after the start of the program. This option disables that what may come in handy when you don't have your boot disk inserted. This option has to be the first in the command line but others may also be set there. EXAMPLE 1> CrM -I +r ;don't load config file and don't load req.library 3.1.8 - `-m' - Enable Sample Encoding -------------------------------------- This feature is especially for compressing samples. Only with samples the cruched file will probably shorter. This is due to algorithm the sample mode invokes. That algorithm calculates the relative difference between two bytes instead of the absolute values. Now imagine a sine wave. The difference between two bytes is in the range of -4 to +4, but the absolute values go from -128 to +127. The algorithm will convert the file into one with about 20 different values instead of 256. EXAMPLE 1> CrM -m ;Enable Sample Encoding Default is off, as most files compress worse with it. 3.1.9 - `-n' - Enable Icon copying ----------------------------------- With this option enabled, the program will check if the currently loaded program or data file has an icon and then load it and save it together with the crunched file with the new name. 3.1.10 - `-r' - Enable req.library ----------------------------------- The req.library is loaded when the reqtools.library fails to open and is used for user communication. When you don't have very much memory you may prevent the program from loading it with the option `+r'. But remember: you don't have any file requesters any more, no overwrite requesters and several other menu options are also disabled. Usually the reqtools.library is tried to be open before the req.library. With this option the program first tries to open the req.library. EXAMPLES 1> CrM +r ;no req.library, but still reqtools.library 1> CrM +t +r ;no libraries at all 1> CrM -r ;try to open req.library first 3.1.11 - `-t' - Enable reqtools.library ---------------------------------------- The reqtools.library is loaded by default. and is used for user communication. When you don't have very much memory you may prevent the program from loading it with the option `+t'. But remember: The req.library is still loaded untill it is not also disabled. EXAMPLES (for more see 3.1.10) 1> CrM -t ;try to open reqtools.library first (e.g. with -r option ;in the config file) 3.1.12 - `-u' - Enable Free Memory Updating -------------------------------------------- The title bar of the screen or the window displays the currently free memory. This display is updated every 1/10 second. You can disable this with `+u' to gain a bit more speed, but it's not very much. EXAMPLE 1> CrM +u ;no updating 3.1.13 - `-w' - Use Window --------------------------- A screen uses a lot of Chip-memory. When you don't have very much of it this option may help you to have some more. Use `-w' to let Crunch-Mania open a window on the Workbench screen. EXAMPLE 1> CrM +w ;use Screen (default) 3.2 - Menu Options ------------------- In the following lines the functions of the menus are described. Usually the functions and the key shortcuts are the same as the CLI options. Menus are accessible via the right mousebutton. 3.2.1 - Project Menu --------------------- In this menu the basic operations have found their place. They have the same effect as the corresponding gadgets, just for people who like menus more than gadgets. 3.2.2 - - About -------------------- This will display the text that is shown when you start the program or when returning from being iconified. When the reqtools.library is active a requester is called instead. 3.2.3 - - Load File ------------------------ Load a File, has the same function as Load gadget, see 3.3.7 3.2.4 - - Save File ------------------------ Save a File, has the same function as Save gadget, see 3.3.19 3.2.5 - - Crunch --------------------- Crunch the loaded data, has the same function as Crunch gadget, see 3.3.10 3.2.6 - - Iconify ---------------------- Close screen and window and open a small window on the workbench screen, same effect as Iconify Gadget, see 3.3.3 3.2.7 - - Quit ------------------- Leave Crunch-Mania, same as Quit gadet, see 3.3.1. NOTE: you have to press when using keyboard shortcuts 3.3.10 - Options Menu ---------------------- This menu contains several preferences and values that are used in the program. There are no corresponding gadget, so you have to use the menu. Some options are disabled when neither the req.library nor the reqtools.library is active. 3.2.11 - - Free Mem Update ------------------------------- See 3.1.12 for details. Press + to switch. Default is on. 3.2.12 - - req.library --------------------------- Chapter 3.1.10 gives you more information. Shortcut is + . Default is off. 3.2.13 - - reqtools.library -------------------------------- Chapter 3.1.11 gives you more information. Shortcut is + . Default is on. 3.2.14 - - Segment-Ptrs ---------------------------- Consult 3.1.5 for more information. Press + as shortcut. Default is off. 3.2.15 -