Mode 13h

In computing, Mode 13h (the "h" here stands for "hexadecimal," so this is actually VGA mode 19) is a standard 256 colour mode on IBM's VGA graphics hardware. It features a resolution of 320×200 pixels and was used extensively in computer games of the late 1980s and early- to mid-1990s. Mode 13h provides a straight forward manner of access (called chunky graphics) to video at the expense of several very useful features. Due to its aspect ratio Mode 13h does not have completely square pixels.

Mode 13 is something of a curiosity, because the VGA is from a hardware perspective a planar device, and so completely unsuited to chunky graphics. It was made possible by a hardware trick. In order to understand how Mode 13h was possible, one must consider the VGA's memory layout:

The VGA's 256K of video memory is not directly available to the programmer and is accessed via a 64KB 'window' in the PC's real mode address space. The Video RAM is actually a bank of 4 planes, 64KB each. By manipulating the VGA's control registers the programmer can decide how some or all of these 4 planes will be affected by each write or read operation. In 256 colour mode each plane represents a pixel. For example, on the first line of the screen pixels 0, 4, 8, 12 etc. are all contained in memory plane 0, while pixels 1, 5, 9, 13 etc. are contained in memory plane 1 and so on. A single byte written to the 64K window therefore can address up to 4 pixels at once. The programmer through a combination of the 64K window available, and the selection of any of the four planes (an effective extra two bits of address space) allows the manipulation of the total 256K video memory.

Mode 13h though allows the programmer to access the VGA in the chunky fashion where every byte represents a single pixel. This is made possible because in Mode 13h the hardware uses the last two bits of the address to select the plane to write to. The upshot is that the programmer has a simple access model, the downside is that three quarters of the video memory is now inaccessible. A simple bank switching method could have made the remaining memory available, and indeed bank switching was made available on Super VGAs to access the larger VRAMs these devices sported.

Although never documented by IBM, an alternative planar 256 colour mode is available called Mode X.

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools