Mode X is an alternative 256-color
graphics display mode of the
IBM VGA
Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the PC industry within three years. The term can no ...
graphics hardware that was popularized by
Michael Abrash
Michael Abrash is a programmer and technical writer specializing in code optimization and 80x86 assembly language. He wrote the 1990 book ''Zen of Assembly Language Volume 1: Knowledge'' and a monthly column in '' Dr. Dobb's Journal'' in the earl ...
. It was first published in July 1991 in ''
Dr. Dobb's Journal
''Dr. Dobb's Journal'' (''DDJ'') was a monthly magazine published in the United States by UBM Technology Group, part of UBM plc, UBM. It covered topics aimed at computer programmers. When launched in 1976, DDJ was the first regular periodical focu ...
'', and republished in chapters 47-49 of Abrash's ''Graphics Programming Black Book'' (now freely available online). The term "Mode X" was coined by Abrash.
The primary advantage of Mode X is that it has square pixels: a resolution of 320×240 instead of the standard VGA
Mode 13h Mode 13h is the standard 256-color mode on VGA graphics hardware introduced in 1987 with the IBM PS/2. It has a resolution of 320×200 pixels. It was used extensively in computer games and art/animation software of the late 1980s and early to mid- ...
which is 320×200. 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, it was first widely publicized in the Mode X articles, leading many programmers to consider Mode X and planar memory synonymous. It is possible to enable planar memory in standard 320×200 mode, which became known as Mode Y in the
Usenet
Usenet () is a worldwide distributed discussion system available on computers. It was developed from the general-purpose Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Ellis conceived the idea in 1979, and it was ...
rec.games.programmer group.
[Roberts, Dave. ''PC Game Programming Explorer''. The Coriolis Group, Scottsdale Arizona, 1994. . Page 106.]
Planar memory arrangement splits the pixels horizontally into groups of four. For any given byte in PC 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
In addition to unchained 320×200 being called Mode Y, Mode Q (short for "cube") is sometimes used to refer to a 256×256 256-color mode.
[Bas van Gaalen. ] The Y coordinate can simply 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.
References
{{reflist
External links
Graphics Programming Black Bookby
Michael Abrash
Michael Abrash is a programmer and technical writer specializing in code optimization and 80x86 assembly language. He wrote the 1990 book ''Zen of Assembly Language Volume 1: Knowledge'' and a monthly column in '' Dr. Dobb's Journal'' in the earl ...
, chapter
474849
Mode X tutorial at GameDev.net (archived copy)
Computer display standards