>---!----!----!--------------------C---------------------------------!-----R >>>ac_5.doc 2nd April 1997 >>>Atari Computing Issue 5 *** Type - Feature *** Category - Beginners *** Mark S Baines msbaines@cix.co.uk 01862 871624 *** 2nd April 1997 *** 2 pages 1665 words no boxouts *** 3 images, mono GIF, MSB5_[1-3].GIF Disk Copying So you thought disk copying was straightforward? Mark Baines looks a little deeper. Programs crash whilst writing to the disk, we press the wrong key, select the wrong menu item, we place the wrong disk in the drive, we spill tea on it, we take a disk out of the drive with the motor still running, the baby finds a new thing to chew! These are some of the "thousand natural shocks that" disks "are heir to". When a disk doesn't work any more or the program file is corrupted what is to be done next? After that anguished cry, that is! Backups Of course, there is always the backup or master disk to turn to. Yes? Well done! No? The importance of backing up every disk, whether commercial or PD can't be emphasised enough. Most, if not all, commercial software distributors allow this (indeed, any legal basis for preventing it is questionable) and one should always work from a copy of the master disk and not from the master disk itself. Of course, some disks cannot be copied so easily because of some 'protection' technique employed by the publisher to prevent copies being made for illegal distribution. Only games really fall into this category because the increase in popularity of hard disks has required that all application disks be 'copyable' so that their contents can be placed on them. In fact, it is quite clear from the IBM PC and Mac markets that customers will refuse to buy software that is copy protected. There are two ways to copy a disk, the easiest being to use the Desktop's Copy Disk function. Disk Copy This is achieved by dragging the disk icon A to disk icon B or using the appropriate item in the menu. Under TOS 1.4 Diskcopy is in the 'Format' dialog, for instance. Space won't be wasted here describing how to do this except to say that the master or source disk should always be write protected by opening the little hole in the bottom left corner. If there is only one floppy drive and TOS asks for repeated changes of disk this will prevent the wrong disk being written to as it is easy to get muddled and have the wrong disk in the drive. Also, one shouldn't be too eager to take the disk out. Wait for the drive light to go out first. Taking a disk out when it is being accessed by the drive will damage the disk surface and possibly the drive's heads. However, many people do have problems with using this technique on some disks and understandably wonder why TOS is so awkward. GEMDOS demands that the format type of both disks be the same. They should both be single- or doubled-sided and formatted to the same standard and size. GEMDOS has only ever allowed disks to be formatted from the Desktop with 80 tracks and nine sectors. When GEMDOS copies a disk it is reading each sector into memory and from here, copies them one at a time onto the destination disk. If that destination disk has 80 tracks and 10 sectors (a common format) then there are more sectors per track than GEMDOS has data for and the source disk boot sector's map of the disk structure doesn't match the destination disk's structure. The error alert "The destination disk is not the same type as the source disk. Please insert another disk" then appears. If it is known that the destination disk has an irregular format then the solution may be easy. Abort, format the disk from the Desktop and start again. But, many source disks are not formatted to the Desktop norm. Increasingly, distributors of software use greater capacity formats to get their large programs and data files onto them. Some use very unusual formats in an attempt to prevent them being copied. Unwittingly, it is easy to format a destination disk to the normal standard only to find that they are rejected again. It would have been a simple mater for the programmer of this part of TOS to have allowed the destination disk to be formatted during the copying procedure using the details contained in the source disk's boot sector. Very little extra code would be needed and the result would be a tremendous improvement of versatility. But, TOS isn't like that and so third party programs come to the rescue. A decent disk copier and formatter program is essential, such as FastCopy 3 by Martin Backschat (PD), H-Copy by Robert Weiss (shareware) or FastCopy PRO (œ8.95 from FaST Club). There are many PD disk copiers available but most aren't intelligent enough to bother with more than once. FastCopy and H-Copy appear very similar and at first sight seem too complicated with lots of buttons and boxes and this can put new users off. For the simple purpose of making disk copies it is no harder than using the GEM Desktop with the added bonus that they are intelligent. Destination disks do not need to be formatted beforehand as FastCopy will read the source disk's boot sector and format the destination disk to match the same format whilst copying. Selecting 'Fast Format Dest' and 'Read Disk Config' performs this. There is no need to alter the configuration in the 'Disk configuration' box and 'Get Sectors - all' should also be selected. Normally 'Verify Destination' should be selected as well. This causes the program to check that what it has just written to disk is the same as that temporarily stored in memory whilst copying. Very rarely does a disk or file copy fail, especially on hard disks but if making a backup of very valuable data where no chances can be taken, it is prudent to set this. However, with Verify off, disk copying is almost twice as fast. If the format of the source disk is known and a destination disk is already formatted to match, then FastCopy is even faster and certainly worthwhile if backing up more than the odd disk. File Copy The other way of copying disks is to copy each individual file across onto the destination disk. With GEM it is a simple matter of selecting all the files on the source disk and dragging them to the new one. There are several problems with this and some interesting benefits. One of the problems is that the GEM directory windows aren't very clever and selecting a whole disk of many files can take several operations, scrolling the window between each one. Many alternative Desktops allow all the items in a directory window to be selected as does the 'Select All Items' menu item in TOS 2, 3 and 4. Another problem is that if the destination disk has a smaller capacity than the source disk, there might be some files incapable of being copied across because of lack of space. Disk capacities can be checked beforehand, of course, but who thinks of that? Anyway, doing a 'Show Info' on a disk gives very misleading results. Quite often the 'Bytes Used' figure is obtained by adding up the length of each file on the disk and bears no resemblance to the amount of disk space that they will take up on your destination disk. Different programs and desktops will also give different figures for this. Most programs will give consistent values for the 'Bytes Free' but this is only the maximum number of bytes that can be stored if every sector on every track is full to the brim. This is never the case and can be grossly misleading if there are lots of small data files to copy. Space thought to be available, might not be there once files have started to be copied over. One of the major benefits of copying individual files is that they can be copied in any order desired. Why? If working from floppy disks a quicker boot up or execution of an application can be had, by copying the program file, its resource and configuration files onto an empty disk in that order so that they are placed on the first tracks of the disk, just after the directory sectors. If this is also a boot up disk, copy the AUTO folder programs first, then the accessories and lastly, the application program files. These files are in the correct order for being loaded and will occupy contiguous sectors and tracks which greatly decreases the amount of time the drive's heads are moving over the disk surface. This is also possible on hard disks, especially on larger capacity ones where there can be a significant improvement in the load up time of a large application. After this has been done, the data files and other stuff that will only be accessed infrequently can be copied. When a disk gets used a lot, files get deleted leaving empty sectors scattered about the disk. New files will occupy the first empty sectors designated as being free in the FAT. This may mean that a large file will get split up into non-contiguous sectors all over the disk. This is apparent when the disk drive motor is heard moving backwards and forwards across the disk surface when loading a single file. That file is said to be fragmented. Because the heads have to travel more, the file takes significantly longer to load up. All the files on the disk can be made contiguous again and their load times optimised by copying all of them to another disk or, better still, a RAM disk. Delete all the files or reformat the original disk and copy them back again, remembering to do the program files first. If the files aren't deleted before copying them back, they are copied into the same sectors again making no difference at all. The fastest and most versatile file copier is Kobold (from Systems Solutions) and this program makes this sort of operation - as well as copying hard disk partitions around - effortless. *** CAPTION MSB5_1.GIF *** FastCopy will fulfil most disk copying needs and includes an extensive formatter where favoured formatting configurations can be saved as Presets. *** END CAPTION *** *** CAPTION MSB5_2.GIF *** Select the files on one side, select the destination path and click - easy and very fast! Kobold can also be taught to play back an operation again at a later date so speeding up repetitive copying tasks. *** END CAPTION *** *** CAPTION MSB5_3.GIF *** Look at all that fragmentation! Files split all over the disk take longer to load up. Diamond Edge can especially sort that but so can Kobold by moving the files to another disk and back again. *** END CAPTION ***