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

  1. Avance Logic ALG Graphics Accelerator
  2.  
  3. The ALG chips is a VGA controller with a built in graphics coprocessor (COP).
  4. The ALG chips only works in AT and better systems as it uses 16 bit I/O addresses.
  5.  
  6. ALG2101  2Mb, 1280x1024x256c, 800x600x64k
  7. ALG2201
  8. ALG2228  2MB, 1280x1024x256c, 1024x768x32k/64k, 800x600x16m
  9.  
  10.  
  11. Support chips:
  12.  
  13.  
  14. ALG1101   16bit DAC
  15. ALG3102   Clock chip
  16.  
  17.  
  18. 3C0h index 15h (R/W):  Cursor Foreground
  19. bit  0-7  The HW cursor foreground color
  20.  
  21. 3C0h index 16h (R/W):  Cursor Background
  22. bit  0-7  The HW cursor background color
  23. Note: When updating index 15h and 16h it may be necessary to explicitly
  24.       preserve index 11h and 12h.
  25.  
  26. 3CEh index  Ah
  27.  
  28. 3CEh index  Bh
  29.  
  30. 3CEh index  Ch (R/W): 
  31. bit    4  (256/65k color modes) If set the Display Start Address (3d4h index
  32.           Ch-Dh + 20h) and the Offset (3D4h index 13h) are in units of 8
  33.           bytes. If clear in units of 4 bytes and the pixels are doubled on
  34.           the screen (Mode 13h).
  35.        5  ?
  36.        6  ?
  37.  
  38. 3CEh index  Dh (R/W): Fill Color
  39. bit  0-7  Used as fill color by Coprocessor.
  40.  
  41. 3CEh index  Fh (R/W):
  42. bit    2  Set to enable the Read bank.
  43.  
  44. 3d4h index 19h (R/W):
  45. bit    0  Interlace enabled if set.
  46.        1  If set enables access to video memory above 256K.
  47.        4  HiColor mode if set
  48.  
  49. 3d4h index 1Ah (R/W):
  50. bit    1  If set display wraps at 512K ??
  51.        4  If set enables access to extended registers
  52.  
  53. 3d4h index 1Bh
  54.  
  55. 3d4h index 1Ch
  56.  
  57. 3d4h index 1Eh (R/W): 
  58. bit  0-1  Video memory. 0=256k, 1=512k, 2=1M, 3=2Mbytes.
  59.      6-7  Max Horizontal Frequency:  0=38kHz, 1=48kHz, 2=56kHz, 3=64kHz.
  60.  
  61. 3d4h index 1Fh (R/W):
  62. bit  0-1  Emulation. 0=VGA, 1=EGA, 2=CGA,3=MDA 
  63.  
  64. 3d4h index 20h (R/W):
  65. bit  0-2  Display start address bit 16-18.
  66. Note: if 3CEh index Ch bit 4 is set, the display start is in units of 8 bytes,
  67.       rather than 4 as in std vga.
  68.  
  69. 3d4h index 21h (R/W):  Cursor X position
  70. bit  0-7  Bits 3-10 of the HW cursor X position. The lower bits are in index
  71.           25h.
  72.  
  73. 3d4h index 23h (R/W):  Cursor Y position
  74. bit  0-7  Bits 1-8 of the HW cursor Y position. The upper bits are in index
  75.           25h.
  76. Note: in non-interlaced modes (3d4h index 19h bit 0 is 0) the Y co-ordinate
  77.       should be multiplied by 2.
  78.  
  79. 3d4h index 25h (R/W):  Cursor control
  80. bit  0-1  Bit 9-10 of the HW cursor Y position. The lower bits are in index
  81.           23h
  82.      2-4  Bits 0-2 of the HW cursor X position. The upper bits are in index
  83.           21h
  84.        5  If set enables the HW cursor. To preserve the stability of the
  85.           cursor, this bit should be set with each update of this register.
  86.        6  Bit 0 of the HW cursor Y position. (see note on interlace).
  87.  
  88. 3d4h index 27h W(R/W):  Cursor Map address
  89. bit 0-10  The address in video memory where the HW cursor map starts.
  90.           In planar modes this address is in units of 256 bytes,
  91.           in packed modes in units of 1024 bytes.
  92.           The HW cursor is a 64x64 bitmap imposed on the display.
  93.           The cursor map is stored as a 64x64x2bit array, where each pixel is:
  94.              0: Background color (3C0h index 16h)
  95.              1: Foreground color (3C0h index 15h)
  96.              2: The screen data (transparent cursor).
  97.              3: Inverted screen data (XOR cursor)
  98. Note: in interlaced modes the cursor is shown double height.
  99.  
  100. 3D6h (R/W):  Read Bank Register
  101. bit  0-4  64k Read bank number. If 3CEh index Fh bit 2 is set all reads use
  102.           this bank number, if clear all accesses use 3D7h.
  103.  
  104. 3D7h (R/W):  Single/Write Bank Register
  105. bit  0-4  64k Bank number. If 3CEh index Fh bit 2 is clear all accesses use
  106.           this bank number, if set writes use this bank and reads use 3D6h.
  107.  
  108. 8280h W(R/W): Source address low
  109. bit 0-15  The lower 16 bits of the pixel address of the source area.
  110.  
  111. 8282h (R/W): Source address high
  112. bit  0-7  The upper 8 bits of the pixel address of the source area.
  113.           Calculated as (line no.)*(pixels per line)+(pixel no. in line).
  114.  
  115. 8284h W(R/W): Source area scanline width.
  116. bit 0-15  The number of pixels in a scanline at the source.
  117.  
  118. 8286h W(R/W): Destination address low.
  119. bit 0-15  Lower 16 bits of the pixel address of the destination area.
  120.  
  121. 8288h (R/W): Start pixel high.
  122. bit  0-7  The upper 8 bits of the pixel address of the destination area.
  123.           Calculated as (line no.)*(pixels per line)+(pixel no. in line).
  124.  
  125. 828Ah W(R/W): Destination area scanline width
  126. bit 0-15  Number of pixels in a scanline at the destination.
  127.  
  128. 828Ch W(R/W): Width of op.
  129. bit 0-15  Width of the blit area in pixels.
  130.  
  131. 828Eh W(R/W): Height of op.
  132. bit 0-15  Number of lines in the blit area. 
  133.  
  134. 8290h (R/W): 
  135. bit  0-5  7 If moving towards higher co-ordinates, 1 if moving towards lower.
  136.           0 (or don't care) for line draws
  137.        6  If set drawing only happens within the rectangle defined by
  138.           8294h-9Ah.
  139.           X co-ordinate must be >= 8294h and <=8296h.
  140.           Y co-ordinate must be >= 8298h and <=829Ah.
  141.  
  142. 8292h W(R/W): 
  143. bit  0-7  always 0Dh ???
  144.        8  (Line Draw) If set the final position is to the left of the start
  145.        9  (Line Draw) If set the final position is above the start
  146.       10  (Line Draw) If set (Delta X) and (Delta Y) are swapped when
  147.           calculating the Bresenham constants in 82A2h-A6h.
  148.       11  ??
  149.       12  Set if moving towards lower co-ordinates, clear if not.
  150.  
  151. 8294h W(R/W):  Clipping left
  152. bit 0-15  If 8290h bit 6 is set drawing only happens if the X-co-ordinate is
  153.            >= this value
  154.  
  155. 8296h W(R/W):  Clipping right
  156. bit 0-15  If 8290h bit 6 is set drawing only happens if the X-co-ordinate is
  157.            <= this value
  158.  
  159. 8298h W(R/W):  Clipping top
  160. bit 0-15  If 8290h bit 6 is set drawing only happens if the Y-co-ordinate is
  161.            >= this value
  162.  
  163. 829Ah W(R/W):  Clipping bottom
  164. bit 0-15  If 8290h bit 6 is set drawing only happens if the Y-co-ordinate is
  165.            <= this value
  166.  
  167. 829Ch W(R/W): Start X co-ordinate
  168. bit 0-15  Starting X co-ordinate of the destination area.
  169.  
  170. 829Eh W(R/W): Start Y co-ordinate
  171. bit 0-15  Starting Y co-ordinate of the destination area
  172.  
  173. 82A0h W(R/W): 
  174. bit 0-15  Always set to 0 ??
  175.  
  176. 82A2h W(R/W):  Bresenham Constant 1
  177. bit 0-15  The Bresenham Constant 1 used for line drawing
  178.           Calculated as  2*(Delta Y). If 8292h bit 10 is set 2*(Delta X) is
  179.           used.
  180.  
  181. 82A4h W(R/W):  Bresenham Constant 2
  182. bit 0-15  The Bresenham Constant 2 used for line drawing
  183.           Calculated as  2*((Delta Y) - (Delta X)). If 8292h bit 10 is set
  184.           (Delta Y) and (Delta X) are swapped in the calculation.
  185.  
  186. 82A6h W(R/W):  Bresenham Error Term
  187. bit 0-15  The Bresenham Error Term used for line drawing.
  188.           Calculated as  2*(Delta Y) + (Delta X). If 8292h bit 10 is set
  189.           (Delta Y) and (Delta X) are swapped in the calculation.
  190.  
  191. 82A8h W(R/W):
  192. bit 0-15  (Line draw) Pattern mask. Only the set bits are drawn.
  193.  
  194. 82AAh (R/W): COP status/instruction
  195. bit  0-3  (R) When 0 the COP is free.
  196.      0-7  (W) Graphics instruction:
  197.                1: Fill rectangle  
  198.                2: Copy rectangle
  199.                4: ?
  200.                8: Line draw
  201.  
  202.  
  203. ID Avance Logic AL2101:
  204.  
  205.   old:=rdinx($3d4,$1A);
  206.   clrinx($3d4,$1A,$10);            {Disable extensions}
  207.   if not testinx($3d4,$19) then
  208.   begin
  209.     setinx($3d4,$1A,$10);          {Enable extensions}
  210.     if testinx($3d4,$19) and testinx2($3d4,$1A,$3F) then
  211.        Avance Logic AL2101 !!
  212.   end;
  213.   wrinx($3d4,$1A,old);
  214.  
  215.  
  216.  
  217.   Video modes:
  218.  
  219.     20h  T   132   25  16
  220.     21h  T   132   30  16
  221.     22h  T   132   43  16
  222.     23h  T   132   60  16
  223.     24h  T    80   30  16
  224.     25h  T    80   43  16
  225.     26h  T    80   60  16
  226.     27h  G   960  720  16  PL4
  227.     28h  G   512  512 256  P8
  228.     29h  G   640  400 256  P8
  229.     2Ah  G   640  480 256  P8
  230.     2Bh  G   800  600  16  PL4
  231.     2Ch  G   800  600 256  P8
  232.     2Dh  G   768 1024  16  Pl4
  233.     2Eh  G   768 1024 256  P8
  234.     2Fh  G  1024  768   4  
  235.     30h  G  1024  768  16  PL4
  236.     31h  G  1024  768 256  P8
  237.     33h  G  1024 1024 256  P8
  238.     36h  G  1280 1024  16  PL4
  239.     37h  G  1280 1024 256  P8
  240.     40h  G   320  200 64k  P16
  241.     41h  G   512  512 64k  P16
  242.     42h  G   640  400 64k  P16
  243.     43h  G   640  480 64k  P16
  244.     44h  G   800  600 64k  P16
  245.