xref: /netbsd/share/man/man4/man4.hp300/rbox.4 (revision bf9ec67e)
1.\"	$NetBSD: rbox.4,v 1.3 2002/02/13 08:17:57 ross Exp $
2.\"
3.\" Copyright (c) 1990, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" the Systems Programming Group of the University of Utah Computer
8.\" Science Department.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"	This product includes software developed by the University of
21.\"	California, Berkeley and its contributors.
22.\" 4. Neither the name of the University nor the names of its contributors
23.\"    may be used to endorse or promote products derived from this software
24.\"    without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36.\" SUCH DAMAGE.
37.\"
38.\"     from: @(#)rb.4	8.1 (Berkeley) 6/9/93
39.\"
40.Dd September 10, 2001
41.Dt RBOX 4 hp300
42.Os
43.Sh NAME
44.Nm rbox
45.Nd
46.Tn HP98720
47``Renaissance'' graphics device interface
48.Sh SYNOPSIS
49.Cd "rbox* at intio?"
50.Cd "rbox* at dio? scode ?"
51.Sh DESCRIPTION
52This driver is for the
53.Tn HP98720
54and 98721 graphics device, also known as
55the Renaissance.  This driver has not been tested with all possible
56combinations of frame buffer boards and scan boards installed in the device.
57The driver merely checks for the existence of the device and does minimal set
58up.
59.Pp
60The Renaissance can be configured at either the ``internal'' address
61(frame buffer address 0x200000, control register space address 0x560000)
62or at an external select code less than 32.
63At the internal address it will be the ``preferred'' console device.
64The hardware installation manual describes the procedure for
65setting these values.
66.Pp
67A user process communicates to the device initially by means of
68.Xr ioctl 2
69calls.  For the
70.Tn HP-UX
71.Xr ioctl 2
72calls supported, refer to
73.Tn HP-UX
74manuals.
75The
76.Bx
77calls supported are:
78.Bl -tag -width indent
79.It Dv GRFIOCGINFO
80Get Graphics Info
81.Pp
82Get info about device, setting the entries in the
83.Ar grfinfo
84structure, as defined in
85.Aq Pa hpdev/grfioctl.h .
86For the standard 98720, the number of planes should be 4.  The number of
87colors would therefore be 15, excluding black.  If one 98722A frame buffer
88board is installed, there will still be 4 planes, with the 4 planes on the
89colormap board becoming overlay planes.  With each additional 98722 frame
90buffer board 4 planes will be added up to a maximum of 32 planes total.
91.It Dv GRFIOCON
92Graphics On
93.Pp
94Turn graphics on by enabling
95.Tn CRT
96output.  The screen will come on, displaying
97whatever is in the frame buffer, using whatever colormap is in place.
98.It Dv GRFIOCOFF
99Graphics Off
100.Pp
101Turn graphics off by disabling output to the
102.Tn CRT .
103The frame buffer contents
104are not affected.
105.It Dv GRFIOCMAP
106Map Device to user space
107.Pp
108Map in control registers and framebuffer space. Once the device file is
109mapped, the frame buffer structure is accessible.  The structure describing
110the 98720 is defined in
111.Pa hpdev/grf_rbreg.h .
112.El
113.Sh FILES
114.Bl -tag -width /dev/MAKEDEV.hpux -compact
115.It Pa /dev/grf?
116.Bx
117special file
118.It Pa /dev/crt98720
119.It Pa /dev/ocrt98720
120.Tn HP-UX
121.Em starbase
122special files
123.It Pa /dev/MAKEDEV.hpux
124script for creating
125.Tn HP-UX
126special files
127.El
128.Sh EXAMPLES
129This is a short segment of code showing how the device is opened and mapped
130into user process address space assuming that it is grf0:
131.Bd -literal
132struct rboxfb *rbox;
133u_char *Addr, frame_buffer;
134struct grfinfo gi;
135int disp_fd;
136
137disp_fd = open("/dev/grf0",1);
138
139if (ioctl (disp_fd, GRFIOCGINFO, \*[Am]gi) \*[Lt] 0) return -1;
140
141(void) ioctl (disp_fd, GRFIOCON, 0);
142
143Addr = (u_char *) 0;
144if (ioctl (disp_fd, GRFIOCMAP, \*[Am]Addr) \*[Lt] 0) {
145	(void) ioctl (disp_fd, GRFIOCOFF, 0);
146	return -1;
147}
148rbox = (rboxfb *) Addr;                         /* Control Registers   */
149frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */
150.Ed
151.Sh DIAGNOSTICS
152None under
153.Bx .
154The
155.Tn HP-UX
156.Tn CE.utilities
157must be used.
158.Sh ERRORS
159.Bl -tag -width [EINVAL]
160.It Bq Er ENODEV
161no such device.
162.It Bq Er EBUSY
163Another process has the device open.
164.It Bq Er EINVAL
165Invalid ioctl specification.
166.El
167.Sh SEE ALSO
168.Xr ioctl 2 ,
169.Xr grf 4 ,
170.Xr ite 4
171.Pp
172For extensive code examples using the
173Renaissance, see the X device dependent source.
174.Sh BUGS
175Not tested for all configurations of scan board and frame buffer memory boards.
176