home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff350.lzh / TrackUtils / tcopy.doc < prev    next >
Text File  |  1990-04-16  |  11KB  |  252 lines

  1.  
  2.                 TCOPY -- copies tracks from one disk to another
  3.  
  4.              (C) Copyright Eddy Carroll 1990. Freely distributable.
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9.     One of the nicer additions that came with Workbench 1.3 was RAD:, the
  10.     recoverable ram disk. A handy feature of RAD: is that it can be made to
  11.     look like a floppy disk, and you can then copy an entire disk into it
  12.     in one go -- much quicker than copying files in seperately.
  13.  
  14.     Unfortunately, you need to have an 880K RAD: to do this; since I only
  15.     have a 2 Meg Amiga, I can't really afford to lose that much memory.
  16.     Thus, Tcopy was born.
  17.  
  18.     Tcopy is essentially a DiskCopy command which will copy a specified
  19.     range of tracks (actually cylinders, but most people seem to prefer to
  20.     call them tracks) from one disk to another. Using Tcopy, you can store
  21.     a complete "dump" of RAD: on your startup disk, and then copy it back
  22.     into RAD: very rapidly. For example, it takes about 15 seconds to load
  23.     up my 275K RAD (as opposed to around 45 seconds when the files were
  24.     being copied in one at a time). This is a loading speed of around
  25.     18K/second. So much for the Amiga's "slow" floppy drives :-)
  26.  
  27.     To help speed up your startup times even more, Tcopy can automatically
  28.     mount RAD: (for all you purists who don't think this sort of thing
  29.     belongs in a track copier, tcopy can be readily compiled without the
  30.     RAD: handling). If you have just done a reset and RAD: was already in
  31.     memory, then Tcopy won't bother reloading it unless you specifically
  32.     ask it to.
  33.  
  34.  
  35. USAGE
  36.  
  37.     The command template for Tcopy looks like this:
  38.  
  39.         tcopy <options> <from> <to> <start> <end> <newstart>
  40.  
  41.     The <options> are all to do with RAD: and if you don't specify any
  42.     of them, Tcopy won't try to mount it. This allows you to use Tcopy for
  43.     copying tracks between two normal devices (such as DF0: and DF1:)
  44.     without having RAD: confusing things. I'll discuss the valid options
  45.     in a little while.
  46.  
  47.     <from> and <to> give the source and destination devices respectively
  48.     that Tcopy is to use. These devices can be different sizes, but they
  49.     must both have the same track size (i.e. same number of blocks/track
  50.     and number of surfaces).
  51.  
  52.     <start> specifies the track to start copying from, <end> specifies
  53.     the track to copy up to (and including), and <newstart> specifies
  54.     the track to start copying to on the destination device.
  55.  
  56.     For example, supposing you wanted to use Tcopy to copy a disk from
  57.     drive 0 to drive 1. You could type
  58.  
  59.         tcopy DF0: DF1: 0 79 0
  60.  
  61.     meaning "copy tracks 0 to 79 on DF0: to track 0 upwards on DF1:".
  62.     It should be pointed out however that Tcopy doesn't make a particularly
  63.     good disk copier, because:
  64.  
  65.       - It requires that the destination disk already be formatted
  66.       - It doesn't verify the data was written properly
  67.       - It is about twice as slow as DiskCopy when writing to floppy
  68.       - It doesn't update the root block on the destination disk, so
  69.         AmigaDOS will see two disks that look identical, and will go
  70.         a little bit crazy trying to sort it out.
  71.  
  72.     Hence, it's probably best to keep Tcopy for loading RAD:, and for
  73.     copying the odd single track around when needed.
  74.  
  75.  
  76. OPTIONS
  77.  
  78.     Now onto the options which are supported for mounting RAD:  Any
  79.     or all of these options may appear; options which are ommitted get
  80.     the default values indicated in brackets. Remember that Tcopy will only
  81.     mount RAD: automatically if at least one of the options is specified.
  82.     Also, you should have ramdrive.device in your DEVS: directory.
  83.  
  84.     -v<name>     (RAMB0)
  85.         Sets the volume name of the mounted device to <name>. This is the
  86.         name that appears under the disk icon on Workbench.
  87.  
  88.     -n<name>     (RAD)
  89.         Sets the AmigaDOS device name of the mounted device to <name>. This
  90.         is the "real" name, which cannot be altered once set.
  91.  
  92.     -e<txt>
  93.         Outputs <txt> to the screen. This is useful if you want to display
  94.         a message while the copying takes place. If the message contains
  95.         any spaces, you will need to surround the entire option with
  96.         quotation marks. For example, you might use something like this:
  97.  
  98.             "-eNow copying startup disk to RAD:"
  99.  
  100.     -a
  101.         Normally, Tcopy will only actually do the diskcopy into RAD: if it
  102.         finds RAD: has no files after it has been mounted (i.e. it is a
  103.         cold startup, rather than a reset). The rest of the time, it will
  104.         mount RAD: and then quit immediately.
  105.  
  106.         You may occasionally want to override this behaviour. Specifying -a
  107.         will tell Tcopy to always copy the disk into RAD: even when it
  108.         doesn't think its necessary. This could be useful if you have
  109.         several different startup disks, each containing a different set
  110.         of files to load into RAD: (one for programming, one for TeX etc.)
  111.  
  112.     -t#          (10)
  113.         Sets the number of tracks that RAD: will have, and therefore the
  114.         amount of memory it will take up. Each track occupies about 11K
  115.         of memory. In general, you will want to customise this to suit
  116.         your system rather than leaving it at the default.
  117.  
  118.     -p#          (-1)
  119.         Sets the boot priority for RAD:. This is only useful to Kikstart 1.3
  120.         users who can boot from RAD: (you 1.2 users don't know what you're
  121.         missing!)  The default of -1 means that the Amiga will first try to
  122.         boot from a floppy disk in drive 0 and if that fails, will then boot
  123.         from RAD. If you set this value to 127, the Amiga will always
  124.         boot from RAD: regardless of what's in drive 0.
  125.  
  126.     You are unlikely to ever need to use the following options, but they
  127.     are included for the adventurous to play with. They give you control
  128.     over several of the fields that normally appear in the mountlist.
  129.     Don't mess with them unless you know what you are doing!
  130.  
  131.     -d<name>     (ramdrive.device)
  132.         Sets the name of the underlying exec device associated with the
  133.         AmigaDos device.
  134.  
  135.     -f#          (0)
  136.         Sets the flags to specify when calling OpenDevice().
  137.  
  138.     -m#          (1)
  139.         Specifies the type of memory to use; the default is Public Memory
  140.         which is basically any memory that happens to be free.
  141.  
  142.  
  143. CREATING A STARTUP DISK
  144.  
  145.     So, now that you know what Tcopy can do, lets get down to essentials.
  146.     Namely, how to put together a disk that boots up as quickly as possible.
  147.  
  148.     My system consists of an A1000 with 1.3 Kikstart, 2 Megs of RAM, and
  149.     a C Ltd. hard drive (no autoboot). My RAD: is 275K, and contains
  150.     a fairly stripped down Workbench -- essentially just enough to
  151.     get the hard drive up and running, and to install my favourite
  152.     resident utilities (Dmouse, Conman, BlitzFonts and Snap).
  153.  
  154.     My startup disk looks like this:
  155.  
  156.         Directory of HD_Boot:
  157.             c
  158.             devs
  159.             l
  160.             libs
  161.             s
  162.             Tracks1-25
  163.  
  164.         Directory of HD_Boot:c
  165.             RemRad
  166.             Tcopy
  167.  
  168.         Directory of HD_Boot:devs
  169.             ramdrive.device
  170.             system-configuration
  171.  
  172.         Directory of HD_Boot:s
  173.             startup-sequence
  174.  
  175.     If you are paying attention, you may have noticed the file Tracks55-79
  176.     above. This is a special file created by the Tfile program which
  177.     accompanies Tcopy, and to AmigaDos, it looks as if it occupies
  178.     tracks 55 to 79 of the disk. This means that I can store my copy of
  179.     RAD: on these tracks, without having to worry about AmigaDos trying
  180.     to overwrite it if I go to save a new file on the disk.
  181.  
  182.     My startup-sequence looks like this:
  183.  
  184.         c:tcopy -t25 -vRAD "-eBooting up 275K RAD..." df0: rad: 1 25 0
  185.         rad:c/cd rad:
  186.         rad:c/defdisk rad:
  187.         rad:c/execute rad:s/startup-sequence
  188.  
  189.     The first command is the only one that gets loaded in from disk. It
  190.     mounts a RAD: with 25 tracks (275K), changes the volume name to RAD:
  191.     instead of RAMB0: (which I don't like at all), prints a brief message
  192.     and then copies tracks 1 to 25 of the startup disk to RAD:. I have
  193.     arranged that RAD: contains enough commands to allow the bootup to
  194.     be carried on from there.
  195.  
  196.     The next command changes the current directory to RAD: (mainly because
  197.     the execute command lower down will create a temporary file in the
  198.     current disk, and I want it to do this in RAD: instead of on my
  199.     write-protected boot disk!)  After this, DefDisk does all the necessary
  200.     assigns to make RAD: look like the bootup disk (so that I can remove
  201.     the real bootup disk for good, and AmigaDos won't ever ask me to
  202.     insert it again). DefDisk is a really nice little P.D. program which is
  203.     well worth hunting down.
  204.  
  205.     The final step is to execute the real startup-sequence located in RAD:.
  206.     This is the same startup-sequence that will get executed when I reset
  207.     in future (since I am booting from RAD:).
  208.  
  209.     If I accidentally reset with my boot disk in DF0:, no harm is done;
  210.     Tcopy will see that RAD: is already loaded and exit immediately,
  211.  
  212.     If I had Kikstart 1.2 instead of 1.3, the only change I would have to
  213.     make would be booting from my startup disk each time I reset rather
  214.     than from RAD:. This would still be very fast, since Tcopy will only
  215.     copy the disk into RAD: the first time I bootup.
  216.  
  217.     I actually created the startup disk as follows. First of all, I
  218.     mounted RAD: manually, and filled it with all the goodies I wanted.
  219.     Then I formatted a blank disk, and ran Tfile on it to create the
  220.     dummy file Tracks1-25 so that those tracks would remain free to store
  221.     the copy of RAD: on. The command I used was:
  222.  
  223.         tfile DF0:Tracks1-25 1 25
  224.  
  225.     Then I copied RAD: to the disk with Tcopy:
  226.  
  227.         tcopy RAD: DF0: 0 24 1
  228.  
  229.     Finally, I created the minimal bootdisk listed earlier by copying over
  230.     all the files and directories needed.
  231.  
  232.     The result? It takes just under 25 seconds from a cold reset to load
  233.     mount and fill the 275K RAD:, and pass control to its startup-sequence.
  234.     While it's not as nice as booting off a hard drive, it makes booting
  235.     from floppy a great deal more bearable!
  236.  
  237.  
  238. RELEASE HISTORY
  239.  
  240.     V1.0
  241.         First release, January 1990. No known bugs, but this will
  242.         probably change in the future...
  243.  
  244.  
  245. AUTHOR
  246.  
  247.     Please direct any praise, criticism, general suggestions or
  248.     large sums of money to:
  249.  
  250.     Eddy Carroll
  251.     ecarroll@vax1.tcd.ie (Trinity College, Dublin, Ireland)
  252.