aboutsummaryrefslogtreecommitdiff
path: root/atr2xfd.rst
blob: fac2ed40cb9625782b3c402e81bcfb815b3449ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.. RST source for atr2xfd(1) man page. Convert with:
..   rst2man.py atr2xfd.rst > atr2xfd.1
.. rst2man.py comes from the SBo development/docutils package.

=======
atr2xfd
=======

----------------------------------------------------------
Convert an Atari 8-bit ATR disk image to a raw (XFD) image
----------------------------------------------------------

.. include:: manhdr.rst

SYNOPSIS
========

**atr2xfd** *infile.atr* [*outfile.xfd*]

**atrcheck** *infile.atr*

DESCRIPTION
===========

**atr2xfd**  strips  the  16-byte  ATR header from an ATR image. While this
could be done with a command like::

  dd if=infile.atr outfile.xfd bs=16 skip=1

...**atr2xfd** first checks that its input is in fact an  ATR  file,  then
checks the ATR header and reports any problems it may find.

**atrcheck**  performs  the  same  checks  as **atr2xfd**, but doesn't actually
write an XFD image. In fact, **atrcheck** is a symbolic  link  to  **atr2xfd**,
which  changes  its  behaviour  (simply  doesn't write any output) when
called via the link.

Neither **atr2xfd** nor **atrcheck** take any options.

NOTES
=====

For both commands, you may use **-** for **infile** to read from
standard input. For **atr2xfd**, use **-** for **outfile** to write
to standard output. If a filename is supplied for **outfile**, it will
always be used as-is (no *.xfd*  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 *.atr* or *.ATR* extension,
  replace the extension with *.xfd*.

- Otherwise, append *.xfd* to the input filename.

EXAMPLES
========

Check an image::

  $ atrcheck dos_20s.atr
  atrcheck: size is 5760 16-byte paragraphs
  atrcheck: sectors: 720, sector size: 128 bytes
  atrcheck: dos_20s.atr is a standard SS/SD image, 90K
  atrcheck: ATR image OK (no fatal errors).
  [ exit status is 0 ]

Check an image and convert to XFD::

  $ atr2xfd dos_20s.atr
  atr2xfd: input 'dos_20s.atr', output 'dos_20s.xfd'
  atr2xfd: size is 5760 16-byte paragraphs
  atr2xfd: sectors: 720, sector size: 128 bytes
  atr2xfd: dos_20s.atr is a standard SS/SD image, 90K
  atr2xfd: ATR image OK (no fatal errors).
  atr2xfd: XFD image OK, wrote 92160 bytes
  [ exit status is 0 ]

Attempt to use atrcheck with an XFD image::

  $ atrcheck dos_20s.xfd
  atrcheck: (fatal) dos_20s.xfd looks like an XFD image, not an ATR
  [ exit status is 2 ]

Here, games001.atr is one of the old Yogi/Jellystone 1 meg images::

  $ atrcheck games001.atr
  atrcheck: size is 65536 16-byte paragraphs
  atrcheck: sectors: 8192, sector size: 128 bytes
  atrcheck: games001.atr is a high-capacity floppy or hard disk image, SD
  atrcheck: ATR image OK (no fatal errors).
  [ exit status is 0 ]

Here is an attempt to treat a non-image file as an image::

  $ atrcheck /bin/ls
  atrcheck: size is 5120 16-byte paragraphs
  atrcheck: (fatal) /bin/ls not an ATR file (no NICKATARI signature)!
  [ exit status is 2 ]

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 ATR file.

.. include:: manftr.rst