|
|
1.1 root 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: .\"
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.
21: .\"
22: .\" @(#)gb.4 5.1 (Berkeley) 6/29/90
23: .\"
24: .TH GB 4 "June 29, 1990"
25: .UC 7
26: .SH NAME
27: gb \- HP98700 ``Gatorbox'' device interface
28: .SH DESCRIPTION
29: This driver is for the HP98700 and 98710 graphics devices, also known as
30: the Gatorbox. The term ``Gator'' will often be used, and it is not to be
31: confused with ``Gator'' used in reference to an HP 9837 or 200/237 machine.
32: Also, the term Gatorbox is used for the 98700 alone, with the 98701 frame
33: buffer memory or with the 98710 accelerator installed. This driver merely
34: checks for the existence of the device and does minimal set up, as it is
35: expected the applications will initialize the device to their requirements.
36: .PP
37: The 98700 can be used as the only graphics device on a system, in which case
38: it will be used as the system console. It can also be installed as a secondary
39: display device. For the first case, the HP 98287A M.A.D. interface card
40: should be set to internal control space. This will put the frame buffer at
41: the DIO address 0x200000 and the control registers at 0x560000.
42: At this address it will be the ``preferred'' console device (see
43: .IR cons (4)).
44: For use as a secondary device,
45: the 98287A should be set to frame buffer address 0x300000,
46: and to an external select code.
47: .PP
48: It should be noted that this configuration will conflict with the 98547
49: display card which has a 2 megabyte frame buffer starting at address 0x200000.
50: The 98700 should only be installed as a secondary device in a machine with a
51: 1 bit 98544 display card or 4 bit 98545 card.
52: The
53: .I "98700H Installation Guide"
54: contains further configuration information.
55: .PP
56: The
57: .IR ioctl (2)
58: calls supported by the BSD system for the Gatorbox are:
59: .TP
60: GRFIOCGINFO
61: Get Graphics Info
62: .sp
63: Get info about device, setting the entries in the
64: .I grfinfo
65: structure, as defined in <hpdev/grfioctl.h>.
66: For the standard 98700, the number of planes should be 4. The number of
67: colors would therefore be 15, excluding black. With the 98701 option installed
68: there will be another 4 planes for a total of 8, giving 255 colors.
69: .TP
70: GRFIOCON
71: Graphics On
72: .sp
73: Turn graphics on by enabling CRT output. The screen will come on, displaying
74: whatever is in the frame buffer, using whatever colormap is in place.
75: .TP
76: GRFIOCOFF
77: Graphics Off
78: .sp
79: Turn graphics off by disabling output to the CRT. The frame buffer contents
80: are not affected.
81: .TP
82: GRFIOCMAP
83: Map Device to user space
84: .sp
85: Map in control registers and framebuffer space. Once the device file is
86: mapped, the frame buffer structure is accessible.
87: The frame buffer structure describing the 98700
88: is given in <hpdev/grf_gbreg.h>.
89: .TP
90: GRFIOCUNMAP
91: Unmap Device
92: .sp
93: Unmap control registers and framebuffer space.
94: .PP
95: For further information about the use of ioctl see the man page.
96: .SH EXAMPLE
97: A small example of opening, mapping and using the device is given below.
98: For more examples of the details on the behavior of the device, see the device
99: dependent source files for the X Window System, in the
100: .I /usr/src/new/X/libhp.fb
101: directory.
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
125: ioctl(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]
133: no such device.
134: .TP 15
135: [EBUSY]
136: Another process has the device open.
137: .TP 15
138: [EINVAL]
139: Invalid ioctl specification.
140: .SH DIAGNOSTICS
141: None under BSD.
142: .br
143: HP-UX CE.utilities/Crtadjust programs must be used.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.