Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Originally, there were eight video modes defined for the IBM personal
  computers: seven on the CGA and one on the MDA. The more sophisticated
  EGA, MCGA, and VGA introduced several new modes plus variations on the
  original eight. As a result, among the five IBM video subsystems are 12
  text and graphics modes and, depending how you count them, seven or eight
  variations--and that's not counting the extra modes available with non-IBM
  video hardware and with defunct IBM systems like the PCjr. There's plenty
  of variety when you're working with IBM video subsystems.

  Despite the perplexing proliferation of video modes, what is striking
  about the different modes is not their differences but their similarities
  (Figure 4-2): All video modes are related in resolution and in video
  buffer organization to the original MDA and CGA modes.

  The MDA's 80-column, 25-row monochrome text mode is supported on the EGA
  and VGA. Similarly, the CGA's two text modes (40 x 25 and 80 x 25 16-color
  modes) are also supported on the EGA, MCGA, and VGA. Don't let the
  redundant mode numbers in Figure 4-2 confuse you: The difference between
  mode 0 and mode 1, for example, is that the composite color signal on the
  CGA is modified for composite monochrome monitors in mode 0. (See page
  74 for more on monitors.) With all other monitors and in all other video
  subsystems, modes 0 and 1 are the same, as are modes 2 and 3 and modes 4
  and 5.


  BIOS Mode Number
  Hex          Dec           Type         Resolution    Colors       Video Subsystem
  ----------------------------------------------------------------------------------------------
  00H,01H      0, 1          Text         40 x 25       16           CGA, EGA, MCGA, VGA
  02H,03H      2, 3          Text         80 x 25       16           CGA, EGA, MCGA, VGA
  04H,05H      4, 5          Graphics     320 x 200     4            CGA, EGA, MCGA, VGA
  06H          6             Graphics     640 x 200     2            CGA, EGA, MCGA, VGA
  07H          7             Text         80 x 25       Mono         MDA, EGA, VGA
  08H,09H,0AH  8, 9, 10                                              (PCjr only)
  0BH,0CH      11, 12                                                (Used internally by EGA
                                                                     BIOS)
  0DH          13            Graphics     320 x 200     16           EGA,VGA
  0EH          14            Graphics     640 x 200     16           EGA,VGA
  0FH          15            Graphics     640 x 350     Mono         EGA,VGA
  10H          16            Graphics     640 x 350     16           EGA,VGA
  11H          17            Graphics     640 x 480     2            MCGA,VGA
  12H          18            Graphics     640 x 480     16           VGA
  13H          19            Graphics     320 x 200     256          MCGA,VGA
  ----------------------------------------------------------------------------------------------


  Figure 4-2.  Video modes available on IBM video subsystems.

  The evolutionary pattern is the same for graphics modes. The CGA supports
  two graphics modes, a 320 x 200 pixel, 4-color mode and a 640 x 200,
  2-color mode. These same two modes are supported on the EGA, MCGA, and
  VGA. The EGA introduced three new graphics modes with more colors and
  better resolution than the original CGA graphics modes: the 320 x 200,
  16-color; 640 x 200, 16-color; and 640 x 350, 16-color modes. The EGA also
  introduced a 640 x 350 monochrome graphics mode that could be used only
  with an MDA-compatible monochrome display.

  When the PS/2s appeared, their video subsystems supported the same modes
  as did the MDA, CGA, and EGA--but again, a few new graphics modes were
  introduced. The MCGA in the PS/2 models 25 and 30 followed the CGA
  tradition: It supported all CGA modes, plus new 640 x 480, 2-color and 320
  x 200, 256-color graphics modes. The VGA in the other PS/2 models strongly
  resembles the EGA. It provides all the EGA's text and graphics modes, the
  two new MCGA graphics modes, and one more graphics mode not supported by
  the other subsystems--a 640 x 480, 16-color mode.

  How do you know which mode to use in a program? Clearly, if broad
  compatibility is a concern, the MDA and CGA modes are the least common
  denominator. If you need more colors or better graphics resolution than
  the CGA modes provide, you can turn to one of the EGA, MCGA, or VGA
  graphics modes. Of course, if your program requires an EGA or a VGA to
  run, users who have only a CGA will be out of luck.

  Many commercial software vendors solve this problem by distributing
  installable video output routines along with their products. Before you
  can use a package like Microsoft Windows or Lotus 1-2-3, for example, you
  must run a special installation program that binds output routines for
  your particular video hardware to the software application. This approach
  is more work for both the people who write software and the people who use
  it, but it is a good way to make applications deliver the best possible
  video performance without stumbling over the diversity of video hardware
  and video modes.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson