1dskutil(1)                         Emulators                        dskutil(1)
2
3
4

NAME

6       dskutil - Simple sector edtor for discs and disc images.
7

SYNOPSIS

9       dskutil  [-type TYPE] [-side SIDE] [-comp COMP] [-dstep] [-retry COUNT]
10       [-format FMT] DISKIMAGE

DESCRIPTION

12       dskutil is an interactive command-driven sector editor, patterned after
13       the  venerable  CP/M  sector  editor  DU90.  This  explains some of its
14       idiosyncracies, such as the fact that commands deal  in  logical  track
15       numbers but physical sector numbers.
16

OPTIONS

18       -type TYPE
19              Determines which LibDsk driver is to be used to access the disc.
20
21              auto    Select  according  to  the  disc image file. This is the
22                      default.
23
24              dsk     Use the DSK (CPCEmu format) image driver.
25
26              edsk    Use the extended version of the DSK format.
27
28              floppy  Use the floppy driver.
29
30              myz80   Use the hard disk (MYZ80 format)  image  driver.   (This
31                      format cannot be autodetected.)
32
33              cfi     Use  the  CFI  (DOS  fdcopy format) image driver.  (This
34                      format cannot be autodetected.)
35
36              apridisk
37                      Use the ApriDisk image driver (from the utility  of  the
38                      same name).  (This format cannot be autodetected.)
39
40              raw     Use the raw driver.
41
42
43       -comp COMP
44              Select  the  compression method used on the disc image file (has
45              no effect when reading a floppy disc).
46
47              auto    Detect from the first few bytes of the file. This is the
48                      default.
49
50              sq      Huffman coded (SQ / USQ).
51
52              gz      Gzipped (gzip / gunzip).
53
54              bz2     Burrows-Wheeler compressed (bzip2 / bunzip2).
55
56
57       -side SIDE
58              Determines  which  side  (0  or  1)  of the source disc is to be
59              scanned. If this option  is  not  present  both  sides  will  be
60              scanned.
61
62
63       -dstep Double-step  the  source drive (used to read 360k discs in 1.2Mb
64              drives). Only supported by the Linux floppy driver.
65
66
67       -retry COUNT
68              Set the number of times to attempt a read/write/format  in  case
69              of error.
70
71
72       -format FMT
73              Do  not  autodetect  the  disc format; use the named format. The
74              format need only be an approximation to the actual  format  used
75              by the disc.
76
77
78       -first CYL
79              Start scanning at the specified cylinder.
80
81
82       -last CYL
83              Scan up to and including the specified cylinder.
84

COMMANDS

86       The  following  single-letter  commands  are used. Operands in brackets
87       such as [filename] are optional. Numeric inputs are  shown  as  nn  for
88       decimal,  and xx for hex. In either case, prefixing the number with "#"
89       selects the alternate number system.
90
91       Multiple commands on a line are allowed, separated by semicolons.
92
93
94       +[x]   Increase the current sector number by [x] and read the resulting
95              sector, incrementing the track if necessary.
96
97       -[x]   Decrease the current sector number by [x] and read the resulting
98              sector, decrementing the track if necessary.
99
100       #      Display the disc geometry for the current drive/disc image.
101
102       $[variable[=value]]
103              View and amend the geometry. "$" by itself  shows  all  possible
104              variables with their current values; "$variable" shows the value
105              of one variable; and "$variable=value" sets a  new  value.  Note
106              that  changing  the  size  of the sector with "$secsize=nn" will
107              cause the current sector buffer and clip buffer to be cleared.
108
109       =ascii Search for an ASCII string, starting at the current sector.  Hex
110              codes  can  be  included  in  the ASCII by surrounding them with
111              angle brackets - for example, to search for the word "Hello"  at
112              the  start  of  a  line,  you could use "=<0A>Hello". The search
113              string is case-sensitive.
114
115       <      Save the currently-loaded sector to a clip buffer.
116
117       >      Restore the contents of the clip buffer to  the  current  sector
118              buffer.
119
120       ?      Display a command summary.
121
122       A[from,to]
123              Dump  the contents of the sector buffer as ASCII. If from and to
124              are included, then only values between  those  offsets  will  be
125              shown.
126
127       CHoffset,value,value,value...
128              Change bytes in the current sector buffer. The offset and values
129              are in hex.
130
131       CAoffset,ascii
132              Replace bytes in the current sector buffer with an ASCII string.
133              As  with  the  "="  command,  the ASCII can contain embedded hex
134              bytes in angle brackets.
135
136       CHfrom-to,value,value,value...
137              The same as CH above, but fills the range from from to  to  with
138              the byte sequence, repeating or truncating it as necessary.
139
140       CAfrom-to,ascii
141              The  same  as CHfrom-to, except that the byte sequence is speci‐
142              fied as ASCII.
143
144       D[from,to]
145              Dump the contents of the sector buffer as ASCII and hex.
146
147       Gxx    Go to logical sector number xx
148
149       H[from,to]
150              Dump the contents of the sector buffer as hex.
151
152       Kfilename
153              Save all "yanked" sectors (see Y below) to the  specified  file.
154              This also clears them from memory.
155
156       Lfilename[,type[,compression]]
157              Open  a  new drive or disc image. If this has a different sector
158              size from the current sector size, the sector  buffer  and  clip
159              buffer will be cleared.
160
161       N[geometry]
162              Change geometry. N by itself re-runs the automatic probe; N with
163              the name of a geometry selects  one  of  the  formats  known  to
164              LibDsk.
165
166       R      (Re)read the current sector.
167
168       Snn    Set the current sector number, and read.
169
170       Tnn    Set the current track number. Does not read.
171
172       V      Compare  the contents of the sector buffer with the current sec‐
173              tor on disc.
174
175       W      Write the sector buffer to disc.
176
177       X      Leave dskutil.
178
179       Y      Append the current sector to a "yank" buffer.  It  can  then  be
180              saved with the K command.
181
182       Z[nn]  Sleep  for nn seconds; if nn is not present, sleeps for one sec‐
183              ond.
184
185       /nn    This must be the last command on a line. It repeats the  preced‐
186              ing line nn times.
187

BUGS

189       On  platforms  with  no sleep(3) function, the Z command works by busy-
190       waiting.
191
192       Commands are always input using fgets(3), even  when  the  host  system
193       provides a more sophisticated input method such as readline(3).
194
195       While the current feature set is a fairly good match for DU90 (less the
196       features specific to the CP/M filesystem) it doesn't cover all the fea‐
197       tures of LibDsk.
198

AUTHOR

200       John Elliott <seasip.webmaster@gmail.com>.
201
202
203
204Version 1.5.9                  17 September 2018                    dskutil(1)
Impressum