Date: Wed, 8 Apr 92 22:28:36 EDT
From: BERNIET@BCRVMPC1.VNET.IBM.COM
Subject: OS/2 SVGA INFO (long)
Newsgroups: comp.os.os2.programmer

Revision 1.0                                                 April 8, 1992
                          OS/2 SVGA NETINFO
                       -----------------------
  INTRO:

This little document is meant to shed some light on how OS/2 can utilize
SVGA hardware.  I'll start out with a description of all of the files involved,
their duties, and where they live; and I'll have a question and answer session
with myself (schitzoid, but hopefully informative).

  THE FILES:

\OS2\SVGADATA.PMI
        This file serves as a flag to tell OS/2 whether SVGA support has been
        enabled with SVGA ON.  The file actually contains data on
        1. What video chipset your SVGA card has.
        2. What SVGA modes, from the supported list, your adapter is capable of
           setting.  The list of supported modes is:
                a. 640x480/256
                b. 800x600/16
                c. 800x600/256
                d. 1024x768/16
                e. 1024x768/256
                f. 132x25 text
                g. 132x43 or 44 text
        3. What values are in the video registers when the card is in each
           mode..  this data is used by OS/2 to save and restore the registers
           to their proper state when switching between sessions with
           different SVGA modes set.
        This data file must be generated by typing SVGA ON from a DOS
        FULLSCREEN, because what SVGA ON actually does is set all the possible
        modes using the video card's BIOS and then read out the values of the
        registers into the .PMI file. If SVGA ON is run from a DOS window,
        OS/2's video virtualization takes over, and the BIOS doesn't set the
        svga modes properly.
\OS2\SVGA.EXE
        This is the utility that generates the .PMI file and places it in the
        \OS2 subdirectory. Syntax is SVGA (ON)(OFF)(STATUS), where
          ON: creates the \OS2\SVGADATA.PMI file and enables SVGA support.
          OFF: deletes the .PMI file.
          STATUS: returns the chipset type OS/2 thinks your card is.
\OS2\DLL\DISPLAY.DLL
        This file determines what video resolution the PM desktop uses.
        This is the PM display driver and the heart of OS/2 video.  The
        equivalent file on a Windows system is the VGA.DRV (in the case of
        VGA) file.  For the first release, SVGA systems will have a VGA
        display driver installed on their system.  Already, SVGA drivers are
        available from most of the main board manufacturers. In
        this document, I'll try to list some of the ones that are working.
\OS2\DLL\BVHSVGA.DLL
        This file is the Base Video Handler for OS/2.  Any OS/2 application
        that sets a video mode calls this DLL.  In mode cases, however, the
        only application that sets any video modes is the PM display driver
        and the MODE.EXE utility (for setting 132 column modes).  The first
        time this DLL would be called is after the OS/2 bitmap logo appears
        (PM starts up then).  This DLL is specified in the CONFIG.SYS in the
        following manner:
           SET VIO_VGA=DEVICE(BVHVGA,BVHSVGA)
        BVHVGA is used to set, save, and restore VGA modes, BVHSVGA for SVGA
        modes.
\OS2\MDOS\VSVGA.SYS
        This is the virtual video device handler for DOS sessions.  All calls
        to change the video mode from a DOS session are handled through this
        driver.  This driver's job is to allow the user to set a SVGA mode, and
        when the user switches away, save the current state of the video card
        (its registers and its video RAM).  Then, when the user returns to the
        DOS session, restore the video card to it's previous state. When there
        is no .PMI file (SVGA is OFF) this driver acts like a VGA driver,
        except for adapter-specific code in it to make sure the VGA modes work
        right on the SVGA adapter.  Therefore, even if you don't want SVGA,
        you'll probably want VSVGA.
\OS2\MDOS\WINOS2\SYSTEM\VGA.DRV
\OS2\MDOS\WINOS2\SYSTEM\SWINVGA.DRV
        These are the WINOS2 and seamless WINOS2 drivers, respectively.  They
        determine what resolution WINSO2 uses.

  QUESTION AND ANSWER::

Q:  I'm having problems with my video.
A:  Start by reading the README in your root directory.

Q:  I'm having problems with my video.
A:  In many cases, OS/2 requires a different dip switch setup for your adapter.
    Try some of the suggested variations in your adapter manual.

Q:  I have an adapter that uses the Tseng ET4000 chipset. My video goes out of
    sync when entering a DOS or WinOS2 fullscreen, what's the deal?
A:  Tseng ET4000 chips with a batch # TC6059AF or higher will exhibit this
    effect.  Through talking to Tseng, we have developed a solution, and
    hopefully by the time you read this your problem will be gone.

Q:  What SVGA support is actually provided with OS/2 2.0 GA edition?
A:  The only support that is provided in the shrink wrapped version is the
    ability to switch away from a DOS or OS/2 fullscreen and have the current
    state of your video card saved.. and this is only after you have turned
    SVGA ON, and if you have one of the adapters listed in the readme..although
    everyone with a Tseng, Trident, ATI, Headland, or Western Digital chipset
    should try turning SVGA ON at least for a while to see if it fixes any
    unseemly video problems they might be having.

