home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / doc / graphdoc / vga.txt < prev    next >
Text File  |  1994-01-18  |  26KB  |  517 lines

  1. 3C0h:  Attribute Controller: Address register
  2. bit 0-4  Address of data register to write to port 3C0h or read from port 3C1h
  3.          (Reads only on VGA).
  4.       5  If set screen output is enabled and the palette can not be modified,
  5.          if clear screen output is disabled and the palette can be modified.
  6.  
  7.  
  8. Port 3C0h is special in that it is both address and data-write register.
  9. Data reads happen from port 3C1h. An internal flip-flop remembers whether it
  10. is currently acting as address or data register.
  11. Accesses to the attribute controller must be separated by at least 250ns.
  12. Reading port 3dAh will reset the flip-flop to address mode.
  13.  
  14.  
  15. 3C0h index 0-Fh  (r/W):  Attribute: Palette
  16. bit   0  (EGA) Primary Blue
  17.       1  (EGA) Primary Green
  18.       2  (EGA) Primary Red
  19.       3  (EGA) Secondary Blue
  20.       4  (EGA) Secondary Green
  21.       5  (EGA) Secondary Red
  22.     0-5  (VGA) Index into the 256 color DAC table.
  23.                May be modified by 3C0h index 10h and 14h.
  24.  
  25. 3C0h index 10h (r/W):  Attribute: Mode Control Register
  26. bit   0  Graphics mode if set, Alphanumeric mode else.
  27.       1  Monochrome mode if set, color mode else.
  28.       2  9-bit wide characters if set.
  29.          The 9th bit of characters C0h-DFh will be the same as
  30.          the 8th bit. Otherwise it will be the background color.
  31.       3  If set Attribute bit 7 is blinking, else high intensity.
  32.       5  (VGA Only) If set the PEL panning register (3C0h index 13h) is
  33.          temporarily set to 0 from when the line compare causes a wrap around
  34.          until the next vertical retrace when the register is automatically
  35.          reloaded with the old value, else the PEL panning register ignores
  36.          line compares.
  37.       6  (VGA Only) If set pixels are 8 bits wide. Used in 256 color modes.
  38.       7  (VGA Only) If set bit 4-5 of the index into the DAC table are taken
  39.          from port 3C0h index 14h bit 0-1, else the bits in the palette
  40.          register are used.
  41.  
  42. 3C0h index 11h (r/W):  Attribute: Overscan Color Register.
  43. bit 0-5  Color of screen border. Color is defined as in the palette registers.
  44. Note: The EGA requires the Overscan color to be 0 in high resolution modes.
  45.  
  46. 3C0h index 12h (r/W):  Attribute: Color Plane Enable Register
  47. bit   0  Bit plane 0 is enabled if set.
  48.       1  Bit plane 1 is enabled if set.
  49.       2  Bit plane 2 is enabled if set.
  50.       3  Bit plane 3 is enabled if set.
  51.     4-5  Video Status MUX. Diagnostics use only.
  52.          Two attribute bits appear on bits 4 and 5 of the Input
  53.          Status Register 1 (3dAh).
  54.          Value       EGA            VGA
  55.            0      Red/Blue        Bit 2/Bit 0
  56.            1      Blue'/Green     Bit 5/Bit 4
  57.            2      Red'/Green'     Bit 3/Bit 1
  58.            3                      Bit 7/Bit 6
  59.  
  60. 3C0h index 13h (r/W):  Attribute: Horizontal PEL Panning Register
  61. bit 0-3  Indicates number of pixels to shift the display left
  62.          Value  9bit textmode   256color mode   Other modes
  63.            0          1               0              0
  64.            1          2              n/a             1
  65.            2          3               1              2
  66.            3          4              n/a             3
  67.            4          5               2              4
  68.            5          6              n/a             5
  69.            6          7               3              6
  70.            7          8              n/a             7
  71.            8          0              n/a            n/a
  72.  
  73. 3C0h index 14h (r/W):  Attribute: Color Select Register  (VGA Only)
  74. bit 0-1  If 3C0h index 10h bit 7 is set these 2 bits are used as bits 4-5 of
  75.          the index into the DAC table.
  76.     2-3  These 2 bits are used as bit 6-7 of the index into the DAC table
  77.          except in 256 color mode.
  78. Note: this register does not affect 256 color modes.
  79.  
  80. 3C2h (R):  Input Status #0 Register
  81. bit   4  Status of the switch selected by the Miscellaneous Output
  82.          Register 3C2h bit 2-3. Switch high if set.
  83.       5  (EGA Only) Pin 19 of the Feature Connector (FEAT0) is high if set
  84.       6  (EGA Only) Pin 17 of the Feature Connector (FEAT1) is high if set
  85.       7  (EGA Only ??) If set IRQ 2 has happened due to Vertical Retrace.
  86.          Should be cleared by IRQ 2 interrupt routine by clearing port 3d4h
  87.          index 11h bit 4.
  88.  
  89. 3C2h (W):  Miscellaneous Output Register
  90. bit   0  If set Color Emulation. Base Address=3Dxh else Mono Emulation. Base
  91.          Address=3Bxh.
  92.       1  Enable CPU Access to video memory if set
  93.     2-3  Clock Select
  94.           0: 14MHz(EGA)     25MHz(VGA)
  95.           1: 16MHz(EGA)     28MHz(VGA)
  96.           2: External(EGA)  Reserved(VGA)
  97.       4  (EGA Only) Disable internal video drivers if set
  98.       5  When in Odd/Even modes Select High 64k bank if set
  99.       6  Horizontal Sync Polarity. Negative if set
  100.       7  Vertical Sync Polarity. Negative if set
  101.          Bit 6-7 indicates the number of lines on the display:
  102.               0=200(EGA)  Reserved(VGA)
  103.               1=          400(VGA)
  104.               2=350(EGA)  350(VGA)
  105.               3=          480(VGA).
  106. Note: Set to all zero on a hardware reset.
  107. Note: On the VGA this register can be read from port 3CCh.
  108.  
  109. 3C3h (W):  Video Subsystem Enable Register
  110. bit   0  Enables the VGA display if set
  111.  
  112. 3C4h index  0  (r/W):  Sequencer: Reset
  113. bit   0  (EGA) Asynchronous Reset if clear
  114.       0  (VGA) Synchronous Reset just as bit 1
  115.       1  Synchronous Reset if clear
  116.  
  117. 3C4h index  1  (r/W):  Sequencer: Clocking Mode
  118. bit   0  If set character clocks are 8 dots wide, else 9.
  119.       1  (EGA Only) If set the CRTC uses 2/5 of the clock cycles, else 4/5.
  120.       2  If set loads video serializers every other character
  121.          clock cycle, else every one.
  122.       3  If set the Dot Clock is Master Clock/2, else same as
  123.          Master Clock (See 3C2h bit 2-3). (Doubles pixels).
  124.       4  (VGA Only) If set loads video serializers every fourth character
  125.          clock cycle, else every one.
  126.       5  (VGA Only) if set turns off screen and gives all memory cycles to the
  127.          CPU interface.
  128.  
  129. 3C4h index  2  (r/W):  Sequencer: Map Mask Register
  130. bit   0  Enable writes to plane 0 if set
  131.       1  Enable writes to plane 1 if set
  132.       2  Enable writes to plane 2 if set
  133.       3  Enable writes to plane 3 if set
  134.  
  135. 3C4h index  3  (r/W):  Sequencer: Character Map Select Register
  136. bit 0-1  (EGA) Selects EGA Character Map (0..3) if bit 3 of the character
  137.          attribute is clear.
  138.     2-3  (EGA) Selects EGA Character Map (0..3) if bit 3 of the character
  139.          attribute is set.
  140.   0,1,4  (VGA) Selects VGA Character Map (0..7) if bit 3 of the character
  141.          attribute is clear.
  142.   2,3,5  (VGA) Selects VGA Character Map (0..7) if bit 3 of the character
  143.          attribute is set.
  144. Note: Character Maps are placed at:
  145.       Map no. (EGA/VGA)       Map no. (VGA)
  146.          0       0k              4      8k
  147.          1      16k              5     24k
  148.          2      32k              6     40k
  149.          3      48k              7     56k
  150.  
  151. 3C4h index  4  (r/W):  Sequencer: Memory Mode Register
  152. bit   0  Set if in an alphanumeric mode, clear in graphics modes.
  153.       1  Set if more than 64kbytes on the adapter.
  154.       2  Enables Odd/Even addressing mode if set. Odd/Even mode places all odd
  155.          bytes in plane 1&3, and all even bytes in plane 0&2.
  156.       3  (VGA Only)  If set address bit 0-1 selects video memory planes
  157.          (256 color mode), rather than the Map Mask and Read Map Select
  158.          Registers.
  159.  
  160. 3C4h index 7 (R/W):  Sequencer Horizontal Character Counter Reset Register.
  161.                                                                    (VGA  Only)
  162. Note: Undocumented by IBM. May not be available in all clones.
  163.       A write to this register will cause the Horizontal Character Counter
  164.       to be held reset (=0) until a write happens to any of the Sequencer
  165.       registers index 0..6.
  166.       The Vertical Line counter is clocked by a signal derived from the
  167.       Horizontal Display Enable (which does not occur if the Horizontal
  168.       Character Counter is held reset).
  169.       Thus a write to index 7 during Vertical Retrace can stop the display
  170.       timing and allow software to start the next frame reasonably
  171.       synchronous to an external event.
  172.  
  173. 3C6h (R/W):  PEL Mask                                               (VGA Only)
  174. bit 0-7  This register is anded with the palette index sent for each dot.
  175.          Should be set to FFh.
  176.  
  177. 3C7h (R):  DAC State Register                                       (VGA Only)
  178. bit 0-1  0 indicates the DAC is in Read Mode and 3 indicates write mode.
  179.  
  180. 3C7h (W):  PEL Address Read Mode                                    (VGA Only)
  181. bit 0-7  The PEL data register (0..255) to be read from 3C9h.
  182. Note: After reading the 3 bytes at 3C9h this register will increment,
  183.       pointing to the next data register.
  184.  
  185. 3C8h (R/W):  PEL Address Write Mode                                 (VGA Only)
  186. bit 0-7  The PEL data register (0..255) to be written to 3C9h.
  187. Note: After writing the 3 bytes at 3C9h this register will increment, pointing
  188.       to the next data register.
  189.  
  190. 3C9h (R/W):  PEL Data Register                                      (VGA Only)
  191. bit 0-5  Color value
  192. Note:  Each read or write of this register will cycle through first the
  193.        registers for Red, Blue and Green, then increment the appropriate
  194.        address register, thus the entire palette can be loaded by writing 0 to
  195.        the PEL Address Write Mode register 3C8h and then writing all 768 bytes
  196.        of the palette to this register.
  197.  
  198. 3CAh (R):  Feature Control Register                                 (VGA Only)
  199. Bit   3  Vertical Sync Select. If set Vertical Sync to the monitor is the
  200.          logical OR of the vertical sync and the vertical display enable.
  201. Note: This register is written to port 3dAh and read from 3CAh.
  202.  
  203. 3CAh (W):  Graphics 2 Position                                      (EGA Only)
  204. bit 0-1  Select which bit planes should be controlled by Graphics Controller
  205.          #2. Always set to 1.
  206.  
  207. 3CCh (R):  Miscellaneous Output Register                            (VGA Only)
  208. bit   0  If set Color Emulation. Base Address=3Dxh else Mono Emulation. Base
  209.          Address=3Bxh.
  210.       1  Enable CPU Access to video memory if set
  211.     2-3  Clock Select. 0= 25MHz, 1= 28MHz, 2= Reserved
  212.       5  When in Odd/Even modes Select High 64k bank if set
  213.       6  Horizontal Sync Polarity. Negative if set
  214.       7  Vertical Sync Polarity. Negative if set
  215.          Bit 6-7 indicates the number of lines on the display:
  216.             0=Reserved, 1=400, 2=350, 3=480.
  217. Note: This register is written to port 3C2h and read from port 3CCh.
  218.  
  219. 3CCh (W):  Graphics 1 Position                                      (EGA Only)
  220. bit 0-1  Select which bit planes should be controlled by Graphics Controller
  221.          #1. Always set to 0.
  222.  
  223. 3CEh index  0  (r/W):  Graphics: Set/Reset Register
  224. bit   0  If in Write Mode 0 and bit 0 of 3CEh index 1 is set a write to
  225.          display memory will set all the bits in plane 0 of the byte to this
  226.          bit, if the corresponding bit is set in the Map Mask Register (3CEh
  227.          index 8).
  228.       1  Same for plane 1 and bit 1 of 3CEh index 1.
  229.       2  Same for plane 2 and bit 2 of 3CEh index 1.
  230.       3  Same for plane 3 and bit 3 of 3CEh index 1.
  231.  
  232. 3CEh index  1  (r/W):  Graphics: Enable Set/Reset Register
  233. bit   0  If set enables Set/reset of plane 0 in Write Mode 0.
  234.       1  Same for plane 1.
  235.       2  Same for plane 2.
  236.       3  Same for plane 3.
  237.  
  238. 3CEh index  2  (r/W):  Graphics: Color Compare Register
  239. bit 0-3  In Read Mode 1 each pixel at the address of the byte read is compared
  240.          to this color and the corresponding bit in the output set to 1 if
  241.          they match, 0 if not. The Color Don't Care Register (3CEh index 7)
  242.          can exclude bitplanes from the comparison.
  243.  
  244. 3CEh index  3  (r/W):  Graphics: Data Rotate
  245. bit 0-2  Number of positions to rotate data right before it is written to
  246.          display memory. Only active in Write Mode 0.
  247.     3-4  In Write Mode 2 this field controls the relation between the data
  248.          written from the CPU, the data latched from the previous read and the
  249.          data written to display memory:
  250.            0: CPU Data is written unmodified
  251.            1: CPU data is ANDed with the latched data
  252.            2: CPU data is ORed  with the latch data.
  253.            3: CPU data is XORed with the latched data.
  254.  
  255. 3CEh index  4  (r/W):  Graphics: Read Map Select Register
  256. bit 0-1  Number of the plane Read Mode 0 will read from.
  257.  
  258. 3CEh index  5  (r/W):  Graphics: Mode Register
  259. bit 0-1  Write Mode: Controls how data from the CPU is transformed before
  260.          being written to display memory:
  261.            0: Mode 0 works as a Read-Modify-Write operation.
  262.               First a read access loads the data latches of the EGA/VGA with
  263.               the value in video memory at the addressed location. Then a
  264.               write access will provide the destination address and the CPU
  265.               data byte. The data written is modified by the function code in
  266.               the Data Rotate register (3CEh index 3) as a function of the CPU
  267.               data and the latches, then data is rotated as specified by the
  268.               same register.  
  269.            1: Mode 1 is used for video to video transfers.
  270.               A read access will load the data latches with the contents of
  271.               the addressed byte of video memory. A write access will write
  272.               the contents of the latches to the addressed byte. Thus a single
  273.               MOVSB instruction can copy all pixels in the source address byte
  274.               to the destination address.
  275.            2: Mode 2 writes a color to all pixels in the addressed byte of
  276.               video memory. Bit 0 of the CPU data is written to plane 0 et
  277.               cetera. Individual bits can be enabled or disabled through the
  278.               Bit Mask register (3CEh index 8). 
  279.            3: (VGA Only) Mode 3 can be used to fill an area with a color and
  280.               pattern. The CPU data is rotated according to 3CEh index 3 bits
  281.               0-2 and anded with the Bit Mask Register (3CEh index 8). For
  282.               each bit in the result the corresponding pixel is set to the
  283.               color in the Set/Reset Register (3CEh index 0 bits 0-3) if the
  284.               bit is set and to the contents of the processor latch if the bit
  285.               is clear.
  286.       2  (EGA Only) Forces all outputs to a high impedance state if set.
  287.       3  Read Mode
  288.            0: Data is read from one of 4 bit planes depending on the Read Map
  289.               Select Register (3CEh index 4).
  290.            1: Data returned is a comparison between the 8 pixels occupying the
  291.               read byte and the color in the Color Compare Register (3CEh
  292.               index 2). A bit is set if the color of the corresponding pixel
  293.               matches the register.
  294.       4  Enables Odd/Even mode if set (See 3C4h index 4 bit 2).
  295.       5  Enables CGA style 4 color pixels using even/odd bit pairs if set.
  296.       6  (VGA Only) Enables 256 color mode if set.
  297.  
  298. 3CEh index  6  (r/W):  Graphics: Miscellaneous Register
  299. bit   0  Indicates Graphics Mode if set, Alphanumeric mode else.
  300.       1  Enables Odd/Even mode if set.
  301.     2-3  Memory Mapping:
  302.            0: use A000h-BFFFh
  303.            1: use A000h-AFFFh   EGA/VGA Graphics modes
  304.            2: use B000h-B7FFh   Monochrome modes
  305.            3: use B800h-BFFFh   CGA modes
  306.  
  307. 3CEh index  7  (r/W):  Graphics: Color Don't Care Register
  308. bit   0  Ignore bit plane 0 in Read mode 1 if clear.
  309.       1  Ignore bit plane 1 in Read mode 1 if clear.
  310.       2  Ignore bit plane 2 in Read mode 1 if clear.
  311.       3  Ignore bit plane 3 in Read mode 1 if clear.
  312.  
  313. 3CEh index  8  (r/W):  Graphics: Bit Mask Register
  314. bit 0-7  Each bit if set enables writing to the corresponding bit of a byte in
  315.          display memory.
  316.  
  317. 3d4h index  0  (r/W):  CRTC: Horizontal Total Register
  318. bit 0-7  (EGA) Horizontal Total Character Clocks-2
  319.     0-7  (VGA) Horizontal Total Character Clocks-5
  320.  
  321. 3d4h index  1  (r/W):  CRTC: Horizontal Display End Register
  322. bit 0-7  Number of Character Clocks Displayed -1
  323.  
  324. 3d4h index  2  (r/W):  CRTC: Start Horizontal Blanking Register
  325. bit 0-7  The count at which Horizontal Blanking starts
  326.  
  327. 3d4h index  3  (r/W):  CRTC: End Horizontal Blanking Register
  328. bit 0-4  Horizontal Blanking ends when the last 5 (6 for VGA) bits of the
  329.          character counter equals this field.
  330.          (VGA) The sixth bit is found in port 3d4h index 5 bit 7.
  331.     5-6  Number of character clocks to delay start of display after Horizontal
  332.          Total has been reached.
  333.       7  (VGA Only) Access to Vertical Retrace registers if set. If clear
  334.          reads to 3d4h index 10h and 11h access the Lightpen read back
  335.          registers ?? 
  336.  
  337. 3d4h index  4  (r/W):  CRTC: Start Horizontal Retrace Register
  338. bit 0-7  Horizontal Retrace starts when the Character Counter reaches this
  339.          value.
  340.  
  341. 3d4h index  5  (r/W):  CRTC: End Horizontal Retrace Register
  342. bit 0-4  Horizontal Retrace ends when the last 5 bits of the character counter
  343.          equals this value.
  344.     5-6  Number of character clocks to delay start of display after Horizontal
  345.          Retrace.
  346.       7  (EGA) Provides Smooth Scrolling in Odd/Even mode. When set display
  347.          starts from an odd byte.
  348.       7  (VGA) bit 5 of the End Horizontal Blanking count (See 3d4h index 3
  349.          bit 0-4).
  350.  
  351. 3d4h index  6  (r/W):  CRTC: Vertical Total Register
  352. bit 0-7  Lower 8 bits of the Vertical Total. Bit 8 is found in 3d4h index 7
  353.          bit 0. (VGA) Bit 9 is found in 3d4h index 7 bit 5.
  354. Note: For the VGA this value is the number of scan lines in the display -2.
  355.  
  356. 3d4h index  7  (r/W):  CRTC: Overflow Register
  357. bit   0  Bit 8 of Vertical Total (3d4h index 6)
  358.       1  Bit 8 of Vertical Display End (3d4h index 12h)
  359.       2  Bit 8 of Vertical Retrace Start (3d4h index 10h)
  360.       3  Bit 8 of Start Vertical Blanking (3d4h index 15h)
  361.       4  Bit 8 of Line Compare Register (3d4h index 18h)
  362.       5  (VGA) Bit 9 of Vertical Total (3d4h index 6)
  363.       6  (VGA) Bit 9 of Vertical Display End (3d4h index 12h)
  364.       7  (VGA) Bit 9 of Vertical Retrace Start (3d4h index 10h)
  365.  
  366. 3d4h index  8  (r/W):  CRTC: Preset Row Scan Register
  367. bit 0-4  Number of lines we have scrolled down in the first character row.
  368.          Provides Smooth Vertical Scrolling.
  369.     5-6  (VGA Only) Number of bytes to skip at the start of scanline. Provides
  370.          Smooth Horizontal Scrolling together with the Horizontal Panning
  371.          Register (3C0h index 13h).
  372.  
  373. 3d4h index  9  (r/W):  CRTC: Maximum Scan Line Register
  374. bit 0-4  Number of scan lines in a character row -1. In graphics modes this is
  375.          the number of times (-1) the line is displayed before passing on to
  376.          the next line (0: normal, 1: double, 2: triple...).
  377.          This is independent of bit 7, except in CGA modes which seems to
  378.          require this field to be 1 and bit 7 to be set to work.
  379.       5  (VGA) Bit 9 of Start Vertical Blanking
  380.       6  (VGA) Bit 9 of Line Compare Register
  381.       7  (VGA) Doubles each scan line if set.
  382.          I.e. displays 200 lines on a 400 display.
  383.  
  384. 3d4h index  Ah (r/W):  CRTC: Cursor Start Register
  385. bit 0-4  First scanline of cursor within character.
  386.       5  (VGA) Turns Cursor off if set
  387.  
  388. 3d4h index  Bh (r/W):  CRTC: Cursor End Register
  389. bit 0-4  Last scanline of cursor within character
  390.     5-6  Delay of cursor data in character clocks.
  391.  
  392. 3d4h index  Ch (r/W):  CRTC: Start Address High Register
  393. bit 0-7  Upper 8 bits of the start address of the display buffer
  394.  
  395. 3d4h index  Dh (r/W):  CRTC: Start Address Low Register
  396. bit 0-7  Lower 8 bits of the start address of the display buffer
  397.  
  398. 3d4h index  Eh (r/W):  CRTC: Cursor Location High Register
  399. bit 0-7  Upper 8 bits of the address of the cursor
  400.  
  401. 3d4h index  Fh (r/W):  CRTC: Cursor Location Low Register
  402. bit 0-7  Lower 8 bits of the address of the cursor
  403.  
  404. 3d4h index 10h (R):  CRTC: Light Pen High Register     (EGA Only)
  405. bit 0-7  (EGA Only)  Upper 8 bits of the address of the lightpen position.
  406.  
  407. 3d4h index 10h (r/W):  CRTC: Vertical Retrace Start Register
  408. bit 0-7  Lower 8 bits of Vertical Retrace Start. Vertical Retrace starts when
  409.          the line counter reaches this value. Bit 8 is found in 3d4h index 7
  410.          bit 2. (VGA Only) Bit 9 is found in 3d4h index 7 bit 7.
  411.  
  412. 3d4h index 11h (R):  CRTC: Light Pen Low Register                   (EGA Only)
  413. bit 0-7  (EGA Only)  Lower 8 bits of the address of the lightpen position.
  414.  
  415. 3d4h index 11h (r/W):  CRTC: Vertical Retrace End Register
  416. bit 0-3  Vertical Retrace ends when the last 4 bits of the line counter equals
  417.          this value.
  418.       4  if clear Clears pending Vertical Interrupts.
  419.       5  Vertical Interrupts (IRQ 2) disabled if set. Can usually be left
  420.          disabled, but some systems (including PS/2) require it to be enabled.
  421.       6  (VGA Only) If set selects 5 refresh cycles per scanline rather
  422.          than 3.
  423.       7  (VGA Only) Disables writing to registers 0-7 if set 3d4h index 7
  424.          bit 4 is not affected by this bit.
  425.  
  426. 3d4h index 12h (r/W):  CRTC: Vertical Display End Register
  427. bit 0-7  Lower 8 bits of Vertical Display End. The display ends when the line
  428.          counter reaches this value. Bit 8 is found in 3d4h index 7 bit 1.
  429.          (VGA Only) Bit 9 is found in 3d4h index 7 bit 6.
  430.  
  431. 3d4h index 13h (r/W):  CRTC: Offset register
  432. bit 0-7  Number of bytes in a scanline / K. Where K is 2 for byte mode, 4 for
  433.          word mode and 8 for Double Word mode.
  434.  
  435. 3d4h index 14h (r/W):  CRTC: Underline Location Register
  436. bit 0-4  Position of underline within Character cell.
  437.       5  (VGA Only) If set memory address is only changed every fourth
  438.          character clock.
  439.       6  (VGA Only) Double Word mode addressing if set
  440.  
  441. 3d4h index 15h (r/W):  CRTC: Start Vertical Blank Register
  442. bit 0-7  Lower 8 bits of Vertical Blank Start. Vertical blanking starts when
  443.          the line counter reaches this value. Bit 8 is found in 3d4h index 7
  444.          bit 3.
  445.  
  446. 3d4h index 16h (r/W):  CRTC: End Vertical Blank Register
  447. bit 0-4  (EGA) Vertical blanking stops when the lower 5 bits of the line
  448.          counter equals this field.
  449.     0-6  (VGA) Vertical blanking stops when the lower 7 bits of the line
  450.          counter equals this field.
  451.  
  452. 3d4h index 17h (r/W):  CRTC: Mode Control Register
  453. bit   0  If clear use CGA compatible memory addressing system
  454.          by substituting character row scan counter bit 0 for address bit 13,
  455.          thus creating 2 banks for even and odd scan lines.
  456.       1  If clear use Hercules compatible memory addressing system by
  457.          substituting character row scan counter bit 1 for address bit 14,
  458.          thus creating 4 banks.
  459.       2  If set increase scan line counter only every second line.
  460.       3  If set increase memory address counter only every other character
  461.          clock.
  462.       4  (EGA Only) If set disable the EGA output drivers. This bit is used
  463.          for other purposes in some Super VGA chips.
  464.       5  When in Word Mode bit 15 is rotated to bit 0 if this bit is set else
  465.          bit 13 is rotated into bit 0.
  466.       6  If clear system is in word mode. Addresses are rotated 1 position up
  467.          bringing either bit 13 or 15 into bit 0.
  468.       7  Clearing this bit will reset the display system until the bit is set
  469.          again.
  470.  
  471. 3d4h index 18h (r/W):  CRTC: Line Compare Register
  472. bit 0-7  Lower 8 bits of the Line Compare. When the Line counter reaches this
  473.          value, the display address wraps to 0. Provides Split Screen
  474.          facilities. Bit 8 is found in 3d4h index 7 bit 4.
  475.          (VGA Only) Bit 9 is found in 3d4h index 9 bit 6.
  476.  
  477. 3d4h index 22h (R):  Memory Latch Register                       (VGA - Undoc)
  478. bit 0-7  Reads the contents of the Graphics Controller Memory Data Latch for
  479.          the plane selected by 3C0h index 4 bit 0-1 (Read Map Select).
  480. Note: This register is not documented by IBM and may not be available on all
  481.       clones.
  482.  
  483. 3d4h index 24h (R):  Attribute Controller Toggle Register.       (VGA - Undoc)
  484. bit 0-4  Attribute Controller Index. 
  485.          The current value of the Attribute Index Register.
  486.       5  Palette Address Source. Same as 3C0h bit 5.
  487.       7  If set next read or write to 3C0h will access the data register.       
  488. Note: This register is not documented by IBM and may not be available on all
  489.       clones.
  490.  
  491. 3d4h index 30h-3Fh (W):  Clear Vertical Display Enable.          (VGA - Undoc)
  492. bit   0  Setting this bit will clear the Vertical Display Enable thus blanking
  493.          the display for the rest of the frame and giving the CPU total access
  494.          to display memory until the start of the next frame.
  495. Note: This register is not documented by IBM and may not be available on all
  496.       clones.
  497.  
  498. 3dAh (R):  Input Status #1 Register
  499. bit   0  Either Vertical or Horizontal Retrace active if set
  500.       1  (EGA Only) Light Pen has triggered if set
  501.       2  (EGA Only) Light Pen switch is open if set
  502.       3  Vertical Retrace in progress if set
  503.     4-5  (EGA Only) Shows two of the 6 color outputs, depending on 3C0h index
  504.          12h bit 4-5:
  505.           Attr: Bit 4-5:   Out bit 4  Out bit 5
  506.                    0          Blue       Red
  507.                    1        I Blue       Green
  508.                    2        I Red      I Green
  509.  
  510. 3dAh (W):  Feature Control Register
  511. bit   0  (EGA Only) Output to pin 21 of the Feature Connector.
  512.       1  (EGA Only) Output to pin 20 of the Feature Connector.
  513.       3  (VGA Only) Vertical Sync Select. If set Vertical Sync to the monitor
  514.          is the logical OR of the vertical sync and the vertical display
  515.          enable.
  516. Note: On the VGA this register can be read from port 3CAh.
  517.