Despite using the same flexible WD1772 FDC chip as the Atari ST, the majority of SAM disks formats aren’t particularly challenging.
To create a disk image from an existing SAM disk use:
SAMdisk a: image.dsk
To write a SAM disk image back to a real disk use:
SAMdisk image.dsk a:
To write a disk image to a pre-formatted SAM floppy (faster):
SAMdisk image.dsk a: --no-format
To write only used tracks to pre-formatted floppy (fastest!):
SAMdisk image.dsk a: --minimal --no-format
To format a floppy in MGT format for normal SAM use:
SAMdisk format a:
To format a floppy in CP/M format for Pro-Dos use:
SAMdisk format a: --cpm
Note: Be sure to use only true double-density disks, which should be marked DSDD or 2DD, and are often blue. Covering the hole on high-density disks (usually black) is not recommended!
BDOS format drives are supported, on floppy disks, hard disks, or compact flash cards.
To display a list of available drives:
SAMdisk list
Sample output:
0:
Name: ST380021A
Capacity: 80026361856 bytes = 156301488 sectors = 80GB
1:
Name: Generic-Compact Flash
Capacity: 524869632 bytes = 1025136 sectors = 525MB
Format: Atom Lite, 641 records, bootable
A drive number followed by a colon is shown above each entry, and used to refer to the drive in other commands. In this example the OS boot drive is 0: and the BDOS drive is 1:
To list the BDOS records on this drive:
SAMdisk list 1:
Sample output:
Atom Lite, 641 records:
1 : System
10 : Comet v18
40 : SAM Paint
50 : Lemmings! 1-1
51 : Lemmings! 1-2
To show a directory listing of files in a single BDOS record (1 in this example):
SAMdisk list 1:1
Sample output:
Record 1: System
1* Mini-FAT16 256 SPECIAL
2 AL-BDOS15a 21 CODE 32777,10701 22/07/2012 00:59
3 AL-LOGO 49 SCREEN$ [mode 4] 22/07/2012 00:59
3 files, 77 free slots, 163K used, 617K free
To create a disk image from a BDOS drive:
SAMdisk 1: image.hdf
The output file is uncompressed, so you’ll need space matching your source drive size.
SAMdisk image.hdf 1:
You’ll be asked to confirm the target drive is correct before writing begins, though you may skip this step with --force
if you need to automate this process.
If your target drive is a different size (even slightly), use --resize
to make the necessary adjustments. This is not the default behaviour as a safety precaution.
If your new drive is much larger than the old one, you can use --quick
to skip the zero-filling of the new disk after the content is copied.
To convert between Atom and Atom Lite formats during the write, use --byte-swap
.
To convert images between Atom and Atom Lite format requires byte-swapping:
SAMdisk atom.hdf atomlite.hdf --byte-swap
To copy an image into a existing image of a different size will require resizing:
SAMdisk small.hdf big.hdf --resize
To create a blank HDF disk image (32MB in this example):
SAMdisk create image.hdf 32
This image will still need formatting before use.
To format a drive or image for use with the Atom Lite interface:
SAMdisk format 1:
SAMdisk format image.hdf
To format for use with the legacy Atom interface:
SAMdisk format 1: --atom:
To format an existing record, to empty it:
SAMdisk format 1:123
To copy a record (123 in this example) to a floppy disk image:
SAMdisk 1:123 image.mgt
To copy a special ProDos CP/M record to a disk image:
SAMdisk 1:123 image.cpm --cpm
To copy a disk image (MGT or compatible) to a record:
SAMdisk image.mgt 1:123
To copy a 720K CP/M image to a the special ProDos record format:
SAMdisk image.cpm 1:123 --cpm
To copy between records is simple too:
SAMdisk 1:123 1:234
The first sector on a BDOS drive is the boot sector, which holds configuration parameters for the drive, as well as code to load the splash screen and optionally auto-boot a record.
To copy the boot sector a file:
SAMdisk 1:0 image.bin
To copy a previously saved boot sector (512 bytes) back to the drive:
SAMdisk image.bin 1:0
SAMdisk will automatically update the BDOS parameters in the data before writing. To suppress this add --no-fix
.