home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / compress / zap_1_41.lzh / Zap.doc < prev   
Text File  |  1990-03-17  |  12KB  |  334 lines

  1. Hmmm.. now what can I do tonight?
  2.  
  3. I know! I'll go on the POWERGRID BBS and download the amazing
  4. ZAP documents file!
  5.  
  6. ATDP 0670-540073
  7.  
  8. RINGING
  9. CONNECT 9600
  10.  
  11.  
  12.         DOWNLOADED FROM THE POWERGRID BBS!
  13.  
  14.  
  15.         **********************************
  16.         **********************************
  17.         **                **
  18.         **                **
  19.         **    ZZZZZZ     AA   PPPPPP    **
  20.         **    Z   ZZ  AAAA   PP  PP    **
  21.         **       ZZ  AA  AA  PP  PP    **
  22.         **      ZZ   AAAAAA  PPPPP    **
  23.         **     ZZ  Z AA  AA  PP    **
  24.         **    ZZZZZZ AA  AA PPPP    **
  25.         **                **
  26.         **                **
  27.         **********************************
  28.         **********************************
  29.  
  30.           Written by *GREMLIN* of MAYHEM!
  31.           ===============================
  32.  
  33.              Docs for V1.41 (31/1/90)
  34.              ========================
  35.  
  36.  
  37.  
  38.     About ZAP
  39.     =========
  40. I got into serious modem usage when I got a 9600HST modem (It's not worth
  41. it if you've got anything slower!!), and the first thing I noticed was that
  42. EVERYONE used this 'Warp' program to crunch disks. I downloaded it and the
  43. first question was *WHY??*  It's RUBBISH! It's massively long, it's written
  44. in C, and worst of all, it's SO -=S L O W=-!!  5 minutes to uncrunch a disk
  45. is just ridiculous!  And as for crunching disks.. you could have a long
  46. holiday in Barbados while it crunches a blank disk!
  47.  
  48.  
  49.     C (or why Kernighan and Richie should be tied to a post and shot)
  50.     ===================================================================
  51. Well, I'm a professional programmer (I'm not telling you what I've written -
  52. you never know who's listening!) and I've written my own compression routines
  53. before for use on games. It must be said now, that I'm not a fan of the C
  54. language, or at least, of the current implementations of it. It's fine for
  55. writing utilities that don't need to be fast or compact, but for ANYTHING
  56. else it is useless!
  57.  
  58. One of it's main selling points is that it is supposedly easy to use and
  59. portable from one machine to another - what a joke! The company I work
  60. for wrote the strategy part of a game on the IBM PC (in Lattice C) simply
  61. so it could be easily ported to the ST and Amiga while the machine-specific
  62. bits (i.e. graphics routines, animated stuff, etc) were rewritten from 8086
  63. to 68000. ...It took less time to rewrite the machine code than it did to
  64. get the C code to work - and that was using the SAME Lattice compiler on the
  65. 68000 machines!  As for ease of use.. Can you learn C in two days?
  66.  
  67. Ok.. enough of C (thankfully!)
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.     How to use ZAP
  84.     ==============
  85.  
  86.  
  87. 1: Crunching a disk.
  88. --------------------
  89.  
  90. So, you have a disk you want to crunch. Is it all in DOS format?
  91.  
  92. Most likely, it will be..
  93. If you don't know, you can either try it, or you can save time and run it
  94. through the CHECKDISK option on a copier like X-Copy. If any tracks
  95. come up as not green then either the disk is in a non-dos format, or
  96. you have an error on it.
  97.  
  98. If you suspect an error, use the DOSCOPY+ option to copy the disk 
  99. and correct the error. If it has lots of non-dos tracks,
  100. you will probably have to find some other way of crunching it,
  101. as the current version of Zap (V1.41) does not support non-dos disk
  102. formats.
  103.  
  104. Right, now you have your source disk sorted out, here's how to
  105. crunch it:
  106.  
  107. 1) Do you want to crunch it to ramdisk? If not, see step 2.
  108.  There's usually no point; you will want to copy it to floppy/harddisk
  109.  afterwards anyway, but if you are really mad and have enough memory,
  110.  make sure that the ramdisk is installed up BEFORE you run Zap. The
  111.  RAM: device is only installed into your machine the first time you
  112.  try and use it after booting the machine, so to avoid problems, type
  113.  something like DIR RAM: . This will ensure the ram disk is all
  114.  set up and ok.
  115.   You could use the recoverable ram disk RAD: instead if you want to,
  116.  assuming it is configured to be big enough, but that is your problem,
  117.  and is a bit beyond the scope of this document to tell you how to set
  118.  it all up if you don't know.
  119.  
  120. 2) If crunching to floppy, make sure you have 2 drives and a nice
  121.  formatted disk with enough space to hold the crunched file.
  122.  
  123. 3) If crunching to hard disk, you have no problem!
  124.  
  125. 4) Would you like some text to be displayed when someone
  126.  else comes to uncrunch the disk? You could advertise yourself to
  127.  the world!  If so, use a text editor (any one will do) to make up
  128.  a file with your text in it. (you can include ANSI codes - if you know
  129.  what they are!!)
  130.  
  131. 5) type 
  132.     ZAP R (filename)
  133.  Where (filename) is the name of the device/file that you want the
  134.  crunched file to go to. E.g.   DF1:Fred   or  DH0:Zapstuff/Megademo
  135.  or  RAM:SillyName     The filename will have ".ZAP" added on the
  136.  end of it, unless you put it on the name yourself.
  137.  
  138. 6) You will then be asked what crunch depth you require. This simply
  139.  determines the amount of time the disk will take to crunch, and thereby
  140.  how short the resulting file will be. Basically, experiment. The time
  141.  taken will vary from about 40 seconds for a blank disk on the fastest
  142.  setting (i.e. '0') to an hour or more for a full disk on the slowest
  143.  setting ('9'). 
  144.  Note that numbers over about 4 or 5 will take correspondingly
  145.  longer to crunch but will yield progressively less gain, so it's only
  146.  worth using '9' if you are going to leave it overnight, having said
  147.  that try to use '1' or '2' instead of '0' if you can, as the difference is
  148.  always worth it.
  149.  
  150. 7) After that you will be asked for the name of the text file you want
  151.  to incorporate in the crunched file, if any. If you have prepared a file
  152.  before (you were warned!!), enter the name now. If not, just press
  153.  return.
  154.  
  155. 8) When prompted to put the disk in, bung it in DF0, and wait for a second
  156.  or two. If the disk grinds and a requestor comes up saying something
  157.  like 'Key 880 checksum error' or 'Error validating disk' then just click
  158.  on CANCEL until they go away! Then press return to start.
  159.  
  160. 8) That's it! The disk will be read in and compressed (accompanied by much
  161.  screen-flashing) and any errors will be reported. If there are no problems
  162.  Zap will tell you after every block of 8 tracks how well they crunched.
  163.  
  164.  Finally you will be told the total file length in kilobytes. You can now
  165.  do what you like with the crunched file (e.g. upload it onto a bulletin
  166.  board, save it on hard disk, whatever)
  167.  
  168. For those of you who wonder why there are not millions of options
  169. to use (like WARP) e.g. 1,79,NOZERO, etc,etc the answer is that
  170. ZAP handles them all automatically!
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177. 2: Uncrunching a disk.
  178. ----------------------
  179.  A file crunched with ZAP can be recognised by the ".ZAP" extension
  180.  it should have.
  181.  
  182.  Type ZAP W (filename)
  183.  
  184.  You don't have to put the ".ZAP" extension on the name if you don't
  185.  want to, but it will be assumed.
  186.  
  187.  Put a disk (it doesn't have to be blank or even formatted) into DF0,
  188.  and click on CANCEL on any silly requestors that may appear. Then
  189.  press return. At this point if someone crunched the disk with a text
  190.  file on it, the text will be displayed. If not, the disk will be
  191.  uncrunched and written to DF0. The boot block will be displayed so
  192.  you can see if it has any obvious viruses on.
  193.  
  194.  That's it!
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. 3: Error messages
  202. -----------------
  203. You can get two sorts of error messages;
  204.  
  205.  Dos messages (familiar, like 'disk full' or something short like 
  206.  'File Error' which usually means the file was not found)
  207.  
  208.  Trackdisk messages (unfamiliar, but quite obvious, like WRITEPROT
  209.  means the disk was writeprotected. If you get something you don't
  210.  know, like BADSECHDR then it means that there is an error on the
  211.  disk you are crunching. See earlier) You can (R)etry or (C)ancel
  212.  with these messages.
  213.  
  214.  
  215.  
  216.  
  217.  
  218. 4: Miscellaneous problems
  219. -------------------------
  220. If it doesn't end in ".ZAP" and you are not sure, or there is some major
  221. problem in unzapping the file, try:
  222.     TYPE name OPT H
  223. which will display the file in hex and ascii for you. Right at the start
  224. of the file should be "ZAP V?.?? (C) 19?? GREMLIN of MAYHEM" or some
  225. such message. If this is not there, then the file wasn't ZAPped. If the
  226. first part of the version number is greater then 1 (the release that this
  227. docs file was written for) then it has been crunched with a later version
  228. of Zap that uses a new and incompatible compression algorithm. Get the
  229. latest version!
  230.  
  231. Anything else? Tell me via POWERGRID (see bottom of file)
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.     Technical Stuff
  247.     ===============
  248. For the techy people amongst the massed throngs (?!) of you readers,
  249. Zap uses a modified Runlength Encode as a preprocessor, followed by an
  250. ultra-optimised Lempel-Zev algorithm. This Lempel-Zev technique is used
  251. in virtually every cruncher around nowadays, and is the best algorithm
  252. for general data compression - Those wishing to argue can go and eat
  253. their own toenails!  There is another algorigm, Huffman coding, which
  254. is much faster, but is not usually so efficient, so I decided against
  255. using it.
  256.  
  257. The main problem with Lempel-Zev is that it requires a vast amount of
  258. data searching, and so tends to take a very long time to run. The total
  259. time taken is determined by how far you search for each byte, and that
  260. is why the user is usually asked for the search depth for the program
  261. to use. If you are interested, the 0-9 numbers of Zap can be worked
  262. out as byte depths by 128+(number*256) i.e. 0 will search 128($80) 
  263. bytes. 
  264.  
  265. Most crunchers (for example the classic 'Bytekiller') are
  266. written by people who tend to know less about writing really superfast
  267. 68000 code, and more about writing demos or business programs!
  268. Anyway, Zap was written simply for speed and efficiency, and I like
  269. to think I achieved it to some extent.
  270.  
  271. The other thing that makes Zap fast, is the fact that it is the only
  272. cruncher to use Amiga multitasking properly. Instead of using the
  273. reading a track, crunching it, and then writing it out, Zap uses
  274. a double-buffer system where the next 8 cylinders are read at the same
  275. time as the previous 8 are being crunched. Therefore there is never any
  276. time wasted waiting for disk access to finish. This makes quite a
  277. difference when crunching a disk, but really comes into its own when
  278. uncrunching, when the disk is written to virtually non-stop. If you
  279. have the source file in ramdisk, you can uncrunch a whole disk in about
  280. 45 seconds, as opposed to 4 minutes using WARP!
  281.  
  282. Zap uses the trackdisk command TD_FORMAT rather than TD_WRITE, so the
  283. destination disk doesn't have to be formatted first. To date (V1.41) it
  284. does not do verification on written tracks, although I'll put this on
  285. a later version.
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.     Stuff I'll try to put in the next release
  293.     =========================================
  294. 1) Selection of tracks to be crunched, so you can crunch part of a disk
  295.    if you like.
  296. 2) I'll put back in the bitmap option, but I tend to think it's more
  297.    trouble than it's worth to use.
  298. 3) Automatic handling of non-dos tracks (i.e. MFM mode) ..maybe
  299. 4) Verify option when writing.
  300. 5) Even better compression (I have had an idea that might well improve the
  301.    crunching by a considerable amount!!)
  302. 6) Even faster crunching (there's probably something I can optimise a
  303.    bit more!)
  304. 7) Bob-demo and Soundtracker music when crunching. (Joke!!)
  305. 8) Disk-validation disabling when source or target disks are inserted (minor!)
  306. 9) Crunching/Uncrunching to different drives (only floppies though!)
  307. 10) Flashing powerlight when crunching (so you can see if it's finished
  308.    when doing those all-nighters with the monitor turned off)
  309.  
  310.  
  311.  
  312. Any other suggestions or bug reports?
  313.              ring the
  314.  
  315.         POWERGRID BBS (UK) on +44(0)670-540073
  316.  
  317.     2400-14.4k (no-one below 2400!) 24hrs 300Meg on-line!
  318.  
  319.                Mail to: GREMLIN
  320.  
  321.  
  322.  
  323.     Now y'all be sure to Have A Nice Day!!! (they REALLY say that!)
  324.  
  325.             ...And Come Back Real Soon, Y'Hear?
  326.  
  327. Click!
  328.  
  329. NO CARRIER
  330. OK
  331.  
  332. Gee! Wasn't that fun?
  333.  
  334.