Video Graphics Array

from Wikipedia, the free encyclopedia

For the specification of the electronic interface, see VGA connection

Video Graphics Array ( VGA ) is a computer graphics standard that defines certain combinations of image resolution and number of colors ( color bit depth ) as well as refresh rate and was introduced by IBM in 1987.

In contrast to its predecessors EGA and CGA , VGA was initially designed as a one- inch processor for easier integration on motherboards and was therefore not planned as a separate "adapter". A direct forerunner was the onboard graphics of the IBM PS / 2 Model 30 called Multi-Color Graphics Array (MCGA) . This was only equipped with 64 kB of video memory, which allowed the 256-color mode popular with games (which is therefore often also called "MCGA mode"), but the VGA-typical graphic resolution of 640 × 480 pixels was only monochrome (1 Bit per pixel). The MCGA also lacked compatibility with the EGA card.

Since all modern graphics cards are still compatible with IBM's VGA, modern operating systems still use the VGA graphics mode, e.g. B. during installation or if no driver suitable for the graphics card is installed.

Features of a VGA-compatible graphics card

Basic skills

  • (at least) 256 kB internal memory
  • Write register can be read back (the EGA card lacked this feature, which made it impossible to save the status of the graphics card)
  • supports all standardized CGA and EGA graphics and text modes
  • Graphics mode 640 × 480 pixels (aspect ratio 4: 3) with 2 or 16 colors
  • Graphics mode 320 × 200 pixels (aspect ratio 16:10) with 4, 16 or 256 colors
  • All (max. 256) colors can be freely selected from a color palette of 2 3 × 6  = 262144 colors
  • Video resolution of up to 720 × 400 in text mode,
  • ROM fonts in code page 437 with 8, 14 and 16 pixel lines per character, 8 or 9 pixel columns per character.
  • User-definable fonts with 256 or 512 characters and 1 to 32 pixel lines per character possible

Hardware level

  • VGA connection with analog transmission of the RGB signal components (different from EGA , similar to PGC ), which (depending on the card or signal source) in principle allows the display of an infinite number of colors and intermediate gradations in connection with a small amount of circuitry for a tube monitor. However, the picture quality is heavily dependent on the circuit structure and the component quality of the card as well as the connecting cable to the picture tube.

resolution

VGA and other standards

Frequently used graphics modes are:

  • 320 × 200 pixels, 256 colors (8 bit , 64 kB linear, very popular for games)
  • 320 × 200 pixels, 16 colors (4 bit)
  • 640 × 200 pixels, 16 colors
  • 640 × 350 pixels, 16 colors (see Enhanced Graphics Adapter , EGA for short)
  • 640 × 480 pixels, 16 colors (square pixels, 1 plane per bit of the pixel color, 4 planes for 16 colors)

The text modes used are mainly 80 × 25 characters (16 pixel lines per character) and 80 × 50 characters (8 pixel lines per character), both with an underlying image resolution of 720 × 400 pixels.

Flexibility of the VGA connection

The image resolution and parameters of the image output via the classic VGA connection can be set fairly freely. Nevertheless, tube TV sets cannot be operated on a standard VGA card (no CSync = requires additional electronics, slightly different level = requires additional electronics, no line jump = only 240 ... 288 line display possible)

However, the following variants are suitable for conventional analogue VGA tube monitors:

  • Pixel frequency: 28.322 MHz or 25.175 MHz. halved.
  • Line frequency: 31.4688 kHz is the default. Exactly 80% of the line time is used for image display.
  • Full screen display.
  • 70.08 images / s with a maximum of 400 visible lines or 59.94 images / s with a maximum of 480 visible lines
    • The number of visible lines can be reduced to 350 lines. This was transmitted to the monitor by changing the polarity of the sync signals (+ hsync -vsync). Used for EGA simulation.
    • Another possibility to reduce the resolution is to display lines twice - 480 lines become 240 or 400 lines become 200 lines. Used for CGA simulation.
  • 640 or 720 visible pixels per line are usual (depending on the selected pixel clock)
    • This can be halved to 320 or 360 pixels.
    • In the 256-color mode, the pixel clock is also always halved.
  • Memory structure
    • 64 kB × 32 bit, extended cards 128 kB × 32 bit
    • Graphics modes read a 32-bit word every 8 clocks. Modes with up to 16 colors generate 8 pixels from this. 256 color modes 4 pixels.
    • In the case of text modes, there is a second access for reading out the character representation.

