XFD2ATR(1)

NAME
xfd2atr - Convert an Atari 8-bit XFD (raw) disk image to an ATR image.

SYNOPSIS

xfd2atr [-sd] infile.xfd [outfile.atr]

DESCRIPTION

xfd2atr generates and adds a 16-byte ATR header to an XFD image. If no -s or -d options are given, xfd2atr tries to guess the density based on the file size.

OPTIONS

-s  Assume the image uses single density (128-byte) sectors, instead of trying to guess the density from the file size.

-d  Assume the image uses double density (256-byte) sectors, instead of trying to guess the density from the file size.

NOTES

You may use - for infile to read from standard input and/or - for outfile to write to standard output. If a filename is supplied for outfile, it will always be used as-is (no .atr extension will be appended).

If outfile is omitted, it is constructed like so:

•   If reading from standard input, write to standard output.

•   If reading from a file whose name ends with an .xfd or .XFD extension, replace the extension with .atr.

•   Otherwise, append .atr to the input filename.

    Since XFD images are raw dumps with no header or structure, it's impossible to know the correct density (bytes/sector) for a given image for certain.

    However, no known Atari-compatible disk format uses other than 128 or 256 bytes per sector (or possibly 512, for some hard disk images, but xfd2atr doesn't support these). This means any file that isn't a multiple of 128 bytes in size will be rejected.

    Likewise, no known format uses an odd number of sectors, and it's assumed that all double-density images will begin with 3 single-density boot sectors (true of all floppy images you're ever likely to run across; may not be true of hard disk images).

    Given these assumptions, xfd2atr is able to make an educated guess about the correct sector size and count to use for the ATR header it generates. If it guesses wrong, the resulting ATR image will be unusable; if this happens, re-run xfd2atr and force the density with -s or -d.

EXIT STATUS

Exit status is zero for success, non-zero for failure. Further, exit status will be 1 for errors involving file I/O (file not found, permissions, etc), and 2 for structural errors in the XFD file.

COPYRIGHT

WTFPL. See http://www.wtfpl.net/txt/copying/ for details.

AUTHOR

B.  Watson <urchlay@slackware.uk>; Urchlay on irc.libera.chat ##atari.

SEE ALSO

a8cat(1), a8eol(1), a8xd(1), atr2xfd(1), atrsize(1), axe(1), bas2aplus(1), blob2c(1), blob2xex(1), cart2xex(1), cxrefbas(1), dasm2atasm(1), diffbas(1), dumpbas(1), f2toxex(1), fenders(1), listbas(1), listamsb(1), protbas(1), renumbas(1), rom2cart(1), unmac65(1), unprotbas(1), vxrefbas(1), whichbas(1), xex1to2(1), xexamine(1), xexcat(1), xexsplit(1), xfd2atr(1), xex(5), atascii(7), fauxtari(7).

Any good Atari 8-bit book: De Re Atari, The Atari BASIC Reference Manual, the OS Users' Guide, Mapping the Atari, etc.