|
|
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: .\" @(#)tc.4 5.1 (Berkeley) 6/29/90 ! 23: .\" ! 24: .TH TC 4 "June 29, 1990" ! 25: .UC 7 ! 26: .SH NAME ! 27: tc \- HP98544-98550 ``Topcat'' and ``Catseye'' device interface ! 28: .SH DESCRIPTION ! 29: This driver is for the HP98544, 98545 and 98547 ``Topcat'' ! 30: and HP98548, 98549, and 98550 ``Catseye'' display cards. ! 31: This driver merely checks for the existence of the device ! 32: and does minimal set up, as it is expected the applications will initialize ! 33: the device to their requirements. ! 34: The Topcat and Catseye are nearly identical in common usage and only the ! 35: Topcat will be referred to from now on. ! 36: .PP ! 37: The Topcat display cards are not user configurable. If one is present on a ! 38: system, it will always have a frame buffer address of 0x200000 and a control ! 39: register address of 0x560000. These are the HP series 300 ITE (Internal ! 40: Terminal Emulator) defaults. The device can also be used as a graphics output ! 41: device. ! 42: .PP ! 43: The ! 44: .IR ioctl (2) ! 45: calls supported by the BSD system for the Topcat are: ! 46: .TP ! 47: GRFIOCGINFO ! 48: Get Graphics Info ! 49: .sp ! 50: Get info about device, setting the entries in the ! 51: .I grfinfo ! 52: structure, as defined in <hpdev/grfioctl.h>. ! 53: For the 98544 or 98549, ! 54: the number of planes should be 1, as they are monochrome devices. ! 55: The number of planes for a 98545 is 4, translating to 15 colors, ! 56: excluding black. ! 57: The 98547 and 98548 cards have 6 planes, yielding 63 colors and black. ! 58: The 98550 has 8 planes, yielding 255 colors and black. ! 59: The displayed frame buffer size for the 98549 and 98550 is 2048 x 1024, ! 60: for the others it is 1024 x 768. ! 61: .TP ! 62: GRFIOCON ! 63: Graphics On ! 64: .sp ! 65: Turn graphics on by enabling CRT output. The screen will come on, displaying ! 66: whatever is in the frame buffer, using whatever colormap is in place. ! 67: .TP ! 68: GRFIOCOFF ! 69: Graphics Off ! 70: .sp ! 71: Turn graphics off by disabling output to the CRT. The frame buffer contents ! 72: are not affected. ! 73: .TP ! 74: GRFIOCMAP ! 75: Map Device to user space ! 76: .sp ! 77: Map in control registers and framebuffer space. Once the device file is ! 78: mapped, the frame buffer structure is accessible. The frame buffer structure ! 79: describing Topcat/Catseye devices is defined in <hpdev/grf_tcreg.h>. ! 80: .PP ! 81: For further information about the use of ioctl see the man page. ! 82: .SH EXAMPLE ! 83: A small example of opening, mapping and using the device is given below. ! 84: For more examples of the details on the behavior of the device, see the device ! 85: dependent source files for the X Window System, in the ! 86: .I /usr/src/new/X/libhp ! 87: directory. ! 88: .DS ! 89: { ! 90: struct tcboxfb *tc; ! 91: u_char *Addr, frame_buffer; ! 92: struct grfinfo gi; ! 93: int disp_fd; ! 94: ! 95: disp_fd = open("/dev/grf0",1); ! 96: ! 97: if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; ! 98: ! 99: (void) ioctl (disp_fd, GRFIOCON, 0); ! 100: ! 101: Addr = (u_char *) 0; ! 102: if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { ! 103: (void) ioctl (disp_fd, GRFIOCOFF, 0); ! 104: return -1; ! 105: } ! 106: tc = (tcboxfb *) Addr; /* Control Registers */ ! 107: frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ ! 108: } ! 109: .DE ! 110: .SH "SEE ALSO" ! 111: ioctl(2), grf(4) ! 112: .SH FILES ! 113: .ta \w'/dev/crt9837, /dev/crt98550 'u ! 114: /dev/grf? BSD special file ! 115: .br ! 116: /dev/crt9837, /dev/crt98550 HP-UX \fIstarbase\fP special files ! 117: .br ! 118: /dev/MAKEDEV.hpux script for creating HP-UX special files ! 119: .SH ERRORS ! 120: .TP 15 ! 121: [ENODEV] ! 122: no such device. ! 123: .TP 15 ! 124: [EBUSY] ! 125: Another process has the device open. ! 126: .TP 15 ! 127: [EINVAL] ! 128: Invalid ioctl specification. ! 129: .SH DIAGNOSTICS ! 130: None under BSD. ! 131: .br ! 132: HP-UX /usr/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.