home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / WEITEK.TXT < prev    next >
Text File  |  1996-01-04  |  36KB  |  787 lines

  1. Weitek
  2.  
  3.   W5086
  4.   W5186    1MB, BitBlt, Line draw
  5.   W5286    As W5186 + Color expansion and fills
  6.  
  7.   Power9000    Max 2MB. Not VGA compatible, but VGA chip can be added.
  8.                Accelerates 8bit operations.
  9.   Power9001    PCI version of the Power9000
  10.   Power9100    New version with a W5286 like VGA part built in. can handle
  11.                 8MB and accelerates 8/16/32bit operations
  12.  
  13.  
  14.  
  15.   Power9130    Video accelerator
  16.  
  17.  
  18. W5x86 series:
  19.  
  20.  
  21. 3C0h index 15h (R/W):  Overscan Color High
  22.  
  23. 3C4h (R/W):  Sequencer Index Register
  24. bit  0-2  Sequencer index bits 0-2
  25.        3  (W5086,W5186) Enable additional registers. If set enables registers
  26.            at 300h, 301h, 30Ah, 320h and 32Ah
  27.        4  Sequencer index high bit
  28.  
  29. 3C4h index  5  (W):  Control Register 0
  30. bit    2  SRS17. CRTC Display Start Address bit 16. Bits 0-15 are in 3d4h
  31.           index 0Ch,0Dh
  32.        6  BO. Bit Order. If clear bit 0 is displayed first (VGA)
  33.        7  DVSAE. Dual Video Start Address/Offset Enable
  34.  
  35. 3C4h index  6  (W):  Control Register 1
  36. bit    3  BSE. Special Text Attributes. If set the text attributres are
  37.           defined as follows:
  38.           bit  0  Color 0 (Half bright in monochrome)
  39.                1  Underline
  40.                2  Reverse Video
  41.                3  Blinking
  42.                4  Bold
  43.                5  Struck Through
  44.                6  Color 1
  45.                7  Color 2
  46.        6  GHAE. Graphics Accelerator Enable. 0: Halt, 1: Enable
  47.  
  48. 3C4h index 07h (R):  Revision Register
  49. Bit  0-2  Revision Level.
  50.      5-7  Chip ID. 1: W5186, 2: W5286 or P9100  (0: W5086 ???)
  51.  
  52. 3C4h index 10h (R):  User Bits
  53. bit  0-3  Manufacturer information. Read from straps at power-up.
  54.      4-7  Always returns 9 for the W5186, 5 for the W5286 & P9100.
  55.  
  56. 3C4h index 10h (W):  I/O Base
  57. bit  0-7  Defines the upper 8 bits of the I/O base address. Default is 3 to
  58.           map the registers at 3xxh
  59.  
  60. 3C4h index 11h (R/W):  Miscellaneous
  61. bit    5  Clear to enable extensions
  62.        6  Clear to enable bank addressing
  63. Note: to update this register, first it must be read and the value
  64.       rewritten twice, then the changed value can be written
  65.  
  66. 3C4h index 12h (R/W):  Output Control
  67. bit  5-6  3 for 640x480, 1 for 800x600, 0 else
  68.      6-7  (W5286) Memory. 0: 256K, 1: 512K, 2: 1MB
  69.        7
  70.  
  71. 3C4h index 13h (R/W):  Memory Base
  72. bit  0-3  Base Memory address. Defines the location of the 1MB Linear Aperture
  73.           in units of 1MB.
  74.  
  75. 3CDh (R/W):  Bank Register
  76. bit  0-3  Write Bank
  77.      4-7  Read bank
  78.  
  79. 3CEh (R/W):  Graphics Controller Index Register
  80. bit  0-3  Index
  81.        7  (R) Graphics Engine Busy if set
  82.  
  83. 3CEh index 09h (R/W):  GHA Queue Base Address
  84. bit  0-7  Base address of the Instruction Queue in units of 1KB (?). The
  85.           Graphics engine uses a 4KByte Instruction Queue of 256 16byte
  86.           instructions. Each instruction has this format:
  87.           Byte  Bit  Description
  88.            00h  0-3  Plane Mask. Each bit set enables writing in the
  89.                      corresponding plane
  90.                   4  Sync. If set the instruction is delayed until Vertical
  91.                      Retrace occurs
  92.                 5-7  Opcode. 0: Short BitBLT, 1: Long BitBLT, 2: Short Screen
  93.                      Move, 3: Long Screen Move, 4: Steep Line Draw, Flat Line
  94.                      Draw, 6: Block Move, 7: NOP
  95.            01h  0-7  Start Mask. Each bit set enables writing to the
  96.                      corresponding bits in the first byte of each scanline
  97.            02h 0-15  (BitBLT) Horizontal Total. The width of the blit area in
  98.                       bytes (-1)
  99.            02h 0-15  (Linedraw) Line Decrement. The amount to subtract from
  100.                       the error term when moving parallel to the minor axis
  101.            04h  0-3  Source Inversion Mask. Each bit if set causes source data
  102.                      from the corresponding plane to be inverted before
  103.                      applying the operation in Byte 05h (Color Plane Logical
  104.                      Operation).
  105.                 4-7  Destination Inversion Mask. Each bit if set causes
  106.                      destination data from the corresponding plane to be
  107.                      inverted before applying the operation in Byte 05h (Color
  108.                      Plane Logical Operation).
  109.            05h  0-3  Color Plane Logical Operation 0 (LOP0)
  110.                 4-7  Color Plane Logical Operation 1 (LOP1)
  111.                      The logical operation for each plane is controlled by one
  112.                      bit from LOP0 and one from LOP1
  113.                      LOP1  LOP0  Operation
  114.                       0     0     Store (NOP)
  115.                       0     1     AND
  116.                       1     0     OR
  117.                       1     1     XOR
  118.            06h  0-7  End Mask. Each bit set enables writing to the
  119.                      corresponding bits in the last byte of each scanline
  120.            07h  0-7  Vertical Total. Height of the blit area in scanlines.
  121.                      Bits 8-9 are in Byte 0Dh bits 6-7.
  122.            08h 0-15  Destination Address. The offset from start of display
  123.                      memory in bytes. Bits 16-17 are in Byte 0Dh bits 1-2
  124.            0Ah 0-15  (BitBLT) Source Address. The offset from start of display
  125.                       memory in bytes. Bits 16-17 are in Byte 0Fh bits 1-2.
  126.            0Ah 0-15  (Linedraw) Line Initial Error. The Initial Error Term
  127.            0Ch  0-7  Destination Pitch. The number of bytes in each scanline
  128.                      at the destination. This is a 9bit two's complement value
  129.                      (Bit 8 is in Byte 0Dh bit 0). Use a negative value if DIR
  130.                      (Byte 0Fh bit 7) is set
  131.            0Dh    0  Destination Pitch bit 8. Bits 0-7 are in Byte 0Ch
  132.                 1-2  Destination Address bits 16-17. Bits 0-15 are in Bytes
  133.                       08h,09h
  134.                 3-5  Rotate Count. Number of bits to right-shift
  135.                 6-7  Vertical Total bits 8-9. Bits 0-7 are in Byte 07h
  136.            0Eh  0-7  (BitBLT) Source Pitch. The number of bytes in each
  137.                       scanline at the source. This is a 9bit two's complement
  138.                       value (Bit 8 is in Byte 0Fh bit 0). Use a negative value
  139.                       if DIR (Byte 0Fh bit 7) is set
  140.            0Eh  0-7  (Linedraw) Line Increment. The amount to add to the
  141.                       error term when moving parallel to the major axis
  142.            0Fh  0-5  (Linedraw) Line Increment bits 8-13. Bits 0-7 are in Byte
  143.                        0Eh
  144.                   0  (BitBLT) Source Pitch bit 8. Bits 0-7 are in Byte 0Eh
  145.                 1-2  (BitBLT) Source Address bit 16-17. Bits 0-15 are in Byte
  146.                        0Ah, 0Bh
  147.                 3-4  (BitBLT) Expansion Source. Selects the plane that holds
  148.                       the source for the expansion.
  149.                   5  (BitBLT) Expansion enable. If set color expansion is
  150.                       enabled
  151.                   6  Interrupt Disable. If clear an interrupt is generated
  152.                      when the current instruction completes
  153.                   7  Direction. If set the destination and source are
  154.                      processed right-to-left and bottom-to-top
  155.  
  156. 3CEh index 0Ah (R/W):  GHA Queue Tail Pointer
  157. bit  0-7  Points to the entry in the Instruction Queue where we put the next
  158.           instruction. First write the instruction to this position, then
  159.           increment this register
  160.  
  161. 3CEh index 0Bh (R/W):  GHA Queue Execution Pointer
  162. bit  0-7  Points to the currently (or most recently) executing instruction in
  163.           the Instruction Queue.
  164.  
  165. 3CEh index 0Ch (W):  Extended Graphics
  166. bit    2  Set in extended 256 color modes
  167.  
  168. 3CEh index 0Dh (R/W):  GHA Bit Mask                                     (5286)
  169. bit  0-7  Each bit enables updating the corresponding bit in each byte
  170.  
  171. 3CEh index 0Eh W(R/W):  BCOLOR                                          (5286)
  172. bit 0-15  Background color for color expansion.
  173.  
  174. 3d4h index 19h (R/W):  Interlace
  175.  
  176. 3d4h index 1Ah (R/W):  Serial Start Address High
  177. bit  0-7  Bits 8-15 of the Start Address of the second frame buffer
  178.  
  179. 3d4h index 1Bh (R/W):  Serial Start Address Low
  180. bit  0-7  Bits 0-7 of the Start Address of the second frame buffer
  181.  
  182. 3d4h index 1Ch (R/W):  Serial Offset
  183. bit  0-7  CRTC Offset for the second frame buffer
  184.  
  185. 3d4h index 1Dh (R/W):  Total Characters Per Line
  186. bit  0-7  Number of character clocks displayed per line for the second frame
  187.           buffer
  188.  
  189.  
  190. ID Weitek VGA:
  191.  
  192.   old:=rdinx(SEQ,$11);
  193.   outp(SEQ+1,old);
  194.   outp(SEQ+1,old);
  195.   outp(SEQ+1,inp(SEQ+1) or $20);
  196.   if not testinx(SEQ,$12) then
  197.   begin
  198.     x:=rdinx(SEQ,$11);
  199.     outp(SEQ+1,old);
  200.     outp(SEQ+1,old);
  201.     outp(SEQ+1,inp(SEQ+1) and $DF);
  202.     if testinx(SEQ,$12) and tstrg($3CD,$FF) then
  203.     begin
  204.       _Weitek chip_
  205.     end;
  206.   end;
  207.   wrinx(SEQ,$11,old);
  208.  
  209.  
  210. Video Modes:
  211.  
  212. 0054h  T   132   43
  213. 0055h  T   132   25
  214. 0056h  T   132   43  4color
  215. 0057h  T   132   25  4color
  216. 0058h  G   800  600   16c  PL4
  217. 0059h  G   800  600   16c  PL4
  218. 005Ah  G  1280 1024   16c  PL4
  219. 005Ch  G   800  600  256c  P8
  220. 005Dh  G  1024  768   16c  PL4
  221. 005Eh  G  1024  768  256c  P8
  222. 005Fh  G   640  480  256c  P8
  223. 0064h  T   132   60
  224. 0065h  T   132   50
  225. 0066h  T   132   60   4c
  226. 0067h  T   132   50   4c
  227. 0068h  T    80   60
  228. 0069h  G   640  480   16m  P24
  229. 006Ah  G   800  600   16c  PL4
  230. 006Ch  G   640  480  32Kc  P15
  231. 006Dh  G   800  600  32Kc  P15
  232. 006Eh  G   640  480  64Kc  P16
  233. 006Fh  G   800  600  64Kc  P16
  234.  
  235.  
  236.  
  237. Power 9000/9100:
  238. The Power 9000 and 9100 have different memory and register layouts.
  239. Also the different brands of Power9000/9100 boards all have different
  240. Linear Aperture addresses, DAC access and special registers
  241.  
  242. The registers and video memory of the Power 9000 are mapped in a 4MB linear
  243. memory block staring at M (typically 20000000h, 80000000h or A0000000h):
  244.  
  245. M+000000h - M+0FFFFFh  (1MB) Non-Power 9000 use
  246. M+100000h - M+1FFFFFh  (1MB) Registers. The registers are 32bit and internally
  247.                              stored in Big Endian format. Bits 16-18 of the
  248.                              address are used to access the register with
  249.                              different combinations of bit, byte and halfword
  250.                              (16bit) swaps:
  251.                               +00000h
  252.                               +10000h  Swap bits
  253.                               +20000h  Swap bytes
  254.                               +30000h  Swap bytes and bits
  255.                               +40000h  Swap Halfwords
  256.                               +50000h  Swap Halfwords and bits
  257.                               +60000h  Swap Halfwords and bytes
  258.                               +70000h  Swap Halfwords, bytes and bits
  259.                              Bits 13-15 of the address appears to be ignored.
  260. M+200000h - M+3FFFFFh  (2MB) Video memory
  261.  
  262. The Power9100 has a more compact register layout where the registers are in
  263. one 32Kbyte block, accessible either at A000h or in the Linear Aperture.
  264. Swapping of bits/bytes/halfword are controlled from a register.
  265.  
  266. The registers below are shown as M+xxxh, where M+xxxh is the Power9100 address
  267. (even if the register does not exist for the Power9100). The corresponding
  268. Power9000 address can be found as:
  269.     Power9100           Power9000
  270.   0000h - 1FFFh     100000h - 101FFFh
  271.   2000h - 3FFFh     180000h - 181FFFh
  272.   4000h - 7FFFh        No match
  273. The swap flags are added to the Power9000 address in bits 16-18 (see above).
  274.  
  275.  
  276.  
  277. 3C4h index 12h (R/W):
  278. bit 0-1  Base Address. 0: None, 1: A0000000h, 2: 20000000h, 3: 80000000h
  279.       2  Should be 0
  280.       3  Should be 1
  281.       4  P9000 Enabled if set, disable if clear
  282.       5  HSync polarity. Positive if clear, negative if set
  283.       6  VSync polarity. Positive if clear, negative if set
  284.       7  W5186 (or other VGA) Enabled if set, disabled if clear
  285.  
  286. 3CDh (R/W):  Bank Register:                                            (Viper)
  287. bit 0-5  Bank number. Maps a 64K block of the 4MB linear block at A000h, thus:
  288.            00h - 0Fh  Maps 64K of the non-Power 9000 block
  289.            10h - 1Fh  Maps a 64K Register block
  290.            20h - 3Fh  Maps 64K of the Video memory
  291. Note: This register only exists in the Viper (non-PCI versions) and is
  292.       implemented by external logic.
  293.  
  294. XXXXh (R/W):  PCI Bank Register                                    (Viper PCI)
  295. bit 1-6  Bank number. Maps a 64K block of the 4MB linear block at A000h, thus:
  296.            00h - 0Fh  Maps 64K of the non-Power 9000 block
  297.            10h - 1Fh  Maps a 64K Register block
  298.            20h - 3Fh  Maps 64K of the Video memory
  299. Note: This register only exists in the Viper PCI systems and is (probably?)
  300.       implemented by external logic.
  301.       The Base address for this register is found from Offset 14h in the PCI
  302.       configuration space.
  303.  
  304. 9100h (R/W):  "PCI index register"                                      (9100)
  305. bit 0-7  Selects the offset into the 256byte PCI configuration space accessed
  306.          at 9104h. This allows access to the PCI configuration space even in
  307.          non-PCI systems.
  308.  
  309. 9104h (R/W):  "PCI data register"                                       (9100)
  310. bit 0-7  Each access to this register reads or writes the byte from the PCI
  311.          configuration space selected by 9100h. This allows access to the PCI
  312.          configuration space even in non-PCI systems.
  313.  
  314. M+0004h D(R/W):  System Configuration Register
  315. bit   0-2  Power 9000 version number. Always 0 on the 9100
  316.         9  Pixel writes go to buffer 1 if set, buffer 0 if clear
  317.        10  Pixel reads go to buffer 1 if set, buffer 0 if clear
  318.        11  If set swaps bits within each 32 bit DWORD when accessing display
  319.            memory (similar to the bit swap for register accesses)
  320.        12  If set swaps bytes within each 32 bit DWORD when accessing display
  321.            memory (similar to the byte swap for register accesses)
  322.        13  If set swaps halfwords within each 32 bit DWORD when accessing
  323.            display memory (similar to the halfword swap for register accesses)
  324.     14-22  The width of a scanline in pixels is determined by adding the
  325.            result of the three 3bit fields (Bits 14-16, 17-19 and 20-22).
  326.            Each field selects: 0: 0, 1: 32, 2: 64, 3: 128, 4: 256, 5: 512,
  327.              6: 1024, 7: 2048.   Thus a width of 1280 is achieved by having
  328.            one field with 0, one with 4 and one with 6 (0+256+1024 = 1280).
  329.        23  Must be 0
  330.        24  If set the Frame Buffer Controller has double load, normal if clear
  331.        25  Must be 0
  332.     26-28  (9100) Pixel Size. 0: 8bpp, 1: 16bpp, 2: 24bpp
  333.     29-20  (9100) Shift3. Fourth subfield for the scanline width in bits 14-22
  334.  
  335. M+0008h D(R/W):  Interrupt Register
  336. bit     0  The drawing engine is idle if set, busy if clear
  337.         1  Must be set on writes for bit 0 to be updated. Reads as 1
  338.         2  If set a pick is done
  339.         3  Must be set on writes for bit 2 to be updated. Reads as 1
  340.         4  If set a vertical blanking has occured
  341.         5  Must be set on writes for bit 4 to be updated. Reads as 1
  342. Note: The interrupt status bits (Bits 0,2,4) are sticky, once the condition
  343.       has occured they remain set until cleared by a write. If an interrupt
  344.       status bit (Bits 0,2,4) is set an interrupt will be generated if allowed
  345.       by the Interrupt Enable register (M+0000Ch).
  346.  
  347. M+000Ch D(R/W):  Interrupt Enable
  348. bit     0  If set allows interrupt when the drawing engine goes idle
  349.         1  Must be set on writes for bit 0 to be updated. Reads as 1
  350.         2  If set allows interrupt when a pick occurs
  351.         3  Must be set on writes for bit 2 to be updated. Reads as 1
  352.         4  If set allows interrupt when vertical blanking occurs
  353.         5  Must be set on writes for bit 4 to be updated. Reads as 1
  354.         6  If set allows interrupts as specified by bits 0,2 and 4, if clear
  355.            all interrupts are disabled
  356.         7  Must be set on writes for bit 6 to be updated. Reads as 1
  357.  
  358. M+0010h D(R/W):  Alternate Read Bank                                    (9100)
  359. bit 16-22  Read bank. Selects the 64K block accessed by reading at Axxxxh
  360.  
  361. M+0014h D(R/W):  Alternate Write Bank                                   (9100)
  362. bit 16-22  Write bank. Selects the 64K block accessed by writing to Axxxxh
  363.  
  364.  
  365. M+0104h D(R):  Horizontal Counter (hrzc)
  366. bit  0-11  The currently displayed pixel in DDOTCLK clocks from the start of
  367.            Horizontal Retrace (Falling edge of HSYNC-).
  368.  
  369. M+0108h D(R/W):  Horizontal Length (hrzt)
  370. bit  0-11  The total number of DDOTCLK clocks in a scanline including blanking
  371. .          and retrace
  372.  
  373. M+010Ch D(R/W):  Horizontal Sync Rising Edge (hrzsr)
  374. bit  0-11  The HSYNC- pulse width in number of DDOTCLK clocks.
  375.  
  376. M+0110h D(R/W):  Horizontal Blank Rising Edge (hrzbr)
  377. bit  0-11  The number of DDOTCLK clocks from the start of horizontal retrace
  378.            (Falling edge of HSYNC-) to the end of blanking (Rising edge of
  379.            HBLNK-)
  380.  
  381. M+0114h D(R/W):  Horizontal Blank Falling Edge (hrzbf)
  382. bit  0-11  The number of DDOTCLK clocks from the start of the horizontal
  383.            retrace (Falling edge of HSYNC-) to the start of blanking (Falling
  384.            edge of HBLNK-)
  385.  
  386. M+0118h D(R/W):  Horizontal Counter Preload Value (prehrzc)
  387. bit  0-11  The value to load into the Horizontal Counter (M+100104h) when an
  388.            internal or external HSYNC- is received to allow synchronisation
  389.            with an external source. Should be set to 0 if external sync is not
  390.            used.
  391.  
  392. M+011Ch D(R):  Vertical Counter (vrtc)
  393. bit  0-11  The currently displayed line number
  394.  
  395. M+0120h D(R/W):  Vertical Length (vrtt)
  396. bit  0-11  The total number of lines in a frame including blanking and retrace
  397.  
  398. M+0124h D(R/W):  Vertical Sync Rising Edge (vrtsr)
  399. bit  0-11  The width of the Vertical Sync (VSYMC-) pulse in scanlines
  400.  
  401. M+0128h D(R/W):  Vertical Blank Rising Edge (vrtbr)
  402. bit  0-11  The number of scanlines from the start of Vertical Retrace (Falling
  403.            edge of VSYNC-) to the end of Vertical Blanking (Rising edge of
  404.            VBLNK-)
  405.  
  406. M+012Ch D(R/W):  Vertical Blank Falling Edge (vrtbf)
  407. bit  0-11  The number of scanlines from the start of Vertical Retrace (Falling
  408.            edge of VSYNC-) to the start of Vertical Blanking (Falling edge of
  409.            VBLNK-)
  410.  
  411. M+0130h D(R/W):  Vertical Counter Preload Value (prevrtc)
  412. bit  0-11  The value to load into the Vertical Counter (M+18011Ch) when an
  413.            internal or external VSYNC- is received to allow synchronization
  414.            with external video sources. Should be set to 0 if external sync is
  415.            not used.
  416.  
  417. M+0134h D(R):  Screen Repaint Address (sraddr)
  418. bit  0-11  The next VRAM row address to load into the VRAM. This is bits 10-21
  419.            of the linear memory address. When Vertical Blanking starts this
  420.            register is set to 0 (or the start address of the second buffer).
  421.  
  422. M+0138h D(R/W):  Screen Repaint Timing Control (srtctl)
  423. bit   0-2  QSF counter position. Selects which bit in the QSF counter register
  424.            (M+013Ch) causes the next row address transfer.
  425.            Typical values:
  426.             Memory    1 DDOTCLK     1 DDOTCLK
  427.             Config:   = 4 dots      = 8 dots
  428.                1           4             3
  429.                2           4             3
  430.                3           5             4
  431.                4           5             4
  432.                5           6             5
  433.         3  Set to select buffer 1 for display, clear to select buffer 0
  434.         4  Set to select Restricted (HBLNK- reload) mode, clear to select
  435.            normal (split shift) mode.
  436.         5  Set for normal operation, clear for Blanks asserted
  437.         6  Set to select Composite synchronization, clear to select separate
  438.            synchronization
  439.         7  Set to select internal HSYNC-, clear to select external HSYNC-
  440.         8  Set to select internal VSYNC-, clear to select external VSYNC-
  441.  
  442. M+013Ch D(R):  QSF Counter (qsfcounter or sraddr_inc?)
  443. bit 0-11  Counts DDOTCLK pulses within the current VRAM page, Ie. which bits
  444.           are shifted out of the VRAMs
  445. Note: The sraddr_inc and qsfcounter register appears to be the same, but the
  446.       documentation leaves some doubt
  447.  
  448. M+0184h D(R/W):  Memory Configuration (mem_config)
  449. bit   0-2  Frame buffer VRAM configuration:
  450.              0: Memory Config 1. 8 256Kx4 VRAMs in 1 bank and  1 1Mpixel
  451.                 buffer
  452.              1: Memory Config 2. 8 128Kx8 VRAMs in 2 interleaved banks and
  453.                  1 1Mpixel buffer
  454.              2: Memory Config 3. 16 256Kx4 VRAMs in 2 interleaved banks and
  455.                  1 2Mpixel buffer
  456.              3: Memory Config 4. 16 256Kx4 VRAMs in 2 interleaved banks and
  457.                  2 1Mpixel buffers
  458.              4: Memory Config 5. 32 256Kx4 VRAMs in 4 interleaved banks and
  459.                  2 2Mpixel buffers
  460.  
  461. M+0188h D(R/W):  Refresh Period (rfperiod)
  462. bit   0-9  The max time between memory refreshes in SYSCLK periods
  463.  
  464. M+018Ch D(R):  Refresh Counter (rfcount)
  465. bit   0-9  This register is decremented on each SYSCLK until it reaches 0,
  466.            when a refresh request is made and the register is reloaded from
  467.            the Refresh Period Register (M+0188h).
  468.  
  469. M+0190h D(R/W):  RAS Low Maximum (rlmax)
  470. bit   0-9  The maximum time the RAS- signal can be asserted in SYSCLK periods
  471.  
  472. M+0194h D(R):  RAS low count (rlcur)
  473. bit   0-9  When RAS- is asserted this register is loaded with the value in the
  474.            RAS Low Maximum register (M+0190h) and then decremented on each
  475.            SYSCLK until either RAS- is deasserted, or it reaches 0 in which
  476.            case a refresh sequence is started.
  477.  
  478. M+198h W(?):                                                            (9100)
  479. bit 12-15  Number of FIFo slots free ??
  480. Note: Apparently the IBM RGB525 DAC requires a read or write of this register
  481.       for the last write to a DAC register at 200h-23Ch takes effect ?
  482.  
  483. M+200h - M+23Ch D(R/W):  DAC regs 0-15                                  (9100)
  484. bit   0-7  Each access to one of these registers causes a read or write of
  485.            the corresponding DAC register (200h is REG00, 210h is REG04...)
  486.            The IBM RGB525 DAC apparently requires a read or write of M+198h
  487.            after a write to a DAC register ? Usually the same value is
  488.            repeated in all four bytes (bits 0-7, 8-15, 16-23 and 24-31) ?
  489.  
  490. M+2000h D(R):  Status Register
  491. bit     0  If set the source coordinates for a quad draw straddle the clipping
  492.            window
  493.         1  If set the source coordinates for a quad draw are entirely inside
  494.            the clipping window
  495.         2  If set the source coordinates for a quad draw are entirely outside
  496.            the clipping window
  497.         3  If set the requested quad is concave
  498.         4  If set an exception was encountered for a quad command, the
  499.            operation cannot be performed and must be done in software
  500.         5  If set an exception was encountered for a blit command, the
  501.            operation cannot be performed and must be done in software
  502.         6  If set an exception was encountered for a pixel command, the
  503.            operation cannot be performed and must be done in software
  504.         7  If set a pick was detected. (This is a copy of the pick bit in the
  505.            interrupt register (M+0008h bit 2)).
  506.        30  If set the drawing engine is busy
  507.        31  If set a Quad or Blit operation can not be started
  508.  
  509. M+2004h D(R):  Blit command
  510. Note: Reading this register issues a Blit command using X[0]/Y[0] as the upper
  511.       left corner of the source, X[1]/Y[1] as the lower right corner of the
  512.       source, X[2]/Y[2] as the upper left corner of the destination and
  513.       X[3]/Y[3] as the lower right corner of the destination. The source and
  514.       destination areas must be the same size. If the destination is out of
  515.       range bit 5 of the Status Register (M+2000h) is set and the operation
  516.       must be done in software.
  517.       Bit 31 of the Status Register (M+2000h) should be tested before a Quad
  518.       operation is issued.
  519.  
  520. M+2008h D(R):  Quad command
  521. Note: Reading this register issues a Quad command using X[0-3],Y[0-3] as
  522.       coordinates. If the Quad defined by the coordinates id concave or one
  523.       (or more) of the coordinates is out of range bit 4 of the Status
  524.       Register (M+2000h) is set and the operation must be done in software.
  525.       Bit 31 of the Status Register (M+2000h) should be tested before a Quad
  526.       operation is issued.
  527.  
  528. M+200Ch D(W):  Pixel8 command
  529.  
  530. M+2014h D(W):  Next_pixels command
  531.  
  532. M+2080h - M+20FCh D(W):  Pixel1
  533. Note: Writing to this register starts a Pixel1 command of (n+1) pixels,
  534.       where n is bits 2-6 of the address written to.
  535.  
  536. M+2184h D(R):  Out of range (OOR) Register
  537. bit     0  Set if y[0] is out of range
  538.         1  Set if y[1] is out of range
  539.         2  Set if y[2] is out of range
  540.         3  Set if y[3] is out of range
  541.         4  Set if x[0] is out of range
  542.         5  Set if x[1] is out of range
  543.         6  Set if x[2] is out of range
  544.         7  Set if x[3] is out of range
  545.  
  546. M+218Ch D(R/W):  Cindex
  547. bit   0-1  Selects one of the 4 X/Y coordinate register sets.
  548.  
  549. M+2190h D(R/W):  Window Offset Register
  550. bit  0-15  Y-offset of current window
  551.     16-31  X-offset of current window
  552.  
  553. M+2194h D(R):  Parameter Engine Window Minimum Register
  554. bit  0-12  Minimum Y value (top line). Pixels above this line are not drawn
  555.     16-28  Minimum X value (left edge). Pixels left of this are not drawn
  556. Note: This register can be read and written at M+2220h
  557.  
  558. M+2198h D(R):  Parameter Engine Window Maximum Register
  559. bit  0-12  Minimum Y value (bottom line). Pixels below this line are not drawn
  560.     16-28  Minimum X value (right edge). Pixels right of this are not drawn
  561. Note: This register can be read and written at M+2224h
  562.  
  563. M+21A0h D(R):  Yclip
  564. bit     0  Set if Y[0] > the window maximum (M+2224h)
  565.         1  Set if Y[1] > the window maximum (M+2224h)
  566.         2  Set if Y[2] > the window maximum (M+2224h)
  567.         3  Set if Y[3] > the window maximum (M+2224h)
  568.         4  Set if Y[0] < the window minimum (M+2220h)
  569.         5  Set if Y[1] < the window minimum (M+2220h)
  570.         6  Set if Y[2] < the window minimum (M+2220h)
  571.         7  Set if Y[3] < the window minimum (M+2220h)
  572.  
  573. M+21A4h D(R):  Xclip
  574. bit     0  Set if X[0] > the window maximum (M+2224h)
  575.         1  Set if X[1] > the window maximum (M+2224h)
  576.         2  Set if X[2] > the window maximum (M+2224h)
  577.         3  Set if X[3] > the window maximum (M+2224h)
  578.         4  Set if X[0] < the window minimum (M+2220h)
  579.         5  Set if X[1] < the window minimum (M+2220h)
  580.         6  Set if X[2] < the window minimum (M+2220h)
  581.         7  Set if X[3] < the window minimum (M+2220h)
  582.  
  583. M+21A8h D(R):  Xedge_lt
  584. bit     0  Set if X[0] > X[2]
  585.         1  Set if X[1] > X[3]
  586.         2  Set if X[3] > X[0]
  587.         3  Set if X[2] > X[3]
  588.         4  Set if X[1] > X[2]
  589.         5  Set if X[0] > X[1]
  590.  
  591. M+21ACh D(R):  Xedge_gt
  592. bit     0  Set if X[0] < X[2]
  593.         1  Set if X[1] < X[3]
  594.         2  Set if X[3] < X[0]
  595.         3  Set if X[2] < X[3]
  596.         4  Set if X[1] < X[2]
  597.         5  Set if X[0] < X[1]
  598.  
  599. M+21B0h D(R):  Yedge_lt
  600. bit     0  Set if Y[0] > Y[2]
  601.         1  Set if Y[1] > Y[3]
  602.         2  Set if Y[3] > Y[0]
  603.         3  Set if Y[2] > Y[3]
  604.         4  Set if Y[1] > Y[2]
  605.         5  Set if Y[0] > Y[1]
  606.  
  607. M+21B4h D(R):  Yedge_gt
  608. bit     0  Set if Y[0] < Y[2]
  609.         1  Set if Y[1] < Y[3]
  610.         2  Set if Y[3] < Y[0]
  611.         3  Set if Y[2] < Y[3]
  612.         4  Set if Y[1] < Y[2]
  613.         5  Set if Y[0] < Y[1]
  614.  
  615. M+2200h D(R/W):  Foreground Color (fground)                             (9000)
  616. bit   0-7  The foreground color used in drawing
  617.  
  618. M+2200h D(R/W):  Color 0                                                (9100)
  619. bit  0-31  Color0. For 8bpp modes repeat bits 0-7 in bits 8-15, 16-23 and
  620.              24-31, for 15/16bpp modes repeat bits 0-15 in bits 16-31.
  621.  
  622. M+2204h D(R/W):  Background Color (bground)
  623. bit   0-7  The background color used in drawing
  624.  
  625. M+2204 D(R/W):  Color 1                                                 (9100)
  626. bit  0-31  Color1. For 8bpp modes repeat bits 0-7 in bits 8-15, 16-23 and
  627.              24-31, for 15/16bpp modes repeat bits 0-15 in bits 16-31.
  628.  
  629. M+2208h D(R/W):  Plane Mask (pmask)
  630. bit   0-7  Each bit enables the corresponding plane in the frame buffer if set
  631.  
  632. M+220Ch D(R/W):  Draw mode (draw_mode)
  633. bit     0  If set selects buffer 1 for all drawing operations, if clear
  634.            selects buffer 0
  635.         1  Must be set on writes for bit 0 to be updated. Reads as 1
  636.         2  If set suppresses all writes and sets the picked bit in the
  637.            Interrupt Register (M+0008h bit 2)
  638.         3  Must be set on writes for bit 2 to be updated. Reads as 1
  639.  
  640. M+2210h D(R/W):  Pattern Origin X (Pat_originx)
  641. bit   0-3  X origin of the pattern
  642.  
  643. M+2214h D(R/W):  Pattern Origin Y (Pat_originy)
  644. bit   0-3  Y origin of the pattern
  645.  
  646. M+2218h D(R/W):  Raster Register (raster)
  647. bit   0-7  (9100) The minterm to use for raster operations.
  648.      0-15  (9000) The minterm to use for raster operations.
  649.        13  (9100) Solid Color Disable. If set Solid Color is disabled and
  650.             Patterns enabled, if clear Solid Color is disabled and Patterns
  651.             are disabled.
  652.        14  (9100) Pattern Depth. 0: 2color, 1: 4color
  653.        15  (9100) Pixel1 Transparent. Enable Pixel1 transparent mode if set
  654.        16  If set Quad draw mode is Oversize mode, if clear X11 mode
  655.        17  If set enables the pattern (M+2280h - M+229Ch) for Quad draw
  656.            operations, if clear disables the pattern by forcing it to all 1's
  657.  
  658. M+221Ch D(R/W):  Pixel8 Register (pixel8_reg)
  659. bit  0-7?  Excess data from the last pixel8 operation.
  660.  
  661. M+2220h D(R/W):  Window Minimum Register (w_min)
  662. bit  0-12  Minimum Y value (top line). Pixels above this line are not drawn
  663.     16-28  Minimum X value (left edge). Pixels left of this are not drawn
  664.  
  665. M+2224h D(R/W):  Window Maximum Register (w_max)
  666. bit  0-12  Minimum Y value (bottom line). Pixels below this line are not drawn
  667.     16-28  Minimum X value (right edge). Pixels right of this are not drawn
  668.  
  669. M+2238h D(R/W):  Color2                                                 (9100)
  670. bit  0-31  Color2. For 8bpp modes repeat bits 0-7 in bits 8-15, 16-23 and
  671.              24-31, for 15/16bpp modes repeat bits 0-15 in bits 16-31.
  672.  
  673. M+223Ch D(R/W):  Color 3                                                (9100)
  674. bit  0-31  Color3. For 8bpp modes repeat bits 0-7 in bits 8-15, 16-23 and
  675.              24-31, for 15/16bpp modes repeat bits 0-15 in bits 16-31.
  676.  
  677. M+2280h D(R/W):  Pattern 0/1 Register                                   (9000)
  678.  
  679. M+2280h D(R/W):  Pattern 0                                              (9100)
  680.  
  681. M+2284h D(R/W):  Pattern 2/3 Register                                   (9000)
  682.  
  683. M+2284h D(R/W):  Pattern 1                                              (9100)
  684.  
  685. M+2288h D(R/W):  Pattern 4/5 Register                                   (9000)
  686.  
  687. M+2288h D(R/W):  Pattern 2                                              (9100)
  688.  
  689. M+228Ch D(R/W):  Pattern 6/7 Register                                   (9000)
  690.  
  691. M+228Ch D(R/W):  Pattern 3                                              (9100)
  692.  
  693. M+2290h D(R/W):  Pattern 8/9 Register                                   (9000)
  694.  
  695. M+2290h D(R/W):  Software 0                                             (9100)
  696.  
  697. M+2294h D(R/W):  Pattern 10/11 Register                                 (9000)
  698.  
  699. M+2294h D(R/W):  Software 1                                             (9100)
  700.  
  701. M+2298h D(R/W):  Pattern 12/13 Register                                 (9000)
  702.  
  703. M+2298h D(R/W):  Software 2                                             (9100)
  704.  
  705. M+229Ch D(R/W):  Pattern 14/15 Register                                 (9000)
  706.  
  707. M+229Ch D(R/W):  Software 3                                             (9100)
  708.  
  709. M+22A0h D(R/W):  Byte Window Min                                        (9100)
  710.  
  711. M+22A4h D(R/W):  Byte Window Max                                        (9100)
  712.  
  713. M+3000h - M+31FFh D(R/W):  Device Coordinate Registers
  714. bit  0-31  (Adr bit 3-4 = 1)  32bit X coordinate
  715.      0-31  (Adr bit 3-4 = 2)  32bit Y coordinate
  716.      0-15  (Adr bit 3-4 = 3)  16bit Y coordinate
  717.     16-31  (Adr bit 3-4 = 3)  16bit X coordinate
  718. Note: When these registers are accessed the lower bits of address selects the
  719.       X/Y register and the form used as follows:
  720.       Address bits:
  721.         0-2  Should be 0
  722.         3-4  Selects the data: 1: 32bit X value, 2: 32bit Y value,
  723.                3: Y in lower 16 bits and X in upper 16 bits
  724.           5  If set the data (X/Y) is window relative (only valid for writes),
  725.              if clear the data is absolute
  726.         6-7  Selects the X/Y coordinate register:
  727.               0: X[0]/Y[0], 1: X[1]/Y[1], 2: X[2]/Y[2], 3: X[3]/Y[3]
  728. Note: On the Power9000 these registers can probably also be accessed at
  729.       address:  M+3400h - M+35FFh (M+181400h - M+1815FFh in Power9000 terms)
  730.       as bit 10 of the address is not decoded
  731.  
  732. M+3200h - M+33FFh D(W):  Meta-Coordinate Pseudo regs
  733. bit  0-31  (Adr bit 3-4 = 1) 32bit X coordinate
  734.      0-31  (Adr bit 3-4 = 2) 32bit Y coordinate
  735.      0-15  (Adr bit 3-4 = 3) 16bit Y coordinate
  736.     16-31  (Adr bit 3-4 = 3) 16bit X coordinate
  737. Note: For these registers the data written is the coordinate(s) and the lower
  738.       bits of the address specify the drawing operation:
  739.       Address bits:
  740.          0-2  Should be 0
  741.          3-4  Selects the interpretation of the data written to the register.
  742.                 1: 32bit X value, 2: 32bit Y value, 3: Y in lower 16 bits and
  743.                     X in upper 16 bits
  744.            5  If set the coordinate is relative to the previous one, if clear
  745.               it is relative to the window offset
  746.          6-8  Type of operation. 0: Point, 1: Line, 2: Triangle,
  747.                3: Quadrilateral, 4: rectangle
  748. Note: On the Power9000 these registers can probably also be accessed at
  749.       address:  M+3600h - M+37FFh (M+181600h - M+1817FFh in Power9000 terms)
  750.       as bit 10 of the address is not decoded
  751.  
  752. 4386-9h  DAC
  753. 8386-9h  DAC
  754. C386-9h  DAC
  755.  
  756.  
  757. PCI Configuration space:
  758. Byte 41h   Bit 2 Set to access the DAC registers at A000h
  759.            Bit 3 Set to access the graphics engine registers at A000h
  760.  
  761.  
  762.  
  763.  
  764. Memory Locations:
  765.  0:0487h   (9100)  Bit 4.  Set for IBM RGB525 DAC, clear for Bt485 DAC
  766.  0:0489h   (9100)  Bit 5.  Set for 4MB video memory, clear for 2MB
  767.  
  768. ----------1DAA-------------------------------
  769. INT 10 - VIDEO - Diamond Get System Info (Viper Pro)
  770.         AX = 1DAAh
  771.         BX = FDECh
  772. Return: BX = CEDFh  if Viper Pro (Weitek P9100)
  773.         AL = Memory Type:
  774.                01h:  1MB  8 128Kx8
  775.                02h:  2MB  8 256Kx8 or 16 256Kx4
  776.                04h:  4MB
  777.                10h:  1MB  8 256Kx4
  778.         AH = Bits 0-3 = DAC type:
  779.                           0: Normal 8bit DAC
  780.                           1: Sierra 15/16bit DAC
  781.                           2: MUSIC MU9c1880/Diamond SS24
  782.                           3: Brooktree Bt485
  783.                           7: IBM RGB525
  784.                     4 = VGA chip. 0: Weitek 5x86, 1: Oak OTI-087
  785.                     5 = Bus type: 0: VLB bus, 1: PCI bus.
  786.         SI:DI -> Viper BIOS string
  787.