Jump to content

Mode X

From Wikipedia, the free encyclopedia

Template:Short description

File:Birds VGA Mode x 320x240.png
Simulated image as displayed using VGA Mode X resolution and color abilities

Mode X is a Template:Resx 256-color graphics display mode of the VGA graphics hardware for IBM PC compatibles. It was first publicized by Michael Abrash in his July 1991 "Ramblings in Realtime" column in Dr. Dobb's Journal. The articles were reprinted in chapters 47-49 of Abrash's Graphics Programming Black Book.[1] The term "Mode X" was coined by Abrash. Mode X is a variant of the Template:Resx Mode 13h with the resolution increased to Template:Resx, giving square pixels instead of the slightly elongated pixels of Mode 13h. It is enabled by entering Mode 13h via a BIOS system call, then changing the values of several VGA registers.

Additionally, Abrash enabled the VGA's planar memory mode (also called "unchained mode"). Even though planar memory mode is a documented part of the VGA standard and was used in earlier commercial games,[2] it was first widely publicized in the Mode X articles, leading many programmers to consider Mode X and planar memory synonymous.

Planar memory arrangement splits the pixels horizontally into groups of four. For any given byte in video memory, four pixels on screen can be accessed depending on which plane(s) are enabled. This is more complicated for the programmer, but the advantages gained by this arrangement—primarily the ability to use all 256 KB of VGA memory for one or more display buffers, instead of only one quarter of that (64 KB)—were considered worthwhile by many.

Variants

It is possible to enable planar memory in standard Template:Resx mode, which became known as Mode Y in the Usenet rec.games.programmer group.[3][4] Mode Q (short for "cube") is sometimes used to refer to a lesser known and used 256-color mode color mode with Template:Resx resolution.[5][6] The Y coordinate can be put in the high byte of the address and the X coordinate in the low byte, forming the address of the pixel without a multiply, at the expense of lower horizontal resolution.

References

Template:Reflist

Template:Compu-hardware-stub Template:Compu-graphics-stub

  1. ↑ Abrash, Michael. Michael Abrash's Graphics Programming Black Book Special Edition. The Coriolis Group, Scottsdale Arizona, 1997. Template:ISBN: PDF available online [1] Template:Webarchive
  2. ↑ Abrash, Michael. Michael Abrash's Graphics Programming Black Book Special Edition. The Coriolis Group, Scottsdale Arizona, 1997. Template:ISBN: PDF available online [2] Template:Webarchive pg. 877
  3. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  4. ↑ Roberts, Dave. PC Game Programming Explorer. The Coriolis Group, Scottsdale Arizona, 1994. Template:ISBN. Page 106.
  5. ↑ Robert Schmidt.{{#invoke:citation/CS1|citation |CitationClass=web }}
  6. ↑ Bas van Gaalen. {{#invoke:citation/CS1|citation |CitationClass=web }}