]> 4ch.mooo.com Git - 16.git/blob - src/lib/modex/mode-x.txt
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / src / lib / modex / mode-x.txt
1 The following is a FAQ (Frequently Asked Question) summary of \r
2 information and assembly routines for Mode "X" Graphics.\r
3 \r
4 An overview of Mode "X" for the VGA Adaptor:\r
5 \r
6 1) Mode "X" is a 256 color graphics mode that is available on *ANY* VGA\r
7 card with the minimum of 256K video RAM.  It is capable of providing\r
8 higher resoultions than the only "Official" 256 color mode, mode 13h.\r
9 (In quickbasic that is mode 13)\r
10 \r
11 2) Mode "X" comes in 8 different flavors: 320 or 360 pixels\r
12 horizontally, and 200, 240, 400, and 480 pixels vertically.\r
13 \r
14 3) Since mode X is not supported by the VGA BIOS, there is no built in\r
15 support for it.  A program must provide its own routines for *ALL*\r
16 operations in Mode "X", including setting up the video mode.\r
17 \r
18 4) Unlike Mode 13h, which has one display page, Mode "X" allows from 1\r
19 to 4 video pages, depending upon the resoultion selected.  The reason\r
20 that Mode 13h has but one page is that it activates a VGA hardware\r
21 feature known as CHAIN4, which prevents access to all but 64K of VGA's\r
22 video RAM.  CHAIN4 is what provides mode 13h's linear addres space.\r
23 \r
24 5) Unlike Mode 13h, where each 256 color (1-byte) pixel has a unique\r
25 address in the E000: segement, in Mode X there are Four (4) Pixels\r
26 at each address in E000: segment.  The VGA's control registers allow you\r
27 to control which of the 4 pixels is currently available at an address.\r
28 \r
29 6) It is possible to use the VGA's control registers to operate on 2 or\r
30 more of the Pixels at the same address at the same time.  The CPU can\r
31 write one color value, and set up to 4 pixels with that value at the\r
32 same time.\r
33 \r
34 7) Video RAM that is not being used for the current screen display can\r
35 be used to store images and patterns.  These images and patterns can be\r
36 copied to other parts of the Video RAM 4 bytes (32 bits) at a time,\r
37 which is much faster than the 8 bits (1 byte) at time that is possible\r
38 over the ISA BUS.  (16 Bit BUS operations can produce erroneous results)\r
39 \r
40 If anything is unclear, inadequate, or you just plain want to know more \r
41 or have other specific questions, please send me a message.\r
42 \r
43 \r
44 -Matt Pritchard\r