File: vice_10.html

package info (click to toggle)
vice 1.19-1etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 27,132 kB
  • ctags: 33,406
  • sloc: ansic: 257,145; cpp: 13,395; sh: 3,674; makefile: 3,380; perl: 1,801; yacc: 622; lex: 258; asm: 4
file content (298 lines) | stat: -rw-r--r-- 8,438 bytes parent folder | download | duplicates (2)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from ../vice.texi on 7 January 2006 -->

<TITLE>VICE Manual - 10  c1541</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_9.html">previous</A>, <A HREF="vice_11.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC147" HREF="vice_toc.html#TOC147">10  c1541</A></H1>

<P>
VICE is provided with a complete stand-alone disk image maintenance
utility, called <CODE>c1541</CODE>.

</P>
<P>
You can either invoke it from the command
line or from within one of the VICE emulators, using the "Run c1541"
command which will open a new <CODE>xterm</CODE> window with a running
<CODE>c1541</CODE> in it.

</P>
<P>
The syntax is:

</P>

<PRE>
c1541 [IMAGE1 [IMAGE2]] [COMMAND1 COMMAND2 ... COMMANDN]
</PRE>

<P>
<CODE>IMAGE1</CODE> and <CODE>IMAGE2</CODE> are disk image names that can be
attached before <CODE>c1541</CODE> starts.  <CODE>c1541</CODE> can handle up to
two disk images at the same time by using two virtual built-in drives,
numbered <CODE>8</CODE> and <CODE>9</CODE>; <CODE>IMAGE1</CODE> (if present) is always
attached to drive <CODE>8</CODE>, while <CODE>IMAGE2</CODE> is attached to drive
<CODE>9</CODE>.

</P>
<P>
<CODE>COMMAND</CODE>s specified on the command-line all begin with the minus
sign (<CODE>-</CODE>); if present, <CODE>c1541</CODE> executes them in the same
order as they are on the command line and returns a zero error code if
they were successful.  If any of the <CODE>COMMAND</CODE>s fails, <CODE>c1541</CODE>
stops and returns a nonzero error code.

