|
|
1.1 ! root 1: .TH VGA 3 ! 2: .SH NAME ! 3: vga \- VGA controller device ! 4: .SH SYNOPSIS ! 5: .nf ! 6: .B bind #v /dev ! 7: ! 8: .B /dev/vgactl ! 9: .B /dev/vgaiob ! 10: .B /dev/vgaiow ! 11: .B /dev/vgaiol ! 12: .fi ! 13: .SH DESCRIPTION ! 14: The VGA device allows configuration of a graphics controller ! 15: on a PC. ! 16: .B Vgactl ! 17: allows control over higher-level settings such as display height, width, depth, ! 18: controller and hardware-cursor type. ! 19: .BR Vgaiob , ! 20: .B vgaiow ! 21: and ! 22: .B vgaiol ! 23: allow control over individual 8-bit, 16-bit and 32-bit ! 24: x86 ! 25: I/O-ports respectively, such as those ! 26: used to implement configuration and setup registers on a VGA controller card. ! 27: These functions are normally carried out by ! 28: .IR vga (8). ! 29: .PP ! 30: Writes to ! 31: .B vgactl ! 32: are of the form ! 33: .RI ` attribute\ value '. ! 34: Valid attributes are ! 35: .TP ! 36: .I size ! 37: .I value ! 38: is ! 39: .IB 'X x Y x Z' ! 40: , where ! 41: .IR X , ! 42: .I Y ! 43: and ! 44: .I Z ! 45: are numbers that tell the kernel the width and ! 46: height of the screen in pixels and the number of ! 47: bits per pixel. ! 48: .TP ! 49: .I type ! 50: tells the kernel which type of controller is ! 51: being used, mainly to enable the correct code for display-memory bank switching ! 52: at resolutions greater than 640x480x1. The names ! 53: .IR vga , ! 54: .IR clgd542x , ! 55: .IR et4000 , ! 56: .IR mach32 , ! 57: and ! 58: .I s3 ! 59: are supported for ! 60: .IR value . ! 61: .IP ! 62: Note that this list does not indicate the full set of VGA chips ! 63: supported. For example, ! 64: .I s3 ! 65: includes the 86C801/5, 86C928, Vision864, and Vision964. ! 66: It is the job of ! 67: .IR vga (8) ! 68: to recognize which particular chip is being used and to initialize it ! 69: appropriately. ! 70: .TP ! 71: .I hwgc ! 72: tells the kernel to use a particular type of hardware graphics cursor. ! 73: .IR Bt485hwgc , ! 74: .IR et4000hwgc , ! 75: .I s3hwgc ! 76: and ! 77: .IR tvp3020hwgc , ! 78: are currently recognized values. ! 79: A value of ! 80: .I off ! 81: reverts to using the software cursor. ! 82: .PP ! 83: Reading ! 84: .B vgactl ! 85: returns the current settings, one per line. ! 86: .SH EXAMPLES ! 87: The following reverts to using the software graphics ! 88: cursor ! 89: .EX ! 90: ! 91: echo -n 'hwgc off' >/dev/vgactl ! 92: ! 93: .EE ! 94: Sample code to read an ! 95: x86 ! 96: 8-bit I/O port ! 97: .EX ! 98: ! 99: uchar ! 100: inportb(long port) ! 101: { ! 102: uchar data; ! 103: ! 104: if(iobfd == -1) ! 105: iobfd = open("#v/vgaiob", ORDWR); ! 106: ! 107: seek(iobfd, port, 0); ! 108: if(read(iobfd, &data, sizeof(data)) != sizeof(data)) ! 109: error("inportb(0x%4.4x): %r\n", port); ! 110: return data; ! 111: } ! 112: ! 113: .EE ! 114: .SH SOURCE ! 115: .B /sys/src/9/pc/devvga.c ! 116: .SH SEE ALSO ! 117: .IR vga (8) ! 118: .SH BUGS ! 119: There should be some restriction on the range of valid ports. ! 120: .PP ! 121: There should be support for the hardware graphics cursor on the ! 122: .I clgd54[23]x ! 123: VGA controller chips. ! 124: .PP ! 125: The hardware graphics cursor on the ! 126: .I et4000 ! 127: does not work in 2x8-bit mode.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.