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

  1. Matrox MGA series
  2.  
  3. MGA-I  "IS-ATLAS" Used for the Impression series. Upto 3Mb VRAM, 2Mb DRAM
  4.        (Z-buffer) Impression Pro: Upto 4.5Mb VRAM, 4Mb DRAM (Z-buffer)
  5.        BitBLT, 3D-acceleration
  6. MGA-II "IS-DUBIC","IS-TITAN" 2chips (160pin & 240pin). Used for the Ultima
  7.        series.  Upto 4MB VRAM. BitBLT. No 3D support
  8.  ?     "IS-HELENA" 240 pin chip. Used for the Impression Lite/Plus series
  9.        3D support
  10.  ?     "2064W". Millenium series. 32bit VGA core. Upto 8Mb
  11.  
  12.  
  13. The Impression (original/Pro/Lite/Plus) boards have 3D functions (Gouraud
  14.  shading), the Ultima series does not.
  15.  
  16. The Compaq QVision 2000 card is based on the MGA-II
  17.  
  18. VGA registers. The VGA engine can be disabled.
  19.  
  20. 3d4h index E0h (R):
  21. Note:
  22.  
  23. 3d4h index E1h (R/W):
  24. bit  0-7  ??
  25.  
  26. 3d4h index E2h (R/W):
  27. bit  0-7  ??
  28.  
  29. 3d4h index E3h (R/W):
  30. bit  0-7  ??
  31.  
  32. 3DEh index 00h (R/W):
  33. bit  0-7  ??
  34.        2  If set blanks the first ~256 pixels
  35.        4  If set the display wraps at 128Kbytes
  36.  
  37. 3DEh index 01h (R/W):
  38. bit    0  In 256color modes enables the bank system when set.
  39.      1-2  ??
  40.        3  Set for Extended 256 color modes.
  41.      4-7  ??
  42.  
  43. 3DEh index 02h (R/W):
  44. bit  0-7  ??
  45.  
  46. 3DEh index 03h (R/W):
  47. bit  0-7  ??
  48.  
  49. 3DEh index 04h (R/W):
  50. bit  0-7  ??
  51.  
  52. 3DEh index 07h (R):
  53. 3DEh index 08h (R):
  54.  
  55. 3DEh index 09h (R/W):
  56. bit  0-3  64K bank number.
  57.  
  58. 3DEh index 0Ah (R/W):
  59. bit  0-1  Display Start Address bit 16-17. Bits 0-15 are in 3d4h index 0Ch-0Dh
  60.           Note that for 256color modes bits 0-1 of 3d4h index 0Dh appears to be
  61.           ignored. The data intended for these bits should be written to 3d4h
  62.           index 8 bits 5-6 instead.
  63.      2-3  ??
  64.        4  Appears to be set when the display start address is set ??
  65.      6-7  ??
  66.  
  67. 3DEh index 0Ch (R/W):
  68. bit  0-4  ??
  69.        7  ??
  70.  
  71. 3DEh index 0Dh (R/W):
  72. bit  0-7  ??
  73.        0  If set
  74.      1-2  Swaps lines (0/1 -> 1/0 ???)
  75.        4  If set changes memory layout
  76.        6  Interlaced if set ?
  77.        7  Clock ??
  78.  
  79. 3DEh index 0Eh
  80.  
  81.  
  82.  
  83. Matrox Native mode:
  84. In native mode the Matrox chips use a 16Kbyte memory mapped area. In the MGA-I
  85. (Impression) series this was apparently always at AC00h:0, in the MGA-II
  86. (Ultima) series it can be at AC00h:0, C800h:0, CC00h:0, D000h:0, D400h:0,
  87.  D800h:0 or DC00h:0.
  88.  
  89. M+0000h - M+1BFFh:  Source/DMA Window
  90. M+1C00h - M+1CFFh:  Drawing Registers
  91.  
  92. M+1C00h  D(W): Drawing Control Register (DWGCTL)
  93. bit  0-3  Opcode. 0: Open Line, 1: Auto/Open Autoline, 2: Closed Line,
  94.            3: Closed Autoline, 4: Trap, 8: BitBLT, 9: Iload, Ah: Idump
  95.      4-5  Auto line type. 0: RPL, 1: RSTR, 2: ANTI, 3: ZI
  96.        6  Blockmode ON if set
  97.        7  Linear BitBLT if set, XY BitBLT if clear
  98.    16-19  ROP. 0: Black/Blackness (0), 1: NotMergePen (Not (Dst OR Src)),
  99.            2: MaskNotPen (Dst AND Not Src), 3: NotCopyPen (Not Src),
  100.            4: MaskPennot ((Not Dst) AND Src), 5: NOT (Not Dst), 6: XORPEN
  101.            (Dst XOR Src), 7: NOTMASKPEN (Not (Dst AND Src)), 8: MASKPEN
  102.            (Dst AND Src), 9: NOTXORPEN (Not Dst XOR Src), Ah: NOP (Dst),
  103.            Bh: MERGENOTPEN (Dst OR Not Src), Ch: COPYPEN/SRCCOPY (Src),
  104.            Dh: MERGEPENNOT ((Not Dst) OR Src), Eh: MERGEPEN (Dst OR Src),
  105.            Fh: WHITE/WHITENESS (1)
  106.    20-23  Trans 0-15 ??
  107.       24  Alpha Dither. Set for RED, clear for foreground
  108.    25-26  (BitBLT) Blt Mode. 0: Mono, 1: Planar, 2: Foreground color, 3: UCOL?
  109.       25  (Z buffer?) ZDRWEN?. Set for Depth, clear for No Depth
  110.       26  (Z buffer?) ZLTE?. Set for Less_Than_or_Equal, clear for Less_Than
  111.       27  (Autoline?) Autoline foreground is Foreground Color if set, ALU data
  112.             if clear
  113.           (h?) Background Source is BGR/Windows if set, RGB/EC3 if clear ??
  114.       28  (Auto line?) ABAC is Background color if set, old data if clear
  115.           (?) HCPRS Source is 24bpp if set, 32bpp if clear
  116.       29  Pattern enabled if set, disabled if clear
  117.       30  Transc. Background is Transparent if set, Opaque if clear
  118.  
  119. M+1C04h  (W): Memory Access Register (MACCESS)
  120. bit  0-1  Pixel Width. 0: 8bpp, 1: 16bpp, 2: 32bpp
  121.      2-3    0: Source buffer, 2: Dest buffer A, 3: Dest buffer B
  122.  
  123. M+1C08h  (W): Memory Control Wait State Register (MCTLWTST)
  124. Note: Set to C4001000h for IDUMPs ??
  125.  
  126.  
  127. M+1C10h  (W): Destination In Register (DST0)
  128.  
  129. M+1C14h  (W): Destination In Register (DST1)
  130.  
  131. M+1C18h  (W): Z Mask Control Register (ZMSK)
  132.  
  133. M+1C1Ch  (W): Plane write Mask (PLNWT)
  134. bit 0-31  Each bit if set enables writing to the corresponding bit in video
  135.           memory. FFFFFFFFh enables all of memory, FFh enables only the low
  136.           byte of each DWORD (Blue), FF00h enables Green, FF0000h enables
  137.           the Red byte and FF000000h enables the free byte.
  138.  
  139. M+1C20h  (W): Background Color (BCOL)
  140.  
  141. M+1C24h  (W): ForeGround Color (FCOL)
  142.  
  143. M+1C2Ch  (W): Source Register for Blit (SRCBLT)
  144.  
  145. M+1C30h  (W): Source Register 0 (SRC0)
  146.  
  147. M+1C34h  (W): Source Register 1 (SRC1)
  148.  
  149. M+1C38h  (W): Source Register 2 (SRC2)
  150.  
  151. M+1C3Ch  (W): Source Register 3 (SRC3)
  152.  
  153. M+1C40h  (W): X Y Start Address (XYSTRT)
  154.  
  155. M+1C44h  (W): X Y End Address (XYEND)
  156.  
  157. M+1C50h  (W): Funnel Shifter Control Register (SHIFT)
  158. bit 16-21  Rightwise Shift count (2's complement -32 to 31).
  159.  
  160. M+1C58h  (W): Sign Register (SGN)
  161. bit     0  (Blit) If set the X coordinate moves from right to left (decreasing
  162.              X), if clear from left to right (increasing X).
  163.            (Line) Set if DeltaX > DeltaY.
  164.         1
  165.         2  If set the Y coordinate moves from bottom to top (decreasing Y),
  166.            if clear from top to bottom (increasing Y).
  167.         5
  168.  
  169. M+1C5Ch  (W): Length Register (LEN)
  170.  
  171. M+1C60h  AR0
  172. bit  0-16  ??
  173.  
  174. M+1C64h  AR1
  175. M+1C68h  AR2
  176. M+1C6Ch  AR3
  177. M+1C70h  AR4
  178. M+1C74h  AR5
  179. M+1C78h  AR6
  180.  
  181. M+1C8Ch  (W): Memory Pitch (PITCH)
  182. bit  5-12  Memory pitch in units of 32 (pixels or bytes?)
  183.        15  If set Y is not linear ??
  184.  
  185. M+1C90h  (W): Y Address Register (YDST)
  186.  
  187. M+1C94h  (W): Memory Origin Register (YDSTORG)
  188. M+1C98h  (W): Clipper Y Top Boundary (CYTOP)
  189. M+1C9Ch  (W): Clipper Y Bottom Boundary (CYBOT)
  190. M+1CA0h  (W): Clipper X Minimum Boundary (CXLEFT)
  191. M+1CA4h  (W): Clipper X Maximum Boundary (CXRIGHT)
  192. M+1CA8h  (W): X Address Register Left (FXLEFT)
  193. M+1CACh  (W): X Address Register Right (FXRIGHT)
  194. M+1CB0h  (W): X Destination Address Register (XDST)
  195. M+1CC0h - M+1CFFh  DR0 - DR15
  196.  
  197. M+1D00h - M+1DFFh:  Start Drawing Registers
  198. M+1E00h - M+1EFFh:  Host Registers
  199.  
  200. M+1E00h  (R/W): Source Page Register (SRCPAGE)
  201.  
  202. M+1E04h  (R/W): Destination Page Register (DSTPAGE)
  203.  
  204. M+1E08h  (R/W): Byte Accumulator Data (BYTACCDATA)
  205.  
  206. M+1E0Ch  (R/W): Address Generator Register (ADRGEN)
  207.  
  208. M+1E10h  (R/W): Bus FIFO Status Register (FIFOSTATUS)
  209. bit   0-6  FIFO count
  210.         8  Full
  211.         9  Empty
  212.     16-22  Byte Accumulator Address
  213.     24-29  Address Generator State
  214.  
  215. M+1E14h  D(R/W): Status Register (STATUS)
  216. bit     0  Bus FIFO Error Interrupt Status
  217.         1  DMA Controller Interrupt Status
  218.         2  Pick Interrupt Status
  219.         3  Vsync Status
  220.      8-11  Byte flag
  221.        16  Drawing Engine Status. Set if the engine is busy.
  222.  
  223. M+1E18h  (W): Interrupt Clear Register (ICLEAR)
  224. bit     0  Write 1 to clear the Bus FIFO Interrupt
  225.         1  Write 1 to clear the DMA Controller Interrupt
  226.         2  Write 1 to clear the Pick Interrupt
  227.  
  228. M+1E1Ch  (R/W): interrupt Enable Register (IEN)
  229. bit     0  Bus FIFO Interrupt enabled if set
  230.         1  DMA Controller Interrupt enabled if set
  231.         2  Pick Interrupt enabled if set
  232.         3  Vsync Interrupt enabled if set
  233. Note: "DMA Controller" could be "DMA Terminal Count" ?
  234.  
  235. M+1E40h  (R/W): Reset Register (RST)
  236. bit     0  Write 1 to perform a soft reset
  237.  
  238. M+1E44h  (R/W): Test Register (TEST)
  239. bit     0  VGA test
  240.         8  Robitwren ?
  241.  
  242. M+1E48h  (R): Revision Register (REV)
  243. bit  0-31  A2681700h for the MGA-II (Ultima)
  244.            A2681702h for the Impression LIte/Plus
  245.  
  246. M+1E50h  (R/W): Configuration Register (CONFIG_REG)
  247.  
  248. M+1E54h  (R/W): Operating Mode Register (OPMODE)
  249. bit     0  Pseudo DMA enabled if set
  250.         1  DMA Act? enabled if set
  251.       2-3  DMA mode. 1: Blit Write, 2: Vector Write, 3: Blit Read
  252.  
  253. M+1E5Ch  (R/W): CRTC Control (CRTC_CTRL)
  254.  
  255. M+1E60h  (R/W): VCOUNT Register (VCOUNT)
  256.  
  257. M+1F00h - M+1FFFh:  VGA registers
  258. Accesses to these addresses will access the VGA registers at 3xxh, I.e.
  259.  M+1FC4h accesses 3C4h.
  260.  
  261. M+2000h - M+3BFFh:  Destination Window
  262. M+3C00h - M+3C7Fh:  RamDAC Registers
  263.   The RamDAC registers are mapped 4 addresses apart (I.e. REG00 at M+3C00h,
  264.    REG01 at M+3C04h...).
  265.  
  266. M+3C80h - M+3CFFh:  Dubic Chip Registers
  267.  
  268. M+3C80h (R/W): DUB_SEL
  269. M+3C84h (R/W): NDX_PTR
  270. The indexed DUBIC registers are accessed by writing the index to M+3C84h
  271. and reading or writing the data at M+3C88h.
  272.  
  273. M+3C88h (R/W): DUB_DATA
  274. Data port for the indexed registers
  275.  
  276. M+3C84h index 00h  (R/W): DUB_CTL
  277. M+3C84h index 01h  (R/W): KEY_COL
  278. M+3C84h index 02h  (R/W): KEY_MSK
  279. M+3C84h index 03h  W(R/W): DBX_MIN_MAX
  280. M+3C84h index 05h  W(R/W): DBY_MIN_MAX
  281. M+3C84h index 07h  (R/W): OVS_COL
  282. M+3C84h index 08h  (R/W): CUR_X
  283. M+3C84h index 09h  (R/W): CUR_Y
  284. M+3C84h index 0Ah  (R/W): DUB_CTL2
  285. M+3C84h index 0Ch  (R/W): DUB_COL0
  286. M+3C84h index 0Dh  (R/W): DUB_COL1
  287. M+3C84h index 0Eh  (R/W): CRC_CTL
  288. M+3C84h index 0Fh  (R/W): CRC_DAT
  289.  
  290. M+3C83h (R/W): LASER
  291. M+3C84h (R/W): MOUSE0
  292. M+3C85h (R/W): MOUSE1
  293. M+3C86h (R/W): MOUSE2
  294. M+3C87h (R/W): MOUSE3
  295.  
  296.  
  297. M+3D00h - M+3D7Fh:  Viwic Chip Registers
  298. M+3D80h - M+3DFFh:  Clock Generator
  299. M+3E00h - M+3FFFh:  Expansion Devices
  300.  
  301.  
  302. Identifying Matrox chips:
  303.  
  304.  
  305.  
  306.  
  307. Modes (VGA part):
  308.  
  309. 27h G   800  600  PL4
  310. 2Ah G  1024  768  PL4
  311. 33h G   640  400  P8
  312. 34h G   640  480  P8
  313. 39h G   800  600  P8
  314. 3Bh G  1024  768  P8
  315. 41h T    90   25
  316. 43h T   120   25
  317. 44h T   132   25
  318.  
  319.  
  320. ----------10BD-----------------------------------
  321. INT 10 - VIDEO - Matrox - Check for Matrox card
  322.         AX = BDFFh
  323. Returns: AX = 00BDh if Matrox card installed
  324.          DX = BIOS segment
  325. ----------10BD-----------------------------------
  326. INT 10 - VIDEO - Matrox
  327.         AX = BDFEh
  328.  
  329.  
  330.         AL = Emulation
  331.                43h  CGA emulation
  332.                45h  EGA emulation
  333.                4Dh  Hercules emulation
  334.                56h  VGA emulation
  335.         ES:DI -> signature string "Calamity"
  336. Switches to the desired emulation
  337.  
  338.  
  339.  
  340. MCA specifics:
  341.   POS ID - 80ECh  (Ultima)
  342.  
  343. POS registers:
  344.  00h bit   0  Set if adapter enabled
  345.  
  346.  01h bit 0-2  Memory Mapping. Controls location of the 16K aperture
  347.                0: AC00h, 2: C800h, 3: CC00h, 4: D000h, 5: D400h, 6: D800h,
  348.                7: DC00h
  349.  
  350.