BSD 4_3_Reno release
[unix-history] / usr / src / share / man / man4 / man4.hp300 / gb.4
CommitLineData
1a298c90
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" 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.\"
1c15e888
C
8.\" Redistribution and use in source and binary forms are permitted provided
9.\" that: (1) source distributions retain this entire copyright notice and
10.\" comment, and (2) distributions including binaries display the following
11.\" acknowledgement: ``This product includes software developed by the
12.\" University of California, Berkeley and its contributors'' in the
13.\" documentation or other materials provided with the distribution and in
14.\" all advertising materials mentioning features or use of this software.
15.\" Neither the name of the University nor the names of its contributors may
16.\" be used to endorse or promote products derived from this software without
17.\" specific prior written permission.
18.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1a298c90 21.\"
1c15e888 22.\" @(#)gb.4 5.1 (Berkeley) 6/29/90
1a298c90 23.\"
1c15e888 24.TH GB 4 "June 29, 1990"
1a298c90
KB
25.UC 7
26.SH NAME
27gb \- HP98700 ``Gatorbox'' device interface
28.SH DESCRIPTION
29This driver is for the HP98700 and 98710 graphics devices, also known as
30the Gatorbox. The term ``Gator'' will often be used, and it is not to be
31confused with ``Gator'' used in reference to an HP 9837 or 200/237 machine.
32Also, the term Gatorbox is used for the 98700 alone, with the 98701 frame
33buffer memory or with the 98710 accelerator installed. This driver merely
34checks for the existence of the device and does minimal set up, as it is
35expected the applications will initialize the device to their requirements.
36.PP
37The 98700 can be used as the only graphics device on a system, in which case
38it will be used as the system console. It can also be installed as a secondary
39display device. For the first case, the HP 98287A M.A.D. interface card
40should be set to internal control space. This will put the frame buffer at
41the DIO address 0x200000 and the control registers at 0x560000.
42At this address it will be the ``preferred'' console device (see
43.IR cons (4)).
44For use as a secondary device,
45the 98287A should be set to frame buffer address 0x300000,
46and to an external select code.
47.PP
48It should be noted that this configuration will conflict with the 98547
49display card which has a 2 megabyte frame buffer starting at address 0x200000.
50The 98700 should only be installed as a secondary device in a machine with a
511 bit 98544 display card or 4 bit 98545 card.
52The
53.I "98700H Installation Guide"
54contains further configuration information.
55.PP
56The
57.IR ioctl (2)
58calls supported by the BSD system for the Gatorbox are:
59.TP
60GRFIOCGINFO
61Get Graphics Info
62.sp
63Get info about device, setting the entries in the
64.I grfinfo
65structure, as defined in <hpdev/grfioctl.h>.
66For the standard 98700, the number of planes should be 4. The number of
67colors would therefore be 15, excluding black. With the 98701 option installed
68there will be another 4 planes for a total of 8, giving 255 colors.
69.TP
70GRFIOCON
71Graphics On
72.sp
73Turn graphics on by enabling CRT output. The screen will come on, displaying
74whatever is in the frame buffer, using whatever colormap is in place.
75.TP
76GRFIOCOFF
77Graphics Off
78.sp
79Turn graphics off by disabling output to the CRT. The frame buffer contents
80are not affected.
81.TP
82GRFIOCMAP
83Map Device to user space
84.sp
85Map in control registers and framebuffer space. Once the device file is
86mapped, the frame buffer structure is accessible.
87The frame buffer structure describing the 98700
88is given in <hpdev/grf_gbreg.h>.
89.TP
90GRFIOCUNMAP
91Unmap Device
92.sp
93Unmap control registers and framebuffer space.
94.PP
95For further information about the use of ioctl see the man page.
96.SH EXAMPLE
97A small example of opening, mapping and using the device is given below.
98For more examples of the details on the behavior of the device, see the device
99dependent source files for the X Window System, in the
100.I /usr/src/new/X/libhp.fb
101directory.
102.DS
103{
104 struct gboxfb *gbox;
105 u_char *Addr, frame_buffer;
106 struct grfinfo gi;
107 int disp_fd;
108
109 disp_fd = open("/dev/grf0",1);
110
111 if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1;
112
113 (void) ioctl (disp_fd, GRFIOCON, 0);
114
115 Addr = (u_char *) 0;
116 if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) {
117 (void) ioctl (disp_fd, GRFIOCOFF, 0);
118 return -1;
119 }
120 gbox = (gboxfb *) Addr; /* Control Registers */
121 frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */
122}
123.DE
124.SH SEE ALSO
125ioctl(2), grf(4)
126.SH FILES
127/dev/grf? BSD special file
128.br
129/dev/crt98700 HP-UX \fIstarbase\fP special file
130.SH ERRORS
131.TP 15
132[ENODEV]
133no such device.
134.TP 15
135[EBUSY]
136Another process has the device open.
137.TP 15
138[EINVAL]
139Invalid ioctl specification.
140.SH DIAGNOSTICS
141None under BSD.
142.br
143HP-UX CE.utilities/Crtadjust programs must be used.