-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtpip.html
More file actions
339 lines (309 loc) · 13.6 KB
/
rtpip.html
File metadata and controls
339 lines (309 loc) · 13.6 KB
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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- <link rel="stylesheet" href="style.css"> -->
<title>RTPIP</title>
<style>
table {
border-collapse: collapse;
width: 50%;
}
th, td {
text-align: left;
padding: 2px;
}
tr:nth-child(even) {
background-color: #D6EEEE;
}
.TblCntr table
{
margin: 10px;
border:1px solid #000;
border-collapse: collapse;
width: 50%;
align: left;
}
.TblCntr tr
{
border: 2px solid white;
}
.TblCntr th
{
border: 2px solid white;
text-align: center;
padding: 2px;
}
.TblCntr td
{
border: 2px solid white;
text-align: center;
padding: 2px;
}
.TblCntr tr:nth-child(even)
{
background-color: #D6EEEE;
}
</style>
</head>
<body>
<div style="width: 25%;text-align:center;">
<h1>RTPIP</h1>
RT-11 container file handler<br>
Version 1.0<br>
First created around 2013 but never released<br>
Revisions through 2022<br>
</div>
<p></p>
<div style="border: 2px solid black;margin:4px;padding: 4px">
<em>Note from Dave Shepperd, 10/2022
<p>
There never were any release notes kept on this application so there is no record of what got changed when. It just is what it is.
</p>
<p>
Recently I got involved in rebuilding some of old Atari coin-op game code (some of which recently
was released on github) and wanted to use this tool to extract some old images I had lying around
in RT-11 container files. I am neither a technical writer nor am I any good at HTML5.
Feel free to hack this document into something more readable. If you do, please send me a copy.
</p>
</em>
</div>
<h2>How to run</h2>
<p>
<pre>
<b>rtpip</b> [<em>global_options</em>] <em>container_spec</em> <em>command</em> [<em>cmd_options</em>] [<em>file_list</em>]
Where ([] indicates optional parameter):
<em>global_options</em> can be one of:
-d or --debug = set debug mode
-f or --floppy = image is of a floppy disk
-F or --double = image is of a double density floppy disk
-h, -? or --help = This message.
-lN or --lba=N = set starting LBA to 'N' (defaults to 6)
-v or --verbose = set verbose mode
<em>container_spec</em> = path to the RT-11 container file.
<em>command</em> = one of <b>del</b>, <b>dir</b>, <b>in</b>, <b>ls</b>, <b>new</b>, <b>out</b>, <b>rm</b> or <b>sqz</b>
<em>cmd_options</em> = optional options for specific command
<em>file...</em> = optional input or output filename expressions
For help on a specific <b><em>cmd</em></b>, use:
<b>rtpip</b> <em>anything</em> <b><em>cmd</em> -h</b>
</pre>
</p>
<h2>Command dir or ls</h2>
<b>rtpip</b> [<em>opts</em>] <b>container ls</b> [<em>command_options</em>] [<em>file_filters</em>]
<pre>
Display a listing of files in container file.
The <em>command_options</em> can be one or more of the following:
--help or -h or -? = help specific to ls command.
--cols=N or -cN or -N = 'N' is a number 1 through 9 indicating columns to output.
--full or -f = Output full directory information (only if column is not specifed).
--all or -a = Output all directory information (only if column is not specified).
--sort=n or -sn = Sort by filename.
--sort=t or -st = Sort by filetype.
--sort=d or -sd = Sort by date.
--sort=s or -ss = Sort by size.
--reverse or -r = Reverse sort.
--rexp or -R = filters are regular expressions.
--verbose or -v = Set verbose mode.
</pre>
<p>
The <em>file_filters</em> are zero or more file filters. If -R or --rexp option is present then the names are
interpreted as regular expressions.
</p>
<p>
NOTE: the regular expressions are defined in <b>man 7 regex</b> or <b>man grep</b>.
I.e. to display only .MAC filenames, use <b>mac$</b> instead of the more typical <b>*.mac</b>.
<br><br>
The case of the names used in the filters does not matter (upper or lowercase will work
equally well). If the regular expression includes shell specific characters, they will
need to be escaped.
</p>
<pre>
Examples (<b>rt11.dsk</b> is the container file):
Get a full file list of the container rt11sys.sys:
<b>rtpip rt11.dsk ls -a</b>
Get a list of just files of type .mac:
<b>rtpip rt11.dsk ls \*.mac</b>
Get a list of just files of type .mac and .sav:
<b>rtpip rt11.dsk ls \*.mac \*.sav</b>
</pre>
<p>
<font color="red">NOTE:</font>
<em>There's an oddity I noticed using rtpip in an MSYS2 window where the notation "*.*" doesn't
pass the asterisks to rtpip. Instead the shell expands the list to all files in the current directory
the same as it would if the double quotes are left off. Using single quotes makes it do the right thing.
And it might also be true with the leading backslash as in the above examples.
</em>
</p>
<h2>Command out</h2>
<b>rtpip</b> [<em>opts</em>] <b>container out</b> [<em>command_options</em>] [<em>file_filters</em>]
<pre>
Copy file(s) out of the container.
The <em>command_options</em> can be one or more of the following:
--ascii or -a = Change crlf to just lf. Copy file until control Z or null found. If a Control Z terminates, does not write it.
--binary or -b = Write file as image (default).
--help or -h or -? = help specific to out command.
--outdir=<b>X</b> or -o <b>X</b> = specify the directory into which the files will be output as <b>X</b>. Default is current dir.
--lower or -l = Change output filename to lowercase.
--rexp or -R = <em>file_filters</em> are regular expressions.
--time or -t = maintain file timestamps
--assumeyes or -y = Assume YES instead of prompting for each file.
</pre>
<p>
The <em>file_filters</em> are one or more file filters. If -R or --rexp option is present then the names are
interpreted as regular expressions.
</p>
<p>
NOTE: the regular expressions are defined in <b>man 7 regex</b> or <b>man grep</b>.
I.e. to display only .MAC filenames, use <b>mac$</b> instead of the more typical <b>*.mac</b>.
<br><br>
The case of the names used in the filters does not matter (upper or lowercase will work
equally well). If the regular expression includes shell specific characters, they will
need to be escaped.
</p>
<pre>
Examples (<b>rt11.dsk</b> is the container file):
Get a plain binary file named foo.sys:
<b>rtpip rt11.dsk out foo.sys</b>
Get all the files of type .mac and convert to ascii:
<b>rtpip rt11.dsk out -a \*.mac</b>
Get all the files of type .mac, maintain their creation dates, convert filename to lowercase, convert contents to ascii and deposit them into <b>outdir</b>:
<b>rtpip rt11.dsk out -tl -o outdir \*.mac</b>
</pre>
<p>
<font color="red">NOTE:</font>
<em>There's an oddity I noticed using rtpip in an MSYS2 window where the notation "*.*" doesn't
pass the asterisks to rtpip. Instead the shell expands the list to all files in the current directory
the same as it would if the double quotes are left off. Using single quotes makes it do the right thing.
And it might also be true with the leading backslash as in the above examples.
</em>
</p>
<h2>Command in</h2>
<b>rtpip</b> [<em>opts</em>] <b>container in</b> [<em>command_options</em>] [<em>file_filters</em>]
<pre>
Copy file(s) into the container.
The <em>command_options</em> can be one or more of the following:
--help or -h or -? = help specific to in command.
--query or -q = Prompt before copying each file (default).
--ascii or -a = Change lone lf's to crlf.
--binary or -b = Write file as image (default).
--date=xx or -d xx = Set rt11 date for files. dd-mmm-yy where 72<=yy<=99.
--rexp or -R = <em>file_filters</em> are regular expressions.
--time or -t = maintain file timestamps.
--assumeyes or -y = Assume YES instead of prompting for each file.
--verbose or -v = Sets verbose mode.
</pre>
<p>
The <em>file_filters</em> are one or more file filters. If -R or --rexp option is present then the names are
interpreted as regular expressions.
</p>
<p>
NOTE: the regular expressions are defined in <b>man 7 regex</b> or <b>man grep</b>.
I.e. to display only .MAC filenames, use <b>mac$</b> instead of the more typical <b>*.mac</b>.
If the regular expression includes shell specific characters, they will
need to be escaped.
<br><br>
The case of the names used in the filters does not matter (upper or lowercase will work
equally well). However, filenames are always converted to uppercase in the container file and
must conform to valid RT11 no more than 6.3 Rad50 characters.
</p>
<pre>
Examples (<b>rt11.dsk</b> is the container file):
Input a plain binary file named foo.sys:
<b>rtpip rt11.dsk in foo.sys</b>
Input all the files of type .mac and convert to ascii:
<b>rtpip rt11.dsk in -a \*.mac</b>
Input all the files of type .mac, maintain their creation datestamps and convert contents to ascii:
<b>rtpip rt11.dsk in -t \*.mac</b>
</pre>
<p>
<font color="red">NOTE:</font>
<em>There's an oddity I noticed using rtpip in an MSYS2 window where the notation "*.*" doesn't
pass the asterisks to rtpip. Instead the shell expands the list to all files in the current directory
the same as it would if the double quotes are left off. Using single quotes makes it do the right thing.
And it might also be true with the leading backslash as in the above examples.
</em>
</p>
<h2>Command del or rm</h2>
<b>rtpip</b> [<em>opts</em>] <b>container del</b> [<em>command_options</em>] [<em>file_filters</em>]
<pre>
Delete file(s) from the container.
The <em>command_options</em> can be one or more of the following:
--help or -h or -? = help specific to del command.
--rexp or -R = <em>file_filters</em> are regular expressions.
--assumeyes or -y = Assume YES instead of prompting for each file.
--verbose or -v = Sets verbose mode.
</pre>
<p>
The <em>file_filters</em> are one or more file filters. If -R or --rexp option is present then the names are
interpreted as regular expressions.
</p>
<p>
NOTE: the regular expressions are defined in <b>man 7 regex</b> or <b>man grep</b>.
I.e. to display only .MAC filenames, use <b>mac$</b> instead of the more typical <b>*.mac</b>.
If the regular expression includes shell specific characters, they will
need to be escaped.
<br><br>
The case of the names used in the filters does not matter (upper or lowercase will work
equally well).
</p>
<pre>
Examples (<b>rt11.dsk</b> is the container file):
Delete a plain binary file named foo.sys:
<b>rtpip rt11.dsk rm foo.sys</b>
Delete all the files of type .mac:
<b>rtpip rt11.dsk rm \*.mac</b>
</pre>
<p>
<font color="red">NOTE:</font>
<em>There's an oddity I noticed using rtpip in an MSYS2 window where the notation "*.*" doesn't
pass the asterisks to rtpip. Instead the shell expands the list to all files in the current directory
the same as it would if the double quotes are left off. Using single quotes makes it do the right thing.
And it might also be true with the leading backslash as in the above examples.
</em>
</p>
<h2>Command sqz</h2>
<b>rtpip</b> [<em>opts</em>] <b>container sqz</b> [<em>command_options</em>]
<pre>
Squeeze all empty space in container into a single contigious space.
The <em>command_options</em> can be one or more of the following:
--help or -h or -? = help specific to del command.
--segments or -s = specify how many segments to be allocated (default is current).
--assumeyes or -y = Assume YES instead of prompting.
--verbose or -v = Sets verbose mode.
</pre>
<p>
NOTE 1: The --segments option allows one to increase the number of segments in the
container. It won't let one set it to less than the current. The maximum number
of segments is 32 in any case. Floppy disk container files have maximums of 2 for
single density and 4 for double density.<br>
If the segment count is not specified, RTPIP will compute an appropriate segment count based on the number of files
in the container if each segment is filled only 1/2 full or maintains the current segment count if the current is
greater than the computed amount.
<br><br>
NOTE 2:, the way RTPIP does a squeeze is to make a completely new container file with all new headers and segment
space and copies all the files from the old one to the new one leaving all the empty space as a single contigious
space at the end. The old file is renamed to .bak.
</p>
<pre>
Examples (<b>rt11.dsk</b> is the container file):
Squeeze the container file:
<b>rtpip rt11.dsk sqz</b>
Note that the resulting <b>rt11.dsk</b> is a new one. The unmodified container file has been renamed to <b>rt11.dsk.bak</b>.
</pre>
<h1>How to build</h1>
<p>
There are makefiles for Linux, mingw, msys2 and PiOS. It should build on either 32 or 64 bit systems:
</p>
<pre>
make -f Makefile.xxx clean
make -f Makefile.xxx
</pre>
<p>
The regular expression handler is not included by default in the mingw and msys2 builds since I didn't have the regexp libs installed on my system.
If you can figure out what packages you need to install in mingw and msys2, change the Makefile.mingw or Makefile.msys2 and remove the -DNO_REGEXP text
from the EXTRA_DEFINES variable and make clean;make to get regular expressions.
</p>
</body>
</html>