VGA(4) | Device Drivers Manual | VGA(4)

# NAME

`vga` — VGA graphics driver for wscons

# SYNOPSIS

`options VGA_CONSOLE_SCREENTYPE="??x??"`
`options VGA_CONSOLE_ATI_BROKEN_FONTSEL`

`vga0 at isa?`
`vga* at pci?`
`wsdisplay* at vga? console ?`

# DESCRIPTION

This driver handles VGA graphics hardware within the wscons(4) console framework. It doesn't provide direct device driver entry points but makes its functions available via the internal wsdisplay(4) interface.

The `vga` driver supports text-mode hardware acceleration on the VGA hardware. Currently, the driver runs the display with a 720×400 pixel resolution. The VGA text-mode accelerator divides the display into fixed-size character cells. The size of the character cells specifies the number of characters available on the screen and the resolution of the font. The wsdisplay screen “types” supported by the `vga` driver are described by the number of character cells available on the screen. See below for a complete list of supported screen modes in the `vga` driver.

Each screen mode requires a suitable font to be loaded into the kernel by the wsfontload(8) utility, before the screen can be used. The size of the font and the screen mode must match for use on the 720×400 display. For example, a screen mode with 80 columns and 40 rows requires a font where each character is 8 pixels wide and 10 pixels high. The `vga` driver can display fonts of the original IBM type and ISO-8859-1 encoded fonts. A builtin font of 256 characters and 8×16 pixels is always present on the VGA hardware.

The colour VGA hardware supports the display of 16 different colours at the same time. It is possible with VGA colour systems to use fonts with 512 characters at any one time. This is due to the fact that with VGA adapters one can specify an alternate font to be used instead of bright letters (used for highlighting on the screen). As an experimental feature, the “higher half” fonts of the former NetBSD/i386 `pcvt` driver distribution can be used too if the kernel option “WSCONS_SUPPORT_PCVTFONTS” was set at compile time. This is only useful with the “*bf” screen types; a font containing the ASCII range of characters must be available too on this screen.

Currently, the following screen types are supported:

80x25
  This is the standard VGA text mode with 80 columns and 25 rows. Sixteen different colors can be displayed at the same time. Characters are 8×16 pixels, and a font consists of 256 characters.
80x25bf
  is a modified version of the previous. It only allows 8 colors to be displayed. In exchange, it can access two fonts at the same time, so that 512 different characters can be displayed.
80x40
  A text mode with 80 columns and 40 rows. Similar to the standard mode, 16 colors and 256 characters are available. Characters are 8×10 pixels. For this mode to be useful, a font of that character size must be downloaded.
80x40bf
  is analogously to “80x25bf” a version with 512 displayable characters but 8 colors only.
80x50
  A text mode with 80 columns and 50 rows. Similar to the standard mode, 16 colors and 256 characters are available. Characters are 8×8 pixels. For this mode to be useful, a font of that character size must be downloaded.
80x50bf
  is analogously to “80x25bf” a version with 512 displayable characters but 8 colors only.
80x24
  is a variant of the “80x25” screen type which displays 24 lines only. It uses the standard 8x16 VGA font. This mode might be useful for applications which depend on closer DEC VT100 compatibility.
80x24bf
  Analogously, like “80x24” but with 512 character slots and 8 colors.

If you have an Ati videocard and you are experiencing problems with fonts other than 80x25, you can try to set `options VGA_CONSOLE_ATI_BROKEN_FONTSEL` in you kernel configuration and see if it helps.

The `vga` driver supports multiple virtual screens on one physical display. The screens allocated on one display can be of different “types”. The type is determined at the time the virtual screen is created and can't be changed later. Screens are either created at kernel startup (then the default type is used) or later with help of the wsconscfg(8) utility.

# SEE ALSO

isa(4), pcdisplay(4), pci(4), wscons(4), wsconscfg(8), wsfontload(8)

# BUGS

Only a subset of the possible text modes is supported.

VGA cards are supposed to emulate an MDA if a monochrome display is connected. In this case, the device will naturally not support colors at all, but offer the capability to display underlined characters instead. The “80x25bf”, “80x40bf”, “80x50bf” and “80x24bf” screen types will not be available. This mode of operation has not been tested.

May 4, 2003 | NetBSD 11.0