DIR2ATR(1)

NAME
dir2atr - create an Atari disk image from a directory of files

SYNOPSIS
dir2atr [-d] [-m] [-p] [-b DOS] [sectors] image-filename directory

DESCRIPTION
dir2atr creates an Atari DOS 2.x or MyDOS compatible disk image, containing the files from directory (or a blank disk, if the supplied directory does not exist). Despite the name, dir2atr is capable of creating ATR, XFD, or DCM format images.

OPTIONS

-d  Create double-density (256 bytes/sector) disk image. Without this option, the default is to create a single-density (128 bytes/sector) image.

-m  Use MyDOS format (VTOC; see -b for boot sector type). Without this option, dir2atr may still create a MyDOS format image: If the number of sectors is not supplied, or if using double density (-d), or if the number of sectors supplied in single density mode is anything other than 720 or 1040, then MyDOS format will be used.

    Another way of saying this is that DOS 2.x format will only be used if the number of sectors is supplied, and if it is equal to either 720 (DOS 2.0 format) or 1040 (DOS 2.5 enhanced density format).

    SpartaDOS-formatted images are not supported.

-p  Create PICONAME.TXT file in disk image, containing long filename information (will be used by MyPicoDOS when displaying filenames).

-b DOS
    Create bootable disk for specified DOS. The directory must already contain the DOS.SYS or equivalent for the specified DOS, unless creating a MyPicoDOS image (in which case, PICODOS.SYS will be created and added to the image).

    Supported DOS choices (case-insensitive):
    Dos20, Dos25, MyDos453, TurboDos21, TurboDos21HS, MyPicoDos403, MyPicoDos403HS

sectors
    Number of sectors in the created image. Standard floppy-sized images generally contain 720 sectors (single- or double-density, 90K or 180K capacity) or 1040 sectors (1050/DOS 2.5 enhanced density, 127K capacity).

    Some Atari drives and DOSes support larger floppy disks (e.g. 1440 double-density sectors for a DS/DD XF551 disk, 360K capacity; or 2880 DD sectors for a PC-style 720K floppy drive).

    Hard disk images may contain up to 65535 double-density sectors. This limitation is imposed by the ATR file format (16 megabytes is pretty big for an 8-bit Atari disk, though). Most Atari DOSes won't support physical disk partitions bigger than this, anyway. Theoretically, the XFD "format" could be of unlimited size (since it's just a raw dump of the sectors, with no structure), but dir2atr imposes the same size limit for XFD as for ATR.

    Actually, the distinction between "hard disk" and "floppy disk" images doesn't really exist in the ATR file format: any image that fits on an actual floppy disk (one that's actually supported by an actual Atari DOS) is by definition a floppy image, and anything larger than that must be considered a hard disk image.

    If sectors is omitted, dir2atr will create a MyDOS-format image with as many sectors as needed to contain the all the files in directory, unless this is less than 720 sectors (in which case, a 720-sector image is created, with some free sectors).

    If sectors is given, it must be between 720 and 65535. No Atari-compatible disk may contain fewer than 720 sectors. When creating a DCM (DiskComm) image, the only supported image sizes are 90K (720 single-density sectors), 127K (1040 single-density sectors, aka 1050 enhanced density), and 180K (720 double-density sectors).

    If you specify a number of sectors too small for the files in directory, you will get an error message, but the image will still be created. It will contain whatever files were copied before running out of space (which might be none, if the first file is too big to fit).

image-filename
    Disk image file to create. The image type is determined by the filename "extension", which should be .atr, .xfd, or .dcm. The extension is treated case-insensitively, and the default image type is ATR if the extension is missing or not recognized.

directory
    Directory of files to be copied to the image. The files are copied in case-sensitive alphabetical order. directory may contain subdirectories, which will be skipped if creating a DOS 2.x image, or included (recursively) as MyDOS subdirectories if creating a MyDOS image. While the image is being created, each filename in directory is printed to standard error output after it's copied.

    NOTE: Empty subdirectories will not be copied to the image.

    Atari DOS and MyDOS (and any other compatible DOS for the Atari) suffer from a limit of 64 files per directory. For Atari DOS, this means 64 files per disk, since subdirectories are not supported. For MyDOS, it means 64 files/subdirectories per directory. In either case, dir2atr will copy the first 64 files in the directory or subdirectory, then issue a warning to let you know that it had to skip the rest of the files.

    To create a blank disk, you may create and use an empty directory. A blank disk is also created if the specified directory is not a directory (e.g. if it's a regular file), or if it does not exist at all! No error messages are given for non-directories or non-existent files. This is probably not the author's original intent, but it can be considered useful behaviour (except when it's confusing: if you make a typo in the directory, you'll end up with a blank image instead of the expected error message. The careful user will notice that no "Added file" messages get printed in this case).

    Although Atari DOS and MyDOS only support uppercase "8.3" names, filenames within directory are not required to conform to this limitation. dir2atr will transform the filenames so that they match the Atari limitations, although care should be taken to avoid filenames within directory that differ only in case (e.g. FOO and foo). If this happens, some of the resulting Atari filenames will contain spaces, which is incompatible with most (all?) Atari DOSes. Also, dir2atr will allow filenames inside the image to start with a digit, which is incompatible with most Atari DOSes as well.

    If the -p option is used, the filenames will still be transformed as necessary, but the original filenames will be recorded in the PICONAME.TXT file. If creating a MyPicoDOS image, the MyPicoDOS menu will actually display the full, original filenames.

AUTHOR
Matthias Reichl <hias@horus.com>

Man page by B. Watson <urchlay@urchlay.com>

SEE ALSO
atariserver(1), atarixfer(1), adir(1).

AtariSIO home page: http://www.horus.com/~hias/atari/