ATRSIZE(1)

NAME
atrsize - Change the size of an Atari 8-bit ATR disk image, or create a blank ATR image

SYNOPSIS

atrsize [-bB] infile.atr [sectors]

DESCRIPTION

Without the -b or -B options: infile.atr will be backed up to infile.atr~, and a new infile.atr will be created. If sectors is given, the new image file will be truncated or extended to the new size. Without sectors, the new image's size will be set as follows:
Density | Original Sectors | New Sectors
Either | 0 - 2 | Error
Either | 3 - 719 | 720
Either | 720 | 720 (no change)
Single | 721 - 1039 | 1040 (aka 1050 enhanced density)
Single | 1040 | 1040 (no change)
Single | 1041 or more | Unknown (must specify size)
Double | 721 - 1339 | 1440 (aka double sided, double density)
Double | 1440 | 1440 (no change)
Double | 1441 or more | Unknown (must specify size)

When sectors is given, its allowed range is from 3 to 65535. infile.atr will be rewritten at the new size.

When atrsize changes the size of an image, the new ATR header will reflect the new size. If the new image is larger than the old image, atrsize pads the image with empty sectors containing all 0 data bytes. If the new image is smaller than the old image, it is truncated, and any data in the old image that resides in the removed sectors will be lost.

For ATR images where the ATR header doesn't agree with the actual size of the file, the actual file size is used to determine the number of sectors. The output image will have its ATR header adjusted to reflect the actual file size of the image, if sectors is not given.

With -b or -B: atrsize will create a new, blank image called infile.atr. If this file already exists, however, it will not be overwritten (instead, atrsize will exit with a "file exists" message).

If sectors is given, the new image's size will be set to that many sectors. If not given, the new image's size will be 720 sectors.

-b creates a new image with 128-byte sectors (single density)

-B creates a new image with 256-byte sectors (double density).

New images created with atrsize consist of a valid ATR header, and sectors filled with zeroes. No boot sectors, directory, VTOC, or filesystem are created. To use a blank image for file storage, it must be formatted with an Atari DOS (either in an emulator or with a real Atari via SIO2PC cable). If you're trying to create a blank DOS 2.0S disk, use axe -b.

NOTES

•   atrsize cannot change the sector size (density) of an image under any circumstances. Only the sector count may be changed.

•   atrsize will fail if the input file doesn't have a valid ATR header. If it's an XFD (raw) image, use xfd2atr(1) to convert it to an ATR first.

EXIT STATUS

Exit status is zero for success, non-zero for failure.

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.