1.\" $NetBSD: rbox.4,v 1.5 2010/03/22 18:58:31 joerg 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. 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. 21.\" 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 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)rb.4 8.1 (Berkeley) 6/9/93 35.\" 36.Dd September 10, 2001 37.Dt RBOX 4 hp300 38.Os 39.Sh NAME 40.Nm rbox 41.Nd 42.Tn HP98720 43``Renaissance'' graphics device interface 44.Sh SYNOPSIS 45.Cd "rbox* at intio?" 46.Cd "rbox* at dio? scode ?" 47.Sh DESCRIPTION 48This driver is for the 49.Tn HP98720 50and 98721 graphics device, also known as 51the Renaissance. This driver has not been tested with all possible 52combinations of frame buffer boards and scan boards installed in the device. 53The driver merely checks for the existence of the device and does minimal set 54up. 55.Pp 56The Renaissance can be configured at either the ``internal'' address 57(frame buffer address 0x200000, control register space address 0x560000) 58or at an external select code less than 32. 59At the internal address it will be the ``preferred'' console device. 60The hardware installation manual describes the procedure for 61setting these values. 62.Pp 63A user process communicates to the device initially by means of 64.Xr ioctl 2 65calls. For the 66.Tn HP-UX 67.Xr ioctl 2 68calls supported, refer to 69.Tn HP-UX 70manuals. 71The 72.Bx 73calls supported are: 74.Bl -tag -width indent 75.It Dv GRFIOCGINFO 76Get Graphics Info 77.Pp 78Get info about device, setting the entries in the 79.Ar grfinfo 80structure, as defined in 81.In hpdev/grfioctl.h . 82For the standard 98720, the number of planes should be 4. The number of 83colors would therefore be 15, excluding black. If one 98722A frame buffer 84board is installed, there will still be 4 planes, with the 4 planes on the 85colormap board becoming overlay planes. With each additional 98722 frame 86buffer board 4 planes will be added up to a maximum of 32 planes total. 87.It Dv GRFIOCON 88Graphics On 89.Pp 90Turn graphics on by enabling 91.Tn CRT 92output. The screen will come on, displaying 93whatever is in the frame buffer, using whatever colormap is in place. 94.It Dv GRFIOCOFF 95Graphics Off 96.Pp 97Turn graphics off by disabling output to the 98.Tn CRT . 99The frame buffer contents 100are not affected. 101.It Dv GRFIOCMAP 102Map Device to user space 103.Pp 104Map in control registers and framebuffer space. Once the device file is 105mapped, the frame buffer structure is accessible. The structure describing 106the 98720 is defined in 107.Pa hpdev/grf_rbreg.h . 108.El 109.Sh FILES 110.Bl -tag -width /dev/MAKEDEV.hpux -compact 111.It Pa /dev/grf? 112.Bx 113special file 114.It Pa /dev/crt98720 115.It Pa /dev/ocrt98720 116.Tn HP-UX 117.Em starbase 118special files 119.It Pa /dev/MAKEDEV.hpux 120script for creating 121.Tn HP-UX 122special files 123.El 124.Sh EXAMPLES 125This is a short segment of code showing how the device is opened and mapped 126into user process address space assuming that it is grf0: 127.Bd -literal 128struct rboxfb *rbox; 129u_char *Addr, frame_buffer; 130struct grfinfo gi; 131int disp_fd; 132 133disp_fd = open("/dev/grf0",1); 134 135if (ioctl (disp_fd, GRFIOCGINFO, \*[Am]gi) \*[Lt] 0) return -1; 136 137(void) ioctl (disp_fd, GRFIOCON, 0); 138 139Addr = (u_char *) 0; 140if (ioctl (disp_fd, GRFIOCMAP, \*[Am]Addr) \*[Lt] 0) { 141 (void) ioctl (disp_fd, GRFIOCOFF, 0); 142 return -1; 143} 144rbox = (rboxfb *) Addr; /* Control Registers */ 145frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ 146.Ed 147.Sh DIAGNOSTICS 148None under 149.Bx . 150The 151.Tn HP-UX 152.Tn CE.utilities 153must be used. 154.Sh ERRORS 155.Bl -tag -width [EINVAL] 156.It Bq Er ENODEV 157no such device. 158.It Bq Er EBUSY 159Another process has the device open. 160.It Bq Er EINVAL 161Invalid ioctl specification. 162.El 163.Sh SEE ALSO 164.Xr ioctl 2 , 165.Xr grf 4 , 166.Xr ite 4 167.Pp 168For extensive code examples using the 169Renaissance, see the X device dependent source. 170.Sh BUGS 171Not tested for all configurations of scan board and frame buffer memory boards. 172