VGA Modes

by Marie Olga Shawn.

Share
|
Homepage | Submit your article | Contact | TOS
More articles on memory processor motherboards and buses  

You are here: Categories » Computers and technology » Memory Processor Motherboards and buses

Even in the early 1980s, a frame buffer of 32K proved inadequate. To allow for more space in the frame buffer, IBM developed a paged frame buffer for its EGA system. This same memory arrangement is used today for the VGA system upon which all current video boards are based.

In moving to paged memory, IBM also moved the frame buffer to its current location at a base address of 0A0000(Hex), the very bottom of High DOS memory. Normally, the full expanse of the system's display memory is split four ways into 64K banks, although a two way 128k bank split is also possible. The latter mode extends across the ranges used by the old monochrome and low resolution color frame buffers.

A register, called the Map Mask Register, that is part of the VGA chip, controls which banks the system microprocessor addresses through a 64K range of high memory addresses. The VGA specification puts the Map Mask Register at I/O port 03C5(Hex). Several registers actually share this port address to economize on port usage. The VGA Sequencer Register at port address 03C4(Hex) controls the function of the port used by the Map Mask Register. When the Sequencer Register is set to the value 02(Hex), port 03C5(Hex) gives access to the Map Mask Register.

The Map Mask Register has four control bits. In the VGA's original 16-color mode, each bit nominally controls a bit plane and switches the intensity on or off red, green, and blue signals (listed from most significant bit to least). Unlike most bank switching systems, the VGA system allows multiple banks to be switched on simultaneously. This scheme allows an onscreen hue that's mixed from more than one color to be loaded in a single cycle. For example, if your system could only activate the VGA banks individually, writing a bright white dot would take four separate operations-writing a bit of one color, switching banks, then writing another color, and so on. By activating all four banks simultaneously, writing the white bit takes only one switch and write operation.

Addressing within each bank is linear in the original 16-color VGA graphic mode. That is, the memory arrangement puts onscreen pixels and lines into memory in the same order that they appear on the screen. The bit data in a byte from most significant to least significant bit corresponds to an onscreen sequence of eight pixels in a line from left to right.

In 256-color mode, each byte of memory defines the color of a single pixel. The bank control logic of the VGA system divides the 256K of memory for onscreen pixels into four 64K blocks. These banks essentially duplicate one another but provide a convenient way of scanning color plane data into the RAMDAC. Because there are eight color signals per pixel and the VGA system is designed to scan four color planes at a time, the 256-color pages are scanned twice to make the transfer.

In text modes, the VGA memory banks act as if they are at the old mode locations and are similarly interleaved: odd bytes of display memory in the first bank; even bytes in the second bank. In normal text mode operation, this corresponds to putting the character values in the first bank and attribute data in the second bank. The various pages of character memory start at each 2K paragraph address boundary. For example, when operating in color text mode, the first page will be based at 0B8000(Hex), the second page at 0B8800(Hex), and so on.

The mechanics of the address remapping used by the VGA system are relatively straightforward. A register in the VGA control circuitry acts as the switch. The Memory Map Register controls the base address of the VGA's video memory and the page size of each bank.

Accessing the Memory Map Register is a two step process. First the Graphic Address Register at microprocessor I/O port must be set with a value of 06(Hex) to enable writing to the Memory Map Register through the VGA's Miscellaneous Register at microprocessor port address 03C2(hex), an address shared with a number of other functions. Bits 2 and 3 in the Memory Map Register control bank address and size.

Setting Bit 3 of the Memory Map Register to zero locates the base address of the frame buffer at 0A0000(Hex). Bit 2 then controls bank size. Set to zero, it specifies two 128K banks; set to one it indicates four 64K banks.

When Bit 3 of the Memory Map Register is set to one, bank size is set at 32K, and Bit 2 controls the base address used by the two permitted banks. With Bit 2 set to zero, the buffer base address is 0B0000(Hex); when set to one, the buffer base address is 0B8000(Hex).

Leave a comment or ask a question
Total comments: 0

Memory Processor Motherboards and buses Disclaimer

  • The e-articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us to investigate the issue
Troubleshooting Memory - Memory problems can be difficult to troubleshoot. For one thing, computer memory is still mysterious to people because it is a kind of "virtual" thing that can be hard to grasp. The other difficult (more...)
Guidelines when upgrading memory on older systems - When upgrading an older motherboard, it is sometimes impossible to match the installed memory. Some motherboards have 30-pin and 72-pin SIMM sockets, and many have both SIMM and DIMM sockets. I (more...)
Guidelines when upgrading memory in Pentium II/III/IV Celeron and Athlon systems - These systems are excellent candidates for memory upgrades. Early Pentium II systems often have only 16 MB of RAM. In the price-sensitive consumer Celeron market, many early systems shipped wit (more...)
Power6 Processor: World`s Fastest Processor - Increases the processing speed to 4.7 GHz A revolutionary device in the form of tiny chip has been designed by IBM which has put the world in wonders. Power6 is really a mind-blow (more...)
About Clocking - In computers, a serial signal is one in which the bits of data of the digital code are arranged in a series. They travel through their medium or connection one after another as a train of pulses (more...)
Hardware Flow Control in the Serial Interface - Several of the signals in the serial interface are specifically designed to help handle flow control. Rather than a simple on and off operation, however, they work together in an elaborate ritua (more...)
Software Flow Control in the Serial Interface - The alternate means of handshaking, software flow control, requires your serial peripheral and PC to exchange characters or tokens to indicate whether they should transfer data. The serial perip (more...)
IrDA overview - The one thing you don't want with a portable PC is a cable to tether you down, yet most of the time you must plug into one thing or another. Even a simple and routine chore like downloading file (more...)
USB: Universal Serial Bus Overview - Three drawbacks head any list of the most aggravating aspects of serial ports: low speed, complex cabling, and the limited number of ports. The Universal Serial Bus breaks through all three, com (more...)
IEEE 1394 Port Overview - Compared to the performance you've come to expect from your PC, serial ports are slow at best. They are constrained not only by the pragmatic aspects of their design-UART chips and the clocks th (more...)

 
free content
    Copyright © 2006 - 2012 e-articles.info.
The texts, articles and tutorials in the directory are property of their respective owners and authors.