<s>
The	O
Enhanced	B-Device
Graphics	I-Device
Adapter	I-Device
(	O
EGA	B-Device
)	O
is	O
an	O
IBM	B-Device
PC	I-Device
graphics	B-Device
adapter	I-Device
and	O
de	O
facto	O
computer	O
display	O
standard	O
from	O
1984	O
that	O
superseded	O
the	O
CGA	B-Device
standard	O
introduced	O
with	O
the	O
original	B-Device
IBM	I-Device
PC	I-Device
,	O
and	O
was	O
itself	O
superseded	O
by	O
the	O
VGA	B-Protocol
standard	O
in	O
1987	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
original	O
EGA	B-Device
card	O
manufactured	O
by	O
IBM	O
,	O
many	O
compatible	B-Device
third-party	O
cards	O
were	O
manufactured	O
,	O
and	O
EGA	B-Device
graphics	I-Device
modes	O
continued	O
to	O
be	O
supported	O
by	O
VGA	B-Protocol
and	O
later	O
standards	O
.	O
</s>
<s>
EGA	B-Device
was	O
introduced	O
in	O
October	O
1984	O
by	O
IBM	O
,	O
shortly	O
after	O
its	O
new	O
PC/AT	B-Operating_System
.	O
</s>
<s>
The	O
EGA	B-Device
could	O
be	O
installed	O
in	O
previously	O
released	O
IBM	B-Device
PCs	I-Device
,	O
but	O
required	O
a	O
ROM	B-Device
upgrade	O
on	O
the	O
mainboard	B-Device
.	O
</s>
<s>
Chips	O
and	O
Technologies	O
first	O
product	O
,	O
announced	O
in	O
September	O
1985	O
,	O
was	O
a	O
four	O
chip	O
EGA	B-Device
chipset	B-Device
that	O
handled	O
the	O
functions	O
of	O
19	O
of	O
IBM	O
's	O
proprietary	O
chips	O
on	O
the	O
original	O
Enhanced	B-Device
Graphics	I-Device
Adapter	I-Device
.	O
</s>
<s>
By	O
that	O
November	O
's	O
COMDEX	O
,	O
more	O
than	O
a	O
half	O
dozen	O
companies	O
had	O
introduced	O
EGA-compatible	O
boards	O
based	O
on	O
T	O
's	O
chipset	B-Device
.	O
</s>
<s>
Between	O
1984	O
and	O
1987	O
,	O
several	O
third-party	O
manufacturers	O
produced	O
compatible	B-Device
cards	O
,	O
such	O
as	O
the	O
Autoswitch	O
EGA	B-Device
or	O
Genoa	O
Systems	O
Super	O
EGA	B-Device
chipset	B-Device
.	O
</s>
<s>
Later	O
cards	O
supporting	O
an	O
extended	O
version	O
of	O
the	O
VGA	B-Protocol
were	O
similarly	O
named	O
Super	O
VGA	B-Protocol
.	O
</s>
<s>
The	O
EGA	B-Device
standard	O
was	O
made	O
obsolete	O
in	O
1987	O
by	O
the	O
introduction	O
of	O
MCGA	B-Device
and	O
VGA	B-Protocol
with	O
the	O
PS/2	B-Device
computer	O
line	O
.	O
</s>
<s>
Commercial	O
software	O
began	O
supporting	O
EGA	B-Device
soon	O
after	O
its	O
introduction	O
,	O
with	O
The	B-Device
Ancient	I-Device
Art	I-Device
of	I-Device
War	I-Device
,	O
released	O
in	O
1984	O
.	O
</s>
<s>
Microsoft	B-Application
Flight	I-Application
Simulator	I-Application
v2.12	I-Application
,	O
Jet	O
,	O
Silent	B-Device
Service	I-Device
,	O
and	O
Cyrus	O
,	O
all	O
released	O
in	O
1985	O
,	O
offered	O
EGA	B-Device
support	O
,	O
along	O
with	O
Windows	B-Application
1.0	I-Application
.	O
</s>
<s>
Sierra	O
's	O
King	B-Application
's	I-Application
Quest	I-Application
III	I-Application
,	O
released	O
in	O
1986	O
,	O
was	O
one	O
of	O
the	O
earliest	O
mainstream	O
PC	O
games	O
to	O
use	O
it	O
.	O
</s>
<s>
By	O
1987	O
,	O
EGA	B-Device
support	O
was	O
commonplace	O
.	O
</s>
<s>
Most	O
software	O
made	O
up	O
to	O
1991	O
could	O
run	O
in	O
EGA	B-Device
,	O
although	O
the	O
vast	O
majority	O
of	O
commercial	O
games	O
used	O
320×200	O
with	O
16	O
colors	O
for	O
backwards	O
compatibility	B-Device
with	O
CGA	B-Device
and	O
Tandy	O
,	O
and	O
to	O
support	O
users	O
who	O
did	O
not	O
own	O
an	O
enhanced	O
EGA	B-Device
monitor	O
.	O
</s>
<s>
350-line	O
modes	O
were	O
mostly	O
used	O
by	O
freeware/shareware	O
games	O
and	O
application	O
software	O
,	O
although	O
SimCity	B-Application
is	O
a	O
notable	O
example	O
of	O
a	O
commercial	O
game	O
that	O
runs	O
in	O
640×350	O
with	O
16	O
colors	O
mode	O
.	O
</s>
<s>
The	O
original	O
IBM	B-Device
EGA	I-Device
was	O
an	O
8-bit	O
PC	O
ISA	B-Architecture
card	I-Architecture
with	O
64KB	O
of	O
onboard	O
RAM	B-Architecture
.	O
</s>
<s>
An	O
optional	O
daughter-board	B-Device
(	O
the	O
Graphics	O
Memory	O
Expansion	B-Device
Card	I-Device
)	O
provided	O
a	O
minimum	O
of	O
64	O
KB	O
additional	O
RAM	B-Architecture
,	O
and	O
up	O
to	O
192	O
KB	O
if	O
fully	O
populated	O
with	O
the	O
Graphics	O
Memory	O
Module	O
Kit	O
.	O
</s>
<s>
Output	O
was	O
via	O
direct-drive	O
RGB	O
,	O
as	O
with	O
the	O
CGA	B-Device
,	O
but	O
no	O
composite	O
video	O
output	O
was	O
included	O
.	O
</s>
<s>
MDA	B-Device
and	O
CGA	B-Device
monitors	O
could	O
be	O
driven	O
,	O
as	O
well	O
as	O
newly	O
released	O
enhanced	O
color	O
monitors	O
for	O
use	O
specifically	O
with	O
EGA	B-Device
.	O
</s>
<s>
EGA-specific	O
monitors	O
used	O
a	O
dual-sync	B-General_Concept
design	O
which	O
could	O
switch	O
from	O
the	O
15.7kHz	O
of	O
200-line	O
modes	O
to	O
21.8kHz	O
for	O
350-line	O
modes	O
.	O
</s>
<s>
Many	O
EGA	B-Device
cards	O
have	O
DIP	O
switches	O
on	O
the	O
back	O
of	O
the	O
card	O
to	O
select	O
the	O
monitor	O
type	O
.	O
</s>
<s>
If	O
CGA	B-Device
is	O
selected	O
,	O
the	O
card	O
will	O
operate	O
in	O
200-line	O
mode	O
and	O
use	O
8x8	O
characters	O
in	O
text	B-Application
mode	I-Application
.	O
</s>
<s>
If	O
EGA	B-Device
is	O
selected	O
,	O
the	O
card	O
will	O
operate	O
in	O
350-line	O
mode	O
and	O
use	O
8×14	O
text	O
.	O
</s>
<s>
Some	O
third-party	O
cards	O
using	O
the	O
EGA	B-Device
specification	O
were	O
sold	O
with	O
the	O
full	O
128KB	O
of	O
RAM	B-Architecture
from	O
the	O
factory	O
,	O
while	O
others	O
included	O
as	O
much	O
as	O
256KB	O
to	O
enable	O
multiple	O
graphics	O
pages	O
,	O
multiple	O
text-mode	B-Application
character	B-General_Concept
sets	I-General_Concept
,	O
and	O
large	O
scrolling	O
displays	O
.	O
</s>
<s>
A	O
few	O
third-party	O
cards	O
,	O
such	O
as	O
the	O
ATI	O
Technologies	O
EGA	B-Device
Wonder	O
,	O
built	O
on	O
the	O
EGA	B-Device
standard	O
to	O
additionally	O
offer	O
features	O
such	O
as	O
extended	O
graphics	O
modes	O
as	O
high	O
as	O
800×560	O
and	O
automatic	O
monitor	O
type	O
detection	O
.	O
</s>
<s>
EGA	B-Device
produces	O
a	O
display	O
of	O
up	O
to	O
16	O
colors	O
(	O
using	O
a	O
fixed	O
palette	B-Data_Structure
,	O
or	O
one	O
selected	O
from	O
a	O
gamut	O
of	O
64	O
colors	O
(	O
6-bit	O
RGB	O
)	O
,	O
depending	O
on	O
mode	O
)	O
at	O
several	O
resolutions	O
up	O
to	O
640×350	O
pixels	O
,	O
as	O
well	O
as	O
two	O
monochrome	O
modes	O
at	O
higher	O
resolutions	O
.	O
</s>
<s>
EGA	B-Device
cards	O
include	O
a	O
ROM	B-Device
to	O
extend	O
the	O
system	B-Operating_System
BIOS	I-Operating_System
for	O
additional	O
graphics	O
functions	O
,	O
and	O
a	O
custom	O
CRT	O
controller	O
(	O
CRTC	O
)	O
.	O
</s>
<s>
The	O
IBM	B-Device
EGA	I-Device
CRTC	O
supports	O
all	O
of	O
the	O
modes	O
of	O
the	O
IBM	B-Device
MDA	I-Device
and	O
CGA	B-Device
adapters	O
through	O
specific	O
mode	O
options	O
,	O
but	O
it	O
is	O
not	O
fully	O
register-compatible	O
with	O
the	O
Motorola	B-General_Concept
MC6845	I-General_Concept
used	O
in	O
those	O
cards	O
,	O
so	O
software	O
that	O
directly	O
programs	O
the	O
registers	B-General_Concept
to	O
select	O
modes	O
may	O
produce	O
different	O
results	O
on	O
the	O
EGA	B-Device
.	O
</s>
<s>
Supported	O
resolutions	O
are	O
320×200	O
and	O
640×200	O
(	O
on	O
a	O
CGA	B-Device
or	O
EGA	B-Device
monitor	O
)	O
,	O
720×350	O
and	O
640×350	O
(	O
on	O
an	O
MDA	B-Device
monitor	O
)	O
and	O
320×350	O
and	O
640×350	O
(	O
on	O
an	O
EGA	B-Device
monitor	O
)	O
.	O
</s>
<s>
EGA	B-Device
scans	O
at	O
21.8kHz	O
when	O
350-line	O
modes	O
are	O
used	O
and	O
15.7kHz	O
when	O
200-line	O
modes	O
are	O
used	O
.	O
</s>
<s>
In	O
the	O
640×350	O
high	O
resolution	O
mode	O
,	O
which	O
requires	O
an	O
enhanced	O
EGA	B-Device
monitor	O
,	O
16	O
colors	O
can	O
be	O
selected	O
from	O
a	O
palette	B-Data_Structure
comprising	O
all	O
combinations	O
of	O
two	O
bits	O
per	O
pixel	O
for	O
red	O
,	O
green	O
and	O
blue	O
,	O
allowing	O
four	O
levels	O
of	O
intensity	O
for	O
each	O
primary	O
color	O
and	O
64	O
colors	O
overall	O
.	O
</s>
<s>
The	O
640×200	O
and	O
320×200	O
graphics	O
modes	O
provide	O
backwards	O
compatibility	B-Device
with	O
CGA	B-Device
software	O
and	O
monitors	O
,	O
but	O
permit	O
use	O
of	O
all	O
sixteen	O
colors	O
in	O
the	O
CGA	B-Device
palette	B-Data_Structure
simultaneously	O
,	O
instead	O
of	O
the	O
fixed	O
four	O
colors	O
available	O
in	O
those	O
modes	O
on	O
the	O
actual	O
CGA	B-Device
.	O
</s>
<s>
EGA	B-Device
's	O
16-color	O
graphic	O
modes	O
utilize	O
bit	O
planes	O
and	O
mask	O
registers	B-General_Concept
together	O
with	O
CPU	O
bitwise	O
operations	O
to	O
enable	O
accelerated	B-Architecture
graphics	I-Architecture
,	O
techniques	O
that	O
would	O
go	O
on	O
to	O
be	O
used	O
in	O
VGA	B-Protocol
.	O
</s>
<s>
EGA	B-Device
supports	O
:	O
</s>
<s>
640×350×16	O
colors	O
(	O
from	O
a	O
6bit	O
palette	B-Data_Structure
of	O
64	O
colors	O
)	O
,	O
pixel	B-Device
aspect	I-Device
ratio	I-Device
of	O
1:1.37	O
.	O
</s>
<s>
640×350×2	O
colors	O
,	O
pixel	B-Device
aspect	I-Device
ratio	I-Device
of	O
1:1.37	O
.	O
</s>
<s>
640×200×16	O
colors	O
,	O
pixel	B-Device
aspect	I-Device
ratio	I-Device
of	O
1:2.4	O
.	O
</s>
<s>
320×200×16	O
colors	O
,	O
pixel	B-Device
aspect	I-Device
ratio	I-Device
of	O
1:1.2	O
.	O
</s>
<s>
Text	B-Application
modes	I-Application
:	O
</s>
<s>
The	O
EGA	B-Device
palette	B-Data_Structure
allows	O
all	O
16	O
CGA	B-Device
colors	O
to	O
be	O
used	O
simultaneously	O
,	O
and	O
it	O
allows	O
substitution	O
of	O
each	O
of	O
these	O
colors	O
with	O
any	O
one	O
from	O
a	O
total	O
of	O
64	O
colors	O
(	O
two	O
bits	O
each	O
for	O
red	O
,	O
green	O
and	O
blue	O
)	O
.	O
</s>
<s>
This	O
also	O
allows	O
the	O
CGA	B-Device
's	O
alternate	O
brown	O
color	O
to	O
be	O
used	O
without	O
any	O
additional	O
display	O
hardware	O
.	O
</s>
<s>
The	O
later	O
VGA	B-Protocol
standard	O
built	O
on	O
this	O
by	O
allowing	O
each	O
of	O
the	O
64	O
colors	O
to	O
be	O
further	O
customized	O
.	O
</s>
<s>
Standard	O
EGA	B-Device
monitors	O
do	O
not	O
support	O
use	O
of	O
the	O
extended	O
color	O
palette	B-Data_Structure
in	O
200-line	O
modes	O
,	O
because	O
the	O
monitor	O
cannot	O
distinguish	O
between	O
being	O
connected	O
to	O
a	O
CGA	B-Device
card	O
or	O
being	O
connected	O
to	O
an	O
EGA	B-Device
card	O
outputting	O
a	O
200-line	O
mode	O
.	O
</s>
<s>
EGA	B-Device
redefines	O
some	O
pins	O
of	O
the	O
connector	O
to	O
carry	O
the	O
extended	O
color	O
information	O
.	O
</s>
<s>
If	O
the	O
monitor	O
were	O
connected	O
to	O
a	O
CGA	B-Device
card	O
,	O
these	O
pins	O
would	O
not	O
carry	O
valid	O
color	O
information	O
,	O
and	O
the	O
screen	O
might	O
be	O
garbled	O
if	O
the	O
monitor	O
were	O
to	O
interpret	O
them	O
as	O
such	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
standard	O
EGA	B-Device
monitors	O
will	O
use	O
the	O
CGA	B-Device
pin	O
assignment	O
in	O
200-line	O
modes	O
so	O
the	O
monitor	O
can	O
also	O
be	O
used	O
with	O
a	O
CGA	B-Device
card	O
.	O
</s>
<s>
Some	O
EGA	B-Device
monitors	O
are	O
switchable	O
,	O
meaning	O
they	O
can	O
be	O
set	O
up	O
to	O
use	O
the	O
full	O
palette	B-Data_Structure
even	O
in	O
200-line	O
modes	O
,	O
often	O
through	O
a	O
mechanical	O
switch	O
.	O
</s>
<s>
Only	O
a	O
few	O
commercial	O
games	O
were	O
released	O
with	O
support	O
for	O
the	O
extended	O
color	O
palette	B-Data_Structure
in	O
320×200	O
or	O
640×200	O
(	O
including	O
the	O
DOS	O
version	O
of	O
Super	B-Application
Off	I-Application
Road	I-Application
)	O
.	O
</s>
<s>
When	O
selecting	O
a	O
color	O
from	O
the	O
EGA	B-Device
palette	B-Data_Structure
,	O
two	O
bits	O
are	O
used	O
for	O
the	O
red	O
,	O
green	O
and	O
blue	O
channels	O
.	O
</s>
<s>
The	O
table	O
below	O
displays	O
an	O
example	O
palette	B-Data_Structure
matching	O
the	O
standard	O
16	O
CGA	B-Device
colors	O
,	O
with	O
their	O
representations	O
in	O
rgbRGB	O
binary	O
(	O
internal	O
card	O
bit	O
order	O
)	O
,	O
where	O
the	O
lowercase	O
letters	O
are	O
the	O
low-intensity	O
bits	O
,	O
and	O
uppercase	O
letters	O
are	O
high-intensity	O
bits	O
.	O
</s>
<s>
The	O
following	O
images	O
illustrate	O
the	O
full	O
EGA	B-Device
palette	B-Data_Structure
in	O
detail	O
.	O
</s>
<s>
EGA	B-Device
uses	O
a	O
female	O
nine-pin	O
D-subminiature	O
(	O
DE-9	O
)	O
connector	O
for	O
output	O
,	O
identical	O
to	O
the	O
CGA	B-Device
connector	O
.	O
</s>
<s>
The	O
signal	O
standard	O
and	O
pinout	O
is	O
backwards-compatible	O
with	O
CGA	B-Device
,	O
allowing	O
EGA	B-Device
monitors	O
to	O
be	O
used	O
on	O
CGA	B-Device
cards	O
and	O
vice	O
versa	O
.	O
</s>
<s>
When	O
operating	O
in	O
EGA	B-Device
modes	O
,	O
pins	O
2	O
,	O
6	O
and	O
7	O
are	O
repurposed	O
for	O
EGA	B-Device
's	O
secondary	O
RGB	O
signals	O
(	O
see	O
pinout	O
table	O
below	O
)	O
.	O
</s>
<s>
When	O
operating	O
in	O
200-line	O
CGA	B-Device
modes	O
,	O
the	O
EGA	B-Device
card	O
is	O
fully	O
backwards	O
compatible	B-Device
with	O
a	O
standard	O
IBM	B-Device
CGA	I-Device
monitor	O
;	O
however	O
,	O
third-party	O
monitors	O
had	O
varying	O
compatibility	B-Device
.	O
</s>
<s>
When	O
connected	O
to	O
an	O
EGA	B-Device
card	O
,	O
this	O
shorts	O
the	O
EGA	B-Device
's	O
secondary	O
red	O
output	O
to	O
ground	O
and	O
can	O
damage	O
the	O
card	O
.	O
</s>
<s>
Also	O
,	O
some	O
monitors	O
were	O
wired	O
with	O
pin	O
two	O
as	O
their	O
sole	O
ground	O
,	O
and	O
these	O
will	O
not	O
work	O
with	O
the	O
EGA	B-Device
.	O
</s>
<s>
Conversely	O
,	O
an	O
EGA	B-Device
monitor	O
should	O
work	O
with	O
a	O
CGA	B-Device
adapter	O
,	O
but	O
if	O
it	O
is	O
not	O
set	O
to	O
CGA	B-Device
mode	O
,	O
the	O
secondary	O
red	O
signal	O
will	O
be	O
grounded	O
(	O
always	O
zero	O
)	O
and	O
the	O
secondary	O
blue	O
will	O
be	O
floating	O
(	O
unconnected	O
)	O
,	O
causing	O
all	O
high-intensity	O
colors	O
except	O
brown	O
to	O
display	O
incorrectly	O
,	O
and	O
all	O
colors	O
to	O
potentially	O
have	O
a	O
variable	O
blue	O
tint	O
due	O
to	O
the	O
indeterminate	O
state	O
of	O
the	O
unconnected	O
secondary	O
blue	O
.	O
</s>
<s>
The	O
IBM	O
5154	O
EGA	B-Device
monitor	O
has	O
a	O
special	O
IBM	O
5153	O
CGA	B-Device
compatibility	B-Device
mode	O
when	O
operating	O
with	O
CGA	B-Device
sync	O
signals	O
,	O
and	O
it	O
will	O
automatically	O
change	O
to	O
the	O
CGA	B-Device
pinout	O
to	O
avoid	O
all	O
of	O
the	O
mentioned	O
problems	O
when	O
operating	O
in	O
this	O
mode	O
.	O
</s>
<s>
For	O
color	O
text	O
and	O
CGA	B-Device
graphics	I-Device
modes	O
,	O
video	O
memory	O
is	O
mapped	O
to	O
16	O
KB	O
of	O
addresses	O
beginning	O
at	O
address	O
B8000h	O
,	O
and	O
in	O
monochrome	O
(	O
MDA-compatible	O
)	O
text	B-Application
mode	I-Application
,	O
video	O
memory	O
occupies	O
16	O
KB	O
beginning	O
at	O
B0000h	O
.	O
</s>
<s>
These	O
address	O
mappings	O
are	O
for	O
backwards	O
compatibility	B-Device
.	O
</s>
<s>
For	O
modes	O
new	O
to	O
the	O
EGA	B-Device
,	O
the	O
video	O
memory	O
begins	O
at	O
address	O
A0000h	O
and	O
occupies	O
64	O
KB	O
.	O
</s>
<s>
The	O
different	O
base	O
addresses	O
for	O
color	O
vs.	O
monochrome	O
modes	O
makes	O
it	O
possible	O
for	O
an	O
EGA	B-Device
to	O
be	O
used	O
simultaneously	O
with	O
a	O
monochrome	O
graphics	B-Device
card	I-Device
in	O
the	O
same	O
computer	O
,	O
or	O
for	O
an	O
EGA	B-Device
in	O
MDA	B-Device
text	B-Application
mode	I-Application
to	O
used	O
simultaneously	O
with	O
a	O
CGA	B-Device
in	O
the	O
same	O
computer	O
.	O
</s>
<s>
EGA	B-Device
's	O
native	O
graphics	O
modes	O
are	O
planar	B-Device
,	O
as	O
opposed	O
to	O
the	O
interlaced	O
CGA	B-Device
and	O
Hercules	B-Device
modes	O
.	O
</s>
<s>
+EGA	O
video	O
plane	O
sizesModePlane	O
size200-line	O
modes	O
,	O
</s>
<s>
They	O
are	O
bank-switched	O
,	O
and	O
only	O
one	O
plane	O
can	O
be	O
read	O
on	O
the	O
CPU	O
bus	O
at	O
once	O
,	O
however	O
,	O
the	O
programmer	O
may	O
set	O
the	O
control	O
registers	B-General_Concept
on	O
the	O
card	O
to	O
select	O
which	O
planes	O
are	O
written	O
to	O
,	O
which	O
permits	O
writing	O
to	O
several	O
at	O
once	O
.	O
</s>