The advancement of the VGA connection was the analog transmission of the signal to the monitor. This overcame the shortcoming of the CGA connection or EGA connection, which in principle could only transmit 16 or 64 colors (with SW: 3 or 4 gray levels). VGA connections could theoretically display any number of colors, standard VGA cards used 262144 of them.

It wasn't until a decade later that analog transmission turned out to be a shortcoming. For TFT displays with individually controllable pixels, it leads to blurring and unrest (moiré) in the image at high resolutions (at the latest at 1600 × 1200 pixels). The successors are called DVI- D, HDMI and DisplayPort . HDMI is a further development of DVI; HDMI signals are backwards compatible with DVI.

Compatibility with MDA, CGA and EGA cards

VGA was largely downward compatible with all previous IBM graphics cards for PCs; When accessing the BIOS , the compatibility was particularly high, but most programs continued to work even with direct register programming. In particular, the user no longer had to choose between color capability (CGA, EGA) and high text quality ( MDA ). For VGA, both monochrome (mostly white) and colored monitors were offered from the start.

Color palettes

CGA offered 16 fixed colors . EGA kept the CGA compatibility and still allowed 64 colors in all modes by interpreting the 16 color numbers of the CGA as pointers to a so called palette, a table with 16 entries; the entries in the palette then contained the EGA color numbers in the range 0 to 63. When the system was started, color numbers were entered there that offered the same color impression as the 16 CGA colors; Programs that knew the EGA standard could change the entries. This meant that only 16 colors could still be displayed at the same time, but from a total of 64 colors.

Default palette in 256-color mode

VGA graphics cards support 262,144 possible colors. The aforementioned palette with 16 entries also exists for VGA cards - the values ​​in the range 0 to 63 contained therein are, however, in contrast to EGA, not interpreted directly as color numbers, but again as pointers to the first 64 entries in another table. This VGA color palette now has 256 entries in the range from 0 to 262143. Here, too, VGA colors are entered in the first 64 entries at the start that look like the 64 EGA colors, but are changed by programs that know VGA can. This two-stage process allows all VGA colors to be displayed in the CGA and EGA-compatible modes of the VGA, but only 16 of them at a time. In the 256-color graphics mode, on the other hand , the data in the screen memory is interpreted directly as a pointer to the 256-entry table and the 16-entry table is not used.

With some CGA-compatible modes, VGA even uses a three-level palette, as the CGA card in these modes also used a palette of 2 or 4 out of 16 colors, although this cannot be freely selected.

Text mode

VGA graphics cards represent the text mode with 720 points per line, like the MDA card, but in contrast to CGA and EGA, which use 640 points. Each of the 80 characters per line has been widened by one pixel to 9 pixels compared to CGA / EGA, increasing the character spacing and thus the legibility. However, since only eight columns were still stored in the character memory, the 9th pixel was either left blank or created by repeating the 8th pixel. The decision about this is made according to the number of the character code - the characters 0xC0 to 0xDF, which in the code page contain 437 block graphic characters with a connection to the right, use the repetition of the 8th pixel, with the others the 9th column is always empty. This also results in the typical vertical stripes in some programs (such as Turbo Pascal from version 6), which fill the background with gray characters. For the use of other code pages that contain normal print characters in positions 0xC0 to 0xDF, the repetition of the 8th pixel can also be completely switched off (this option was not yet available with the MDA, whose code page was fixed at 437) .

As with the EGA card, bit 3 of the attribute byte controls the selection from two character sets. With user-defined character sets it is thus possible to display up to 512 different characters simultaneously in text mode.

The built-in character generator supports user-defined character sets that can be 1 to 32 pixels high. While the usual user-defined character sets use the usual character sizes of 8 × 8, 8 × 14 or 8 × 16 pixels, there are also smaller fonts that would allow up to 96 character lines for characters 5 pixels high, but which are hardly legible.