</P>
<P>
If no <CODE>COMMAND</CODE>s are specified at all, <CODE>c1541</CODE> enters
interactive mode, where you can type commands manually.  Commands in
interactive mode are the same as commands in batch mode, but do not
require a leading <CODE>-</CODE>.  As with the monitor, file name completion
and command line editing with history are provided via GNU
<CODE>readline</CODE>.  Use the command <SAMP>`quit'</SAMP> or press <KBD>C-d</KBD> to
exit.

</P>



<H2><A NAME="SEC148" HREF="vice_toc.html#TOC148">10.1  Specifying files in c1541</A></H2>

<P>
When accessing CBM DOS files (i.e. files that reside on disk images),
c1541 uses a special syntax that lets you access files on both drive 8
and 9.  If you prepend the file name with <CODE>@8:</CODE> or <CODE>@9:</CODE>, you
will specified that file is to be found or created on drive 8 and 9,
respectively.

</P>
<P>
For instance,

</P>

<PRE>
@8:somefile
</PRE>

<P>
will name file named <CODE>somefile</CODE> on unit 8, while

</P>

<PRE>
@9:somefile
</PRE>

<P>
will name file named <CODE>somefile</CODE> on unit 9.

</P>


<H2><A NAME="SEC149" HREF="vice_toc.html#TOC149">10.2  Using quotes and backslashes</A></H2>

<P>
You can use quotes (<CODE>"</CODE>) in a command to embed spaces into file
names.  For instance,

</P>

<PRE>
read some file
</PRE>

<P>
will read file <CODE>some</CODE> from the disk image and write it into the
file system as <CODE>file</CODE>, while

</P>

<PRE>
read "some file"
</PRE>

<P>
will copy <CODE>some file</CODE> into the file system, with the name
<CODE>some file</CODE>.

</P>
<P>
The backslash character (<CODE>\</CODE>) has a special meaning too: it lets
you literally insert the following character no matter what it is.  For
example,

</P>

<PRE>
read some\ file
</PRE>

<P>
will copy file <CODE>some file</CODE> into the file system, while

</P>

<PRE>
read some\ file this\"file
</PRE>

<P>
will copy <CODE>some file</CODE> into the file system with name
<CODE>this"file</CODE> (with an embedded quote).

</P>



<H2><A NAME="SEC150" HREF="vice_toc.html#TOC150">10.3  c1541 commands and options</A></H2>

<P>
This is a list of the <CODE>c1541</CODE> commands.  They are shown in their
interactive form, without the leading <CODE>-</CODE>.
Square brackets [] indicate an optional part, and "&#60;COMMAND&#62;" translates
to a disk command according to CBM DOS, like "i0" for example.

</P>
<DL COMPACT>

<DT><CODE>[&#60;command&#62;]</CODE>
<DD>
Execute specified CBM DOS command and print the current status of the
drive.  If no <CODE>command</CODE> is specified, just print the status.

<DT><CODE>? [&#60;command&#62;]</CODE>
<DD>
Explain specified command.  If no command is specified, list available
ones.

<DT><CODE>attach &#60;diskimage&#62; [&#60;unit&#62;]</CODE>
<DD>
Attach <CODE>diskimage</CODE> to <CODE>unit</CODE> (default unit is 8).

<DT><CODE>block &#60;track&#62; &#60;sector&#62; &#60;disp&#62; [&#60;drive&#62;]</CODE>
<DD>
Show specified disk block in hex form.

<DT><CODE>copy &#60;source1&#62; [&#60;source2&#62; ... &#60;sourceN&#62;] &#60;destination&#62;</CODE>
<DD>
Copy <CODE>source1</CODE> ... <CODE>sourceN</CODE> into destination.  If N &#62; 1,
<CODE>destination</CODE> must be a simple drive specifier (<CODE>@n:</CODE>).

<DT><CODE>delete &#60;file1&#62; [&#60;file2&#62; ... &#60;fileN&#62;]</CODE>
<DD>
Delete the specified files.

<DT><CODE>exit</CODE>
<DD>
Exit (same as <CODE>quit</CODE>).

<DT><CODE>extract</CODE>
<DD>
Extract all the files to the file system.

<DT><CODE>format &#60;diskname,id&#62; [&#60;type&#62; &#60;imagename&#62;] [&#60;unit&#62;]</CODE>
<DD>
If <CODE>unit</CODE> is specified, format the disk in unit <CODE>unit</CODE>.  If
<CODE>type</CODE> and <CODE>imagename</CODE> are specified, create a new image named
<CODE>imagename</CODE>, attach it to unit 8 and format it.  <CODE>type</CODE> is a
disk image type, and must be either <CODE>x64</CODE>, <CODE>d64</CODE> (both VC1541/2031), 
<CODE>g64</CODE> (VC1541/2031 but in GCR coding), <CODE>d71</CODE> (VC1571), <CODE>d81</CODE>
(VC1581), <CODE>d80</CODE> (CBM8050) or <CODE>d82</CODE> (CBM8250/1001). 
Otherwise, format the disk in the current unit, if any.

<DT><CODE>gcrformat &#60;diskname,id&#62; &#60;imagename&#62;</CODE>
<DD>
Create and format a G64 disk image named <CODE>imagename</CODE>.

<DT><CODE>help [&#60;command&#62;]</CODE>
<DD>
Explain specified command.  If no command is specified, list available
ones.

<DT><CODE>info [&#60;unit&#62;]</CODE>
<DD>
Display information about unit <CODE>unit</CODE> (if unspecified, use the current
one).

<DT><CODE>list [&#60;pattern&#62;]</CODE>
<DD>
List files matching <CODE>pattern</CODE> (default is all files).

<DT><CODE>quit</CODE>
<DD>
Exit (same as <CODE>exit</CODE>).

<DT><CODE>read &#60;source&#62; [&#60;destination&#62;]</CODE>
<DD>
Read <CODE>source</CODE> from the disk image and copy it into <CODE>destination</CODE> in
the file system.  If <CODE>destination</CODE> is not specified, copy it into a
file with the same name as <CODE>source</CODE>.", 

<DT><CODE>rename &#60;oldname&#62; &#60;newname&#62;</CODE>
<DD>
Rename <CODE>oldname</CODE> into <CODE>newname</CODE>.  The files must be on the
same drive.

<DT><CODE>tape &#60;t64name&#62; [&#60;file1&#62; ... &#60;fileN&#62;]</CODE>
<DD>
Extract files from a T64 image.

<DT><CODE>unit &#60;number&#62;</CODE>
<DD>
Make unit <CODE>number</CODE> the current unit.

<DT><CODE>unlynx &#60;lynxname&#62; [&#60;unit&#62;]</CODE>
<DD>
Extract the specified Lynx image file into the specified unit (default
is the current unit).

<DT><CODE>validate [&#60;unit&#62;]</CODE>
<DD>
Validate the disk in unit <CODE>unit</CODE>.  If <CODE>unit</CODE> is not specified,
validate the disk in the current unit.

<DT><CODE>write &#60;source&#62; [&#60;destination&#62;]</CODE>
<DD>
Write <CODE>source</CODE> from the file system into <CODE>destination</CODE> on a
disk image.

<DT><CODE>zcreate &#60;x64name&#62; &#60;zipname&#62; [&#60;label,id&#62;]</CODE>
<DD>
Create an X64 disk image out of a set of four Zipcoded files named
<CODE>1!zipname</CODE>, <CODE>2!zipname</CODE>, <CODE>3!zipname</CODE> and
<CODE>4!zipname</CODE>.

</DL>



<H2><A NAME="SEC151" HREF="vice_toc.html#TOC151">10.4  Executing shell commands</A></H2>

<P>
If you want to execute a shell command from withing <CODE>c1541</CODE>, just
prepend it with an exclamation mark (<CODE>!</CODE>).  For example,

</P>

<PRE>
!ls -la
</PRE>

<P>
will execute the command <CODE>ls -la</CODE>, which will show you all the
files in the current directory.

</P>

<P><HR><P>
Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_9.html">previous</A>, <A HREF="vice_11.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.
</BODY>
</HTML>