SVGATextMode support for Matrox G100/200/400 + 2164agp cards

SVGATextMode support for Matrox G100/200/400 + 2164agp cards

Post by jw » Sun, 10 Oct 1999 04:00:00



This small patch adds support for Matrox G100 (pci/agp), G200 (pci/agp),
G400 and Millennium II agp cards to SVGATextMode-1.9. I've tested it
only on a G200 agp, and it seems to work. Don't hold me responsible in
any way if you manage to blow up your monitor.
Since the author of SVGATextMode has stressed that he won't develop it
further, I'm not sure he will do something with my contribution. I
cannot blame him, but I won't keep it to myself either.

Good luck with this!
==============================================================================================
diff -u -r SVGATextMode-1.9-src/XFREE/mga_clock.c SVGATextMode-1.9-src-matrox/XFREE/mga_clock.c
--- SVGATextMode-1.9-src/XFREE/mga_clock.c      Wed Nov 26 16:53:09 1997

                        {
                                if ((pcr->_device == PCI_CHIP_MGA2064)
                                        || (pcr->_device == PCI_CHIP_MGA1064)
-                                        || (pcr->_device == PCI_CHIP_MGA2164))
+                                        || (pcr->_device == PCI_CHIP_MGA2164)
+                                        || (pcr->_device == PCI_CHIP_MGA2164_AGP)
+                                        || (pcr->_device == PCI_CHIP_MGAG200_PCI)
+                                        || (pcr->_device == PCI_CHIP_MGAG200)
+                                        || (pcr->_device == PCI_CHIP_MGAG100_PCI)
+                                        || (pcr->_device == PCI_CHIP_MGAG100)
+                                        || (pcr->_device == PCI_CHIP_MGAG400))
                                        break;
                        }

        if (!pcr) return(FALSE);

-       if ((pcr->_device != PCI_CHIP_MGA2064) && (pcr->_device != PCI_CHIP_MGA1064) && (pcr->_device != PCI_CHIP_MGA2164))
+       if ((pcr->_device != PCI_CHIP_MGA2064) &&
+            (pcr->_device != PCI_CHIP_MGA1064) &&
+            (pcr->_device != PCI_CHIP_MGA2164) &&
+            (pcr->_device != PCI_CHIP_MGA2164_AGP) &&
+            (pcr->_device != PCI_CHIP_MGAG200_PCI) &&
+            (pcr->_device != PCI_CHIP_MGAG200) &&
+            (pcr->_device != PCI_CHIP_MGAG100_PCI) &&
+            (pcr->_device != PCI_CHIP_MGAG100) &&
+            (pcr->_device != PCI_CHIP_MGAG400))
                return(FALSE);


        }
         PDEBUG(("MGAbase0: %x ; MGAbase1: %x ; MGAbase2: %x\n",
                  pcr->_base0, pcr->_base1, pcr->_base2));