With 1 or 2 pixel high "fonts" in text mode (pseudo) graphic effects can be achieved, which, however, were only rarely used under DOS, even in the heyday of graphic gadgets, since only 16 colors are available in text mode and the 256- Color graphics modes made significantly better effects possible.

Graphics BIOS

As with EGA cards, VGA cards also use their own graphics BIOS to make the VGA and EGA graphics functions of the adapter accessible to user programs without the user having to do the complicated register programming themselves. This is necessary because the system BIOS of a PC usually only supports MDA and CGA. As with SCSI control units and network cards with boot ROM, the machine code is displayed in the processor's address space between 640 and 960 Kibibytes , which is reserved for additional cards , in the so-called conventional main memory . Here the programs can then access the VGA (and EGA) routines of the graphics card. In some cases, the graphics routines of the system BIOS are diverted to the adapted code of the graphics card in order to ensure compatibility with older programs.

history

development

Today's graphics cards for IBM-compatible PCs are often at least partially VGA-compatible. From 1981 to around 1990, IBM set the standards for this architecture, including for graphics cards. Due to the capabilities and architecture of the DOS operating system, which was the most widely used at the time (only required text mode , no multitasking capability ), it was necessary at the time that peripherals and expansion cards had to be hardware-compatible with the respective common industry standard , since the software programmed the expansion card or peripheral components directly. Over time, however, the problem arose that the color depths and resolutions and their control were only defined up to the VGA standard. With the onset of the PC's triumphant advance in the late 1980s, the number of manufacturers of PC graphics solutions on the market increased sharply and the price of graphics cards fell. IBM lost its market and standardization power. In order to stand out from the competition, numerous manufacturers (e.g. Genoa Systems , Trident Microsystems , Hercules and many others) began to expand the VGA standard with their own developments (or VGA graphics BIOS extensions). In the course of time, most graphics cards offered the option of displaying resolutions up to 1024 × 768 or higher in high or true color . With the advent of graphical user interfaces such as Windows, the first functions to accelerate them were implemented, such as drawing and filling rectangles and areas in hardware using the graphics card. However, all of these extended functions beyond VGA were not standardized and some of them differed depending on the graphics card. Therefore, every software that wanted to use these functions had to bring its own graphics card driver (example: MS flight simulator 5.0 ). For important applications such as Windows 3.1 , and in some cases AutoCAD , the graphics chip manufacturer also provided drivers . This was not always the case, especially with inexpensive non-standard graphics cards, and therefore the software under DOS was mostly limited to VGA.

Games up to 1995 are therefore mostly limited to the 320 × 200 × 8 VGA mode (Mode 13h). Examples are Doom 1, Worms or Wolfenstein 3D . To date, the VGA driver is often the only one available if a hardware-specific graphics driver has not yet been installed.

In order to standardize higher resolutions and their programming, the VESA standardized the resolutions up to 1280 × 960 in 256 colors and their BIOS APIs at the beginning of the 1990s . These VESA extensions were then quickly adopted by the graphics chip manufacturers and entered into the VGA BIOS. The VESA extensions appeared in several versions, the current version is 3.0. The VGA BIOS chips were mostly implemented as ROM , so that the graphics cards themselves cannot be upgraded to a new VESA BIOS version. By using TSR programs , which serve as "VESA wrappers" , new VESA extensions can be used under DOS on systems that have a correspondingly powerful graphics card that is incompatible with the required VESA version. These TSR programs make the VESA extension routines available and translate them for the graphics card. In addition to manufacturer-specific wrappers, there are also universal wrappers such as UNIVESA.EXE or UNIVBE.EXE. These were often used to retrofit the VESA extensions version 2.0 on systems whose graphics cards only support VESA 1.0. It was not until the mid-1990s that graphics cards compatible with the VESA expansions had become so popular that they were increasingly supported by game manufacturers. With the appearance of the first Pentium processors on the mass market, there was enough computing power to be able to achieve smooth graphics in complex DOS games such as Wing Commander 3 or The Need for Speed even in VESA modes, even with a wrapper . In the shareware scene, however, mode 13h (320 × 200, 256 colors) was used for a long time, since a screen page here requires almost exactly 64 kB. This is in many popular cheap real mode - compilers such as Turbo Pascal , the maximum allowable size for data structures in memory ; Mode 13h screen pages are therefore comparatively easy to handle with such compilers. Despite the VESA expansions, a standard VGA driver is set up under Windows up to and including version 7, as long as no manufacturer-specific driver is available, in contrast to Linux and BSD or newer Windows versions, for example . With the latter, the generic driver is now called "Microsoft Basic Display Adapter" and also supports high resolutions, but without specific acceleration functions.

