1.\" $NetBSD: vga.4,v 1.15 2009/03/09 19:24:28 joerg Exp $ 2.\" 3.\" Copyright (c) 1999, 2000 4.\" Matthias Drochner. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.Dd May 4, 2003 28.Dt VGA 4 29.Os 30.Sh NAME 31.Nm vga 32.Nd VGA graphics driver for wscons 33.Sh SYNOPSIS 34.Cd options VGA_CONSOLE_SCREENTYPE="??x??" 35.Cd options VGA_CONSOLE_ATI_BROKEN_FONTSEL 36.Pp 37.Cd "vga0 at isa?" 38.Cd "vga* at pci?" 39.Cd "wsdisplay* at vga? console ?" 40.Sh DESCRIPTION 41This driver handles 42.Tn VGA 43graphics hardware within the 44.Xr wscons 4 45console framework. 46It doesn't provide direct device 47driver entry points but makes its functions available via 48the internal 49.Xr wsdisplay 4 50interface. 51.Pp 52The 53.Nm 54driver supports text-mode hardware acceleration on the 55.Tn VGA 56hardware. 57Currently, the driver runs the display with a 720\(mu400 pixel resolution. 58The 59.Tn VGA 60text-mode accelerator divides the display into fixed-size 61character cells. 62The size of the character cells specifies the number of characters available 63on the screen and the resolution of the font. 64The wsdisplay screen 65.Dq types 66supported by the 67.Nm 68driver are described by the number of character cells available 69on the screen. 70See below for a complete list of supported screen modes in the 71.Nm 72driver. 73.Pp 74Each screen mode requires a suitable font to be loaded into 75the kernel by the 76.Xr wsfontload 8 77utility, before the screen can be used. 78The size of the font 79and the screen mode must match for use on the 720\(mu400 display. 80For example, a screen mode with 80 columns and 40 rows requires 81a font where each character is 8 pixels wide and 10 pixels high. 82The 83.Nm 84driver can display fonts of the original 85.Tn IBM 86type and ISO-8859-1 encoded fonts. 87A builtin font of 256 characters and 8\(mu16 pixels is always 88present on the 89.Tn VGA 90hardware. 91.Pp 92The colour 93.Tn VGA 94hardware supports the display of 16 different colours at the same 95time. 96It is possible with 97.Tn VGA 98colour systems to use fonts with 512 characters at any one time. 99This is due to the fact that with VGA adapters one can specify an 100alternate font to be used instead of bright letters 101(used for highlighting on the screen). 102As an experimental feature, the 103.Dq higher half 104fonts of the former 105.Nx Ns /i386 106.Nm pcvt 107driver distribution can be used too if the kernel option 108.Dq WSCONS_SUPPORT_PCVTFONTS 109was set at compile time. 110This is only useful with the 111.Dq *bf 112screen types; a font containing the 113.Tn ASCII 114range of characters must be available too on this screen. 115.Pp 116Currently, the following screen types are supported: 117.Bl -hang 118.It 80x25 119This is the standard 120.Tn VGA 121text mode with 80 columns and 25 rows. 122Sixteen different colors can be displayed at the same time. 123Characters are 8\(mu16 pixels, and a font consists of 256 characters. 124.It 80x25bf 125is a modified version of the previous. 126It only allows 8 colors to be displayed. 127In exchange, it can access two fonts at the same time, so that 128512 different characters can be displayed. 129.It 80x40 130A text mode with 80 columns and 40 rows. 131Similar to the standard mode, 16 colors and 256 characters are 132available. 133Characters are 8\(mu10 pixels. 134For this mode to be useful, a font of that character size must 135be downloaded. 136.It 80x40bf 137is analogously to 138.Dq 80x25bf 139a version with 512 displayable characters but 8 colors only. 140.It 80x50 141A text mode with 80 columns and 50 rows. 142Similar to the standard mode, 16 colors and 256 characters are 143available. 144Characters are 8\(mu8 pixels. 145For this mode to be useful, a font of that character size must 146be downloaded. 147.It 80x50bf 148is analogously to 149.Dq 80x25bf 150a version with 512 displayable characters but 8 colors only. 151.It 80x24 152is a variant of the 153.Dq 80x25 154screen type which displays 24 lines only. 155It uses the standard 8x16 VGA font. 156This mode might be useful for applications which depend on closer 157.Tn DEC VT100 158compatibility. 159.It 80x24bf 160Analogously, like 161.Dq 80x24 162but with 512 character slots and 8 colors. 163.El 164.Pp 165If you have an Ati videocard and you are experiencing problems with 166fonts other than 80x25, you can try to set 167.Cd options VGA_CONSOLE_ATI_BROKEN_FONTSEL 168in you kernel configuration and see if it helps. 169.Pp 170The 171.Nm 172driver supports multiple virtual screens on one physical 173display. 174The screens allocated on one display can be of different 175.Dq types . 176The type is determined at the time the virtual screen is created 177and can't be changed later. 178Screens are either created at kernel startup 179(then the default type is used) or later with help of the 180.Xr wsconscfg 8 181utility. 182.Sh SEE ALSO 183.Xr isa 4 , 184.Xr pcdisplay 4 , 185.Xr pci 4 , 186.Xr wscons 4 , 187.Xr wsconscfg 8 , 188.Xr wsfontload 8 189.Sh BUGS 190Only a subset of the possible text modes is supported. 191.Pp 192.Tn VGA 193cards are supposed to emulate an 194.Tn MDA 195if a monochrome display is connected. 196In this case, the device will naturally not support colors at 197all, but offer the capability to display underlined characters 198instead. 199The 200.Dq 80x25bf , 201.Dq 80x40bf , 202.Dq 80x50bf 203and 204.Dq 80x24bf 205screen types will not be available. 206This mode of operation has not been tested. 207