Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Enhanced Graphics Adapter
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Capabilities == [[File:Ega 320x200x16 ratio.png|thumb|EGA {{resx|320Γ200}} Γ 16 colors, CGA-compatible palette]] [[File:Ega 640x200x16 aspect ratio.png|thumb|EGA {{resx|640Γ200}} Γ 16 colors, CGA-compatible palette]] [[File:Birds ega.png|thumb|EGA {{resx|640Γ350}} Γ 16 colors, EGA palette]] [[File:Arachne EGA Mode.png|thumb|Screenshot of the [[Arachne (web browser)|Arachne]] web browser using the {{resx|640Γ350}} graphics mode. The screenshot contains 14 colors.]] [[File:VGA text sample animation.gif|thumb|Sample of [[text mode]] characters with cursor]] EGA produces a display of up to 16 colors (using a fixed [[Palette (computing)|palette]], or one selected from a [[List of monochrome and RGB color formats#6-bit RGB|gamut of 64 colors (6-bit RGB)]], depending on mode) at several resolutions up to 640 Γ 350 pixels, as well as two monochrome modes at higher resolutions. EGA cards include a ROM to extend the system [[BIOS]] for additional graphics functions, and a custom [[Video display controller|CRT controller (CRTC)]].<ref name=":1" /> The IBM EGA CRTC supports all of the modes of the IBM [[IBM Monochrome Display Adapter|MDA]] and CGA adapters through specific mode options,<ref name=":1">{{Cite book |url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf |title=IBM Enhanced Graphics Adapter manual |pages=1, 81}}</ref> but it is not fully register-compatible with the [[Motorola]] [[MC6845]] used in those cards, so software that directly programs the registers to select modes may produce different results on the EGA.<ref>{{Cite book| url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf |title=IBM Enhanced Graphics Adapter manual |pages=75}}</ref> Supported resolutions are 320 Γ 200 and 640 Γ 200 (on a CGA or EGA monitor<ref name=":2">{{Cite book |url=http://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf |title=IBM Enhanced Graphics Adapter manual |pages=5, 6, 7}}</ref>), 720 Γ 350 and 640 Γ 350 (on an MDA monitor) and 320 Γ 350 and 640 Γ 350 (on an EGA monitor). EGA scans at 21.8 kHz when 350-line modes are used and 15.7 kHz when 200-line modes are used. For both horizontal scan rates, the vertical scan rate is 60 Hz.<ref name=":3" /> In the 640 Γ 350 high-resolution mode, which requires an enhanced EGA monitor, 16 colors can be selected from a palette of 64, comprising all combinations of two bits per pixel (four levels of intensity) for red, green and blue. On EGA adapters with only 64 KB of video RAM, only 4 colors can be selected per pixel.<ref name=":3" /> The 640 Γ 200 and 320 Γ 200 graphics modes provide backward compatibility with CGA software and monitors, but they can use the entire 16-color [[Color Graphics Adapter#Color palette|CGA palette]] simultaneously, instead of the smaller 4-color palettes that CGA is limited to in those modes.<ref name=":2" /> EGA's 16-color [[All points addressable|graphic modes]] use [[bit plane]]s and [[bit mask|mask]] [[hardware register|registers]]<ref>[http://support.microsoft.com/KB/45699 Complete Instructions to BLOAD and BSAVE EGA and VGA Screens], [[Microsoft]].</ref> together with CPU [[bitwise operation]]s<ref>{{cite book |title=Graphics Programming Black Book |last=Abrash |first=Michael |author-link=Michael Abrash |year=2001 |publisher=[[Penguin Group|Coriolis Group Books]] |isbn=1-57610-174-6 |pages=[https://archive.org/details/michaelabrashsgr00abra/page/1342 1342] |url=https://archive.org/details/michaelabrashsgr00abra/page/1342 |chapter=Chapter 43: Bit-plane animation |chapter-url=http://www.phatcode.net/res/224/files/html/ch43/43-01.html |access-date=February 6, 2017 |url-access=registration }}</ref> for [[graphics accelerator|accelerated graphics]]. The same techniques went on to be used in the [[Video Graphics Array|VGA]]. === Modes === EGA supports: * {{resx|640Γ350}} Γ 16 colors (from a 6 bit palette of 64 colors), pixel [[aspect ratio]] of 1:1.37. * {{resx|640Γ350}} Γ 2 colors, pixel aspect ratio of 1:1.37. * {{resx|640Γ200}} Γ 16 colors, pixel aspect ratio of 1:2.4. * {{resx|320Γ200}} Γ 16 colors, pixel aspect ratio of 1:1.2. Text modes: * {{resx|40x25}} with {{resx|8x8}} pixel font (effective resolution of {{resx|320Γ200}}) * {{resx|80x25}} with {{resx|8x8}} pixel font (effective resolution of {{resx|640Γ200}}) * {{resx|80x25}} with {{resx|8x14}} pixel font (effective resolution of {{resx|640Γ350}}) * {{resx|80x43}} with {{resx|8x8}} pixel font (effective resolution of {{resx|640Γ344}}) Extended graphics modes of third-party boards:{{cn|date=January 2024}} * {{resx|640Γ400}} * {{resx|640Γ480}} * {{resx|720Γ540}} * {{resx|800Γ560}} === Color palette === With the EGA, all [[List of 16-bit computer hardware palettes#EGA|16 CGA colors]] can be used simultaneously, and each can be mapped in from a larger palette of 64 colors (two bits each for red, green and blue). The [[Color Graphics Adapter#With an RGBI monitor|CGA's alternate brown]] color is included in the larger palette, so it can be used without any additional display hardware. The later VGA standard built on this by mapping each of the 64 colors in from a larger, customizable, palette of 256. Standard EGA monitors do not support use of the extended color palette in 200-line modes, because the monitor cannot distinguish between being connected to a CGA card or being connected to an EGA card outputting a 200-line mode. EGA redefines some pins of the connector to carry the extended color information. If the monitor were connected to a CGA card, these pins would not carry valid color information, and the screen might be garbled if the monitor were to interpret them as such. For this reason, standard EGA monitors will use the CGA pin assignment in 200-line modes, so the monitor can also be used with a CGA card.{{Citation needed|date=August 2020}} Some EGA monitors are ''switchable'', meaning that they can be set up to use the full palette even in 200-line modes, often through a mechanical switch. Only a few commercial games were released with support for the extended color palette in {{resx|320Γ200}} or {{resx|640Γ200}} (including the DOS version of ''[[Super Off Road]]'').<ref>{{Cite web |last=swarmik |date=November 2018 |title=EGA 64-color 320x200 mode on switchable monitors |url=https://swarmik.tumblr.com/post/179660020524/ega-64-color-320x200-mode-on-switchable-monitors |access-date=2022-12-09 |website=Tumblr}}</ref><ref>{{Cite web |last=RetroArchivesFr |date=2018-12-16 |title=Ivan "Ironman" Stewart's Super Off Road |url=https://retroarchives.fr/ivan-ironman-stewarts-super-off-road/ |access-date=2022-12-09 |website=Retro Archives |language=fr-FR}}</ref> When selecting a color from the EGA palette, two bits are used for the red, green and blue channels to signal values of 0, 1, 2 or 3. For instance, to select the color magenta, the red and blue values would be medium intensity (2, or 10 in binary) and the green value would be off (0). The table below displays an example palette matching the standard 16 CGA colors, with their representations in rgbRGB binary (internal card bit order), where the lowercase letters are the low-intensity bits, and uppercase letters are high-intensity bits. Decimal and hexadecimal values (converted to equivalent [[Color depth#True color (24-bit)|24-bit]] [[sRGB]] [[web colors]]) are also shown. [[File:Screen color test EGA 16colors CGA.png|thumb|Screen color test with standard 16-color palette]] {| class="wikitable sortable" style="text-align:center" |+ Default EGA 16-color palette, matching [[Color Graphics Adapter|CGA]] colors |- ! Index ! Default palette number ! Default palette color ! rgbRGB ! Hexadecimal |- style="color: white;" bgcolor="#000000" | 0 | 0 || align="left" | Black || 000000 | #000000 |- style="color: white;" bgcolor="#0000AA" | 1 | 1 || align="left" | Blue || 000001 | #0000AA |- style="color: white;" bgcolor="#00AA00" | 2 | 2 || align="left" | Green || 000010 | #00AA00 |- style="color: white;" bgcolor="#00AAAA" | 3 | 3 || align="left" | Cyan || 000011 | #00AAAA |- style="color: white;" bgcolor="#AA0000" | 4 | 4 || align="left" | Red || 000100 | #AA0000 |- style="color: white;" bgcolor="#AA00AA" | 5 | 5 || align="left" | Magenta || 000101 | #AA00AA |- style="color: white;" bgcolor="#AA5500" | 20 | 6 || align="left" | Brown || 010100 | #AA5500 |- style="color: black;" bgcolor="#AAAAAA" | 7 | 7 || align="left" | White / light gray || 000111 | #AAAAAA |- style="color: white;" bgcolor="#555555" | 56 | 8 || align="left" | Dark gray / bright black || 111000 | #555555 |- style="color: white;" bgcolor="#5555FF" | 57 | 9 || align="left" | Bright Blue || 111001 | #5555FF |- style="color: black;" bgcolor="#55FF55" | 58 | 10 || align="left" | Bright green || 111010 | #55FF55 |- style="color: black;" bgcolor="#55FFFF" | 59 | 11 || align="left" | Bright cyan || 111011 | #55FFFF |- style="color: black;" bgcolor="#FF5555" | 60 | 12 || align="left" | Bright red || 111100 | #FF5555 |- style="color: black;" bgcolor="#FF55FF" | 61 | 13 || align="left" | Bright magenta || 111101 | #FF55FF |- style="color: black;" bgcolor="#FFFF55" | 62 | 14 || align="left" | Bright yellow || 111110 | #FFFF55 |- style="color: black;" bgcolor="#FFFFFF" | 63 | 15 || align="left" | Bright white || 111111 | #FFFFFF |} The following images illustrate the full EGA palette in detail. [[File:EGA Table.svg|left|thumb|Full 64-color EGA palette table]] <gallery mode="packed" widths="240" heights="160"> File:EGA64 Full Palette.png|Full 64-color EGA palette illustration File:Ega palette color test chart.png|Full 64-color EGA palette test card File:Screen color test EGA 16colors.png|Screen color test with custom EGA palette </gallery> {{clear}} === Specifications === [[File:Numbered DE9 female Diagram.svg|thumb|right|EGA connector pinout when looking at back of computer]] EGA uses a female nine-pin D-subminiature ([[DE-9]]) connector for output, identical to the CGA connector. The signal standard and pinout is backward-compatible with CGA, allowing EGA monitors to be used on CGA cards and conversely. When operating in EGA modes, pins 2, 6 and 7 are repurposed for EGA's secondary RGB signals (see pinout table below). When operating in 200-line CGA modes, the EGA card is fully backward compatible with a standard IBM CGA monitor; however, third-party monitors had varying compatibility.{{Citation needed|date=August 2020}} [[File:Tvm-md-3-prevga-monitor-front-and-rear.jpg|thumb|right|Front and rear views of the TVM MD-3, a third-party EGA monitor. DE-9 input, mode switch, contrast and brightness controls at front, V size and V hold knobs at rear.]] Third-party monitors sometimes connected pin two to ground internally. When connected to an EGA card, this shorts the EGA's secondary red output to ground and can damage the card. Also, some monitors were wired with pin two as their sole ground, and these will not work with the EGA.{{Citation needed|date=August 2020}} Conversely, an EGA monitor should work with a CGA adapter, but if it is not set to CGA mode, the secondary red signal will be grounded (always zero), and the secondary blue will be floating (unconnected), causing all high-intensity colors except brown to display incorrectly, and all colors to potentially have a variable blue tint due to the indeterminate state of the unconnected secondary blue.{{Citation needed|date=August 2020}} The IBM 5154 EGA monitor has a special IBM 5153 CGA compatibility mode when operating with CGA sync signals and automatically changes to the CGA pinout to avoid all of the mentioned problems when operating in this mode.<ref>IBM Options and Adapters, Volume 1, "Enhanced Color Display", page 4: "When operating in Mode 1, the display maps the 4 input bits into 16 of the possible 64 colors as shown in the following chart." August 2, 1984.</ref> {| class="wikitable" |+ EGA DE-9 connector pin signals |- ! Pin ! Name ! EGA modes ! CGA compatible modes |- | 1 | GND | Ground | Ground |- | 2 | SR |style="background-color:#fe0000; color:#ffffff;"| Secondary Red (Intensity) | Ground |- | 3 | PR |style="background-color:#9a0000; color:#ffffff;" | Primary Red |style="background-color:#9a0000; color:#ffffff;" | Red |- | 4 | PG |style="background-color:#009901; color:#000000;" | Primary Green |style="background-color:#009901; color:#000000;" | Green |- | 5 | PB |style="background-color:#010066; color:#ffffff;" | Primary Blue |style="background-color:#010066; color:#ffffff;" | Blue |- | 6 | SG |style="background-color:#00fe01; color:#000000;" | Secondary Green (Intensity) |style="color: white; background: #555;"| Intensity |- | 7 | SB |style="background-color:#0000fe; color:#ffffff;" | Secondary Blue (Intensity) | ''Reserved'' |- | 8 | H | Horizontal sync | Horizontal sync |- | 9 | V | Vertical sync | Vertical sync |} The original IBM EGA card includes a [[feature connector]] (blue connector J4, see first photo on this page), providing access to two [[RCA connector|RCA connectors]] at the back of card, in addition to several analog and digital signals that the EGA adaptor can be configured to use.<ref>{{Cite book |url=https://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf |title=IBM Enhanced Graphics Adapter |publisher=IBM |date=August 2, 1984 |pages=76β78}}</ref> A [[light pen]] interface was also present on the original card.<ref>{{Cite book |url=https://minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf |title=IBM Enhanced Graphics Adapter |publisher=IBM |date=August 2, 1984 |pages=84}}</ref> === Memory mapping === For color text and CGA graphics modes, video memory is mapped to 16 KB of addresses beginning at address B8000h, and in monochrome (MDA-compatible) text mode, video memory occupies 16 KB beginning at B0000h. These address mappings are for backward compatibility. For modes new to the EGA, the video memory begins at address A0000h and occupies 64 KB. The different base addresses for color vs. monochrome modes makes it possible for an EGA to be used simultaneously with a monochrome graphics card in the same computer, or for an EGA in MDA text mode to be used simultaneously with a CGA in the same computer. EGA's native graphics modes are [[planar (computer graphics)|planar]], as opposed to the interleaved CGA and [[Hercules Graphics Card|Hercules]] modes. Video memory is divided into four "planes" (except {{resx|640Γ350}} Γ 2, which has one plane), one for each component of the RGBI color space. Each pixel is represented by one bit in each plane. If a bit in the red plane is on, but none of the equivalent bits in the other pages are, a red pixel will appear in that location on screen. If all the other bits for that particular pixel were also on, it would become white, and so forth. Planes are different sizes depending on the mode: {| class="wikitable" |+ EGA video plane sizes ! Mode ! Plane size |- | 200-line modes,<br/>{{resx|640Γ350}} Γ 2 mode | 8 KB |- | {{resx|640Γ350}} with 64 KB RAM | 16 KB |- | {{resx|640Γ350}} with 128 KB RAM | 32 KB |} All planes reside at segment A000 in the CPU's address space. They are bank-switched, and only one plane can be read on the CPU bus at once<!--Though internally, the EGA always reads all 4 planes at once and stores the byte read from each plane in the Graphics Controller data latch for that plane, regardless of which plane is selected to be read on the [CPU] I/O bus-->; however, the programmer may set the control registers on the card to select which planes are written to and write to several at once. An exception is read mode 1, in which all four planes are read and compared with programmed "Color Compare" data, and a byte indicating the result of comparing all four planes can be read on the I/O bus.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Enhanced Graphics Adapter
(section)
Add topic