Clever Geek Handbook
📜 ⬆️ ⬇️

Vga

VGA ( Video Graphics Array ) is a component video interface used in monitors and video adapters . IBM released in 1987 for PS / 2 Model 50 and later computers [1] .

The VGA video adapter, unlike previous IBM video adapters ( MDA , CGA , EGA ), uses an analog signal to transmit color information. The transition to an analog signal was due to the need to reduce the number of wires in the cable. Also, the analog signal made it possible to use VGA monitors with subsequent video adapters , which can output more colors [2] .

The official follower of VGA was the IBM XGA standard, but in fact it was replaced by various extensions to VGA, known as " Super VGA " (SVGA).

The term VGA is also used to refer to the 15-pin VGA connector for transmitting analog video signals at various resolutions .

Content

VGA video adapter architecture

VGA (as well as EGA ) consists of the following main subsystems (the word "sequencer" was called [ who? ] a set of registers for access control to video memory planes):

  • The graphics controller ( Graphics Controller ), through which data is exchanged between the central processor and video memory . Has the ability to perform bitwise operations on the transmitted data.
  • Video memory ( Display Memory ), which contains the data displayed on the monitor screen. 256 kB DRAM is divided into four 64 kB color layers .
  • Serial Converter ( Serializer or Sequencer ) - converts data from video memory into a bit stream transmitted to the attribute controller [3] .
  • Attribute Controller — Converts input data to color values ​​using the palette .
  • Synchronizer ( Sequencer ) - controls the temporal parameters of the video adapter and switching color layers.
  • CRT Controller ( CRT Controller ) - generates synchronization signals for CRT [4] [5] .

Unlike CGA and EGA , the main subsystems are located in one chip , which allows reducing the size of the video adapter ( EGA was also implemented in one chip, at least its Taiwanese non-original clones ). In PS / 2 computers, the VGA video adapter is integrated into the motherboard [2] .

Differences from EGA

VGA is completely similar to EGA (including flat- panel video memory in 16-color modes and a sequencer for accessing the processor to it), with the exception of the following:

  • a different connector and cable to the monitor (and other monitors), analog , not 2 bits per color. This connector and cable did not change for about 15 years (before the advent of digital packet-oriented technologies DVI , HDMI and DisplayPort , which came from the world of home video equipment) and were used further at much higher resolutions. Even standard VGA monitors were very often able to show the 800 × 600 mode when used with a more modern graphics card (it all depended on the quality of the monitor’s scanners and their ability not to disrupt the generation at such high frequencies). Currently (all modern video cards are compatible with VGA from top to bottom), the word “VGA” in everyday life means precisely this type of monitor connection, now obsolete, but still relevant;
  • 18-bit colors in the palette instead of 6-bit ones , such a rich set made it possible, for example, to realize night, bad weather, “enchanted” modes and flickering colors in games with only one palette (as in the game “ Ultima VII ”);
  • the presence of 256-color modes, standard - 320 × 200, undocumented (actually documented in the documentation for VGA hardware, but not included in the BIOS and its documentation) tricks could get 320 × 240 (square pixels , the so-called "VGA mode -X ") and higher;
  • maximum 16-color mode - 640 × 480 (square pixels);
  • in all 200-line graphic modes, the scan line was repeated 2 times, which yielded 400 physical scan lines of the monitor, which greatly improved picture quality even in lower modes (no gaps between the scan lines);
  • the height of the character generator cell is 16 scan lines, and not 14, as in the EGA , which gave the same 400 scan lines in all text modes (except for compatibility modes with the EGA character generator). Thus, VGA always used 400 scan lines, except for the two older 16-color modes, where there were 480 and 350. The VGA-X mode also used 480 lines;
  • all registers (palettes, sequencers, etc.) are available for reading, EGA had a number of “write-only” registers (for example, a palette).

Text Modes

In standard text modes, characters are formed in a 9 × 16 pixel cell; fonts of other sizes can be used: 8--9 pixels wide and 1--32 pixels high. The dimensions of the characters themselves are usually smaller, since part of the space is spent on creating a gap between the characters. The function for selecting the font size in the BIOS is separate from the video mode selection function, which allows you to use various combinations of modes and fonts. It is possible to load eight and simultaneously display two different fonts [2] [6] .

