1 .\" $NetBSD: rbox.4,v 1.3 2002/02/13 08:17:57 ross Exp $
3 .\" Copyright (c) 1990, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
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.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
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. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" from: @(#)rb.4 8.1 (Berkeley) 6/9/93
36 .Dd September 10, 2001
43 ``Renaissance'' graphics device interface
46 .Cd "rbox* at dio? scode ?"
48 This driver is for the
50 and 98721 graphics device, also known as
51 the Renaissance. This driver has not been tested with all possible
52 combinations of frame buffer boards and scan boards installed in the device.
53 The driver merely checks for the existence of the device and does minimal set
56 The Renaissance can be configured at either the ``internal'' address
57 (frame buffer address 0x200000, control register space address 0x560000)
58 or at an external select code less than 32.
59 At the internal address it will be the ``preferred'' console device.
60 The hardware installation manual describes the procedure for
63 A user process communicates to the device initially by means of
68 calls supported, refer to
74 .Bl -tag -width indent
78 Get info about device, setting the entries in the
80 structure, as defined in
81 .Aq Pa hpdev/grfioctl.h .
82 For the standard 98720, the number of planes should be 4. The number of
83 colors would therefore be 15, excluding black. If one 98722A frame buffer
84 board is installed, there will still be 4 planes, with the 4 planes on the
85 colormap board becoming overlay planes. With each additional 98722 frame
86 buffer board 4 planes will be added up to a maximum of 32 planes total.
90 Turn graphics on by enabling
92 output. The screen will come on, displaying
93 whatever is in the frame buffer, using whatever colormap is in place.
97 Turn graphics off by disabling output to the
99 The frame buffer contents
102 Map Device to user space
104 Map in control registers and framebuffer space. Once the device file is
105 mapped, the frame buffer structure is accessible. The structure describing
106 the 98720 is defined in
107 .Pa hpdev/grf_rbreg.h .
110 .Bl -tag -width /dev/MAKEDEV.hpux -compact
115 .It Pa /dev/ocrt98720
119 .It Pa /dev/MAKEDEV.hpux
125 This is a short segment of code showing how the device is opened and mapped
126 into user process address space assuming that it is grf0:
129 u_char *Addr, frame_buffer;
133 disp_fd = open("/dev/grf0",1);
135 if (ioctl (disp_fd, GRFIOCGINFO, \*[Am]gi) \*[Lt] 0) return -1;
137 (void) ioctl (disp_fd, GRFIOCON, 0);
140 if (ioctl (disp_fd, GRFIOCMAP, \*[Am]Addr) \*[Lt] 0) {
141 (void) ioctl (disp_fd, GRFIOCOFF, 0);
144 rbox = (rboxfb *) Addr; /* Control Registers */
145 frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */
155 .Bl -tag -width [EINVAL]
159 Another process has the device open.
161 Invalid ioctl specification.
168 For extensive code examples using the
169 Renaissance, see the X device dependent source.
171 Not tested for all configurations of scan board and frame buffer memory boards.