The copy command copies one or more tracks between devices and disk images.
Floppy writing supports most PC-compatible soft-sector formats, including those mixed sector sizes and error conditions such as data CRC errors, ID CRC errors, and missing data fields. It can also reproduce +3/CPC copy-protection formats, including those using gap data and weak sectors.
Floppy to Image
Create a disk image of an existing disk in drive A:
SAMdisk a: image.dsk
This reads all tracks from the source drive into a disk image. The output file extension determines the disk image type created, as well as the method used to read the disk.
The BIOS floppy drive type is used to determine the range of tracks available on the source disk, so it's recommended that is set correctly. Alternatively, you can use -cN to specify a cylinder count and/or -hN to select a single head.
When reading into a simple floppy image, the source is assumed to be in the expected format and only those sectors are read. This speed up the reading process since the source format doesn't need to be determined. Any missing sectors are reported but reading continues.
When reading into a flexible disk image, SAMdisk determines the sectors on each track before reading the data from each. This is slower but ensures that as much detail as possible is preserved.
To read 40 tracks from the first side only:
SAMdisk a: image.dsk -c40 -h0
To read the full disk, including non-standard inter-sector gaps:
SAMdisk a: image.dsk --gaps
To read a 40-track disk in an 80-track drive:
SAMdisk a: image.dsk -c40 --double-step
To read the second side of a disk into a single-sided image:
SAMdisk a: image.dsk -h1 --flip --head0=0
Image to Floppy
To write a disk image back to real disk:
SAMdisk image.dsk a:
This writes all tracks from the source image to the target drive. Any special writing requirements, including known copy-protections, are handled automatically.
SAMdisk automatically formats as it writes, but that may be suppressed when writing simple disk images by using --no-format.
To write the 40 tracks to the first side only:
SAMdisk image.dsk a: -c40 -h0
To write an image, ignoring any embedded gap data:
SAMdisk image.dsk a: --no-gaps
To write an FM image that fails normal writing due to a FDC bug:
SAMdisk image.dsk a: --fm-overlap
Image to Image
To convert an image between disk image formats is simple:
SAMdisk image.dsk image.imd:
This reads the source image, then writes the contents the target image. Optionally, modifications may be applied to the content during the copy.
The target may be any supported output type (as determined by the file extension), but if the capabilities of the output format are more limited than the source there may be some loss of detail.
To copy an image, removing any inter-sector gaps:
SAMdisk image.dsk newimage.dsk --no-gaps
To copy cylinders 10 to 12 from image into an existing image:
SAMdisk image.dsk existing.dsk -c10-12 --merge
To copy a structured disk image to a raw file containing only sector data:
SAMdisk image.dsk image.raw