In the second half of the 1990s, Windows 95 and 98 became increasingly popular. Windows 95 and its successors provide operating system interfaces with DirectX and OpenGL , with which applications can address defined functions of graphics cards. Windows immediately forwards standardized function calls to the graphics driver, which converts them into commands for the graphics card. Thus, a large part of the functions of graphics cards from Windows can be addressed uniformly for all types of programs. A graphics BIOS that is compatible with a specific hardware standard is no longer required under Windows. Direct programming of the graphics card as under DOS is not possible under Windows anyway, since Windows is capable of multitasking and requires the graphics card for the user interface itself. In order to avoid any conflicts caused by simultaneous access by different programs, hardware access under Windows is therefore always coordinated via the operating system and its device drivers. In contrast to the graphics BIOS, the DirectX drivers enable more complex functions and usually address the chip directly via its register. The upgrade of functions is made much easier by doing without the routines of the rather rigid VGA graphics bios. In contrast to the graphics BIOS, DirectX drivers enable more complex functions. The graphics card is mainly controlled by the Windows driver. The programming of complex graphics is simplified because the abstraction level is higher and z. B. a significant part of the representation of a virtual world, unlike in the past, can be taken over by graphics drivers and graphics cards. This opens up numerous possibilities to accelerate the graphic display through certain circuits in the graphic chip. Portability to other platforms is also facilitated by the high level of abstraction. However, this also increases the complexity of the graphics chip and the graphics driver. The comparatively simple graphics chips, which up to now only had a few acceleration functions for graphic user interfaces (e.g. filling rectangles, drawing lines through the hardware), became highly complex graphics processors with capabilities for the widespread availability of Windows 95 ff. And Direct3D accelerated representation of three-dimensional worlds . Numerous well-known graphics chip manufacturers from the 1990s could not keep up with this development and have now disappeared from the market.

Due to the old age of the VGA standard and the associated design limitations, various manufacturers such as Intel or ATI are concerned with replacing the VGA standard with the UGA standard (Universal Graphics Adapter). After all, the VGA card in the mid 1980s was for the ISA bus developed, especially for modern operating systems is a problem because VGA thus the achievements of the protected memory model ( Protected Mode ) is incompatible.

The declared aim of the UGA sponsors is to increase the minimum graphic performance from 640 × 480 × 4 to 800 × 600 × 32, to simplify the memory model of the graphics card (through 32-bit access and the abolition of pallets and text mode ) and to provide platform-independent access to the graphics card via EFI drivers. Critical, platform-dependent code is thus to be reduced. EFI drivers are not a substitute for operating system- specific drivers, but with EFI and UGA, access to the graphics card should be adapted to the operating system design.

According to the plans of AMD , Intel , LG and other computer and screen manufacturers, the VGA and LVDS connections are no longer to be made [out of date] in 2015 at the latest . The digital outputs DisplayPort or HDMI should be installed in its place .

Today's meaning

Regardless of this original variety of resolutions, "VGA resolution" today, for example in specifications for displays or smartphones, usually stands for a resolution of 640 × 480 pixels, with a higher pixel depth or color resolution (up to 32 bits) being used than originally were not available.

From the VGA resolution of 640 × 480 pixels, other formats such. B. for PDAs . A list can be found under Image resolution # Standards .

literature

  • Mathias Uphoff: Programming the EGA / VGA graphics card . 1st edition. Addison-Wesley, 1990, ISBN 3-89319-274-3

Individual evidence

  1. VGA socket doomed to extinction . heise online , December 10, 2010