DiskToUSB, USBtoDisk 0.44 ========================= mdfs.net/Apps/DiskTools J.G.Harston -- jgh@mdfs.net 70 Camm Street, Walkley, Sheffield, S6 3TR Introduction ------------ DiskToUSB copies a DFS, ADFS or LVFS disk, or disks using the same sector geometry, as a disk image, storing that disk image on a USB device plugged into a BBC USB interface such as that on the RetroClinic DataCentre. USBtoDisk copies in the other direction, writing a disk image to a physical disk. DiskToUSB retries multiple times to step past disk errors to copy as much of the disk as possible. DiskToUSB and USBtoDisk are the equivalent of such programs as DiskToImg and ImgToDisk and the RAMFS *EXPORT and *IMPORT commands. They both run on the BBC and Master. DiskToUSB --------- The RAMFS *EXPORT command can only copy DFS disks, and uses the disk size in the disk catalog as the amount of data to copy. This means that if you try to copy a disk with a truncated catalog - such as an AcornCPM disk - you will not copy the whole disk. DiskToUSB can also copy ADFS and LVFS disks, and you can override the disk size. This lets you make a raw copy of any disk that is formatted to 10 or 16 sectors per track, regardless of the filesystem actually stored on the disk. You can also make an image of an ADFS hard drive. On running, you are asked for the source filing system and drive, and the filename of the image file to save to. The filename must be an 8.3 DOS filename, and it will be stored in the root directory of the USB device. You are then prompted with the size of the source disk as found from reading the disk. To confirm this, press RETURN. Otherwise, enter a disk size in hex to copy. When running, DiskToUSB displays a running count of disk sectors transfered. As many disk sectors as will fit in memory are transfered in one go. If disk errors are encounted the read is re-attempted several times before skipping the dodgy sectors. When completed the USB device is dismounted so it can be unplugged. Skipping bad sectors -------------------- On each pass DiskToUSB initially tries to read as many disk sectors as will fit in memory, making several attempts to read the data. If a bad sector is encounted, it then attempts to read a quarter as many sectors. This will succeed if the bad sector was later in the data. If this read also fails, the bad sector must be in the earlier part of the data somewhere, so DiskToUSB tries to read a smaller number of sectors, until eventually it attempts just a single sector. If this one sector gives errors, DiskToUSB just steps past it, saving whatever data it managed to read. USBtoDisk --------- The RAMFS *IMPORT command can only copy DFS disks and disks with the same geometry of 256 bytes x 10 sectors per track. USBtoDisk will copy such disk images, and can also copy ADFS and LVFS images. This lets you write any disk image to a disk that is formatted to 10 or 16 sectors per track, regardless of the filesystem actually stored on the disk. You can also write a disk image directly to an ADFS hard drive. On running, you are asked for the source USB filename, and the destination filing system and drive. The USB filename must be an 8.3 DOS filename, and must be stored in the root directory of the USB device. **WARNING** On ADFS with a hard drive active, drive ZERO is the hard drive. If you want to write an image to a floppy you MUST specify drive 4 or above. When running, USBtoDisk displays a running count of disk sectors transfered. As many disk sectors as will fit in memory are transfered in one go. When completed the USB device is dismounted so it can be unplugged. Disk formats ------------ The 'Source filing system' prompt will recognise DISK, HADFS, ADFS, LVFS and RAM. The filing system has to be present to be able to be selected. Selecting DISK as the disk type will let you use any disk formatted to 256 bytes x 10 sectors per track. This includes DFS, AcornCPM, TorchCPN and HADFS. ADFS will let you use any disk formatted to 256 bytes x 16 sectors per track. This includes double-density DFS, AcornDOS boot disks, Level 3 File Server and FileStore disks. Notes ----- If you abort the program you may find that the USB drive stops responding. You will need to press Break to reset the Vinculum.