Last update 2000-09-25.

Matrox Mystique G200 review

The BIOS --- OPTION byte --- MATROX VBE ext. --- PInS --- PROGBIOS.EXE --- PCI identifiers

The BIOS

The BIOS subsystem located on Matrox Boards provides standard VGA BIOS services, VESA/VBE 2.0 functions, VESA/VBE/PM functions (4f10h), VESA/VBE/DDC functions (4f15h, 0, 1, 2) and Matrox extended functions (4f14h, 0..5).

The BIOS resides in either 8-bit wide FLASH EPROM (older boards) or SPI serial EEPROM (G100 and G200 based boards). This does not influence the speed, because in case of PCI and AGP boards the BIOS image is always copied to shadow RAM on system board before execution.

The BIOS fits in 32 Kbytes, although on some boards 64 KB chips may be used. In such case, only half of the chip is visible.

During normal DOS/Windows95/98 sessions, the BIOS is accessible at standard VGA BIOS location, C000:0000..C000:7FFF.

Important locations in BIOS space

Offset [hex] Length Description Value
0000 2 BIOS extension signature 0xAA55 (55h, 0aah)
0002 1 BIOS image length in 512 Byte units, 64 means 32 KB. Current G450 images are onger than 32 KB!!!
0018 2 SYS_ID offset 0x0060
0078 3 BIOS file name base three digits in ASCII, like "879"
7FF0 1 video memory size (in MBytes) - determined at init, valid in active BIOS only (new BIOSes for G-series)
7FF1 1 output options bit 7 - Flat Panel output active
bit 6 - FP type
7FF6 2 offset of TV out parameter table
7FF8 2 SUBSYS_VID - Card vendor ID 0x102B = Matrox, 0x1014 = IBM, 0x110a = Siemens
7FFA 1 SUBSYS_ID - hardware rev. id
7FFC 2 PINS offset see below
7FFF 1 BIOS checksum Sum of all bytes in BIOS image modulo 256 must be 0.

OPTION byte

The OPTION byte stores bit flags controlling some aspects of BIOS operation. Its value may be changed using PROGBIOS -b OPTION,1,<val>. The byte doesn't have any fixed location. Its address can be determined as follows: The meaning of bits in OPTION:

Matrox extended BIOS functions

Matrox provides extended BIOS functions using VESA "manufacturer's functions" interface. These functions are called as int 10h with ax = 0x4f14, and bl = function id

4f14, 00 - Get MGA info

entry: es:di points to 256 byte buffer
exit: ax = 0x004f
buffer filled as follows, unused locations set to 0:
 
00..06 string "VBE/MGA" (no trailing 0)
07..10 some data
11..12 BIOS version
13..16 seg:off, pointer to ASCIIZ string "Matrox"
17..1a seg:off, pointer to ASCIIZ card name
1b..1e seg:off, pointer to ASCIIZ string "00"
1f..22 seg:off, pointer to ASCIIZ vendor name, "Matrox Graphics"
23..26 seg:off, pointer to ASCIIZ BIOS file base name
27..2a seg:off, pointer to PINS
2b..2c video memory size in 64KB units
2d..30 linear address of linear frame buffer aperture
31..34 linear address of MGA control aperture
35..36 ?PCI location of the card (bus/device)

4f14, 01 - read/write MGA indexed data register

bh == 0 - write register
bh != 0 - read register

cl - register number, 80h means use the last recently used one
ch - value read/written (?)

4f14, 02 - read/write register in MGA control space

bh = 0 - write byte
bh = 1 - write word
bh = 2 - write dword
bh = 0x10 - read byte
bh = 0x11 - read word
bh = 0x12 - read dword

register address in si,
data passed in cl/cx/ecx

4f14, 03 - read PINS byte

si - offset of byte relative to PINS start
byte returned in cl

4f14, 04 - Set pixel clock

Set pixel clock.

4f14, 05 - read BIOS byte

si - offset of byte relative to BIOS image start (typ. C000:0000)
byte returned in cl

PINS structure

Each board’s BIOS contains the PINS structure which is unique to the board. The PINS is stored somewhere in the BIOS. The address (offset) of PINS is stored at offset 7FFC in the BIOS as 16-bit word. Different models of boards have slightly different PINS structure, as shown below.
 
