PAULCOPY II (C) 1991 Paul Hayter ==================================== PaulCopy II is a single drive diskcopier that allows you to copy a whole 880K floppy in 1 swap, if you have 1Meg or more RAM. As well as this, PaulCopy will safely return you to the CLI prompt (or Workbench) when finished. Even though PaulCopy will allow you to copy in multiple swaps if you do not have extra memory , to take full advantage of the single swap copy you should have at least 890K free memory (use avail to find this out). This means you should not have anything in RAM: or RAD:, or any programs running as seperate tasks. Also, you should not have run any programs which use disk based libraries (eg. arp.library) prior to using PaulCopy. Note: there is some leeway here. Typical free memory for an Amiga is given below.(The reason I list a 2 drive setup is that I have an external 5 1/4" drive, which means that I still use a single drive copier for 3 1/2" to 3 1/2" and 5 1/4" to 5 1/4" copys). 935K A500 1Meg, one drive, no addbuffers, ram-handler, no disk libraries loaded. 912K A500 1Meg,two drives, no addbuffers, ram-handler, no disk libraries loaded. USAGE ===== PaulCopy II works from CLI or Workbench. At the CLI prompt type:- 1> paulcopy OR from Workbench, double click on its icon. PaulCopy starts by opening a small window. If the title has the words ONE.SWAP in it, then PaulCopy will read an entire disk into memory in one pass. If these words are not displayed, then you will have to swap disks at least once. Insert the source disk and hit return. PaulCopy now loads in as many tracks as it can. When this is finished (takes about 50 seconds to read a whole disk on my machine), eject the source disk and insert the Target disk and hit return. If you left the write protect hole open, PaulCopy will prompt you to change it before continuing. If you do not have enough memory to read in a whole disk, you will be prompted to insert the source disk again. Do this, then insert the target disk when asked etc. When the entire disk is copied, you will be prompted with:- COPY AGAIN (y/n) ? Hit 'y' to copy again. Hitting any other key will exit you back to Workbench or the CLI prompt. To abort the copy process, you can press the left mouse button ,or when asked to insert the source or destination, press any key besides return. TECHNICAL NOTES =============== What follows is a short explanation of the more technical points regarding the disk copying process. To store the entire contents of an Amiga floppy disk we must have:- 11 * 2 * 80 * 512 = 901120 bytes storage ( sectors ) (sides) ( tracks ) ( bytes ) (per track) (per disk) (per sector) Now if our diskcopy program allocated this much space it would work, but it would leave little margin for small fluctuations in memory space (there are always other tasks inside the Amiga allocating & deallocating memory). We also have to consider that to access the trackdisk device we must have our storage area allocated in multiples of sectors (512 bytes). My early attempts at PaulCopy allocated the largest chunk of chip ram it could get, then the largest chunk of fast ram it could get, then if that wasn't enough memory (with 2 drives attached it often wasn't) PaulCopy would try to allocate 512 byte blocks where ever it could get them (I could get maybe 8 of these). Unfortunately, even with this setup, I would often run out of memory. Also, I was reading single sectors from the trackdisk device which seemed extremely slow. This latest version of PaulCopy takes a different approach. What follows is a step wise look at the whole copy process, assuming a 1Meg machine. 1. Cut the CLI screen down to 1 bitplane which frees 21K 2. Allocate 5.5K in chip ram specifically for transfering data to and from trackdisk. 5.5K=11 sectors from one side of a disk 3. Allocate 158 5.5K chunks (half tracks) in public memory 4. Read from track 00 into the 5.5K chip ram buffer 5. Transfer this to one of the 158 chunks in public memory 6. Continue reading tracks and transferring them to public memory until we have filled all 158 chunks. We should now be at track 79 surface 0. 7. Read track 79 surface 0 into the chip ram buffer 8. Read ONE SECTOR from track 79 surface 1 into a 512 byte BSS_CHIP hunk at the end of the PaulCopy program. By reading one sector ,trackdisk will automatically fill its own track buffer with the entire contents of this track. 9. Ask the User to remove the source disk and insert the Target disk. 10. Now we write back the very same ONE SECTOR that we read in. By using the normal device commands, trackdisk does not care that we removed the old disk. And because trackdisk does all disk IO on a track basis, it will simply write its own entire track buffer with the sector we wrote (which is identical to what was originally in that sector) onto the Target disk. 11. Now we write the 159 remaining 5.5K chunks onto the Target disk moving from Track 79 down to Track 00 12. If the user wants to quit now, we restore the bitplane we originally took and free all the 5.5K chunks Therefore, the amount of ram needed for the copy now is:- (159 x 5.5K) = 895488 bytes to store 159 tracks 0.5K = 512 bytes to store the last sector ~2.2K = 2200 bytes for the program ------- 898200 bytes ======= Now, because we get about 21K for one of the screen's bitplanes, we effectively only need about 877200 bytes. But, due to the way memory is fragmented, we need more than 890K (as stated before). Now ,this figure was obtained purely by trial and error( copying things to ram: until PaulCopy failed to display ONE SWAP), so it may vary on different Amigas. IN THIS DIRECTORY ================= The following files are included with this release of PaulCopy. PaulCopy :the executable PaulCopy.doc :the docs pc.s :The assembly source for PaulCopy. DISTRIBUTION ============ PAULCOPY IS FREELY DISTRIBUTABLE. YOU CAN COPY IT AS MUCH AS YOU LIKE AS LONG AS THE FOLLOWING IS SATISFIED. 1. ONLY A NOMINAL COPYING FEE IS CHARGED. 2. IT IS NOT USED FOR COMMERCIAL PURPOSES. NOTE: I DO NOT REQUIRE THE SOURCE AND DOC FILE TO ALWAYS BE DISTRIBUTED WITH THE EXECUTABLE. CORRESPONDENCE ============== Please send any bug reports/ or correspondence to myself at the address below. Paul Hayter PO BOX 331 Ballina 2478 Australia.