xref: /original-bsd/share/man/man4/man4.hp300/gb.4 (revision a425a1c9)
1.\" Copyright (c) 1990, 1991 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.\" %sccs.include.redist.man%
8.\"
9.\"     @(#)gb.4	5.2 (Berkeley) 03/27/91
10.\"
11.Dd
12.Dt GB 4 hp300
13.Os
14.Sh NAME
15.Nm gb
16.Nd
17.Tn HP98700
18``Gatorbox'' device interface
19.Sh DESCRIPTION
20This driver is for the
21.Tn HP98700
22and 98710 graphics devices, also known as
23the Gatorbox.  The term ``Gator'' will often be used, and it is not to be
24confused with ``Gator'' used in reference to an
25.Tn HP
269837 or 200/237 machine.
27Also, the term Gatorbox is used for the 98700 alone, with the 98701 frame
28buffer memory or with the 98710 accelerator installed.  This driver merely
29checks for the existence of the device and does minimal set up, as it is
30expected the applications will initialize the device to their requirements.
31.Pp
32The 98700 can be used as the only graphics device on a system, in which case
33it will be used as the system console.  It can also be installed as a secondary
34display device.  For the first case, the
35.Tn HP
36.Tn 98287A M.A.D.
37interface card
38should be set to internal control space.  This will put the frame buffer at
39the DIO address 0x200000 and the control registers at 0x560000.
40At this address it will be the ``preferred'' console device (see
41.Xr cons 4 ) .
42For use as a secondary device,
43the 98287A should be set to frame buffer address 0x300000,
44and to an external select code.
45.Pp
46It should be noted that this configuration will conflict with the 98547
47display card which has a 2 megabyte frame buffer starting at address 0x200000.
48The 98700 should only be installed as a secondary device in a machine with a
491 bit 98544 display card or 4 bit 98545 card.
50The
51.%T 98700H Installation Guide
52contains further configuration information.
53.Pp
54The
55.Xr ioctl 2
56calls supported by the
57.Bx
58system for the Gatorbox are:
59.Bl -tag -width indent
60.It Dv GRFIOCGINFO
61Get Graphics Info
62.Pp
63Get info about device, setting the entries in the
64.Em grfinfo
65structure, as defined in
66.Aq Pa hpdev/grfioctl.h .
67For the standard 98700, the number of planes should be 4.  The number of
68colors would therefore be 15, excluding black.  With the 98701 option installed
69there will be another 4 planes for a total of 8, giving 255 colors.
70.It Dv GRFIOCON
71Graphics On
72.Pp
73Turn graphics on by enabling
74.Tn CRT
75output.  The screen will come on, displaying
76whatever is in the frame buffer, using whatever colormap is in place.
77.It Dv GRFIOCOFF
78Graphics Off
79.Pp
80Turn graphics off by disabling output to the
81.Tn CRT .
82The frame buffer contents
83are not affected.
84.It Dv GRFIOCMAP
85Map Device to user space
86.Pp
87Map in control registers and framebuffer space. Once the device file is
88mapped, the frame buffer structure is accessible.
89The frame buffer structure describing the 98700
90is given in
91.Aq Pa hpdev/grf_gbreg.h .
92.It Dv GRFIOCUNMAP
93Unmap Device
94.Pp
95Unmap control registers and framebuffer space.
96.Pp
97For further information about the use of ioctl see the man page.
98.El
99.Sh EXAMPLE
100A small example of opening, mapping and using the device is given below.
101For more examples of the details on the behavior of the device, see the device
102dependent source files for the X Window System, in the
103.Pa /usr/src/new/X/libhp.fb
104directory.
105.Bd -literal -offset indent
106struct gboxfb *gbox;
107u_char *Addr, frame_buffer;
108struct grfinfo gi;
109int disp_fd;
110
111disp_fd = open("/dev/grf0",1);
112
113if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1;
114
115(void) ioctl (disp_fd, GRFIOCON, 0);
116
117Addr = (u_char *) 0;
118if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) {
119(void) ioctl (disp_fd, GRFIOCOFF, 0);
120return -1;
121}
122gbox = (gboxfb *) Addr;                         /* Control Registers   */
123frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */
124.Ed
125.Sh FILES
126.Bl -tag -width /dev/crt98700 -compact
127.It Pa /dev/grf?
128.Bx
129special file
130.It Pa /dev/crt98700
131.Tn HP-UX
132.Em starbase
133special file
134.El
135.Sh DIAGNOSTICS
136None under
137.Bx .
138.Tn HP-UX
139The
140.Tn CE.utilities/Crtadjust
141programs must be used.
142.Sh ERRORS
143.Bl -tag -width [EINVAL]
144.It Bq Er ENODEV
145no such device.
146.It Bq Er EBUSY
147Another process has the device open.
148.It Bq Er EINVAL
149Invalid ioctl specification.
150.El
151.Sh SEE ALSO
152.Xr ioctl 2 ,
153.Xr grf 4
154.Sh HISTORY
155The
156.Nm
157driver
158.Ud
159