SAMdisk — Options

Command-line Syntax

SAMdisk <command> <args> <options>

SAMdisk uses getopt syntax for command-line options. Many options have a single character short form, as well as a more descriptive longer form that may be easier to remember.

Short options are preceded by - and may be grouped with other non-argument short options, the last one of which may also take an argument. Any required argument may follow immediately after the option or be separated with a space. -a -b -c 3, -a -bc 3 and -abc3 are all equivalent.

Long options are preceded by --, with mandatory arguments using either a space or = separator. Optional arguments must use the = separator. The full long option is not required, as long as it’s unambiguous.

Commands

If the first parameter isn’t a recognised command it’s used as the source argument in a copy.

Basic options

 -c, --cyls=N       cylinder count (N) or range (A-B)
 -h, --head=H       single head select (0 or 1)
 -s, --sectors      sector count for format, or single sector select
 -r, --retries=N    retry count for data errors (default=5)
 -R, --rescans=N    rescan count for track layout, to locate faint sectors
 -d, --double-step  double the step count between tracks
 -v, --verbose      extra output from some commands
 -f, --force        force operations that prompt for confirmation

Regular disk formats (only)

 -n, --no-format    skip formatting stage when writing disks
 -m, --minimal      read/write only used tracks on MGT disks
 -g, --gap3=N       set gap3 inter-sector spacing (default=auto)
 -i, --interleave=N override sector interleave (default=0)
 -k, --skew=N       override inter-track skew (default=1)
 -z, --size=N       override sector size code (default=2; 512 bytes)
 -b, --base=N       override lowest sector number (default=1)
 -0, --head[0|1]=N  override head 0 or 1 value
     --fm           use FM rather than MFM data encoding
     --verify       verify data was written correctly
 -x, --hex          hex display of CHS/CHRN values
     --hex-ish      hex display of sector number and offsets only

SAM Coupe, Spectrum +3 and Amstrad CPC

 --atom             format using Atom rather than Atom Lite byte-order
 --byte-swap        force byte-swapping of HDD images (Atom / Atom Lite)
 --cpm              perform BDOS record wrap/unwrap, or format for ProDOS
 --no-signature     suppress BDOS signature in record copy/format
 --no-weak          use duplicate sector alternative to weak sector (Speedlock)
 --no-check8k       don't check the ~6K checksums on 8K sectors
 --legacy           respect legacy restrictions of original EDSK format
 --calibrate        calibrate drive speed for writing 8K sectors
 --trim             write only allocated sectors to TRD/SCL output images
 --byte-swap        change byte order during copy for Atom/AtomLite conversion
 -L, --label=NAME   set BDOS/MasterDOS disk label to NAME

Gap data options

 --gaps             read and keep non-standard inter-sector gaps
 --clean-gaps       alias for --gaps
 --all-gaps         read and keep all inter-sector gaps
 --gap2             when reading gaps, also include gap2 area
 --no-gap4b         ignore gap data after final sector on track
 --gap-mask=N       bit mask value, for which sector gaps to keep
 --max-splice=N     maximum number of bits allowed in normal write splice
 --read-track       store full track as first gap, for diagnostic use only!

Advanced options

 --no-gaps          ignore any gap3 data in source image
 --no-offsets       ignore any offset information in source
 --no-copies        ignore additional copies of error sectors in source image
 --no-duplicates    ignore duplicate sectors IDs on the same track
 --no-dups          alias for --no-duplicates
 --no-data          discard all sector data, for privacy during diagnostics
 --no-write         after (non-special) formatting, skip the writing phase
 --no-diff          suppress error sector comparison in scan results
 --no-zip           don't attempt zip/gzip extraction on source image
 --no-fix           don't automatically fix suspected source image problems
 --no-fm            avoid use of FM mode for detection or writing
 --no-1m            avoid use of 1Mbps data rate for detection
 --no-identify      ignore any identify data read from source disk
 --no-cfa           don't include CFA features in generated identify data
 --no-wobble        don't simulate drive wobble for flux disk images
 --pll=TYPE         PLL type for flux data scanning (authentic/fixed/variable)
 --hdf=[10|11]      force created HDF images to use v1.0 or v1.1 [default]
 --rpm=[300|360]    force disk speed for track space calculations
 --old-drive        use slower step rate and ignore disk-change line
 --fm-overlap       work-around FM writing bug on some floppy controllers
 --chrn             trust ID header location over physical location
 --blind            blind-read source disk, even if regular format is known
 --flip             reverse disk sides (single-sided gives blank head 0)

Other options

 --quick            perform header-only track layout scanning
 --offsets          show approximate relative sector positions in scan results
 --abs-offsets      show approximate absolute sector positions in scan results
 --bytes=N          limit view command hex output to N bytes
 --copy=N           select a specific (zero-based) error sector copy
 --repair           repair target disk with good sectors from source disk
 --merge            merge source tracks into existing target image
 --resize           allow HDD copying to target of different size
 --fix              apply fixes for some detected disk image issues
 --log=FILE         write output text to FILE
 --mono             disable colour output to terminal devices
 --tty              output status messages to non-console output
 --version          show program version, supported types, driver version
 --help             show basic option help