home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / packery / crmv1.9t / crm.doc < prev    next >
Text File  |  1980-01-10  |  60KB  |  1,586 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                          Crunch-Mania User's Guide
  7.  
  8.                    Registered / Test Version 1.9 - 08.10.93
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                           Written by Thomas Schwarz
  15.  
  16.                    Copyright (c) 1991-93 by Thomas Schwarz
  17.                              All rights reserved
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                              Table Of Contents
  24.  
  25.                              Crunch-Mania V1.9
  26.  
  27.  
  28. 1 ··········· Introduction
  29.   1.1 ······· Copyright & Registration
  30.   1.2 ······· Distribution
  31.   1.3 ······· Support
  32.   1.4 ······· License
  33.   1.5 ······· Disclaimer
  34.   1.6 ······· Future Plans
  35.   1.7 ······· Why buy the registered Version?
  36.  
  37. 2 ··········· General Information
  38.   2.1 ······· Outward Appearance
  39.   2.2 ······· Numbers Input/Output
  40.   2.3 ······· System Requirements
  41.   2.4 ······· Other Information
  42.   2.5 ······· A Word on the Keys
  43.  
  44. 3 ··········· Functions, Options & Features
  45.   3.1 ······· Command Line Options
  46.     3.1.1 ··· `?' - CLI Help
  47.     3.1.2 ··· `-c' - Set Screen Colors
  48.     3.1.3 ··· `-d' - Auto Makedir
  49.     3.1.4 ··· `-e' - Set Extra Mem Size
  50.     3.1.5 ··· `-f' - Enable LED-Flash
  51.     3.1.6 ··· `-g' - Enable Segment-BPTR Creation
  52.     3.1.7 ··· `-h' - Set Huffman Buffer Size
  53.     3.1.8 ··· `-i' - Set Subdir-Level
  54.     3.1.9 ··· `-I' - Ignore S:CrM.cfg
  55.     3.1.10 ·· `-p' - Set Taskpriority
  56.     3.1.11 ·· `-r' - Enable reqtools.library
  57.     3.1.12 ·· `-s' - Enable Sample Encoding
  58.     3.1.13 ·· `-t' - Set Textbuffersize
  59.     3.1.14 ·· `-u' - Enable Free Memory Updating
  60.     3.1.15 ·· `-y' - Encrypt Data
  61.   3.2 ······· Menu Options
  62.     3.2.1 ··· Project Menu
  63.     3.2.2 ··· <a> - About
  64.     3.2.3 ··· <l> - Load File
  65.     3.2.4 ··· <c> - Crunch
  66.     3.2.5 ··· <s> - Save File
  67.     3.2.6 ··· Save Prefs
  68.     3.2.7 ··· <i> - Iconify
  69.     3.2.8 ··· <Q> - Quit
  70.     3.2.10 ·· Options Menu
  71.     3.2.11 ·· Free Mem Update
  72.     3.2.12 ·· reqtools.library
  73.     3.2.13 ·· Segment-Ptrs
  74.     3.2.14 ·· LED-Flash
  75.     3.2.15 ·· Sample-Mode
  76.     3.2.16 ·· Encrypt Data
  77.     3.2.17 ·· Auto Makedir
  78.     3.2.18 ·· Priority
  79.     3.2.19 ·· Include Subdirs
  80.     3.2.20 ·· Extra Mem
  81.     3.2.21 ·· Huffman Buffer
  82.     3.2.22 ·· Text Buffer
  83.   3.3 ······· Gadgets
  84.     3.3.1 ··· Quit
  85.     3.3.2 ··· Abort
  86.     3.3.3 ··· Iconify
  87.     3.3.4 ··· Crunchmode (Reloc/Data/Address/Link/Auto gadgets)
  88.     3.3.5 ··· LowMem / HighMem
  89.     3.3.6 ··· Load / Fix File to
  90.     3.3.7 ··· Load
  91.     3.3.8 ··· Algorithm
  92.     3.3.9 ··· Crunchoffset
  93.     3.3.10 ·· Crunch
  94.     3.3.11 ·· Decruncher
  95.     3.3.12 ·· Decrunch to
  96.     3.3.13 ·· Jump to
  97.     3.3.14 ·· Stack at
  98.     3.3.15 ·· Decruncher at
  99.     3.3.16 ·· Stop Drives
  100.     3.3.17 ·· SR (Status Reg)
  101.     3.3.18 ·· Move Gadgets
  102.     3.3.19 ·· Save
  103.     3.3.20 ·· LZH-Table At
  104.     3.3.21 ·· Advanced Options
  105.     3.3.22 ·· Slider Bar
  106.  
  107. 4 ··········· supplied Utilities
  108.   4.1 ······· Run-time Data-Decruncher
  109.   4.2 ······· The CrM.library
  110.   4.3 ······· The xpkCRM2.library
  111.   4.4 ······· CrMPW
  112.  
  113. 5 ··········· Trivialities
  114.  
  115. 6 ··········· Performance Test
  116.  
  117. 7 ··········· History
  118.  
  119.  
  120. ******************************************************************************
  121.  
  122.  
  123. 1 - Introduction
  124. =================
  125.  
  126.  
  127. 1.1 - Copyright & Registration
  128. -------------------------------
  129.  
  130.    Crunch-Mania  is  Copyright (c) 1989-93 by Thomas Schwarz.  It was released
  131. under  the concept of "Shareware".  All versions until V1.6 are Public Domain,
  132. but  starting  with  V1.7  they are Shareware.  I have released a test version
  133. that may be spread to give you a hint on the program's abilities.  If, after a
  134. testing  period  of some weeks, you find this program useful, please register.
  135. By  cooperating  with this concept you help to ensure continued development of
  136. this product.
  137.  
  138.    Registered Users will receive the latest release version of Crunch-Mania, a
  139. faster  library,  the  latest  version  of RTDD, includes and autodocs for the
  140. CrM.library  and separate decrunch sourcecodes (in Assembler).  The registered
  141. version  has  no  annoying  registration requesters and has some more features
  142. which are ghosted in the test version.
  143.  
  144.    No  person(s)  or businesses other than the author are authorized to accept
  145. any  registration  or  distribution  fees  in  any  form whatsoever, except as
  146. specified  by  the  author.  Only people who have sent US 20, DM 30 or more to
  147. the  following  address  will be regarded as registered users.  Only these two
  148. currencies and only bank-notes will be accepted.
  149.  
  150.                                 Thomas Schwarz
  151.                                 Dammstrasse 12
  152.                               70806 Kornwestheim
  153.                                    Germany
  154.  
  155.    Just  put  the  money in an envelope together with some piece of paper with
  156. your  request  and your address on it or print out the orderform and then post
  157. it to me.
  158.  
  159.    Delivery  may  take  two  to  eight  weeks.   Usually you will be sent your
  160. registered  version  right  away,  but  if  a  new  version  is imminent to be
  161. completed, you will get that one as soon as it becomes available.
  162.  
  163.    I am still searching for somebody or a company who distributes this program
  164. as a commercial product, so I can spend my time in developing new features and
  165. not  in  pasting  stamps on envelopes.  So be free to contact me to relieve my
  166. pain!
  167.  
  168.    The  reqtools.library  this  program  uses  starting with V1.8 is copyright
  169. 1991/1992 by Nico François.  That's what I call cool!
  170.  
  171.  
  172.  
  173. 1.2 - Distribution
  174. -------------------
  175.  
  176.    Basically,  the  test  version of Crunch-Mania may be distributed freely as
  177. long as the following conditions are met:
  178.  
  179.    The  Distributor  may  only  charge  a fee up to the costs of obtaining any
  180. common  public  domain  disk.  The distributor agrees to stop distributing the
  181. programs and data involved on request of the author.  The distributor may only
  182. distribute  an  unmodified copy of the original program, with all the supplied
  183. documentation and copyright notices left intact.
  184.  
  185.  
  186.  
  187. 1.3 Support
  188. ------------
  189.  
  190.    If  you  have any suggestions, bug reports or questions, please contact the
  191. author at the above address.
  192.  
  193.    When  sending bug reports, please describe exactly under what circumstances
  194. the  bug occured, what equipment was used and what happened.  If possible also
  195. try  to give me enough information to reproduce the bug.  It is very difficult
  196. to  find  bugs  when  you don't know exactly what happened.  Please don't just
  197. send messages like "my machine sometimes crashes when I try to load xxx", that
  198. really  doesn't  help  me.  If possible, submit the offending file in crunched
  199. and original state to me so I can test it myself, or give me a pointer where I
  200. can find the files.
  201.  
  202.  
  203.  
  204. 1.4 License
  205. ------------
  206.  
  207. 1.   This  license  applies  to  the  product  called "Crunch-Mania", a set of
  208. programs  for  the Commodore-Amiga computer, published by Thomas Schwarz under
  209. the  concepts  of ShareWare, and the accompanying documentation, example files
  210. and  anything  else  that  comes  with  the  original distribution.  The terms
  211. "Programs",  "Crunch-Mania"  and  "CrM"  below,  refer  to  this product.  The
  212. licensee is addressed as "you".
  213.  
  214. 2.   You  may  copy and distribute verbatim copies of the programs' executable
  215. code  and  documentation  as  you receive it, in any medium, provided that you
  216. conspicuously   and   appropriately  publish  only  the  original,  unmodified
  217. programs,  with  all  copyright notices and disclaimers of warranty intact and
  218. including  all the accompanying documentation, example files and anything else
  219. that came with the original.
  220.  
  221. 3.   You   may   not   copy  and/or  distribute  these  programs  without  the
  222. accompanying  documentation  and  other  additional  files  that came with the
  223. original.   You  may  not  copy  and/or  distribute modified versions of these
  224. programs.
  225.  
  226. 4.   You may not copy, modify, sublicense, distribute or transfer the programs
  227. except  as  expressly  provided  under this license.  Any attempt otherwise to
  228. copy,  modify,  sublicense,  distribute  or transfer the programs is void, and
  229. will  automatically  terminate  your  rights  to  use  the programs under this
  230. license.   However, parties who have received copies, or rights to use copies,
  231. from you under this license will not have their licenses terminated so long as
  232. such parties remain in full compliance.
  233.  
  234. 5.   By  copying,  distributing  and/or  using  the programs you indicate your
  235. acceptance of this license to do so, and all its terms and conditions.
  236.  
  237. 6.   Each  time  you  redistribute  the  programs, the recipient automatically
  238. receives  a  license from the original licensor to copy, distribute and/or use
  239. the  programs  subject  to these terms and conditions.  You may not impose any
  240. further restrictions on the recipients' exercise of the rights granted herein.
  241.  
  242. 7.   You  may  not  disassemble,  decompile,  re-source  or  otherwise reverse
  243. engineer the programs.
  244.  
  245. 8.   You  may  use  the  programs  for  a  period of up to 30 days for testing
  246. purposes.  After that, you have to register.
  247.  
  248. 9.   If  you  wish  to  incorporate parts of the programs into other programs,
  249. write to the author to ask for permission.
  250.  
  251. 10.  You  agree  to  cease  distributing  the  programs  and  data involved if
  252. requested to do so by author.
  253.  
  254. 11.  You may charge a fee to recover distribution costs.  The fee for diskette
  255. distribution  may not be more than the cost to obtain any common public domain
  256. disk.
  257.  
  258. 12.  Only  the  test  version  is  intended  to be distributed, the registered
  259. version may only be used by registered users and nobody else.
  260.  
  261.  
  262.  
  263. 1.5 - Disclaimer
  264. -----------------
  265.  
  266.    THERE  IS  NO  WARRANTY  FOR  THE  PROGRAMS,  TO  THE  EXTENT  PERMITTED BY
  267. APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
  268. AND/OR  OTHER  PARTIES  PROVIDE  THE  PROGRAMS "AS IS" WITHOUT WARRANTY OF ANY
  269. KIND,  EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  270. WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR  A PARTICULAR PURPOSE.  THE
  271. ENTIRE  RISK  AS  TO  THE QUALITY AND PERFORMANCE OF THE PROGRAMS IS WITH YOU.
  272. SHOULD  THE  PROGRAMS  PROVE  DEFECTIVE,  YOU ASSUME THE COST OF ALL NECESSARY
  273. SERVICING, REPAIR OR CORRECTION.
  274.  
  275.    IN  NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
  276. ANY  COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE PROGRAMS AS
  277. PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  278. INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
  279. THE PROGRAMS (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
  280. INACCURATE  OR  LOSSES  SUSTAINED  BY YOU OR THIRD PARTIES OR A FAILURE OF THE
  281. PROGRAMS  TO  OPERATE  WITH  ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
  282. PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  283.  
  284.  
  285.  
  286. 1.6 - Future Plans
  287. -------------------
  288.  
  289.    The program is planned to be a real multi-talent.  So a disk archiver and a
  290. files archiver will be added as soon as I have any spare time.  But my special
  291. attention  will  be  given  to  the  development  of faster and more effective
  292. algorithms.  Another goal is to adapt the GUI to Commodore's styleguide rules.
  293.  
  294.    If  you  register  and support my program, you will speed up the release of
  295. new  and  better  versions.  If there is little demand I may drop this project
  296. and start coding something else and that would be a great pity.
  297.  
  298.  
  299.  
  300. 1.7 - Why buy the registered Version?
  301. --------------------------------------
  302.  
  303.    Well,  first  of all you should buy the registered version, if you use this
  304. program  for  a  longer  time.   With  a  registration you will support future
  305. releases.   The  registered  version  is  faster  both  in  crunching  and  in
  306. decrunching.  With the registered version you can decrunch reloc files and not
  307. only   data   files.    Registered   users   get  the  latest  version  of  my
  308. run-time-data-decruncher (RTDD) which is very useful e.g.  for crunching icons
  309. or  include  files, they will be automatically decrunched.  The source code of
  310. the  decruncher  is  also  provided  to  be  implemented in your own releases.
  311. Registered  users  receive  a  library that crunches and decrunches faster.  A
  312. registered  user gets the latest version of this product plus the next version
  313. as  soon  as  it  gets  available!   A  program worth using is a program worth
  314. buying!
  315.  
  316.  
  317.  
  318.  
  319.  
  320. 2 - General Information
  321. ========================
  322.  
  323.  
  324. 2.1 - Outward Appearance
  325. -------------------------
  326.  
  327.    The  program opens a 2 planes intuition screen which is *NO* public screen.
  328. It   uses  the  intuition.library  for  full  multitasking  compatiblity,  the
  329. gadtools.library  for  nicer  gadgets  and menus and the reqtools.library ((c)
  330. Nico  Francois)  for nice requesters.  It is self-detaching so you do not need
  331. to call it with "run".  You can either run it from CLI or from the Workbench.
  332.  
  333.    The program is controlled by gadgets and menus.  On the right side there is
  334. an  area for tables and error messages and at the bottom there is a statusline
  335. combined  with  a  percentage display which indicates what the program is just
  336. doing.
  337.  
  338.  
  339.  
  340. 2.2 - Numbers Input/Output
  341. ---------------------------
  342.  
  343. Input:
  344.    You  can  enter  hex  and decimal numbers, but hexadecimal numbers are only
  345. recognized  with  a  leading  "$".   To  get negative numbers put a "-" at the
  346. beginning  of  the  line.   An  empty gadget has the same effect as one with a
  347. zero, sometimes this also means that you want to disable this option, e.g.  an
  348. empty  "Stack  At"-gadget  means  that  you  don't  want to set the stack to a
  349. special  address.   Some  extra  functions  can  be  reached by entering chars
  350. instead of numbers.
  351.  
  352. Output:
  353.    The  output  follows  the  same  rules  as  the  input:   a "$" indicates a
  354. hexadecimal  number,  the rest is decimal.  But there is one exception:  while
  355. loading  executables  in  the  Address-  or  Link-Mode  the  dehunker displays
  356. hexadecimal  numbers  without  a leading "$".  This has not been forgotten but
  357. left out as a result of lack of space.
  358.  
  359.  
  360.  
  361. 2.3 - System Requirements
  362. --------------------------
  363.  
  364.    For  packing  small  files  512KB  may  suffice  but the full power of this
  365. program can only be obtained with at least 1MB memory resulting from 200-400KB
  366. of tables depending on the version, the crunchmode and the offset.  Two drives
  367. are  comfortable  but not necessary.  No problems have occured under Kickstart
  368. 1.2, 2.0 and 3.0, so it should also work under 1.3, 2.x and 3.x+.
  369.  
  370.  
  371.  
  372. 2.4 - Other Information
  373. ------------------------
  374.  
  375.    There  are  no known bugs.  Nevertheless the author is in no way liable for
  376. any  errors  and gurus invoked by the Program.  In most cases the user himself
  377. produces the errors by misusing the Program.
  378.  
  379.    This  document  will  only  deal  with the important things.  Understanding
  380. minor details like Filelen is expected.  These things are left out.
  381.  
  382.  
  383.  
  384. 2.5 - A Word on the Keys
  385. -------------------------
  386.  
  387.     You  may  invoke  actions by pressing special keys.  These actions are the
  388. same  as  the  corresponding  gadgets  would cause.  The key that stands for a
  389. certain gadget is underlined in the text next to or in the gadget.
  390.  
  391.     When pressing a key, the gadget behaves as if you had used the mouse, i.e.
  392. it looks like being pressed down.  In this state no actions have yet happened,
  393. you may cancel your choice by pressing one of the <Shift> keys.  Otherwise the
  394. action  will  be  performed  as  supposed.   Only  one key at the same time is
  395. regarded as pressed, keys that are pressed while an other key is still pressed
  396. will be ignored.
  397.  
  398.  
  399.  
  400.  
  401.  
  402. 3 - Functions, Options & Features
  403. ==================================
  404.  
  405.  
  406. 3.1 - Command Line Options
  407. ---------------------------
  408.  
  409.    Here  is  a list of all options and parameters available and adjustable via
  410. the  CLI.  The same options can be used in the configuration file "S:CrM.cfg".
  411. This  file  is  processed  before  the  command  line,  so you can change your
  412. defaults  via the CLI.  A "+" instead of a "-" in front of the option reverses
  413. the result.
  414.  
  415.  
  416. 3.1.1 - `?' - CLI Help
  417. -----------------------
  418.  
  419.    This  option lists all currently available options in the CLI to give you a
  420. brief  overview of what you can do there and then asks for a new command line.
  421. This  option  has to be the first in the command line and no other options may
  422. be specified with it.
  423.  
  424. EXAMPLE
  425.  
  426. 1> CrM ?
  427.  
  428. Crunch-Mania V1.9r - Copyright (c) 1991-93 Thomas Schwarz
  429.  
  430. Command Line Options:
  431.        .
  432.        :
  433.  
  434. Enter Command Line:
  435.  
  436. (Well with <Esc>-codes this looks a bit nicer)
  437.  
  438.  
  439. 3.1.2 - `-c' - Set Screen Colors
  440. ---------------------------------
  441.  
  442.    With  this option followed by four hexadecimal numbers you can set your own
  443. personally  preferred screen colors fitting your needs.  The highest nibble of
  444. each number stands for the red part of the color, the mid nibble for the green
  445. part and the lowest nibble for the blue part.
  446.  
  447. EXAMPLES
  448.  
  449. 1> CrM -c$889 $2 $ccd $358                ;These are the default colors.
  450. or
  451. 1> CrM -c$0 $bbb $2a2 $137
  452.  
  453.  
  454. 3.1.3 - `-d' - Auto Makedir
  455. ----------------------------
  456.  
  457.    This  option comes into effect when you crunch whole directories or use the
  458. multiselect  feature  of the filerequester and you select a subdir.  When this
  459. option  is  active  this  dir  will be automatically created when CrM tries to
  460. access  a file located in this dir, otherwise there will appear an information
  461. requester.  When you deny this requester the whole dir is skipped.
  462.  
  463. EXAMPLES
  464.  
  465. 1> CrM +d                              ;lets a requester appear
  466.  
  467.  
  468. 3.1.4 - `-e' - Set Extra Mem Size
  469. ----------------------------------
  470.  
  471.    As  this  program  does  not  support  floating compression, the source and
  472. destination  memory  blocks  overlap  to  reduce the memory needed.  Extra Mem
  473. specifies the distance between the two blocks.
  474.  
  475.    The  error  message  "File  not  crunchable!!!" indicates that the cruncher
  476. would  have  overwritten  some  data  which  has  not  yet been processed with
  477. crunched  data.   Nevertheless you can crunch those files by setting extra mem
  478. to a higher value, but the files usually then become longer than the original.
  479.  
  480.    Extra  Mem  may  be set by the option `-e' directly followed by a number in
  481. the range from 100 to 10000. Default is 100.
  482.  
  483. EXAMPLES
  484.  
  485. 1> CrM -e100                           ; Sets Extra Mem to 100
  486. or
  487. 1> CrM -e$200                          ; Sets Exrta Mem to 512
  488.  
  489.  
  490. 3.1.5 - `-f' - Enable LED-Flash
  491. --------------------------------
  492.  
  493.     While  packing  the power-LED flashes to show the user that the program is
  494. working.  As you certainly know, the power-LED also steers the low-pass filter
  495. for  the  four  audio  channels.   This  may  lead  to  an annoying sound when
  496. listening  to  a  tune  while  crunching.  To prevent this you can disable the
  497. flickering with the option `+f', default is on.
  498.  
  499. EXAMPLE
  500.  
  501. 1> CrM -f                    ;Enable LED-Flash (default)
  502.  
  503.  
  504. 3.1.6 - `-g' - Segment-BPTR Creation
  505. -------------------------------------
  506.  
  507.    This  option  only  comes into effect in the address and link modes.  There
  508. you  can  relocate  executable to a certain address.  The dos.library does the
  509. same  but  it  adds  the  lenght of a hunk and the pointer to the next hunk in
  510. memory  to  all  hunks.   Normally this is only for internal DOS use, but some
  511. programs  use  these BPTRs to calculate the addresses of their hunks.  You can
  512. enable  the  creation  of  BPTRs with this option so that these programs don't
  513. crash  any more.  As you don't need this option very often the default setting
  514. is off.
  515.  
  516. EXAMPLE
  517.  
  518. 1> CrM -g            ;now BPTRs are created
  519.  
  520.  
  521. 3.1.7 - `-h' - Set Huffman Buffer Size
  522. ---------------------------------------
  523.  
  524.    This  option  can  be  used  to  set  the  size  of  the buffer used in the
  525. LZ-Huffman  compression  mode  for  collecting  statistics.   The size of this
  526. buffer  affects  the  compression  ratio  in unpredictable ways.  As a general
  527. rule,  keep  this  at  the default, but if you are compressing homogenous data
  528. with  an  approximately fixed relative frequency of symbols (like text files),
  529. setting  this  to  a large value will improve compression.  Binaries generally
  530. compress best with the default setting.
  531.  
  532.    The  Huffman  buffer  may  be  of  any  size between 4K and 64K and must be
  533. specified immediately following the `-h' string, in kilobytes.
  534.  
  535. EXAMPLE
  536.  
  537. 1> CrM -h32                 ;Sets the Huffman buffer size to 32768 (32K) bytes
  538.  
  539. The default Huffman buffer size is 16K.
  540.  
  541.  
  542. 3.1.8 - `-i' - Set Subdir-Level
  543. --------------------------------
  544.  
  545.    CrM  takes  care of this option when you want to crunch an entire directory
  546. or  use  the  multiselect  feature of the filerequester and select dirs.  This
  547. number  specifies  the  level  upto  which  the  dirs are scanned.  The number
  548. follows immediately after the "-i", see examples for more details. Accepted
  549. values range from "-1" to "127".
  550.  
  551.    Let's  say  you  want to crunch the whole ramdisk and let's say yours looks
  552. like  mine  below.   If  you  specify "-1" as number the whole ramdisk will be
  553. compressed.   If  you  enter "0" only "dirlist" will be crunched because it is
  554. the only file in the rootdir.  When you take "1" as the number CrM will crunch
  555. "dirlist"  and  the  files  "ASM-One.Pref" to "ZOOMOPTS" in the env directory.
  556. Taking "2" as number will have the same effect as "-1" (in this example case).
  557.  
  558. RAM DISK:
  559.      ENV (dir)
  560.           GadToolsBox (dir)
  561.             GadToolsBox.prefs
  562.           egs (dir)
  563.             mouse.prefs
  564.           Sys (dir)
  565.             floppy.prefs                     font.prefs
  566.             icontrol.prefs                   input.prefs
  567.             locale.prefs                     overscan.prefs
  568.             palette.ilbm                     pointer.ilbm
  569.             printer.prefs                    printergfx.prefs
  570.             printerps.prefs                  screenmode.prefs
  571.             serial.prefs                     sound.prefs
  572.             sysfont.prefs                    wb.pat
  573.             wbconfig.prefs                   wbfont.prefs
  574.             win.pat
  575.        ASM-One.Pref                     NEWLIST_LANG
  576.        TERMPATH                         xprascii
  577.        xprzspeed                        ZedZapWindow
  578.        ZOOMOPTS
  579.      Clipboards (dir)
  580.      T (dir)
  581.   dirlist
  582.  
  583. EXAMPLES
  584.  
  585. 1> CrM -i-1                  ;take whole directory
  586.  
  587. 1> CrM -i1                   ;crunch sourcedir and the files of the dirs in it
  588.  
  589. Default is -1 (scan entire directory).
  590.  
  591.  
  592. 3.1.9 - `-I' - Ignore S:CrM.cfg
  593. --------------------------------
  594.  
  595.    In  the  configuration  file  "S:CrM.cfg" you may specify your own personal
  596. default  settings which are loaded immediately after the start of the program.
  597. This  option  prevents CrM from loading the config file what may come in handy
  598. when  you don't have your boot disk inserted.  This option has to be the first
  599. in the command line but others may also be set there.
  600.  
  601. EXAMPLE
  602.  
  603. 1> CrM -I +r       ;don't load config file and don't load reqtools.library
  604.  
  605. 1> CrM -I          ;don't load config file and use internal defaults instead
  606.  
  607.  
  608. 3.1.10 - `-p' - Set Taskpriority
  609. ---------------------------------
  610.  
  611.    This   value  sets  the  taskpriority  of  the  background  task  which  is
  612. responsible for loading, crunching and saving.  The task handling the windows,
  613. menus  and gadgets always has a higher priority so that it is not frozen while
  614. crunching.   Nevertheless  you have to select the priority wisely because high
  615. priorities  will  interfere multitasking which makes this machine so powerful!
  616. This value ranges from "-128" to "126".
  617.  
  618. EXAMPLE
  619.  
  620. 1> CrM -p-5                            ;Set Pri to -5
  621.  
  622. Default is -1.
  623.  
  624.  
  625. 3.1.11 - `-r' - Enable reqtools.library
  626. ----------------------------------------
  627.  
  628.    The   reqtools.library   is   loaded  by  default  and  is  used  for  user
  629. communication.   When you are short of memory you may prevent CrM from loading
  630. it with the option `+r'.
  631.  
  632.    The   reqtools.library   is   copyright  Nico  Fracois.   It  is  used  for
  633. filerequesters,  numberrequesters  and informationrequesters.  CrM can operate
  634. without this library, but it is more comfortable to use it.
  635.  
  636. 1> CrM +r            ;don't open reqtools.library
  637.  
  638.  
  639. 3.1.12 - `-s' - Enable Sample Encoding
  640. ---------------------------------------
  641.  
  642.    This   feature  is  especially  designed  for  compressing  8-Bit  samples.
  643. Generally  this option will only reduce the crunched size with samples as this
  644. algorithm  is  comparable  with  delta-encryption.  It calculates the relative
  645. difference  between  two  bytes instead of the absolute values.  Now imagine a
  646. sine  wave.  The difference between two bytes is in the range of -4 to +4, but
  647. the absolute values go from -128 to +127.  The algorithm will convert the file
  648. into one with about 20 different values instead of 256.
  649.  
  650.    To  give  you  a hint on the efficiency of this algorithm I have put up the
  651. following  chart.   The  files  are standard 31 Instruments Protracker modules
  652. taken from the "Mayday Attack Vol.  II" packed with the LZ-Huffman compression
  653. algorithm.  The proportional numbers reflect the saved bytes.
  654.  
  655.     Name                   | Original | Sample-Mode=Off |  Sample-Mode=On
  656.     -----------------------+----------+-----------------+----------------
  657.     mod.acid_yell          |   230764 | 19.7%    185338 | 27.0%    168350
  658.     mod.badada             |   112742 | 35.1%     73196 | 41.2%     66338
  659.     mod.flatliner          |   140886 | 29.3%     96648 | 47.8%     73612
  660.     mod.fuck_you!          |   142652 | 24.8%    107238 | 33.3%     95202
  661.     mod.gotta_speed        |   108594 | 21.4%     85338 | 33.7%     71992
  662.     mod.hard_attack        |   108100 | 47.0%     57260 | 54.6%     49118
  663.     mod.leck_mich_am_arsch |   125486 | 39.0%     76528 | 46.3%     67338
  664.     mod.something_big      |   162756 | 19.5%    131092 | 27.2%    118556
  665.     mod.world_of_terror    |   102114 | 48.2%     52932 | 51.8%     49174
  666.     mod.you_gotta_believe  |    85092 | 24.7%     64084 | 26.6%     62490
  667.     -----------------------+----------+-----------------+----------------
  668.     Total                  |  1319186 | 29.5%    929654 | 37.7%    822170
  669.  
  670. EXAMPLE
  671.  
  672. 1> CrM -m        ;Enable Sample Encoding
  673.  
  674. Default is off, as most files compress worse with it.
  675.  
  676.  
  677. 3.1.13 - `-t' - Set Textbuffersize
  678. -----------------------------------
  679.  
  680.    This  value  specifies  the  size  of  the  history  buffer  in  lines.  On
  681. Kick1.2/1.3 this value is fixed to 18, as my version of the gadtools13.library
  682. always crashed when I tried to scroll the outputfield whith the slider next to
  683. it.  You may enter values from "18" to "999".
  684.  
  685. EXAMPLE
  686.  
  687. 1> CrM -t200                           ;Set history size to 200 lines
  688.  
  689. Default is 100.
  690.  
  691.  
  692. 3.1.14 - `-u' - Enable Free Memory Updating
  693. --------------------------------------------
  694.  
  695.    The  title bar of the screen or the window displays the currently available
  696. unused  memory.   This  display is updated every 1/10 second.  You can disable
  697. this with `+u' to gain a bit more speed, but it's not very much.
  698.  
  699. EXAMPLE
  700.  
  701. 1> CrM +u                    ;no updating
  702.  
  703.  
  704. 3.1.15 - `-y' - Encrypt Data
  705. -----------------------------
  706.  
  707.    Starting  with CrM V1.9 you have the possiblity to encrypt your data with a
  708. password.   You  have  to  enter this password when the crunching is finished.
  709. You  will  see  only  spaces  in the requester, therefore you have to enter it
  710. twice  to  be  sure  that  you have entered it correctly.  Currently this only
  711. works in the Data-Mode, in all other modes the state of this flag is ignored.
  712.  
  713. EXAPMLE
  714.  
  715. 1> CrM -y                              ;Enable pw encryption
  716.  
  717. Default is off.
  718.  
  719.  
  720.  
  721. 3.2 - Menu Options
  722. -------------------
  723.  
  724.    In the following lines the functions of the menus are described.  Menus are
  725. accessible via the right mousebutton.
  726.  
  727.  
  728. 3.2.1 - Project Menu
  729. ---------------------
  730.  
  731.    In  this  menu  the basic operations have found their place.  They have the
  732. same  effect as the corresponding gadgets, just for people who like menus more
  733. than gadgets.  For "About" and "Save Prefs" there is no corresponding gadget.
  734.  
  735.  
  736. 3.2.2 - <a> - About
  737. --------------------
  738.  
  739.    This  will display the text that is shown when you start the program.  When
  740. the  reqtools.library  is  active  a  requester  is  called  instead.   In the
  741. registered version this requester also displays the user's address.
  742.  
  743.  
  744. 3.2.3 - <l> - Load File
  745. ------------------------
  746.  
  747.    Load a File, has the same function as Load gadget, see chapter 3.3.
  748.  
  749.  
  750. 3.2.4 - <c> - Crunch
  751. ---------------------
  752.  
  753.    Crunch the loaded data, has the same function as Crunch gadget, see chapter
  754. 3.3.
  755.  
  756.  
  757. 3.2.5 - <s> - Save File
  758. ------------------------
  759.  
  760.    Save a File, has the same function as Save gadget, see chapter 3.3.
  761.  
  762.  
  763. 3.2.6 - Save Prefs
  764. -------------------
  765.  
  766.    This  function  has  no  equivalent  gadget.   It  creates  the config file
  767. "S:CrM.cfg" and saves the current status of the menus to it.  You may edit the
  768. created file with any texteditor for the prefs are saved as normal ASCII-text.
  769.  
  770.  
  771. 3.2.7 - <i> - Iconify
  772. ----------------------
  773.  
  774.    Close  screen  and  window and open a small window on the workbench screen,
  775. same effect as Iconify Gadget, see chapter 3.3.
  776.  
  777.  
  778. 3.2.8 - <Q> - Quit
  779. -------------------
  780.  
  781.    Leave Crunch-Mania, same as Quit gadet, see chapter 3.3.
  782.  
  783. NOTE: you have to press <Shift> when using the keyboard shortcut.
  784.  
  785.  
  786. 3.3.10 - Options Menu
  787. ----------------------
  788.  
  789.    This  menu  contains  several  preferences  and values that are used in the
  790. program.   There  are  no  corresponding gadgets, so you have to use the menu.
  791. Some options are disabled when the the reqtools.library is not active.
  792.  
  793.  
  794. 3.2.11 - Free Mem Update
  795. -------------------------
  796.  
  797.    See chapter 3.1 for details.  Default is on.
  798.  
  799.  
  800. 3.2.12 - reqtools.library
  801. --------------------------
  802.  
  803.    See chapter 3.1 for details.  Default is on.
  804.  
  805.  
  806. 3.2.13 - Segment-Ptrs
  807. ----------------------
  808.  
  809.    Consult chapter 3.1 for more information.  Default is off.
  810.  
  811.  
  812. 3.2.14 - LED-Flash
  813. -------------------
  814.  
  815.    See chapter 3.1 for further information.  Default is on.
  816.  
  817.  
  818. 3.2.15 - Sample-Mode
  819. ---------------------
  820.  
  821.    See chapter 3.1 for more details.  Default is off.
  822.  
  823.  
  824. 3.2.16 - Encrypt Data
  825. ----------------------
  826.  
  827.    See chapter 3.1 for datails.  Default is off.
  828.  
  829.  
  830. 3.2.17 - Auto Makedir
  831. ----------------------
  832.  
  833.    See chapter 3.1 for details.  Default is on.
  834.  
  835.  
  836. 3.2.18 - Priority
  837. ------------------
  838.  
  839.    Here  you can set the task priority of Crunch-Mania.  There are three given
  840. possibilities  (-3, 0, 3) the custom option The current task priority is shown
  841. behind the double point.  Select your priority wisely, because high priorities
  842. will  interfere  multitasking, and that's what makes this machine so powerful!
  843. See chapter 3.1 for more information.  Default is -1.
  844.  
  845.  
  846. 3.2.19 - Include Subdirs
  847. -------------------------
  848.  
  849.    Here  you  can  set  the  rekursion depth for scanning dirs.  There are two
  850. predefined  possibilities,  "All  Subdirs"  which  equals  -1 and "No Subdirs"
  851. meaning 0, and the Set Level option where you can set any level between -1 and
  852. 128.  See chapter 3.1 for more details.  Default is -1.
  853.  
  854.  
  855. 3.2.20 - Extra Mem
  856. -------------------
  857.  
  858.    See chapter 3.1 for detailed description.  The current value is shown after
  859. the  double point.  You may change it by selecting the menu item The new value
  860. will be used when the next file is loaded.  Default is 100.
  861.  
  862.  
  863. 3.2.21 - Huffman-Buf
  864. ---------------------
  865.  
  866.    See chapter 3.1 for more details.  Default size is 16K.
  867.  
  868.  
  869. 3.2.22 - Text Buffer
  870. ---------------------
  871.  
  872.    See chapter 3.1 for more details.  Default size is 100 lines.
  873.  
  874.  
  875.  
  876. 3.3 - Gadgets
  877. --------------
  878.  
  879.    Most  gadgets  behave as you expect it.  Only the mode gadgets (Reloc/Data/
  880. Address/Link) are a bit special.  You can only change the mode when the buffer
  881. is empty.  To empty the buffer you have to press the abort gadget.
  882.  
  883.  
  884. 3.3.1 - Quit
  885. -------------
  886.  
  887.    Uuh,  I  forgot  the function of this gadget.  Well, I think you should not
  888. use  it,  cause it's the end of everything.  It's the most senseless gadget of
  889. all.   Anyway,  when  pressing  it  a  requester  is invoked where you have to
  890. confirm your choice.
  891.  
  892.  
  893. 3.3.2 - Abort
  894. --------------
  895.  
  896.    Generally  you  need this gadget only to stop crunching.  But you also have
  897. to  press  this  button  when you e.g.  loaded something in reloc mode and now
  898. want  to  load  something in data mode.  You will experience that you can't do
  899. this  unless  you  press  this gadget.  You may not change the crunchmode when
  900. something  is  loaded because then the decrunchers would not fit.  By pressing
  901. this gadget you unlock that feature.
  902.  
  903.  
  904. 3.3.3 - Iconify
  905. ----------------
  906.  
  907.    This  closes  the main screen and opens a new small window on the workbench
  908. screen.  The new window displays the togo-counter, so you can crunch something
  909. and  see  when it has finished.  You may return to the main screen by pressing
  910. the right mousebutton when the window is active.
  911.  
  912.  
  913. 3.3.4 - Crunchmode
  914. -------------------
  915.  
  916.    Here you may select between the four crunchmodes.  These are:  Reloc, Data,
  917. Address,  Link.   There  is  also an "Auto" Checkbox.  When it is selected CrM
  918. automatically  detects  whether  a  file  is executable or not and changes the
  919. Crunchmode accordingly.  This is only for registered users.
  920.  
  921.    In  the  reloc  mode  you can load any executable except overlayed files (I
  922. think  there  are not too many).  The hunk structure is analysed and displayed
  923. while  loading.   Name,  Symbol  and  Debug hunks are skipped, Reloc hunks are
  924. sorted  and  precompensated.   This new reloc table format is shorter and even
  925. better crunchable than the one DOS uses!
  926.  
  927.    The  data mode was designed for normal not-executable data files.  They are
  928. loaded  into  memory, compressed and then saved with a small data header.  The
  929. small comment which is also saved is for RTDD which takes the original len out
  930. of  it  without opening the file resulting in a faster access when reading the
  931. dir.
  932.  
  933.    The address mode is a bit similar to the ByteKiller cruncher.  Here you can
  934. load  executables  and  fix them to a special address, load position-depentant
  935. code  or  just  load  pure  data.   The  decruncher  then  puts this data to a
  936. specified  memory  block  and  jumps  somewhere.   This crunchmode is not very
  937. DOS-friendly  (especially the decruncher) but very handy e.g.  for bootloading
  938. games.   The dehunker displays some hexadecimal numbers without a leading "$",
  939. so don't get confused.
  940.  
  941.    The  link  mode  resembles  tetrapack/defpack.   In  this mode you can load
  942. several  executable  and  data  files into a precleared memory block which you
  943. have  to  define first.  Executables are relocated to certain addresses inside
  944. the  block,  data  files  are loaded to a specified position in the block.
  945.  
  946.    I recomend to use the last two modes only with proggies which do not return
  947. to the CLI because important system-parameters and -tables may be destroyed.
  948.  
  949.    When  the  Auto  checkbox  is checked CrM behaves in an itelligent way.  It
  950. detects  whether  the loaded file is executable or not, and then decides which
  951. mode (reloc or data) is the right one.
  952.  
  953.  
  954. 3.3.5 - LowMem / HighMem
  955. -------------------------
  956.  
  957.    These two gadgets are only available in link mode.  They specify the memory
  958. block to which the files are loaded.  This block is buffered someplace else in
  959. memory  while  loading and crunching, so you don't have to care about crashes.
  960. LowMem and HighMem both have to be even addresses and HighMem has to be higher
  961. than  LowMem.  It is recommended to set the "Decrunch to" address to LowMem to
  962. avoid unwanted results.
  963.  
  964.  
  965. 3.3.6 - Load / Fix File to
  966. ---------------------------
  967.  
  968.    These  two  gadgets  are  active in the address and link mode.  The "Load /
  969. Fix"  gadget  determines whether an executable is loaded as a data file (Load)
  970. or  relocated  to  the address given in the string gadget below it (Fix).  For
  971. data  files  this  cycle gadget has no effect.  In the address mode the string
  972. gadget is only important for executables, it contains the address where to fix
  973. them  to.  In the link mode this gadget affects both executable and data files
  974. in the same way:  with the address in the gadget an offset to the beginning of
  975. the  memory  block  is calculated and the file is then loaded there.  The file
  976. has to fit completely in the given memory block.
  977.  
  978.  
  979. 3.3.7 - Load
  980. -------------
  981.  
  982.    With  the  "Load" gadget you may load files in all modes.  When there is no
  983. filename  given  in  the string gadget next to it, or when the filename in the
  984. string  gadget has not been changed since the last loading, a reqtools.library
  985. filerequester  apppears  (when  enabled).   After  pressing  "Load"  and  then
  986. selecting  a  file  the  program  immediatly begins to load the file.  You may
  987. select more that one file and even dirs by holding down the <Shift> key.  Then
  988. you will be asked for a destination dir.
  989.  
  990.    With the DIR gadget next to the load filename you may select a directory to
  991. crunch.   Now  the  whole directory will be packed, subdirs may be included or
  992. not,  this depends on the Include Subdirs Level (see chapter 3.1 for details).
  993. You may activate the string gadget by pressing <Return>.
  994.  
  995.    When  loading  an  executable its hunk structure is displayed in the output
  996. field  either with decimal numbers (reloc) or with hexadecimal numbers (adress
  997. and  link),  where  Range  is the part the entire hunk occupies and Len is the
  998. length of the actual data in the hunk.  The filelength is shown below the load
  999. string  gadget.  "Processed Len" only appears in the Reloc mode in the display
  1000. field  and shows the size of the stripped and precompressed data.  This is the
  1001. len of the data the cruncher really crunches.
  1002.  
  1003.    When  you load a file that has been crunched in reloc or in data mode it is
  1004. automatically  decrunched  presuming  you  selected  the right mode (reloc for
  1005. executable  files  and data for data files) so you can recrunch it or save the
  1006. original file.  After it has been decrunched the file is treated as if you had
  1007. loaded it in its original form.
  1008.  
  1009.  
  1010. 3.3.8 - Crunchmode (Algorithm)
  1011. -------------------------------
  1012.  
  1013.    This  is  again  a  rotating  gadget.   You  may  select  beween  these two
  1014. algorithms:  LZ-Huffman and CrM-Normal.
  1015.  
  1016.    LZ-Huffman  is  the  best  of these algorithms, but not the fastest.  Files
  1017. crunched  in  this mode need 1248 bytes of additional memory to decrunch.  The
  1018. decruncher  is  also  slightly slower than the one of the CrM-Normal mode.  To
  1019. crunch files in this mode you need continuous memory blocks with the sizes:
  1020.    128K
  1021.  + 5*Crunchoffset
  1022.  + Huffman Buffer
  1023. With  the  default values of $7ffe and 16K this will lead to a memory usage of
  1024. 304K.
  1025.  
  1026.    The  advantage  of  the  CrM-Normal mode is its fast decruncher and its low
  1027. memory usage.  But its results are the worst of the two modes partly caused by
  1028. the  Crunchoffset which is limited to $4200.  It needs no additional memory to
  1029. decrunch.  The memory used while crunching is shown in the following table:
  1030.    128K
  1031.  + 5*Crunchoffset
  1032. With  the  default  Crunchoffset  of $4200 this will lead to a memory usage of
  1033. 210K.
  1034.  
  1035.  
  1036. 3.3.9 - Crunchoffset
  1037. ---------------------
  1038.  
  1039.    This  value  specifies  the  range  in which redundant data is searched and
  1040. eliminated.   Higher  values  produce  better  results  but also longer crunch
  1041. times.   Values  range  from  1  to $4200 in the CrM-Normal mode and from 1 to
  1042. $7ffe  in  the  LZH  mode.   Values  which  are too high will be automatically
  1043. reduced to the maximum.
  1044.  
  1045.  
  1046. 3.3.10 - Crunch
  1047. ----------------
  1048.  
  1049.    Now  you  have started the real crunching process.  This will take a while,
  1050. so  be  patient.   The  ToGo  counter  is  displayed in the status line at the
  1051. bottom.   It  shows how much data has not yet been processed.  This counter is
  1052. permanently  updated  and  is also shown in the Iconify window.  When finished
  1053. the  crunched len of the file is displayed above the save string gadget.  This
  1054. is not the final length!  The decruncher or data header is not yet added.
  1055.  
  1056.    The  error  "File not crunchable!" indicates that there is not enough space
  1057. between  the  original  and  the crunched data.  You may increase Extra Mem to
  1058. avoid this message, but generally these files become longer when crunched.
  1059.  
  1060.    The  message  "Min Security-Distance" shows the distance between the source
  1061. and  destination  memory  block which is needed to decrunch a file in the same
  1062. memory block properly.  The crunched data has to be in front of the decrunched
  1063. data.  For more information have a look at the decruncher source.
  1064.  
  1065.  
  1066. 3.3.11 - Decruncher
  1067. --------------------
  1068.  
  1069.    With  this  gadget you can select the decruncher you want.  Each crunchmode
  1070. has a special set of decrunchers.  Not all gadgets that are displayed are also
  1071. needed  for  the  selected  decruncher.   So  be  careful  to select the right
  1072. decruncher especially in the address and link mode.
  1073.  
  1074.    First  of  all  there is the data mode.  As it is really senseless to put a
  1075. decruncher before a data file there is only the data option.  This will save a
  1076. 14  bytes  data  header  in  front  of the encoded data which is necessary for
  1077. decrunch.  This header is described in the decruncher source.  This decruncher
  1078. does not any other input.
  1079.  
  1080.    Then  there  is  the reloc mode.  If you choose the simple decruncher (it's
  1081. the  shortest  one  with  implemented  decruncher) you have a pretty low level
  1082. decruncher.   When a crunched program is running, twice as much memory is used
  1083. as  needed.   The decruncher doesn't free the needless memory but lets this do
  1084. the  dos.library  after  the whole program has done its job.  You can only use
  1085. this decruncher in combination with the CrM-Normal algorithm.  This decruncher
  1086. takes no input from other gadgets.
  1087.  
  1088.    The  decruncher  you  should  use  is  the normal decruncher.  It frees the
  1089. unnecessary memory before running the program.  Here you can choose whether to
  1090. kill the decruncher or not.  Killing it will result in a bit more free memory,
  1091. a  longer  decruncher  and  the  cli_module in pr_CLI in the process structure
  1092. pointing  on  the  first  hunk  of  the  program  (normally  it  points on the
  1093. decruncher).   Some  programs  need  this (e.g.  CygnusEd).  As you might have
  1094. guessed this decruncher pays attention to the "Kill Decr" gadget.
  1095.  
  1096.    The  latest  decruncher is the library decruncher.  It is the shortest one,
  1097. but you need the CrM.library to run a program with that decruncher.  With this
  1098. decruncher  you  should have no problems with the cli_module pointer.  You can
  1099. use  this  decruncher  to  crunch libraries, fonts, devices, handlers (careful
  1100. with the last two, crunch them only with Kick2.0+ because DOS uses an internal
  1101. jumptable  that  cannot  be  patched  in  Kick1.2/1.3).   This  decruncher  is
  1102. independent of any gadgets.
  1103.  
  1104.    The address and link modes have the same decrunchers.  Normally it suffices
  1105. to use the normal decruncher.  You can tell him where to decrunch the data and
  1106. where  to jump.  When you use the LZ-Huffman algorithm you also have to supply
  1107. a  value  to  the  "LZH-Table  at"  gadget, because this decruncher needs some
  1108. memory for a 1248 bytes large table to build the huffman tree.
  1109.  
  1110.    The  professional  decruncher has some more options.  You can set the stack
  1111. as  well  as  locate  the  decruncher  somewhere  in memory.  You may stop the
  1112. drives,  set the status register and init some important hardware registers or
  1113. addresses.   You  may  let  out  some  options by clearing their gadget.  This
  1114. packer  saves  only  the  really necessary parts and not an ultimate decuncher
  1115. where only some values are changed and much senseless code is dragged along.
  1116.  
  1117.    Finally  you can save the files as data files.  This has the same effect as
  1118. just loading them in data mode.
  1119.  
  1120.  
  1121. 3.3.12 - Decrunch to
  1122. ---------------------
  1123.  
  1124.    The   "Decrunch  To"-address  specifies  the  address  where  the  data  is
  1125. decrunched  to.   By entering here a "p" no special address is taken.  Instead
  1126. of  this some mem is allocated (in the Hunk-Header) and there the data will be
  1127. decrunched to.  "c" has almost the same effect but here it will be in Chip-Mem
  1128. (e.g.  for proggies with internal copperlist).
  1129.  
  1130.  
  1131. 3.3.13 - Jump to
  1132. -----------------
  1133.  
  1134.    "Jump  to"  is  the  address  where  the  decruncher  will  jump  to  after
  1135. decrunching.   In most cases this is the same address as the Decrunch-address.
  1136. If there is a "p" or "c" as the Decrunch-Address, the Jump-Address is relative
  1137. to  the  beginning  of  the  data.  By entering here a "r" the decruncher will
  1138. return to the calling code after decrunching.
  1139.  
  1140.  
  1141. 3.3.14 - Stack at
  1142. ------------------
  1143.  
  1144.    This  gadget  specifies where the stack should be put.  The Stackaddress is
  1145. written into a7 (stackpointer) as the first action before decrunching.
  1146.  
  1147.  
  1148. 3.3.15 - Decruncher at
  1149. -----------------------
  1150.  
  1151.    The decruncher can copy itself to a safe position which is fixed by
  1152. "Decruncher at". Of course this is done before decrunching.
  1153.  
  1154.  
  1155. 3.3.16 - Stop Drives
  1156. ---------------------
  1157.  
  1158.    You  may  stop  all floppies either before decrunching or after decrunching
  1159. (or  both).  The left column is responsible for all actions before decrunching
  1160. and the right one for after.  Stopping drives "lame" will switch off the motor
  1161. but  not  the drive LED (at least it does so with my external drive).  To turn
  1162. it out you have to select "pro".
  1163.  
  1164.  
  1165. 3.3.17 - SR (Status Reg)
  1166. -------------------------
  1167.  
  1168.    The  value  given  in  this  gadget  is  written  in  the  status  register
  1169. immediately before the program is entered.  You may also enter values with the
  1170. supervisor  bit set (e.g.  $2700), the status register is set with the help of
  1171. trap  #0.  This may cause some troubles with accelerated machines when the vbr
  1172. is not at address 0.
  1173.  
  1174.  
  1175. 3.3.18 - Move Gadgets
  1176. ----------------------
  1177.  
  1178.    These are the twenty gadgets placed in five rows with two times two columns
  1179. each.  They are designed to write certain values to special addresses outa the
  1180. data  range.   In  the first column there are the values which can be wordened
  1181. with  a  following  ".w"  (e.g.   $0.w)  and  in  the second one there are the
  1182. addresses  which  are  automatically shortened if possible (like in Ass:  e.g.
  1183. move.w #0,$dff180).  The first two columns are executed before decrunching and
  1184. the  second  two  after.   E.g.   you  can  change the background color before
  1185. decrunching  to  red  and  when decrunching has finished to black.  Or you can
  1186. turn off all interrupts and DMAs.
  1187.  
  1188. EXAMPLES
  1189.  
  1190. 1) move  "$0.w     " , "$dff180  "            ;set background color to black
  1191.    move  "$f00.w   " , "$dff182  "            ;set color1 to red
  1192.  
  1193. You can also combine the above two lines into a single one:
  1194.  
  1195.    move  "$f00     " , "$dff180  "            ;set color0/1 to back/red
  1196.  
  1197. 2) move  "$60000   " , "$6c      "            ;set level 3 interrupt to $60000
  1198.  
  1199. 3) move  "$7fff.w  " , "$dff09a  "            ;disable all interrupts
  1200.  
  1201.  
  1202. 3.3.19 - Save
  1203. --------------
  1204.  
  1205.    The  save  filerequester and filename follow the same rules as described in
  1206. 3.3.7.   The  save  directory may be different to the load directory.  You can
  1207. save  the original file before pressing the crunch button or save the crunched
  1208. file  after  crunching  it.   NOTE:   decrunched executables are never totally
  1209. equal  to  their original state, because some useless hunks are removed, reloc
  1210. tables are sorted and Hunk_Ends are added.  The final file lenght is displayed
  1211. above the save string gadget.
  1212.  
  1213.    When  pressing  the  DIR  gadget next to the save filename you may select a
  1214. destination  directory  for  multiple selected files and for crunching a whole
  1215. directory.  While crunching you can select a new save filename (Save gadget is
  1216. ghosted).
  1217.  
  1218.  
  1219. 3.3.20 - LZH-Table At
  1220. ----------------------
  1221.  
  1222.    This gadget determines where the LZH-Decruncher locates the tables it needs
  1223. to  decrunch  the  data.   This  gadget  is only in the address and link modes
  1224. important  when  you the LZ-Huffman crunch algorithm.  The table is 1248 bytes
  1225. large, so it won't be too hard to find some space for it.
  1226.  
  1227.  
  1228. 3.3.21 - Advanced Options
  1229. --------------------------
  1230.  
  1231.    This  gadget  opens and closes the Advanced Option window.  It contains the
  1232. "Move"  gadgets  and  "Stop  Drives" gadgets.  Compared with older versions it
  1233. looks more jovial this way.
  1234.  
  1235.  
  1236. 3.3.22 - Slider Bar
  1237. --------------------
  1238.  
  1239.    The Slider Bar may be used to scroll the output field.  When the slider bar
  1240. is  at  the  bottom  each  text  that is printed out will cause the display to
  1241. scroll  up,  if  it  is somewhere in the middle, the display will stay at it's
  1242. place but the slider bar will scroll instead.  When the slider bar reaches the
  1243. top,  the  display  will scroll again.  This way you can reread something that
  1244. was previously printed without being disturbed.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250. 4 - Supplied Utilities
  1251. =======================
  1252.  
  1253.    This  section describes the utilities which have to do with this packer and
  1254. which are supplied with this package.
  1255.  
  1256.  
  1257.  
  1258. 4.1 - Run-time Data-Decruncher
  1259. -------------------------------
  1260.  
  1261.    This  utility  is very powerful and useful.  It patches some (6) vectors of
  1262. the  dos.library,  so  any  loaded  datafile will be automatically decrunched.
  1263. When the file is loaded entirely no extra mem is needed, otherwise the program
  1264. will allocate a memoryblock as large as the original file and will decrunch it
  1265. there.   In  all  further  read calls the wanted data is only copied from this
  1266. buffer, so this will also speed up disk-access.  In the current version (v1.9)
  1267. RTDD  supports  all  crunch algorithms (CrM!, CrM2), any Min Security-Len, the
  1268. sample-mode  and password encrypted data.  In combination with the CrM.library
  1269. you  will  be  able  to  crunch  almost  EVERY file without realizing anything
  1270. (except a little slow-down).
  1271.  
  1272. The following entries of the dos.library are patched:
  1273. - Open()
  1274. - Close()
  1275. - Read()
  1276. - Seek()
  1277. - Examine()
  1278. - ExNext()
  1279. When you are running Kick2.0+ these are also patched:
  1280. - ExAll()
  1281. - ExamineFH()
  1282. - OpenFromLock()
  1283.  
  1284. RTDD also supports some command line options:
  1285. "?" ··· This will display a help page.
  1286. "-i" ·· Install Only, DON'T remove RTDD. Useful for scripts.
  1287. "-r" ·· Remove Only, DON'T install RTDD. Useful for scripts.
  1288. When no options are given RTDD assumes that you want to change it's state from
  1289. installed to removed or vice versa.
  1290.  
  1291. You CANNOT run RTDD from the workbench!
  1292.  
  1293. There  have  occured  some strange effects when using RTDD in combination with
  1294. Directory Opus.  I will try to fix this in future versions.
  1295.  
  1296.  
  1297.  
  1298. 4.2 - The CrM.library
  1299. ----------------------
  1300.  
  1301.    This  program  has  the option to save crunched execuatables which will use
  1302. the  CrM.library  to  decrunch.   Furthermore  this library can be used by any
  1303. programmer  to  decrunch data files easily.  Each registered user will get the
  1304. includes  and  autodocs  of the library and may use it in his own productions.
  1305. Registered users also get a faster version of the library.
  1306.  
  1307.    Starting  with  release  1.9  (v4)  the  library  also  includes the crunch
  1308. algorithms,  so  any programmer can use the library to crunch his (or her) own
  1309. data.   CrM  will  also  use  the  library.   Consult the autodocs for further
  1310. information how to program it.
  1311.  
  1312.    The  library  supports Sample encoded and password encoded files.  When you
  1313. want  to  decrunch  a  password  crunched  file the library sets up a reqtools
  1314. requester  where you can enter the password.  The entered password is saved in
  1315. a  list  so you don't have to enter the password all the time.  When you enter
  1316. the same password twice you may remove it (or all passwords) from the list.
  1317.  
  1318.  
  1319.  
  1320. 4.3 - The xpkCRM2.library
  1321. --------------------------
  1322.  
  1323.    This  library  is an xpk interface for the CrM.library.  It uses the crunch
  1324. and  decrunch  routines  of  the LZ-Huffman mode the CrM.library provides.  It
  1325. behaves  like  any  other  standard xpk library, so there should not occur any
  1326. problems with any application using xpk.  It requires CrM.library v4+.
  1327.  
  1328.    The  internal benchmarks which are displayed with the xQuery command do not
  1329. reflect  the real performance of the library.  As I don't own a A3000 i cannot
  1330. execute them correctly.  Sorry for the inconvenience.
  1331.  
  1332.  
  1333.  
  1334. 4.4 - CrMPW
  1335. ------------
  1336.  
  1337.    With  this  little  program  you can add or remove passwords to or from the
  1338. list the CrM.library keeps to decrypt data.  The use of this program is really
  1339. self-explanatory,  just  type  in the program's name to get an overview of the
  1340. parameters.
  1341.  
  1342.    The  commands  are  case-insensitive, but the "all" has to be in lowcase to
  1343. clear the whole list.
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349. 5 - Trivialities
  1350. =================
  1351.  
  1352. Many Thanx may reach:
  1353. - Commodore for this fantastic Computer with Multitasking
  1354. - my HD for having no head-crashs anymore after trashing the v1.8 source
  1355. - Rene for Beta-Testing
  1356. - Michael Mutschler for Beta-Testing and detecting the Enforcer Hits
  1357. - Karsten Weiß for telling me that my GUI is not "styleguide"-like
  1358.     and for testing the xpk sublib (now it works perfect!)
  1359.  
  1360. Greetinx and Handsheix fly over to:
  1361.   Michael, Rene, Tobias, Karsten, Christian, Christoph, Uli, ...
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367. 6 - Performance Test
  1368. =====================
  1369.  
  1370.    This test was done on my Amiga 500 with 7.14MHz, 512K Chip, 512K fake-Fast,
  1371. 2M real-Fast, 105M HD, with all files being loaded from dh0:.
  1372.  
  1373. 1) "PageStream2" - Main program of Pagestream V2.2, crunched as executable
  1374. 437576 bytes, 110 Hunks, 22369 Reloc Offsets
  1375. Using Library-Decruncher when available, Times with loading from dh0:
  1376.  
  1377. Cruncher         Crunched Len  Crunch Time  Decrunch Time  
  1378. CrM 1.8r LZH           178848         235s            12s
  1379. CrM 1.8t LZH           178848         352s            15s
  1380. CrM 1.8r Normal        186932         179s            10s
  1381. CrM 1.8t Normal        186932         303s            10s
  1382.  
  1383.  
  1384. 2) same file as in (1), but crunched as data file
  1385.  
  1386. Cruncher         Crunched Len  Crunch Time  Decrunch Time
  1387. CrM 1.8r LZH           211058         285s            14s
  1388. CrM 1.8t LZH           211058         429s            18s
  1389. CrM 1.8r Normal        230344         185s            12s
  1390. CrM 1.8t Normal        230344         331s            12s
  1391.  
  1392.  
  1393. 3) "Lha.man" - Text File (Doc of Lha 1.42), 122451 bytes
  1394.  
  1395. Cruncher         Crunched Len  Crunch Time  Decrunch Time
  1396. CrM 1.8r LZH            36872          55s             2s
  1397. CrM 1.8t LZH            36872          83s             3s
  1398. CrM 1.8r Normal         42648          46s             2s
  1399. CrM 1.8t Normal         42648          79s             2s
  1400.  
  1401.  
  1402.    The  speed and ratio comparisons towards other packers have been removed to
  1403. ensure equal competition.  I don't want to urge people to my packer, they have
  1404. to find out on their own which packer is the best.
  1405.  
  1406.  
  1407.  
  1408.  
  1409. 7 - History
  1410. ============
  1411.  
  1412. ********** V1.3 **************
  1413. First Release Version, with almost all Options as V1.4
  1414. not bugfree (Crunch-Routine could produce Shit without a clear Stack)
  1415.  
  1416. ********** V1.4 **************
  1417. Intuition Interface added, now callable from Workbench, self-detaching,
  1418. Req-Lib FileRequester
  1419. some Bugs fixed (all code was totally overworked)
  1420.  
  1421. ********** V1.5 **************
  1422. V1.5a:    Demo Version, no Saving possible
  1423. V1.5b:    Release Version
  1424. Both Versions released for the Amiga '91 in Cologne!
  1425. Crunch-Routine optimized, now 0,5-2%. better Results!
  1426. Menu-Options "Priority" and "LED-Flash" added!
  1427. Program sometimes crashed when you quitted it, now fixed
  1428. V1.5c:  Auto-SetComment for run-time Data-Decruncher added
  1429.  
  1430. ********** V1.6 **************
  1431. Decruncher added
  1432. User-Communication improved
  1433. Quit-Bug finally removed
  1434.  
  1435. ********** V1.7 ** 02-Aug-92 **********
  1436. First Release with a free Test-Version and a Registered-Version
  1437. New Crunchalgorithms: LZ-Huffman and Quick-LZH
  1438. Not available in Address and Link Modes
  1439. New Crunchmodes: Data    to crunch Datafiles easily (not via Address-Mode)
  1440.                  Switch  which detects Reloc and Data-Files and switches
  1441.                          between the Modes (only registered Version)
  1442. Speed Improvements: Crunching takes now only half the Time! (only reg.)
  1443. Data-Decruncer added
  1444. Now Source and Destination Dir can be different
  1445. Current Dir of Caller is now the CD of CrM (not df0:)
  1446. 2.0-style Intuition Interface added
  1447. More CLI-Options (including CLI-Help)
  1448. New Iconify-Window: shows now ToGo-Counter
  1449. Minor Bugfixes (various Actions caused Crashes)
  1450. RTDD now removeable, supports new crunchalgorithms
  1451.  
  1452. ********** V1.8 ** 02-Nov-92 **********
  1453. New Decruncher:Library, uses CrM.library
  1454. Introducing Library: CrM.library used for executables and data files
  1455. Registered Users get Documentation of Library! and a faster one.
  1456. Now supports reqtools.library V38! (still uses req.library)
  1457. Added Keyboard shortcuts
  1458. Added Project Menu
  1459. New Mode: Sample-mode, get better ratios with 8-Bit Samples
  1460. New Option: Copy Icons (...)
  1461. Now supports multiple select possibilities of file requesters
  1462. Whole directories may now be crunched
  1463. Some changes made to the appearance (Logo, bigger Gads, ...)
  1464.  
  1465.  
  1466.                  ********** CrM V1.9 ** 08-Oct-93 **********
  1467.  
  1468. - Yes! After almost one year another version...
  1469.  
  1470. - new GUI: now uses gadtools.library, on Kick1.2/1.3 gadtools13.library is
  1471.   used!
  1472.  
  1473. - removed possibility to open a window on the wb
  1474.  
  1475. - removed support of req.library, as there is no new version supporting the
  1476.   2.0-Look
  1477.  
  1478. - new Decruncher: LZH-Algo now also available in Address and Link modes
  1479.  
  1480. - added History for Textoutput (only Kick2.0+) (default: 100 Lines)
  1481.  
  1482. - added Percentage Display while crunching, in the main window it's also
  1483.   graphical, in the iconify window there is only text. Ffirst to suggest this
  1484.   was Michael
  1485.  
  1486. - completely rewrote support for filerequester, I hope it won't crash anymore.
  1487.   With multiselect you can now also select dirs, unfortunally this doesn't
  1488.   work with mfr (at least it doesn't with my version).
  1489.  
  1490. - when packing entire directories or using the multiselect feature of the
  1491.   filerequester a complete filelist is created before crunching any file. Now
  1492.   Source and destination dirs may be the same without the risk of confusing
  1493.   dos.
  1494.  
  1495. - memory display now uses the correct colors on Kick3.0, thanx to Uli who
  1496.   detected this bug and helped me to remove it.
  1497.  
  1498. - added menu  : Project / Save Prefs
  1499. - added menu  : Options / Encrypt Data
  1500. - added menu  : Options / Auto Makedir
  1501. - added menu  : Options / Include Subdirs
  1502. - added menu  : Options / Text Buffer
  1503. - removed menu: Options / Req.library, as CrM no longer supports this lib
  1504.  
  1505. - "Copy Icons" still not included, sorry! (menu removed)
  1506.  
  1507. - improved user communication.  The display field displays now all actions the
  1508.   user has done and looks like a real logfile.
  1509.  
  1510. - Reloc/Normal Decruncher/Kill Decruncher=Yes  would  let the decruncher crash
  1511.   always. fixed.
  1512.  
  1513. - CrM uses and needs now CrM.library V4+
  1514.  
  1515. - removed some enforcer hits.
  1516.  
  1517.  
  1518. CrM.library v4:
  1519. ----------------
  1520. - added crunching algorithms and possibility to encrypt data with a password
  1521.  
  1522. - when you enter a password to decrunch some data this pw is stored in a list
  1523.   so you have to enter this pw only once per reset.
  1524.  
  1525. - speeded up decrunch routines. Optimisation ideas by Fabien Letouzey!
  1526.  
  1527. - new functions: cmProcessPW(), cmCryptData(), cmProcessCrunchStruct() and
  1528.   cmCrunchData(). See Autodocs for details.
  1529.  
  1530.  
  1531. xpkCRM2.library:
  1532. -----------------
  1533. - xpk sublibrary using CrM.library v4+
  1534.  
  1535. - uses LZ-Huffman algorithm
  1536.  
  1537. - first release version
  1538.  
  1539.  
  1540. CrMPW v1.0:
  1541. ------------
  1542. - small tool to add/remove pws to/from the library internal list without using
  1543.   the reqtools.library (affects only decryption)
  1544.  
  1545. - provided as assembler example source
  1546.  
  1547. - first release version
  1548.  
  1549.  
  1550. CrMData v1.0:
  1551. --------------
  1552. - small command line version of CrM to crunch/decrunch data files.
  1553.  
  1554. - supports all algorithms and modes: LZH, Normal, Sample, Password
  1555.  
  1556. - provided as assembler example source
  1557.  
  1558. - first release version
  1559.  
  1560.  
  1561. RTDD v1.9:
  1562. -----------
  1563. - now additionally patches ExAll(), OpenFromLock() and ExamineFH() on a system
  1564.   with Kick2.0+
  1565.  
  1566. - now uses and needs CrM.library (no special version required)
  1567.  
  1568. - supports encrypted data: it automatically asks for the pw and decrypts the
  1569.   data.
  1570.  
  1571. - new command line parameters: -i: Install Only
  1572.                                -r: Remove Only (useful for scripts)
  1573.  
  1574. ·  ·   -  - -- --- --=- -=-=- -===- -==-==- -===- -=-=- -=-- --- -- -  -  ·  ·
  1575.  
  1576. If  you  find  any  shit or nonsense above this line please tell me.  This may
  1577. occur as I don't read the complete manual each time a new version is released,
  1578. and as I am really too lazy to care about that...
  1579.  
  1580. Finito - May the Force be with you!!!
  1581.  
  1582.                                         //
  1583.                             :-)        //    (-:
  1584.                                    \\ //
  1585.                                     \X/
  1586.