The following types of fonts and functions for loading and activating them are stored in the VGA BIOS :

  • 8 × 16 pixels (standard VGA font),
  • 8 × 14 (for compatibility with EGA ),
  • 8 × 8 (for compatibility with CGA ).

Typically, these fonts correspond to the CP437 code page. Software font download is also supported, which can be used, for example, for Russification [7] .

The following standard modes are available:

  • 40 × 25 characters, 16 colors, resolution 360 × 400 pixels;
  • 80 × 25 characters, 16 colors, resolution 720 × 400 pixels;
  • 80 × 25 characters, monochrome, resolution 720 × 400 pixels. [four]

Although in VGA text modes one familiarity has a width of 9 pixels, only 8 of them are defined in the character generator data (8 bits of one byte per line); pixels of the right column of the character matrix are automatically determined: empty (for characters in the range 0x00-0xAF and 0xE0-0xFF) or the same as pixels in the 8th column (for pseudo-graphic characters in the range 0xB0-0xDF). The repeat mode of the 8th column could be disabled through the register (through the BIOS request in no way). Also, through the registers, it was possible to switch the text mode from 9 columns to 8 columns for a character (just like the graphic modes of 320/360 points per line were switched), which was necessary for some matrixes of laptops. In this case, standard fonts usually stuck together, and it was necessary to load their own ones (in the BIOS, narrower fonts were usually registered by the vendor, but Russian fonts were downloaded by third-party programs, such as KeyRus).

Using fonts smaller than the standard 8 × 16, you can increase the number of lines in text mode. For example, if you include the font 8 × 14, then 28 lines will be available. The inclusion of an 8 × 8 font increases the number of lines to 50 (similar to the EGA 80 × 43 mode ) [8] [9] .

In text modes, for each cell with a symbol, you can specify an attribute that determines how the symbol is displayed. There are two separate sets of attributes - for color modes and for monochrome.

The attributes of the color text modes allow you to select one of 16 symbol colors, one of 8 background colors and enable or disable flicker (the option to select flicker can be replaced by the option to select one of 16 background colors), which coincides with the CGA capabilities.

The attributes of monochrome modes coincide with the attributes available in MDA, and allow you to include increased symbol brightness, underline, flicker, inversion, and some combinations thereof [2] .

Graphics Modes

Unlike its predecessors (CGA and EGA), the VGA video adapter had a video mode with square pixels (that is, on a screen with a 4: 3 aspect ratio, the horizontal to vertical resolution ratio was also 4: 3 ). For CGA and EGA adapters, the pixels were elongated vertically.

Standard Graphics Modes

  • 320 × 200 pixels, 4 colors.
  • 320 × 200 pixels, 16 colors.
  • 320 × 200 pixels, 256 colors (new for VGA).
  • 640 × 200 pixels, 2 colors.
  • 640 × 200 pixels, 16 colors.
  • 640 × 350 pixels, monochrome.
  • 640 × 350 pixels, 16 colors.
  • 640 × 480 pixels, 2 colors. At a resolution of 640 × 480, the pixel has a 1: 1 aspect ratio (new for VGA).
  • 640 × 480 pixels, 16 colors (new for VGA) [4] .

Custom Graphics Modes (X-Modes)

Reprogramming VGA allowed achieving higher resolutions compared to standard VGA modes. The most common modes are:

  • 320 × 200, 256 colors, 4 pages. Outwardly no different from the 13h mode (320 × 200, 256 colors), this mode had four video pages with a volume of just under 64 kB each. This made it possible to implement double and even triple buffering .
  • 320 × 240, 256 colors, 2 pages. In this mode, there are fewer pages, but the pixels have a ratio of 1: 1 (square).
  • 360 × 480, 256 colors, 1 page. Highest resolution at 256 colors, which allows VGA.

