home *** CD-ROM | disk | FTP | other *** search
/ BBS 1 / BBS#1.iso / document / vgadoc.arj / XGA.DOC < prev    next >
Text File  |  1991-12-05  |  7KB  |  202 lines

  1.   
  2.      Currently the XGA exists only in Microchannel versions.
  3.  
  4.      All register accesses happen through a block of 16 registers starting
  5.      at a adapter dependant register (called xga in the following).
  6.      The register xga+0Ah works as an indexed register ie. xga+0Ah is the
  7.      index register and xga+0Bh is the data register.
  8.  
  9.  
  10.  
  11.  
  12.      xga+0:  Operating Mode
  13.        bit 0  Set if VGA, clear if dual monitor.
  14.            2  Set if in an extended mode.
  15.  
  16.      xga+1:  Video Memory Aperture Control
  17.              0 disables 64k aperture
  18.  
  19.      xga+4:  Interrupt Enable
  20.              0 disables interrupts.
  21.  
  22.      xga+5:  Interrupt Status
  23.        bit 0   Start of blanking
  24.              writing 0FFh clears interrupts.
  25.  
  26.      xga+6:  Virtual Memory Control
  27.  
  28.      xga+8:  Video Memory Aperture Index.
  29.      bit 0-7  64k bank number.
  30.  
  31.      xga+9:  Memory Access Mode
  32.              set to 2 in 16 color modes, 3 in 256 color modes and
  33.              4 in 65536 color modes.
  34.  
  35.      xga+Ah index 10h: Horizontal Total low.
  36.      bit 0-7  lower 8 bits of the total number of character clocks
  37.               in a scanline.
  38.  
  39.      xga+Ah index 11h: Horizontal Total high.
  40.      bit 0-7  upper 8 bits of the total number of character clocks
  41.               in a scanline.
  42.  
  43.      xga+Ah index 12h: Horizontal Displayed low.
  44.      bit 0-7  lower 8 bits of the number of displayed character clocks
  45.               in a scanline.
  46.  
  47.      xga+Ah index 13h: Horizontal Displayed high.
  48.      bit 0-7  upper 8 bits of the number of displayed character clocks
  49.               in a scanline.
  50.  
  51.      xga+Ah index 14h: Horizontal Blanking Start low.
  52.      bit 0-7  lower 8 bits of the count at which blanking starts.
  53.  
  54.      xga+Ah index 15h: Horizontal Blanking Start high.
  55.      bit 0-7  upper 8 bits of the count at which blanking starts.
  56.  
  57.      xga+Ah index 16h: Horizontal Blanking End low.
  58.      bit 0-7  lower 8 bits of the count at which blanking ends.
  59.  
  60.      xga+Ah index 17h: Horizontal Blanking End high.
  61.      bit 0-7  upper 8 bits of the count at which blanking ends.
  62.  
  63.      xga+Ah index 18h: Horizontal Sync Start low.
  64.      bit 0-7  lower 8 bits of the Horizontal Sync Start.
  65.  
  66.      xga+Ah index 19h: Horizontal Sync Start high.
  67.      bit 0-7  upper 8 bits of the Horizontal Sync Start.
  68.  
  69.      xga+Ah index 1Ah: Horizontal Sync End low.
  70.      bit 0-7  lower 8 bits of the Horizontal Sync End.
  71.  
  72.      xga+Ah index 1Bh: Horizontal Sync End high.
  73.      bit 0-7  upper 8 bits of the Horizontal Sync End.
  74.  
  75.      xga+Ah index 1Ch: Horizontal Sync Position.
  76.      bit 0-7  lower 8 bits of the Horizontal sync position.
  77.  
  78.      xga+Ah index 1Eh: Horizontal Sync Position.
  79.      bit 0-7  upper 8 bits of the Horizontal sync position.
  80.  
  81.      xga+Ah index 20h: Vertical Total low.
  82.      bit 0-7  lower 8 bits of the total number of scanlines.
  83.  
  84.      xga+Ah index 21h: Vertical Total high.
  85.      bit 0-7  upper 8 bits of the total number of scanlines.
  86.  
  87.      xga+Ah index 22h: Vertical Displayed End low.
  88.      bit 0-7  lower 8 bits of the number of displayed scanlines.
  89.  
  90.      xga+Ah index 23h: Vertical Displayed End high.
  91.      bit 0-7  upper 8 bits of the number of displayed scanlines.
  92.  
  93.      xga+Ah index 24h: Vertical Blanking Start low.
  94.      bit 0-7  lower 8 bits of the Vertical Blanking Start.
  95.  
  96.      xga+Ah index 25h: Vertical Blanking Start high.
  97.      bit 0-7  upper 8 bits of the Vertical Blanking Start.
  98.  
  99.      xga+Ah index 26h: Vertical Blanking End low.
  100.      bit 0-7  lower 8 bits of the Vertical Blanking End.
  101.  
  102.      xga+Ah index 27h: Vertical Blanking End high.
  103.      bit 0-7  upper 8 bits of the Vertical Blanking End.
  104.  
  105.      xga+Ah index 28h: Vertical Sync Start low.
  106.      bit 0-7  lower 8 bits of the Vertical Sync Start.
  107.  
  108.      xga+Ah index 29h: Vertical Sync Start high.
  109.      bit 0-7  upper 8 bits of the Vertical Sync Start.
  110.  
  111.      xga+Ah index 2Ah: Vertical Sync End.
  112.      bit 0-7  .
  113.  
  114.      xga+Ah index 2Ch: Vertical Line Compare low.
  115.      bit 0-7  lower 8 bits of the Line Compare register.
  116.  
  117.      xga+Ah index 2Dh: Vertical Line Compare high.
  118.      bit 0-7  upper 8 bits of the Line Compare register.
  119.  
  120.      xga+Ah index 36h: Sprite Control.
  121.  
  122.      xga+Ah index 40h: Start Address low.
  123.      bit 0-7  bit 0-7 of the display start address.
  124.  
  125.      xga+Ah index 41h: Start Address middle.
  126.      bit 0-7  bit 8-15 of the display Start Address.
  127.  
  128.      xga+Ah index 42h: Start Address high.
  129.      bit 0-7  bit 16-23 of the display Start Address.
  130.  
  131.      xga+Ah index 43h: Pixel Map Width low.
  132.      bit 0-7  lower 8 bits of the Pixel Map Width.
  133.  
  134.      xga+Ah index 44h: Pixel Map Width high.
  135.      bit 0-7  upper 8 bits of the Pixel Map Width.
  136.  
  137.      xga+Ah index 50h: Display Mode 1.
  138.               7=800x600, Fh=1024x768 and C7h=640x480.
  139.  
  140.      xga+Ah index 51h: Display Mode 2.
  141.               2=16 color mode, 3=256 color mode and 4=64k color mode.
  142.  
  143.      xga+Ah index 52h: Monitor type.
  144.      bit   2  Clear if capable of 1024x768.
  145.  
  146.      xga+Ah index 54h: Clock Select.
  147.               0=640x480, 1=800x600, Dh=1024x768 and 4=VGA.
  148.  
  149.      xga+Ah index 55h: Border Color.
  150.  
  151.      xga+Ah index 60h: Palette Address Index low.
  152.      bit 0-7  lower 8 bits of the Palette Address Index.
  153.  
  154.      xga+Ah index 61h: Palette Address Index high.
  155.      bit 0-7  upper 8 bits of the Palette Address Index.
  156.  
  157.      xga+Ah index 62h: Sprite Pre low.
  158.      bit 0-7  lower 8 bits of the Sprite Pre.
  159.  
  160.      xga+Ah index 63h: Sprite Pre high.
  161.      bit 0-7  upper 8 bits of the Sprite Pre.
  162.  
  163.      xga+Ah index 64h: Palette Access.
  164.               0 disables display, FFh enables display.
  165.  
  166.      xga+Ah index 65h: Palette Data Port.
  167.      bit 0-7  Palette data is read and written to this port.
  168.               Each read or write of the register will increment the
  169.               palette address, first through the Red, Green Blue
  170.               cycle, and then increment the Palette Address Index.
  171.  
  172.      xga+Ah index 66h: Palette Mode.
  173.  
  174.      xga+Ah index 70h: External Clock.
  175.  
  176.  
  177.   Video Modes:
  178.    
  179.     640x480   256 colors
  180.     640x480 65536 colors
  181.     800x600    16 colors
  182.     800x600   256 colors
  183.     800x600 65536 colors  
  184.    1024x768    16 colors
  185.    1024x768   256 colors
  186.     
  187.    
  188.    All modes use a linear address mode, where bits 16-23 of the address 
  189.    are in the Video Aperture Index register (xga+8), and the lower 16 bits 
  190.    are the offset from 0A000:0.
  191.  
  192.    In 16 color modes two pixels are stored in each byte. Even pixels are in
  193.    bits 0-3 and odd pixels in bits 4-7.
  194.    Address of pixel = (row *(pixels per row)+coloumn) /2.
  195.  
  196.    In 256 color modes each pixel occupies a byte. The pixels are addressed
  197.    in linear fashion. Address of pixel = row *(pixels per row) + coloumn.
  198.  
  199.    In 65536 color modes each pixel occupies two bytes.
  200.    Address of pixel = (row *(pixels per row)+coloumn)*2.
  201.  
  202.