Q:  For what adapters has DOS + OS/2 fullscreen save/restore been tested?
A:  ATI VGA Wonder XL
    Boca Reseach SVGA
    Orchid Prodesigner II
    STB Powergraph
    Trident 8900C and 8900B
    Video 7 VRAM II
    Paradise VGA Professional

Q:  Are these the only cards which are "compatable" with OS/2?
A:  NO. Our support is designed to be generic for the Trident, Tseng, ATI,
    Headland, and Western Digital chipsets.  There are likely many more cards
    which work under OS/2 which we havn't even tried.  If you have a card which
    isn't on this list, but does work, please send a note to the email address
    at the bottom of this document with the name of the card and any small
    limitations you found.

Q:  How do I get my PM desktop to use SVGA?
A:  OS/2 does not provide any PM SVGA drivers.. they are available from the
    board manufracturers.  At this time, there are drivers from Trident,
    Orchid, ATI, Tseng, Paradise, and probably countless others. Check around
    for more updated lists than this.

Q:  Will my W*nd*ws 3.0 drivers work in WinOS2?
A:  Yes, you should be able to simply update the SYSTEM.INI to point to a new
    windows display driver, or just copy over VGA.DRV in the
    OS2\MDOS\WINOS2\SYSTEM directory.   Keep in mind, however, that Windows in
    SVGA will only work if you have SVGA ON.

Q:  Why do I have to deal with this SVGA ON and OFF crap?
A:  Because we've torn out many clumps of hair discovering all of the crazy
    things that can happen when you try to provide video support for for so
    many different boards, each with their own quirks.  Most importantly, we
    found that turning SVGA ON actually caused some system's video to become
    worse.. so we had to have a way to give the user the ability to switch back
    and forth.  And so was born the SVGA ON OFF thing.  Hopefully a more
    elegant system will be developed in the future.

Q:  I have an ATI 8514 Ultra.. does it work under OS/2?
A:  Yessir. Because of it's 8514 compatability, this is a keen card. If your
    Ultra is hooked into an SVGA card, you will probably have to change the
    line in your CONFIG.SYS that reads:
    DEVICE=\OS2\MDOS\VVGA.SYS
                                    to:
    DEVICE=\OS2\MDOS\VSVGA.SYS
    This will make OS/2 alot more friendly towards your Ultra's little brother.
    Other than the complication of which card the Ultra is hooked into, OS/2
    treats it just like a 8514 card. Contact ATI for any special problems with
    this card.

Q:  I'm getting some corruption returning to my WinOS2 fullscreen
A:  Set your VIDEO_SWITCH_NOTIFICATION in the DOS SETTINGS to ON.

Q:  Even in VGA, games in a DOS fullscreen are shakey
A:  Set your VIDEO_RETRACE_EMULATION in the DOS SETTINGS to OFF.

Q:  Alot of DOS apps in a window have messed up colors
A:  This is a limitation of the VGA desktop.  The color palatte of the DOS
    session has to be translated to PM, and the 640x480/16 desktop doesn't
    offer enough colors to do a good translation.  The only solution to the
    problem is to use a 256 color PM driver.

Q:  My friend has the same video card as me, and it doesn't work.. can't I
    just give him a working SVGADATA.PMI file?
A:  No. The SVGADATA.PMI has to be specific to each adapter/monitor setup.

Q:  If I have SVGA ON, can I use 132 column modes in an OS/2 fullscreen?
A:  yep.

Q:  If I have SVGA ON, can I window a DOS fullscreen onto the PM desktop, even
    if it is Super VGA?
A:  yep!

Q:  If I have SVGA ON, can I take a window with a SVGA image in it can paste
    to the clipboard?
A:  YEP!

Q:  Hey, wait a minute. A month ago in 304e, there was no SVGA support at all!
A:  Yep! Long hours, buddy, long hours.

Q:  Who were the guys who did all the work on OS/2 SVGA support?
A:  Dale Whitfield and Bill Boden.  They aren't on the net, but still give them
    a hand for the cool stuff that's here and still to come.

Bernie Thompson PSU student and IBM co-op
Send comments/additions to:
    BERNIET@BCRVMPC1.VNET.IBM.COM

I don't know if this will eventually end up in his hands, but I'd like to
thank Timothy Sipples, Keeper of the OS/2 Frequently Asked Questions, for all
of his work over the last couple months.  OS/2 owes you one.

  ***************************************************************************
  *                              DISCLAIMER                                 *
  *                              ----------                                 *
  *  The opinions and suggestions contained herein are my own and not those *
  *  of my employer. This document does not represent any sort of guarantee *
  *  or assurance. Just tips guys... nothing legal, get it?  Good.          *
  ***************************************************************************