In all these modes, a planar organization of video memory is used, conceptually similar to that used in 16-color modes, but using 2 bits from each plane rather than 1 to generate color - that is, bits 0-1 bytes 0 in plane 0 gave bits 0 -1 pixel colors 0, the same bits in plane 1 - bits 2–3 colors, etc. The next bits of the same byte gave the colors of the following pixels, that is, 4 located “one parallel to the other” at the same byte address in 4 planes set the color to 4 pixels.

Such organization of video memory made it possible to use the entire video memory of the card, and not just the 0-plane of 64K, to form a 256-color image, which made it possible to use high resolutions or many video pages.

To work with such memory, the same sequencer was used as in 16-color modes.

But due to the features of the video memory controller, copying data to video memory is four times faster than in 13h mode (this greatly depends on the specific machine code that performs the copying and the specific drawing scenario, namely, solid color filling, in general, planar video memory is much slower than usual , and that is precisely why SVGA completely abandoned it).

The term “X-mode” ( English Mode X ) was coined by Michael Abrash in 1991 to refer to the non-standard mode 320 × 240 with 256 colors. This mode was opened (by studying the IBM 's documentation on VGA hardware, which at that time was protected at the legal level and did not go in the form of files in the public domain, only calls to the VGA BIOS were published that could not enable these modes) by various programmers independently, but became famous thanks to articles by Michael Abrash in the journal “ Dr. Dobb's Journal ” [10] .

See also

  • VESA BIOS Extensions
  • VGA (connector)
  • QVGA
  • SVGA
  • Cif
  • Other common display resolutions

Notes

  1. ↑ Wilton, Richard. IBM Video Hardware and Firmware // Programmer's Guide to PC and Ps / 2 Video Systems. - Microsoft Press, 1987. - S. 544. - ISBN 1-55615-103-9 .
  2. ↑ 1 2 3 4 Thompson, Stephen VGA-sign choices for a new video subsystem . IBM Systems Journal (1988). Date of treatment December 15, 2006. Archived on August 25, 2011.
  3. ↑ Neal, JD VGA Sequencer Operation . FreeVGA Project (1998). Date of treatment February 23, 2007. Archived on August 25, 2011.
  4. ↑ 1 2 3 Scott, Michael comp.sys.ibm.pc.hardware.video FAQ (English) (1997). Date of treatment February 23, 2007.
  5. ↑ Frolov, Alexander; Frolov, Gregory. Architecture of video adapters EGA and VGA (unspecified) . Programming video adapters CGA, EGA and VGA (1992). Date of treatment February 23, 2007. Archived on August 25, 2011.
  6. ↑ Neal, JD VGA Text Mode Operation . FreeVGA Project (1998). Date of treatment December 15, 2006. Archived on August 25, 2011.
  7. ↑ Frolov, Alexander; Frolov, Gregory. Applications (unspecified) . Programming video adapters CGA, EGA and VGA (1992). Date of treatment February 23, 2007. Archived on August 25, 2011.
  8. ↑ Dnes, Walter Nicer console textmodes (inaccessible link) . Date of treatment January 11, 2007. Archived December 7, 2003.
  9. ↑ Rollins, Dan INT 10H 11H: EGA / VGA Character Generator Functions . Tech Help! (1997). Date of treatment January 11, 2007. Archived on August 25, 2011.
  10. ↑ Abrash, Michael Mode X: 256-Color VGA Magic (English) (link not available) . Graphics Programming Black Book (2001). Date of treatment March 30, 2007. Archived September 30, 2007.

Links

  • VGA pinout with signal descriptions
  • Connecting VGA Monitors over Twisted Pair
Source - https://ru.wikipedia.org/w/index.php?title=VGA&oldid=100766646


More articles:

  • Tokaev, Enver Saidovich
  • Sotnikov, Anatoly Dmitrievich
  • List of delegates to the XXI Congress of the CPSU
  • Novourlyadinsky
  • International Day of Lefties
  • Moonlight painted by clouds
  • Shik, Sergey Mikhailovich
  • Pidal-i-Mon, Alejandro
  • Translate me through maidan
  • I Won't Break

All articles

Clever Geek | 2019