

T1KVGA -- Bug Fix for Tandy 1000 series
Courtesy ATI Technologies

Note: this bug fix was provided by ATI when I bought a VGA Wonder card. I
specifically asked if the VGAW card worked in T1Ks, and was told that it
did, but that there is a bug in Tandys that prevents many programs that
access the equipment information bytes from working in VGA modes, _even
if installed for such_. Here's that fix.

Technical Support Department
27 JAN 1989
Technical Note TN18 -- Correcting system BIOS bug in Tandy 1000 PCs

INTRODUCTION

This document describes how to create a simple program which corrects a
bug in the system BIOS of the Tandy 1000 TX, TL, SX and SL PCs. No other
computers are known to be affected, including other models of Tandy
1000s.

This bug will cause some VGA compatible programs to run only in EGA mode,
even if a VGA card and monitor are installed. Some examples of such
programs are WordPerfect 5.0, Microsoft Works and Word 4.0, and Borland
Turbo languages. This program has been tested with the ATI VGA Wonder and
IBM PS/2 Display Adapters.

TECHNICAL DESCRIPTION

The bug in the Tandy BIOS causes a certain byte (0000:048ah) in the DOS
status area to be overwritten with a meaningless value. This byte
contains the entry number in the Display Combination Code (DCC) table in
the video ROM. If this pointer is not set correctly, the Read Display
Combination Code command (INT 10, AH=1Ah, AL=00h) in the VGA BIOS will
not return the correct display code. The program will insert a new entry
for the DCC table pointer. The user must correctly choose the value for
the display combination installed on his computer from the table below.
To simplify selecting the value, only combinations that are known to be
implemented in current IBM PCs are shown in the table.

PROCEDURE

To create the patch program, it will be necessary to utilize the DEBUG
program which comes with every copy of DOS. If you have not included the
directory containing your DOS files in your path, go to that directory.
Where <CR> is shown, this means just press the ENTER key.

Enter these keystrokes:                 Comments--DON'T type these!
DEBUG<CR>                               ; run the debug program
a 100<CR>                               ; start assembling at 0100
MOV AX,0<CR>                                            
MOV DS,AX<CR>
MOV AL,TABLE_ENTRY<CR>                  ; register represented by
                                        ; variable; we're putting that
                                        ; value into AL.  See table
                                        ; below for value to use.
DS:<CR>
MOV [48a],AL<CR>                        ; put contents of AL into 048Ah
MOV AX,4c00<CR>                         ; get set to exit
INT 21                                  ; exit to DOS

<CR>                                    ; back into debug editor mode
rcx<CR>                                 ; tell debug how long the prog is
20<CR>                                  ; 20 hex bytes
n T1KVGA.COM<CR>                        ; (n)ame the program T1KVGA.COM
w<CR>                                   ; (w)rite the program to disk
q<CR>                                   ; (q)uit debug


Select the value for the variable TABLE_ENTRY from the chart below. The
choice should correspond to the default video mode selected by the VGA
card.  (In most cases, the value 0B would be used.)

Default Video Mode      Value           Meaning
    VGA color            0B     single VGA color display
    VGA color and MDA    0C     dual monitors with VGA color and 
                                 mono text cards
    VGA mono             0D     single VGA monochrome display
    VGA mono and CGA     0E     dual monitors with VGA mono and
                                 CGA color cards

Successfully completing this procedure will result in creating a small
program called T1KVGA.COM. This program should be run before trying to
run any software which checks for the presence of a VGA card. We suggest
that you add the program to your AUTOEXEC.BAT file so it will be
automatically executed each time you boot the system.

There is a file T1KVGA.COM in TANDYPRO LIB 5 for your convenience if you 
have any problems compiling it.  