+        /* please note that we need to mask the memory-base with 0xffffc000 according */
+        /* to the sources in xfree86-3.3.5 (my G200-agp suggests MGABase0 f4000008)   */

         if (  ( (pcr->_device == PCI_CHIP_MGA1064) &&

                 */
 /*                PDEBUG(("MGA: swapping mem address bytes to %08lx\n", pcr->_base1));*/
                 base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
-                 MAP_SHARED, devmem, (off_t)(pcr->_base1));
+                 MAP_SHARED, devmem, (off_t)(pcr->_base1 & 0xffffc000));
         }
         else
         {
                 base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
-                MAP_SHARED, devmem, (off_t)(pcr->_base0));
+                MAP_SHARED, devmem, (off_t)(pcr->_base0 & 0xffffc000));
         }
        close(devmem);
        if ((long)base == -1) {
diff -u -r SVGATextMode-1.9-src/XFREE/vgaPCI.h SVGATextMode-1.9-src-matrox/XFREE/vgaPCI.h
--- SVGATextMode-1.9-src/XFREE/vgaPCI.h Wed Nov 26 16:52:14 1997

 #define PCI_CHIP_MGA2064       0x0519
 #define PCI_CHIP_MGA1064       0x051A
 #define PCI_CHIP_MGA2164        0x051B
+#define PCI_CHIP_MGA2164_AGP    0x051f
+#define PCI_CHIP_MGAG200_PCI    0x0520
+#define PCI_CHIP_MGAG200        0x0521
+#define PCI_CHIP_MGAG100_PCI    0x1000
+#define PCI_CHIP_MGAG100        0x1001
+#define PCI_CHIP_MGAG400        0x0525

 /* Chips & Tech */

                                {PCI_CHIP_MGA2064,      "MGA 2064W"},
                                {PCI_CHIP_MGA2164,      "MGA 2164W"},
                                {PCI_CHIP_MGA1064,      "MGA 1064SG"},
-                               {0x0000,                NULL}}},
+                                {PCI_CHIP_MGA2164_AGP,  "MGA 2164W AGP"},
+                                {PCI_CHIP_MGAG200_PCI,  "MGA G200 PCI"},
+                                {PCI_CHIP_MGAG200,      "MGA G200"},
+                                {PCI_CHIP_MGAG100_PCI,  "MGA G100 PCI"},
+                                {PCI_CHIP_MGAG100,      "MGA G100"},
+                                {PCI_CHIP_MGAG400,      "MGA G400"},
+                               {0x0000,                NULL}}},
     {PCI_VENDOR_CHIPSTECH, "C&T", {
                                {PCI_CHIP_65545,        "65545"},
                                {PCI_CHIP_65548,        "65548"},

==============================================================================
Greetings,
Jurriaan

--
Mine alone is the country of my soul
        Marc Chagall

 
 
 

SVGATextMode support for Matrox G100/200/400 + 2164agp cards

Post by Sane » Tue, 19 Oct 1999 04:00:00


Hello there...

    I am trying to get SVGATextMode to work with my G400, and I am missing
some info, I think.

   I applied the patch (by hand, not quite up to reversing diff stuff yet)
and after
hardcoding a #include "asm/io.h" so that it would compile, I have not once
managed
get SVGATextMode to work in even 80x25.

   I am wondering what, if any, Clocks line I should have for the G400.  My
XF86Config
file had no Clocks listing, so I just though someone here might be able to
point me in a
direction (or flat out tell, that would be cool, too) as to what my Clocks
line, and any other
general line that is needed to get a G400 working is.  Scrounging through
Matrox's Tech support
I was unable to dredge up any such info.

In general, the thing just keeps telling me that requested clock rates for a
given setting are out
of range (when being used for 1280x1024 screen resolution setting "exceeds
range [16...1023]"),
either too low, or too high.

I am using a Matrox G400 card and a Diamond Pro 900u Monitor.

Any further help would be wonderful.

Thanks


Quote:

> This small patch adds support for Matrox G100 (pci/agp), G200 (pci/agp),
> G400 and Millennium II agp cards to SVGATextMode-1.9. I've tested it
> only on a G200 agp, and it seems to work. Don't hold me responsible in
> any way if you manage to blow up your monitor.
> Since the author of SVGATextMode has stressed that he won't develop it
> further, I'm not sure he will do something with my contribution. I
> cannot blame him, but I won't keep it to myself either.

> Good luck with this!
> ::snip::

Scott Barnett

 
 
 

SVGATextMode support for Matrox G100/200/400 + 2164agp cards

Post by António Arag? » Wed, 17 Nov 1999 04:00:00


jwk wrote:

> This small patch adds support for Matrox G100 (pci/agp), G200 (pci/agp),
> G400 and Millennium II agp cards to SVGATextMode-1.9. I've tested it
> only on a G200 agp, and it seems to work. Don't hold me responsible in
> any way if you manage to blow up your monitor.
> Since the author of SVGATextMode has stressed that he won't develop it
> further, I'm not sure he will do something with my contribution. I
> cannot blame him, but I won't keep it to myself either.

> Good luck with this!

==============================================================================================
> diff -u -r SVGATextMode-1.9-src/XFREE/mga_clock.c

SVGATextMode-1.9-src-matrox/XFREE/mga_clock.c
> --- SVGATextMode-1.9-src/XFREE/mga_clock.c Wed Nov 26 16:53:09 1997
> +++ SVGATextMode-1.9-src-matrox/XFREE/mga_clock.c  Fri Oct  8 20:09:26
1999
> @@ -58,7 +58,13 @@
>                    {
>                            if ((pcr->_device == PCI_CHIP_MGA2064)
>                                    || (pcr->_device == PCI_CHIP_MGA1064)
> -                                        || (pcr->_device ==
PCI_CHIP_MGA2164))
> +                                        || (pcr->_device ==
PCI_CHIP_MGA2164)
> +                                        || (pcr->_device ==

PCI_CHIP_MGA2164_AGP)
> +                                        || (pcr->_device ==

PCI_CHIP_MGAG200_PCI)
> +                                        || (pcr->_device ==
PCI_CHIP_MGAG200)
> +                                        || (pcr->_device ==

PCI_CHIP_MGAG100_PCI)
> +                                        || (pcr->_device ==
PCI_CHIP_MGAG100)
> +                                        || (pcr->_device ==
PCI_CHIP_MGAG400))
>                                    break;
>                    }
>            }
> @@ -66,7 +72,15 @@

>    if (!pcr) return(FALSE);

> -  if ((pcr->_device != PCI_CHIP_MGA2064) && (pcr->_device !=

PCI_CHIP_MGA1064) && (pcr->_device != PCI_CHIP_MGA2164))
> +  if ((pcr->_device != PCI_CHIP_MGA2064) &&
> +            (pcr->_device != PCI_CHIP_MGA1064) &&
> +            (pcr->_device != PCI_CHIP_MGA2164) &&
> +            (pcr->_device != PCI_CHIP_MGA2164_AGP) &&
> +            (pcr->_device != PCI_CHIP_MGAG200_PCI) &&
> +            (pcr->_device != PCI_CHIP_MGAG200) &&
> +            (pcr->_device != PCI_CHIP_MGAG100_PCI) &&
> +            (pcr->_device != PCI_CHIP_MGAG100) &&
> +            (pcr->_device != PCI_CHIP_MGAG400))
>            return(FALSE);

>    /*
> @@ -85,6 +99,8 @@
>    }
>          PDEBUG(("MGAbase0: %x ; MGAbase1: %x ; MGAbase2: %x\n",
>                   pcr->_base0, pcr->_base1, pcr->_base2));
> +        /* please note that we need to mask the memory-base with

0xffffc000 according */
> +        /* to the sources in xfree86-3.3.5 (my G200-agp suggests

MGABase0 f4000008)   */

- Show quoted text -

>          if (  ( (pcr->_device == PCI_CHIP_MGA1064) &&
>                  (pcr->_rev_id == 0x3)) ||
> @@ -98,12 +114,12 @@
>                  */
>  /*                PDEBUG(("MGA: swapping mem address bytes to %08lx\n",
pcr->_base1));*/
>                  base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
> -                 MAP_SHARED, devmem, (off_t)(pcr->_base1));
> +                 MAP_SHARED, devmem, (off_t)(pcr->_base1 & 0xffffc000));
>          }
>          else
>          {
>                  base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
> -                MAP_SHARED, devmem, (off_t)(pcr->_base0));
> +                MAP_SHARED, devmem, (off_t)(pcr->_base0 & 0xffffc000));
>          }
>    close(devmem);
>    if ((long)base == -1) {
> diff -u -r SVGATextMode-1.9-src/XFREE/vgaPCI.h

SVGATextMode-1.9-src-matrox/XFREE/vgaPCI.h

- Show quoted text -

> --- SVGATextMode-1.9-src/XFREE/vgaPCI.h    Wed Nov 26 16:52:14 1997
> +++ SVGATextMode-1.9-src-matrox/XFREE/vgaPCI.h     Fri Oct  8 12:54:12 1999
> @@ -95,6 +95,12 @@
>  #define PCI_CHIP_MGA2064  0x0519
>  #define PCI_CHIP_MGA1064  0x051A
>  #define PCI_CHIP_MGA2164        0x051B
> +#define PCI_CHIP_MGA2164_AGP    0x051f
> +#define PCI_CHIP_MGAG200_PCI    0x0520
> +#define PCI_CHIP_MGAG200        0x0521
> +#define PCI_CHIP_MGAG100_PCI    0x1000
> +#define PCI_CHIP_MGAG100        0x1001
> +#define PCI_CHIP_MGAG400        0x0525

>  /* Chips & Tech */
>  #define PCI_CHIP_65545            0x00D8
> @@ -256,7 +262,13 @@
>                            {PCI_CHIP_MGA2064,      "MGA 2064W"},
>                            {PCI_CHIP_MGA2164,      "MGA 2164W"},
>                            {PCI_CHIP_MGA1064,      "MGA 1064SG"},
> -                          {0x0000,                NULL}}},
> +                                {PCI_CHIP_MGA2164_AGP,  "MGA 2164W
AGP"},
> +                                {PCI_CHIP_MGAG200_PCI,  "MGA G200 PCI"},
> +                                {PCI_CHIP_MGAG200,      "MGA G200"},
> +                                {PCI_CHIP_MGAG100_PCI,  "MGA G100 PCI"},
> +                                {PCI_CHIP_MGAG100,      "MGA G100"},
> +                                {PCI_CHIP_MGAG400,      "MGA G400"},
> +                          {0x0000,                NULL}}},
>      {PCI_VENDOR_CHIPSTECH, "C&T", {
>                            {PCI_CHIP_65545,        "65545"},
>                            {PCI_CHIP_65548,        "65548"},

==============================================================================

> Greetings,
> Jurriaan

> --
> Mine alone is the country of my soul
>         Marc Chagall

How can I get SVGATextMode ?

------------------  Posted via CNET Linux Help  ------------------
                    http://www.searchlinux.com

 
 
 

1. Matrox G100/200 for Alpha

Hello folks,
I'm planning to buy a G100/200 for my Alpha at home but I'm having a
hard time locating a reseller for these Matrox cards as there seems not
to be any available for PCI... :-(

Anybody has an URL for a reseller which has G100/200 PCI in stock?
And what would be a reasonable price?

TIA.

--
Wai-Sun "squidster" Chia

2. iptable NAT help

3. starmax 400/200, video only 16 colors

4. iso chars sets and solaris

5. PII 400 slower than PPro 200

6. newbie question: How to read what's on a floppy

7. support for Matrox Millenium G-200

8. lucent winmodem problem..

9. Matrox - Old "Ultima Plus 200" Support?

10. MetroX with *old* Matrox Ultima Plus 200 card - no go?!

11. 320 x 200 Video in Matrox Millenium cards

12. Video support - Matrox Productiva G100

13. Matrox G100 Productiva MMS support ??