home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d537 / paulcopy.lha / PaulCopy / paulcopy.doc < prev    next >
Text File  |  1991-08-26  |  7KB  |  171 lines

  1.  
  2.         PAULCOPY II (C) 1991 Paul Hayter
  3.            ====================================
  4.  
  5.      PaulCopy II is a single drive diskcopier that allows you to copy a
  6.     whole 880K floppy in 1 swap, if you have 1Meg or more RAM. As well as
  7.     this, PaulCopy will safely return you to the CLI prompt (or Workbench)
  8.     when finished.
  9.  
  10.      Even though PaulCopy will allow you to copy in multiple swaps if you
  11.     do not have extra memory , to take full advantage of the single swap copy
  12.     you should have at least 890K free memory (use avail to find this out).
  13.     This means you should not have anything in RAM: or RAD:, or any programs
  14.     running as seperate tasks. Also, you should not have run any programs
  15.     which use disk based libraries (eg. arp.library) prior to using PaulCopy.
  16.     Note: there is some leeway here. Typical free memory for an Amiga is given
  17.     below.(The reason I list a 2 drive setup is that I have an external 5 1/4"
  18.     drive, which means that I still use a single drive copier for 3 1/2" to
  19.     3 1/2" and 5 1/4" to 5 1/4" copys). 
  20.  
  21.  935K    A500 1Meg, one drive, no addbuffers, ram-handler, no disk libraries
  22.         loaded.
  23.  
  24.  912K    A500 1Meg,two drives, no addbuffers, ram-handler, no disk libraries
  25.         loaded.
  26.   USAGE
  27.   =====
  28.     PaulCopy II works from CLI or Workbench.
  29.  
  30.     At the CLI prompt type:-
  31.  
  32.  1> paulcopy
  33.  
  34.    OR
  35.  
  36.  from Workbench, double click on its icon.
  37.  
  38.      PaulCopy starts by opening a small window. If the title has the words
  39.     ONE.SWAP in it, then PaulCopy will read an entire disk into memory in
  40.     one pass. If these words are not displayed, then you will have to swap
  41.     disks at least once.
  42.  
  43.      Insert the source disk and hit return. PaulCopy now loads in as many
  44.     tracks as it can.
  45.  
  46.      When this is finished (takes about 50 seconds to read a whole disk on
  47.     my machine), eject the source disk and insert the Target disk and hit
  48.     return. If you left the write protect hole open, PaulCopy will prompt
  49.     you to change it before continuing.
  50.  
  51.      If you do not have enough memory to read in a whole disk, you will
  52.     be prompted to insert the source disk again. Do this, then insert the
  53.     target disk when asked etc.
  54.  
  55.      When the entire disk is copied, you will be prompted with:-
  56.  
  57.     COPY AGAIN (y/n) ?
  58.  
  59.      Hit 'y' to copy again. Hitting any other key will exit you back to
  60.     Workbench or the CLI prompt.
  61.  
  62.      To abort the copy process, you can press the left mouse button ,or
  63.     when asked to insert the source or destination, press any key besides
  64.     return.
  65.  
  66.  
  67. TECHNICAL NOTES
  68. ===============
  69. What follows is a short explanation of the more technical points regarding
  70. the disk copying process.
  71.  
  72.  
  73. To store the entire contents of an Amiga floppy disk we must have:-
  74.  
  75.     11        *     2    *        80       *    512     = 901120 bytes storage
  76. ( sectors )   (sides)   ( tracks )   (  bytes   )
  77. (per track)        (per disk)   (per sector)
  78.  
  79. Now if our diskcopy program allocated this much space it would work,
  80. but it would leave little margin for small fluctuations in memory space
  81. (there are always other tasks inside the Amiga allocating & deallocating
  82. memory). We also have to consider that to access the trackdisk device we
  83. must have our storage area allocated in multiples of sectors (512 bytes).
  84.  
  85. My early attempts at PaulCopy allocated the largest chunk of chip ram it
  86. could get, then the largest chunk of fast ram it could get, then if that
  87. wasn't enough memory (with 2 drives attached it often wasn't) PaulCopy
  88. would try to allocate 512 byte blocks where ever it could get them (I could
  89. get maybe 8 of these). Unfortunately, even with this setup, I would often
  90. run out of memory. Also, I was reading single sectors from the trackdisk
  91. device which seemed extremely slow.
  92.  
  93. This latest version of PaulCopy takes a different approach. What follows
  94. is a step wise look at the whole copy process, assuming a 1Meg machine.
  95.  
  96.      1. Cut the CLI screen down to 1 bitplane which frees 21K
  97.      2. Allocate 5.5K in chip ram specifically for transfering
  98.     data to and from trackdisk. 5.5K=11 sectors from one side of a disk
  99.      3. Allocate 158 5.5K chunks (half tracks) in public memory
  100.      4. Read from track 00 into the 5.5K chip ram buffer
  101.      5. Transfer this to one of the 158 chunks in public memory
  102.      6. Continue reading tracks and transferring them to public memory
  103.     until we have filled all 158 chunks. We should now be at
  104.     track 79 surface 0.
  105.      7. Read track 79 surface 0 into the chip ram buffer
  106.      8. Read ONE SECTOR from track 79 surface 1 into a 512 byte
  107.     BSS_CHIP hunk at the end of the PaulCopy program. By reading one
  108.     sector ,trackdisk will automatically fill its own track buffer
  109.     with the entire contents of this track.
  110.      9. Ask the User to remove the source disk and insert the Target
  111.     disk.
  112.     10. Now we write back the very same ONE SECTOR that we read in.
  113.     By using the normal device commands, trackdisk does not care that we
  114.     removed the old disk. And because trackdisk does all disk IO on a 
  115.     track basis, it will simply write its own entire track buffer with
  116.     the sector we wrote (which is identical to what was originally in
  117.     that sector) onto the Target disk.
  118.     11. Now we write the 159 remaining 5.5K chunks onto the Target disk
  119.     moving from Track 79 down to Track 00
  120.     12. If the user wants to quit now, we restore the bitplane we 
  121.     originally took and free all the 5.5K chunks
  122.  
  123.     Therefore, the amount of ram needed for the copy now is:-
  124.  
  125.         (159 x 5.5K) =    895488    bytes    to store 159 tracks
  126.             0.5K     =       512    bytes    to store the last sector
  127.            ~2.2K     =    2200    bytes    for the program
  128.                    -------
  129.                     898200    bytes
  130.                    =======
  131.  
  132.     Now, because we get about 21K for one of the screen's bitplanes, we
  133. effectively only need about 877200 bytes. But, due to the way memory is
  134. fragmented, we need more than 890K (as stated before). Now ,this figure was
  135. obtained purely by trial and error( copying things to ram: until PaulCopy
  136. failed to display ONE SWAP), so it may vary on different Amigas.
  137.  
  138.  
  139.     IN THIS DIRECTORY
  140.     =================
  141.  
  142.         The following files are included with this release of
  143.     PaulCopy.
  144.  
  145.         PaulCopy    :the executable
  146.         PaulCopy.doc    :the docs
  147.         pc.s        :The assembly source for PaulCopy.
  148.  
  149.     DISTRIBUTION
  150.     ============
  151.  
  152.         PAULCOPY IS FREELY DISTRIBUTABLE. YOU CAN COPY IT AS
  153.     MUCH AS YOU LIKE AS LONG AS THE FOLLOWING IS SATISFIED.
  154.         1. ONLY A NOMINAL COPYING FEE IS CHARGED.
  155.         2. IT IS NOT USED FOR COMMERCIAL PURPOSES.
  156.  
  157.     NOTE: I DO NOT REQUIRE THE SOURCE AND DOC FILE TO ALWAYS BE
  158.           DISTRIBUTED WITH THE EXECUTABLE.
  159.  
  160.     CORRESPONDENCE
  161.     ==============
  162.  
  163.         Please send any bug reports/ or correspondence to myself
  164.     at the address below.
  165.  
  166.         Paul Hayter
  167.         PO BOX 331
  168.         Ballina
  169.         2478
  170.         Australia.
  171.