Board PINS veresion
Millenium 1.0 ("old PINS")
Mystique 170, some Myst 220 2.0
Mystique 220, Millenium II 2.1
G100, G200 3.0
new G200 ('99) 3.5
G400 4.x
G450 5.1

PInS 3.x

The PInS version 3.x structure, used by G100 and G200 boards, is shown below.
 
offset
(hex)
length id used by
PROGBIOS
description value
00 2 0 PINS signature "PIN" (2eh, 41h)
02 1 1 PINS struct length 40h (64)
03 1 2 ?  
04 2 3 PINS version <00, 03> means v3.0
06 2 4 last prog date  
08 2 5 no. of programming  increased at every programming
0a 2 6 detailed board type  
0c 8 7 serial number in ASCII, 3 letters+5 digits, like "ABC12345"
14 8 none we are missing something here
1c 6 8 card version  ASCII, like "001B", "205a"
22 2 9 PCB revision 12 MSBits - major rev., 4 LSBits - minor;
printed on the PCB as "644 00", "703 00" or alike
24 1 10 max. RAMDAC freq value-100 -> 130 means 230MHz 
25 1 11 max. Pixel clock, 8 bpp val - 100 
26 1 12 max. Pixel clock, 16 bpp val - 100
27 1 13 max. pixel clock, 24 bpp  val - 100
28 1 14 max. pixel clock, 32 bpp val - 100
29 1 15 VGA1 PCLK  
2a 1 16 VGA2 PCLK  
2b 1 17 VGA GCLK frequency in MHz 
2c 1 18 2D GCLK w/o memory expansion  
2d 1 19 2D GCLK w/2MB memory expansion  
2e 1 20 2DGCLK w /4MB memory expansion  
2f 1 21 2D GCLK w/8MB memory expansion  
30 22 Memory Control Word   
34 1 23  
35 1 24 video output options   
36 1 25    
37 1 26  
38 1 27 ?  
39 1 28 ?  
3a 1 29 ?  
3b 1 30 ?  
3c 1 31 3D GCLK  
3d 1 32 ?  
3e 1 33 ?  
3f 1 34 checksum all bytes sum modulo 256 = 0

PInS 4.x - used by G400 cards

offset
(dec)
length description value
0 2 PINS signature (2eh, 41h)
2 1 PINS struct length 128
3 1 ?  
4 2 PINS version 0x400? means v4.?
6 2 last prog date  
8 2 no. of programming  increased at every programming
10 2 detailed board type  
12 16 serial number in ASCII, 3 letters+5 digits, like "ABC12345"
28 6 card version  ASCII, like "001B", "205a"
34 2 PCB revision 12 MSBits - major rev., 4 LSBits - minor;
printed on the PCB as "644 00", "703 00" or alike
36 2
38 1 max. System VCO freq val/4
39 1 max. Pixel VCO freq val/4
40 1 max. primary Pixel clock, 8 bpp val/4
41 1 max. primary Pixel clock, 16 bpp val/4
42 1 max. primary pixel clock, 24 bpp  val/4
43 1 max. primary pixel clock, 32 bpp val/4
44 1 max. secondary pixel clock, 16 bpp val/4
45 1 max. secondary pixel clock, 32 bpp val/4
46
50
51 1 VGA1 PCLK  
52 1 VGA2 PCLK  
55 1 VGA GCLK frequency in MHz 
56 1 VGA System PLL freq. freq/4
57 4
61 4 Memory Control Word
65 1 2D GCLK  
66 1 2D System PLL val/4
67 4
71 4 2D Memory Control Word
75 1 3D GCLK
76 1 3D System PLL freq val/4
77 4
81 4 3D Memory Control Word  
85 1  
86 2    
88 2  
90 1 video output options   
91 2    
93 2  
95 32 reserved  
127 1 checksum all bytes sum modulo 256 = 0

PInS 5.x - used by G450

(coming soon...)



PCI identifiers

The identifier is hard coded in the chip. It is also stored in BIOS SYS_ID area. SYS_ID offset relative to BIOS base is stored at offset 0x0018 in BIOS. On all Matrox cards the offset of SYS_ID is 0x0060.

Vendor ID:
102B - Matrox

Device ID:
DevID Rev. Codename Chip and board name
0518 ?Atlas MGA-II - Ultima
0519 Storm MGA 2064W - Millenium
051A 00..02 Hurricane MGA 1064SG - Mystique
051A 03.. Cyclone MGA 1164SG - Mystique 220
051B Mistral MGA 21164W PCI - Millenium II PCI
051E Chinook MGA Mystique 220 AGP
051F Mistral MGA 21164W AGP - Millenium II AGP
0520 00..02 Eclipse MGA G200 PCI (.35u)
0521 00..02 Eclipse MGA G200 AGP (.35u)
0520 03.. Calao MGA G200 PCI (.25u)
0521 03.. Calao MGA G200 AGP (.25u)
0525 0x Toucan G400 AGP
0525 80.. Condor G450
0D10 Athena MGA-I - Impression
1000 Twister MGA G100 (PCI)
1001 Twister MGA G100 (AGP)