Graphics cards in PC compatible systems: The first pc-compatibles had text-only monochrome display modes (using the MDA adapter) or limited color and resolution modes (using the CGA adapter). After some years came EGA adapters, they provided up to 16 colors and 640x350 pixel screen images .... and there problems started. "Old" PC-compatibles had a 128k "hole" in their memory map located between address A000:0000 and C000:0000 where a display adapter could "locate" it's memory to let the cpu directly access it. A "clean design" display card with 64k..256k display ram should have been designed with the capability to address at least the full 128k "adressing window" .... ... but EGA was an evolution of a previous card designed to let the cpu access the display ram in 64k blocks. The problem other was that CGA adapter ram was mapped at B800:0000 ... C000:0000 and MDA adapter was mapped starting at B000:0000. Because it was possible to install TWO display cards (one EGA and one MDA/CGA) and EGA card could NOT ALWAYS use the B000:0000 ... C000:0000 range. For these reasons, a EGA card in graphics mode lets you access memory thru a 64k "addressing window" mapped at A000:0000...B000:0000. In 16 color mode every pixel is mapped as 4 bits the first located in the first 64k block, the second in the second block and so on. Every pixel was mapped as 4 bits "stacked" on the same address (FOUR BITPLANES) by changing some register values you could "change the accessible 64k block" and indipendently access every bit, or if you needed to access pixels "in a single" operation, you could set a special "masking" mode to let you draw up to eight pixels in a single step. Then came VGA, vga was really an EGA-on-steroids with higher 16 color resolution (up to 640x480) and an extra 320x200 256 colors mode (mode 13h). Mode 13h was a so called 8bit mode (where 1 pixel maps to 1 byte). In mode 13h a screen image "maps" into a 64000 bytes block. When in mode 13h you don't need to worry about strange memory layouts the "screen" starts at A000:0000 the A000h:0000h byte is the row 0, colum 0 pixel, the A000h:0001h byte is the row 0, column 1 pixel, ..... the A000h:0140h byte is the row 1, column 0 pixel, .... At last a "linear mapped" screen mode! But mode 13h used just 64k while a VGA has 256k! To "unlock" the extra kbytes and get up to FOUR 320x200 256 color disply pages you need to "turn on" mode 13h and then "turn on" the 16color "mapping model" with some twists. If you do this correcly you get what is called MODE-X. Under mode-x you have again the four "stacked" 64k blocks but this time a screen image is "dispersed" in bytes between the four planes: a single "cpu address" maps FOUR CONSECUTIVE pixels. So for example: the A000:0000 byte maps "in four planes" the row 0,column 0 pixel (plane 0) the row 0,column 1 pixel (plane 1) the row 0,column 2 pixel (plane 2) the row 0,column 3 pixel (plane 3) the A000:0001 byte maps "in four planes" the row 0,column 4 pixel (plane 0) the row 0,column 5 pixel (plane 1) the row 0,column 6 pixel (plane 2) the row 0,column 7 pixel (plane 3) And so on .... The problem with mode-x is that it lets you access up to 256k in a contorted way, but no more. Current SuperVGA cards have 1Mbyte of ram or more... To let you access this extra ram the SVGA designers added another "paging" method. When SVGA modes are active, display memory is "visible to the graphics chips" as a linear block of memory, but the CPU can see it only in 64k blocks , to change the "visible" block the CPU must change the value of a "dispaly paging" register. This SVGA paging is not starndardized, some boards allow TWO "visible" blocks with sizes ranging from 32k to 128k both read/write or one readable and the other writable or just a single read/write block. This explains why very few dos programs handle SVGA modes. To take care of this Windows uses DISPLAY DEVICE DRIVERS (software modules that lets you handle the screen device in a unified way "hiding" the different paging and mapping methods). The VESA consortium added an "extended bios" specification to let dos programs "virtualize" the different svga cards. The VESA BIOS (either included into ROM on a svga card or provided as a TSR program) lets you control paging and video mode initalization of different svga cards in an unified way. A recent addition to this "addressing chaos" is LINEAR APERTURE MAPPING. On newer cards (well, even on old ET3000 cards) you can tell the display card to "map" all the display memory as a countigous block into extended memory (memory above the first megabyte). This way, once you get the "base address" of the linear block you don't have to worry about paging and run your graphics code at full speed (because with fully linear mapping you eliminate the "limit checking" needed to detect when to "change page"). 386Power "runs alone" in protected mode, so the XVD drivers have been designed to: a) ALWAYS map memory in linear mode b) UNIFY the video page addressing modes c) TAKE ADVANTAGE OF LINEAR APERTURE (if possible) because of this ... a) The XVD driver must be capable to map MULTIPLE 320x200 pages on every svga board. If higher resolution modes are possible,it can use 'em with or without paging. b) Video paging is assumed to be possible in single readable/writable 64k blocks with a 64k granularity (this was the lowest common denominator) If different layouts are present, the driver can "convert on the flight" to an equivalent single 64k page layout. c) It is possible to check for linear aperture and enable it. The XVD driver provides "just the basics", the other things are up to the "video module". The current 386video module just handles multi-page 320x200 video modes (well if you want to "turn on" the extra functionalities of XVD driver, simple enhance 386video).