Thursday, February 20, 2020 | Toby Opferman

Introduction to VGA Card

Toby Opferman

			      Introduction To The VGA Card

      Welcome to part 1 of the graphics tutorial.  In this section, we will learn
about how the monitor and video card work before we go to use them.  It is always
good to know about what you're using.  

DISCLAIMER: Read at your own risk. I am not responsible for catotropic ressults 
from information provided in the tutors. 

	A video card is an expansion card (Or integrated into your motherboard), 
either way it's an integrated circuit board that has the means of providing a gateway
between your CPU and your monitor.

	I will begin with an explaination of how a monitor works to put things into
perspective.   We will start at the end, the output, the monitor, work to the card,
 then in the next tutorial we will be in the CPU!  

	Your monitor screen has a substance called "phosphor" on it. Behind it, there
 is a thin piece of metal with tiny holes punched in it.  Some monitors have them 
aligned in different places but none the less, you have tiny holes punched in them.
The "dot pitch" is the space between these tiny holes.  If you put your face to your
monitor right now, real close, you can see extremely tiny dots and a space between
each one.  That is dot pitch.  Some monitors have variant dot pitch, but none the 
less you go to buy a monitor it will say .28 dp, .25 dp, or whatever.  The smaller
the number the better of course.  You want those tiny dots to be as close as possible
for crisper display.  

	Now, how does a metal sheet with holes and phospher make the colors on your
monitor?  Here is how.  There is something called an "ELECTRON GUN" which has 3 beams.
Red Beam, Green Beam and Blue Beam.  By aiming these beams at the holes in the metal
sheet at different intensities, you get the color you want.  How does it work?  You
charge the phosphor with so much engery it can't hold it all, and it radiates the 
rest as light.  Now, it doesn't radiate it for very long, so the ION beam is constantly
doing this over & over again to your screen.  The speed at which your monitor does this
is called "refresh rate" and it's measured in Hz (Hertz).  So, when you see a monitor
with "70 Hz"  that's 70 times a second.  The faster, the better, less flicker!  Also,
the faster, the less it hurts your eyes.  The flicker is so fast you don't see it but
 it can hurt your eyes eventually.

	If you ever see a monitor anymore that is "interlaced" do not buy it.  Most
monitors are "Non-Interlaced" anymore, but they used to have "Interlaced" monitors.
They are very bad for your eyes.  Every refresh they scan every OTHER row of dots, 
then on the next scan they get the rows between and vice versa.  So you have lined 
flicker, which can irritate your eyes.

	For your general knowledge base, that is pretty much all you need to know 
about how a monitor works.  For more information on hardware visit

	Next, we talk about the Video Card.  The video card sends signals to the
 monitor that configure it's mode, timing, what to print on the screen, etc.
It has registers that it holds values in.  These registers control what is going
on in the monitor.

	We are not going to go into VLB or PCI or AGP or anything like that.
Simple overview of what a graphics card is and does.  If you want detailed 
specifics on the latest technological advances in video cards and buses try

or try a web search.

	There are registers that make your monitor do many things.  You can
change the timing (NOT RECCOMENDED!), make split screen mode, change the resolution,
in low 8 bit modes change the color pallete and etc.  The video card has the 
capability to create modes never even seen or intended by it's creaters.  

	Programming the VGA in this abstract way is not what this tutor is to
talk about.  There are many sources you can find information on the web to do this,
but you should know what you're doing if you decide to do this.  The purpose of this
tutorial is to get you up to speed in the graphics world and not to teach you
hardware programming.  If you were going to do that anyway, you would be more
of a BIOS or Driver writer for the video card, not a game or graphic programmer.
We are using the low level so you understand, we will work you up to windows
Direct X.

	That is the basics of behind the scenes hardware.  The CPU is next.
How to interface with the VGA card will go a little more in depth.  We WILL
do some VGA hardware programming at first, not a lot, but a wee little bit.
About Toby Opferman

Professional software engineer with over 15 years...

Learn more »
Codeproject Articles

Programming related articles...

Articles »

Resume »

Email: codeproject(at)opferman(dot)com