[comp.os.msdos.programmer] Forcing VGA cards into 16-bit operation

Mike_Benna@mindlink.UUCP (Mike Benna) (02/13/91)

For those of you who wanted more information about forcing VGA cards
into 16-bit operation, here it is:

Note that all bits are numbered from 0 to 7 ($01 to $80).

Paradise/Western Digital chips (PVGA1A and PVGA1B):

    Port 3CEh/3CFh, index 0Bh, bit 2.  Here's an example code fragment:

                mov     dx,3ceh
                mov     ax,50fh         ;turn off write protect on VGA
registers
                out     dx,ax

                mov     al,0Bh
                out     dx,al
                inc     dx
                in      al,dx
                or      al,00000100b    ;enable 16-bit display RAM
                out     dx,al


Ahead V5000 (perhaps only works with revision B):

    First, enable extended reg access with:

                mov     dx,3ceh
                mov     ax,200fh        ;enable extended register access
                out     dx,ax

    Then, port 3CEh/3CFh, index 0Ch, bit 4 is the 16-bit enable reg.


ATI VGAWonder (18800):

                mov     ax,0C000h       ;video BIOS segment
                mov     es,ax
                mov     dx,word ptr es:[10h] ;fetch address of ext. regs
                mov     al,0B3h
                out     dx,al
                inc     dx
                in      al,dx
                or      al,00100000b    ;enable 16-bit operation
                out     dx,al


Video 7:

                mov     dx,3c4h
                mov     al,06h
                out     dx,al
                inc     dx
                mov     al,0EAh
                out     dx,al           ;enable extended regs $80-$FF

                dec     dx
                mov     al,0FFh
                out     dx,al
                inc     dx
                in      al,dx
                or      al,00000001b    ;enable 16-bit memory
                out     dx,al

In addition to this information, there is a very good book about this
kind of stuff called 'Advanced Programmer's Guide to SuperVGAs' by
George Sutty and Steve Blair (Brady, ISBN 0-13-010455-8).  If nothing
else the book provides register-level information on several of the
major SVGA chip sets.

        ---> Mike
--
   ---> Mike Benna, Vancouver, B.C., Canada
        MindSpan Technologies Corp - Video Game Design and Development
  UUCP: Mike_Benna@mindlink.UUCP  or  uunet!van-bc!rsoft!mindlink!Mike_Benna