Mail Archives: djgpp/1997/01/30/05:19:35
Dim Zegebart writes:
>Since I spend all my time in standart VESA modes,
>I'm wonder - what is Mode-X. And what benefits it has ?
It's a non-standard VGA resolution, undocumented by IBM and not
supported by the BIOS mode setting routines (hence it has no mode
number, which is why it's called 'X'). It's based on the standard
320x200 256 color res (mode 13h) but 'unchains' the memory interface,
which means using the plane hardware designed for use in 16 color modes
to access VGA memory outside the first 64k. This results in a strange
memory addressing scheme where 0xA0000 can refer to any of the first
four pixels on the screen, depending which write plane you have
selected, 0xA0001 can refer to any of pixels 4-7, etc. The big benefits
are that you can tweak the screen size to get resolutions like 320x240,
320x400, 360x240, and 360x480, and that since you can access all 256k of
the VGA's memory, you can use hardware scrolling and page flipping
techniques. The big disadvantage is the need to keep changing the plane
registers, which on modern hardware means that it is usually slower than
SVGA modes (although in some situtations the planes can be very useful,
as they can be used to copy/write four pixels with a single cpu byte
operation).
For a really good explanation of all the ins and outs of mode-X coding,
read Michael Abrash's articles from DDJ (these are available from
x2ftp).
/*
* Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
* Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
*/
- Raw text -