xref: /original-bsd/share/man/man4/man4.hp300/rb.4 (revision 3705696b)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the Systems Programming Group of the University of Utah Computer
6.\" Science Department.
7.\"
8.\" %sccs.include.redist.man%
9.\"
10.\"     @(#)rb.4	8.1 (Berkeley) 06/09/93
11.\"
12.Dd
13.Dt RB 4 hp300
14.Os
15.Sh NAME
16.Nm rb
17.Nd
18.Tn HP98720
19``Renaissance'' device interface
20.Sh DESCRIPTION
21This driver is for the
22.Tn HP98720
23and 98721 graphics device, also known as
24the Renaissance.  This driver has not been tested with all possible
25combinations of frame buffer boards and scan boards installed in the device.
26The driver merely checks for the existence of the device and does minimal set
27up.
28.Pp
29The Renaissance can be configured at either the ``internal'' address
30(frame buffer address 0x200000, control register space address 0x560000)
31or at an external select code less than 32.
32At the internal address it will be the ``preferred'' console device
33(see
34.Xr cons 4 ) .
35The hardware installation manual describes the procedure for
36setting these values.
37.Pp
38A user process communicates to the device initially by means of
39.Xr ioctl 2
40calls.  For the
41.Tn HP-UX
42.Xr ioctl 2
43calls supported, refer to
44.Tn HP-UX
45manuals.
46The
47.Tn BSD
48calls supported are:
49.Bl -tag -width indent
50.It Dv GRFIOCGINFO
51Get Graphics Info
52.Pp
53Get info about device, setting the entries in the
54.Ar grfinfo
55structure, as defined in
56.Aq Pa hpdev/grfioctl.h .
57For the standard 98720, the number of planes should be 4.  The number of
58colors would therefore be 15, excluding black.  If one 98722A frame buffer
59board is installed, there will still be 4 planes, with the 4 planes on the
60colormap board becoming overlay planes.  With each additional 98722 frame
61buffer board 4 planes will be added up to a maximum of 32 planes total.
62.It Dv GRFIOCON
63Graphics On
64.Pp
65Turn graphics on by enabling
66.Tn CRT
67output.  The screen will come on, displaying
68whatever is in the frame buffer, using whatever colormap is in place.
69.It Dv GRFIOCOFF
70Graphics Off
71.Pp
72Turn graphics off by disabling output to the
73.Tn CRT .
74The frame buffer contents
75are not affected.
76.It Dv GRFIOCMAP
77Map Device to user space
78.Pp
79Map in control registers and framebuffer space. Once the device file is
80mapped, the frame buffer structure is accessible.  The structure describing
81the 98720 is defined in
82.Pa hpdev/grf_rbreg.h .
83.El
84.Sh EXAMPLE
85This is a short segment of code showing how the device is opened and mapped
86into user process address space assuming that it is grf0:
87.Bd -literal
88struct rboxfb *rbox;
89u_char *Addr, frame_buffer;
90struct grfinfo gi;
91int disp_fd;
92
93disp_fd = open("/dev/grf0",1);
94
95if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1;
96
97(void) ioctl (disp_fd, GRFIOCON, 0);
98
99Addr = (u_char *) 0;
100if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) {
101	(void) ioctl (disp_fd, GRFIOCOFF, 0);
102	return -1;
103}
104rbox = (rboxfb *) Addr;                         /* Control Registers   */
105frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */
106.Ed
107.Sh FILES
108.Bl -tag -width /dev/MAKEDEV.hpux -compact
109.It Pa /dev/grf?
110.Bx
111special file
112.It Pa /dev/crt98720
113.It Pa /dev/ocrt98720
114.Tn HP-UX
115.Em starbase
116special files
117.It Pa /dev/MAKEDEV.hpux
118script for creating
119.Tn HP-UX
120special files
121.El
122.Sh DIAGNOSTICS
123None under
124.Bx .
125The
126.Tn HP-UX
127.Tn CE.utilities
128must be used.
129.Sh ERRORS
130.Bl -tag -width [EINVAL]
131.It Bq Er ENODEV
132no such device.
133.It Bq Er EBUSY
134Another process has the device open.
135.It Bq Er EINVAL
136Invalid ioctl specification.
137.El
138.Sh SEE ALSO
139.Xr ioctl 2 ,
140.Xr grf 4 .
141.Pp
142For extensive code examples using the
143Renaissance, see the X device dependent source.
144.Sh BUGS
145Not tested for all configurations of scan board and frame buffer memory boards.
146