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
|
<table class="head">
<tr>
<td class="head-ltitle">VA(4)</td>
<td class="head-vol">Device Drivers Manual (vax)</td>
<td class="head-rtitle">VA(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">va</code> — <span class="Nd">Benson-Varian
printer/plotter interface</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">va0 at uba0 csr 0164000 vector vaintr</code>
<br/>
<code class="Cd">vz0 at va0 drive 0</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">NOTE: This driver has not been ported from
<span class="Ux">4.4BSD</span> yet.</p>
<p class="Pp"></p>
<div class="Bf Sy">(NOTE: the configuration description, while
counter-intuitive, is actually as shown above.)</div>
<p class="Pp">The Benson-Varian printer/plotter in normally used with the line
printer system. This description is designed for those who wish to drive the
Benson-Varian directly.</p>
<p class="Pp">In print mode, the Benson-Varian uses a modified ASCII character
set. Most control characters print various <span class="No">non-</span>ASCII
graphics such as daggers, sigmas, copyright symbols, etc. Only LF and FF are
used as format effectors. LF acts as a newline, advancing to the beginning
of the next line, and FF advances to the top of the next page.</p>
<p class="Pp">In plot mode, the Benson-Varian prints one raster line at a time.
An entire raster line of bits (2112 bits = 264 bytes) is sent, and then the
Benson-Varian advances to the next raster line.</p>
<p class="Pp" id="Note"><a class="permalink" href="#Note"><i class="Em">Note</i></a>:
The Benson-Varian must be sent an even number of bytes. If an odd number is
sent, the last byte will be lost. Nulls can be used in print mode to pad to
an even number of bytes.</p>
<p class="Pp">To use the Benson-Varian yourself, you must realize that you
cannot open the device, <span class="Pa">/dev/va0</span> if there is a
daemon active. You can see if there is an active daemon by doing a
<a class="Xr">vax/lpq(1)</a> and seeing if there are any files being
printed. Printing should be turned off using
<a class="Xr">vax/lpc(8)</a>.</p>
<p class="Pp">To set the Benson-Varian into plot mode include the file
<code class="In"><<a class="In">sys/vcmd.h</a>></code> and use the
following <a class="Xr">ioctl(2)</a> call</p>
<div class="Bd Pp Bd-indent Li">
<pre>ioctl(fileno(va), VSETSTATE, plotmd);</pre>
</div>
where <var class="Ar">plotmd</var> is defined to be
<div class="Bd Pp Bd-indent Li">
<pre>int plotmd[] = { VPLOT, 0, 0 };</pre>
</div>
and <var class="Ar">va</var> is the result of a call to
<a class="Xr">fopen(3)</a> on stdio. When you finish using the Benson-Varian
in plot mode you should advance to a new page by sending it a FF after putting
it back into print mode, i.e. by
<div class="Bd Pp Bd-indent Li">
<pre>int prtmd[] = { VPRINT, 0, 0 };
...
fflush(va);
ioctl(fileno(va), VSETSTATE, prtmd);
write(fileno(va), "\f\0", 2);</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
<dt><span class="Pa">/dev/va0</span></dt>
<dd style="width: auto;"> </dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="DIAGNOSTICS"><a class="permalink" href="#DIAGNOSTICS">DIAGNOSTICS</a></h1>
<p class="Pp">The following error numbers are significant at the time the device
is opened.</p>
<dl class="Bl-tag">
<dt>[<code class="Er">ENXIO</code>]</dt>
<dd>The device is already in use.</dd>
<dt>[<code class="Er">EIO</code>]</dt>
<dd>The device is offline.</dd>
</dl>
The following message may be printed on the console.
<dl class="Bl-diag">
<dt>va%d: npr timeout.</dt>
<dd>The device was not able to get data from the UNIBUS within the timeout
period, most likely because some other device was hogging the bus. (But
see <a class="Sx" href="#BUGS">BUGS</a> below).</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">vax/lpr(1)</a>, <a class="Xr">vax/vp(4)</a>,
<a class="Xr">vax/lpd(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">va</code> driver appeared in
<span class="Ux">4.0BSD</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">The 1's (one's) and l's (lower-case el's) in the Benson-Varian's
standard character set look very similar; caution is advised.</p>
<p class="Pp">The interface hardware is rumored to have problems which can play
havoc with the UNIBUS. We have intermittent minor problems on the UNIBUS
where our <a class="Xr">vax/va(4)</a> lives, but haven't ever been able to
pin them down completely.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">February 17, 2017</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|