Category : Miscellaneous Language Source Code
Archive   : TDSVGA.ZIP
Filename : TI1037.TXT
VERSION : 3.1
OS : WINDOWS
TITLE : Configuring/Using Turbo Debugger for Windows
Super VGA support for TDW
=========================
The Turbo Debugger for Windows (TDW) handles most 2-, 4-, 16- and
256-color high-resolution Super VGA modes, but if your card or
mode isn't supported you need to use a special Super VGA DLL.
This document is designed to give you the information needed to
use the Super VGA DLLs available from Borland for the Turbo
Debugger for Windows. This document assumes that you are using
Windows 3.1. If you are using Windows 3.0 read the section
"Question & Answer" for information on how to run TDW under that
version of Windows.
TDW 3.0 Issues
==============
Read this section if you are using TDW 3.0; otherwise, skip to
the Quick Start section below. If you are using TDW 3.0 and
Windows 3.1, you should also read the last question in the
Question and Answers section.
These DLLs are designed for use with TDW 3.1 but will work with
TDW 3.0 if you make some changes.
TDW 3.0 requires that the DLL used is named "TDVIDEO.DLL". So
copy the DLL you want to use to TDVIDEO.DLL and place it in the
same directory as TDW.EXE (usually the BIN directory).
Example: copy svga.dll C:\BORLANDC\BIN\tdvideo.dll
These new DLLs read the option file TDW.INI from the Windows
directory instead of the TDVIDEO.INI used by 3.0. So if you have
a TDVIDEO.INI file in your Windows directory, rename it TDW.INI.
Now you can just follow the directions for TDW 3.1.
Quick Start
===========
The instructions given here are step-by-step instructions on how
to configure TDW to use the Super VGA DLLs available from Borland.
Before beginning, you should read the section "Two General Tips".
Also, you should know which DLL you need and make sure that it is
in the same directory as your TDW.EXE (usually the BIN directory).
If you don't know which DLL you need, you can find the DLL that
matches your video card in the "CARD-DLL Table" (if your video
card is not listed use SVGA.DLL). If you do not have the DLL you
need, see "Where to Find DLLs" for the online sources for the
DLLs. Once you have your DLL, read the section in "DLL
Descriptions" that relates to your DLL.
When you have the DLL you need and know what options are required,
you are ready to begin.
1) Confirm that there is a copy of TDW.INI in your Windows
directory. If it is not there, move the copy from the BIN
directory to the Windows directory. Once you have a copy in the
Windows directory, delete the copy of TDW.INI in the BIN
directory. You should only have one copy of TDW.INI.
2) Load TDW.INI in an editor that reads and writes ASCII files
(such as Windows Notepad). Set the VideoDLL to point to the DLL
you are using.
Example: VideoDLL=C:\BORLANDC\BIN\SVGA.DLL
3) Set any options needed for your card as noted in the "DLL
Descriptions" section. The options are explained in the section
"TDW.INI Options". When you are finished, save TDW.INI and exit
the editor.
4) Try using TDW. If it works fine, you're done. If it is not
working properly, read the sections "TDW.INI Options" and
"Question & Answer" for additional information. There may be
options that are not normally required for your DLL that will fix
the problem you are having. Try specifing a debug file to get
more information on what is happening.
5) If you still cannot get TDW to work and you are using a
card-specific DLL, return to step 1 and try SVGA.DLL. If SVGA.DLL
does not work, call Borland Technical Support. The number for
C/C++ Support is 408.461.9133. Choose the Installation and
Configuration group from the option menu.
Two General Tips
================
All TDW DLLs can use the DebugFile option in the TDW.INI file. If
you are having problems and you cannot resolve it with the
information given here, you should generate a log file before
calling Borland Technical Support. The section "TDW.INI Options"
contains more information on using this option.
If you follow all the instructions but are having no luck, try
booting clean. This means REMing out any unneeded lines in
AUTOEXEC.BAT and CONFIG.SYS. Also, make sure that you are not
running any programs when starting Windows (including programs
like Norton Desktop). This means you must use the program
manager, have nothing on the Load and Run lines in the WIN.INI
file, and nothing in your Startup folder. Booting clean can often
make stubborn problems disappear.
CARD-DLL TABLE
==============
NOTE: ANY card can use SVGA.DLL (except TIGA)
8514/A (single-screen) ... ULTRA.DLL
8514/A (dual-screen) ..... DUAL8514.DLL
Acer VGA ................. SVGA.DLL
ATI 8514 ................. ULTRA.DLL
ATI Ultra ................ ULTRA.DLL
ATI Ultra Pro ............ SVGA.DLL
ATI Vantage .............. ULTRA.DLL
ATI Wonder+ .............. ATI.DLL
ATI XL ................... ATI.DLL
Diamond Speedstar ........ TSENG.DLL
Diamond Stealth .......... SVGA.DLL
EGA ...................... SVGA.DLL
Genoa .................... SVGA.DLL, TDVESA.DLL
Graphics Ultra ........... ULTRA.DLL
Oak Tech. ................ SVGA.DLL
Orchid Prodesigner II .... TSENG.DLL
Orchid Fahrenheit 1280 ... SVGA.DLL
Paradise ................. SVGA.DLL, TDVESA.DLL
S3 Chipset cards ......... SVGA.DLL
STB MVP-2 ................ STB.DLL
TIGA ..................... support is pending
Trident .................. SVGA.DLL
Tseng ET-3000/ET-4000 .... TSENG.DLL
VESA-compatible .......... TDVESA.DLL
Video-7 .................. SVGA.DLL
VRAM ..................... SVGA.DLL
XGA ...................... SVGA.DLL
Any Other cards .......... SVGA.DLL
Where to find DLLs
==================
If you need a DLL that was not included with your compiler, you
should download the file TDSVGA.ZIP. TDSVGA.ZIP contains all
available DLLs and is available on CompuServe in BCPPWIN LIB-3,
and on Borland's DLBBS (408-439-9096, 8N1-9600) in the
Assembler/Debugger/Profiler Miscellaneous section. We are
constantly creating DLLs for new video cards and modes that
appear on the market. If the card you use isn't supported by one
of our DLLs, please contact Tech Support for the latest video DLL
information. The C++ Tech Support phone number is 408-461-9133.
DLL Descriptions
================
TDW makes calls to the DLL to handle the entire video
screen-switching context. The DLL allocates a buffer as it gets
loaded and graphic screen contents are saved to this buffer when
TDW enters text mode. The DLL restores the graphics screen from
this buffer when TDW exits text mode. Memory allocated for the
buffer is freed when the DLL is unloaded.
If there is an error loading the DLL, or if the DLL doesn't
support the selected card or mode, TDW reports the error in a
Windows dialog box. When this happens, TDW unloads the DLL and
exits. If this situation occurs, remove the DLL's name from the
VideoDLL line in the TDW.INI file or select a video mode that is
supported by that DLL.
All of these video DLLs assume you are using the most current
Windows screen drivers for your video card. If you are not sure
if you are using the latest drivers, contact your video card
company for more information.
ATI.DLL (Shipped with TDW 3.1)
-------
Supports ATI VGA Wonder+ and XL cards in certain video modes.
You must use the latest (4.22.92 or later) Windows screen drivers
for this DLL.
ATI.DLL is required in all video modes except for 1024*768 modes.
When this DLL is used the Int2FAssist should be set to YES.
Resolution ATI.DLL Int2FAssist
----------------------------------
| 640*480 | Yes | Yes |
----------------------------------
| 800*600 | Yes | Yes |
----------------------------------
| 1024*768 | No | No |
----------------------------------
DUAL8514.DLL (Shipped with TDW 3.1)
------------
Supports any dual-screen 8514 cards.
This DLL is only for systems that have two color monitors: one
attached to the VGA card and one attached to the 8415/A card.
This DLL speeds up performance by preventing TDW from doing
things that aren't required in dual monitor mode.
NOTE: Using this DLL is not the same as invoking TDW with the -do
parameter, which specifies a monochrome debug screen.
STB.DLL (Shipped with TDW 3.1)
-------
Supports multi-screen video cards.
The STB DLL has been developed for use with the MVP2 and MVP4
series of video cards.
NOTE: The MVP-2 card has two ET-4000 ports on it; the DLL puts
TDW on one and Windows on the other.
SVGA.DLL (See "Where to Find DLLs")
--------
Supports all video cards and modes (except TIGA).
Suggested for: EGA, Trident, Video-7, Oak Tech., Paradise, XGA,
or any card not supported by another DLL.
This DLL is designed to support ALL video cards. SVGA is slightly
slower than the card-specific DLLs, but it has a broader range.
If there is a specific DLL that supports your card, you should
use that one, if possible.
This DLL will support any video card/mode using undocumented
Windows functions that force the Windows display driver to do the
mode switching. (The TIGA card is not supported by this DLL
becuase it does not support the undocumented Windows functions
used by this DLL.) The Windows screen is saved into a full screen
sized bitmap using the BitBlt API call. It also uses two Device
Contexts (DCs) throughout the life of the debugger, so if you use
more than two or three DCs in your program and you see weird
things happening, you'll want to disable the BitBlt option. On
coprocessor cards (or those that are advertised as "Windows
Accelerators") the response time is fairly good even in 1024x768
modes. On non-coprocessor cards, the higher the resolution, the
longer it will take for the screen switch to occur. (The "screen
switch" is the transition from the Windows screen to the debugger
screen or vice versa.) There are some options that can be specified
in the TDW.INI file, under the [VideoOptions] section, that may
improve performance:
BitBlt=YES|NO YES saves the bitmap of the screen
This is on by default and only needs to be specified in order to
disable it. If disabled, the DLL does not allocate the bitmap,
the DCs or save the entire screen each screen swap. If you
disable BitBlt, you will not see anything on the user screen
Windows.
ForceRepaint=YES|NO YES has Windows repaint the screen
This option is on by default and only takes effect if BitBlt
disabled. This forces Windows to repaint the whole screen when
your program is run and you are not saving the whole screen in
the bitmap. If you disable this option, you won't see anything
on the Windows screen until your program invalidates something
and repaints it.
ROWS=25|43|50 Sets the number of rows for TDW
Warning: Make sure your card will handle the number of specified rows.
XGA=YES|NO Set this to 'YES' only on an XGA card
On XGA and other high-powered coprocessor cards, the BitBlt
option should be fast enough to use pleasantly (set BitBlt=YES).
TDVESA.DLL (Shipped with TDW 3.1)
----------
Supports any VESA-compliant video card -- the VESA emulation is
usually available through a TSR or is implemented on board the
video card.
NOTE: You can use the VESATEST.EXE program to see if your system
provides the proper VESA functions. VESATEST.EXE can be run from
either DOS or Windows.
TDVESA.DLL is required for VESA-compliant video cards. These
include the Video-7 VRAM II and the Weitek Power Windows range of
video cards. Make sure that you load the VESA emulation before
launching Windows. If the emulation is not loaded, TDW will
display an error message indicating that the video DLL is not
supported by the current configuration. You can use the VESATEST.EXE
program under Windows or DOS to determine if your card supports
the proper VESA functions.
This DLL should provide compatibility with Video-7, Paradise,
Trident, Genoa and others if you also get the VESA TSR from the
card companies.
The TDVESA.DLL has been tested with the following configurations:
Video Card VESA TSR Required TDVESA.DLL
--------------------------------------------------------
|Video-7 VRAM II | Yes - V7VESA* | Yes |
--------------------------------------------------------
|Weitek Power Windows | No | Yes |
--------------------------------------------------------
* This TSR is supplied with the Video-7 VRAM II card
TSENG.DLL (Shipped with TDW 3.1)
---------
Supports TSENG ET-3000/ET-4000 cards in certain video modes
You must use the latest (3.01.92 or later) Windows screen drivers
for this DLL.
TSENG.DLL only needs to be used in the 640*480*256 resolution; in
all other cases TSENG.DLL is not required. This DLL supports 16
and 256 colors only. The Int2FAssist should be set to YES when
this video DLL is used.
Resolution TSENG.DLL Int2FAssist
-------------------------------------
| 640*480 | Yes | Yes |
-------------------------------------
| 800*600 | No | No |
-------------------------------------
| 1024*768 | No | No |
-------------------------------------
ULTRA.DLL (Shipped with TDW 3.1)
---------
Supports 8514 cards with single-monitor configuration.
You must use the latest (4.22.92 or later) Windows screen drivers
for this DLL. The Ultra card must also have a ROM version of 1.3
or later.
This DLL will work with the 8514/Ultra, 8514/Vantage,
Graphics/Ultra and Graphics/Vantage cards. It will also work on
most IBM 8514/A cards with single monitors.
NOTE: Only the version of the DLL shipped with TDW 3.1 requires
that a DebugFile be specified. We recommend nameing the debug
file TDW.LOG and placing it in the BIN directory.
TDW.INI Options
===============
To use a SuperVGA DLL, simply edit the TDW.INI file that the
installation program puts in your main Windows directory.
** You must have only one copy of TDW.INI. If there is a copy in
the Windows directory and a copy in the BORLANDC\BIN or TCW\BIN
directory, delete the copy in the BIN directory. If there is a
copy in the BIN directory but not in the Windows directory, move
(don't copy) TDW.INI to the Windows directory.
You can modify TDW.INI with any ASCII text editor. Under the
section heading [TurboDebugger] there is an option called
"VideoDLL". This entry should have both the path and filename of
the DLL you want to use.
Example: VideoDLL=C:\BORLANDC\BIN\SVGA.DLL
There are also options you can set for the current video DLL.
These options must be under the [VideoOptions] heading, but in
any order you like.
The following list shows all the video options and the default
values:
SaveWholeScreen default = NO
Int2FAssist default = NO
DebugFile default =
IgnoreMode default = NO
ATI default = YES
Rows default = 25
RestoreTextScreen default = YES
BitBlt default = YES
ForceRepaint default = NO
XGA default = NO
DebugFile can be either blank or set to a specific filename
(except when using ULTRA.DLL). The Rows option must be set to 25
or 50. The other settings should be either YES or NO.
SaveWholeScreen
---------------
The graphics screen is cleared when switching modes. This
option, normally set to NO, determines whether the entire screen
is saved (64k x 8 planes = 512k) or if only the first 32k of the
first four planes is saved (32k x 4 planes = 128k).
Saving the whole screen is not usually necessary, but is provided
in case you're using a nonstandard card that requires that the
whole screen be saved. It also provides support for
when using the Int2FAssist mode.
Int2FAssist
-----------
This option, normally set to NO, tells the DLL to make a special
Int 2F call before switching video modes. This call tells the
current Windows screen driver what's happening. The desired side
effect of this call is to make Windows tell all of its child
windows to repaint themselves. This option is provided mainly to
support some ATI Wonder and TSENG chipset video modes.
DebugFile
---------
The video DLL normally doesn't log any debugging information. If
you're having problems using a DLL, you can use the DebugFile
option to specify the path and filename of a log file. You will
want the information logged in this file if you contact Borland
Technical Support.
The information that gets logged is:
o the date and time that you ran TDW
o the version & location of the DLL
o the name of the current Windows screen driver
o the state of all TDW.INI options
o a listing of all calls and parameters to the DLL's functions
The use of the DebugFile is optional, with the exception that the
ULTRA.DLL shipped with TDW 3.1 requires that a debug file be
specified. We recommend having the debug file named TDW.LOG and
placed in the BIN directory.
Example: DebugFile=C:\BORLANDC\BIN\TDW.LOG
IgnoreMode
----------
This option only applies when the video DLL is ATI.DLL or
TSENG.DLL. It tells the DLL not to do any mode or card checking
and to force the Int2FAssist option on. This option is useful
for cards that aren't directly supported by a card-specific DLL
yet, such as Paradise, Video-7, Trident or any other video card
without a graphics coprocessor. With this option enabled, the
functionality is identical to the temporary ALL.DLL we offered in
the past.
Use this option when you know you are using the right Windows
drivers and the right DLL but are still getting the error message
"Mode not supported..."
ATI (ULTRA)
---
This option is only used by ULTRA.DLL and is on by default. If
you disable it, you can use the ULTRA.DLL on IBM 8514/A cards.
ROWS
----
This option is only used if you use a configuration file to set
the number of rows to 43/50 from 25. If you want to have TDW
start in 50-line mode, you must set the rows option to 50 in the
TDW.INI file.
Warning: Make sure your card will handle the number of specified rows.
RestoreTextScreen
-----------------
This option is only valid with the DUAL8514 and STB DLLs. The
valid options are:
Yes - restores the debugger's screen after exiting.
No - does not touch the debugger's screen at all.
Clear - forces the screen to clear upon exiting TDW.
BitBlt (SVGA)
------
This option controls whether or not the DLL saves the entire
screen with the BitBlt API call. (See the description of SVGA.DLL
above for more information.)
ForceRepaint (SVGA)
------------
This option controls whether Windows should repaint the entire
desktop when you return to your program. (See the description of
SVGA.DLL above for more information.)
XGA (SVGA)
---
Set this to 'YES' only on an XGA card.
Some video modes may require some special handling. The
Int2FAssist option allows these modes to work correctly on most
systems. The behavior is as follows: When you set"Int2FAssist=YES",
the DLL makes Windows tell all sub-windows on the screen to
repaint themselves as the user application is running. This
allows the user screen to be viewed when stepping, tracing or
running your application. It will not, however, switch to the
user screen when you press
control (and TDW doesn't allow Windows to process any messages at
this point).
If you also set "SaveWholeScreen=YES"
screen. (The DLL will now copy the screen back for you.) The
drawback to enabling SaveWholeScreen is that it will take longer
to step or trace if TDW needs to switch back to the user screen
for that particular instruction. Also, extra messages will be
passed to your application that normally would not be passed.
This may affect the debugging of certain pieces of code (like
finding a bug in an owner-draw control). In these cases, you
won't want to use this option on the current video mode.
Question & Answer
=================
Quesiton:
I have set TDW to come up in 43/50 line mode, but it stays in
25 lines when I run it.
Answer:
Put ROWS=50 in your TDW.INI file under the [VideoOptions]
section. If you are using an EGA card, use the latest version of
SVGA.DLL (version 3.2.1 or later) and you can set ROWS=43.
Question:
I made changes to my TDW.INI file, but they seem to have no
effect.
Answer:
Our installation program incorrectly puts a TDW.INI file in
both the BIN and Windows directories. Delete the TDW.INI in the
BIN directory and use the one in the Windows directory, instead.
This problem occurs with Borland C++ 3.1 and Turbo Pascal for
Windows 1.5.
Question:
Can I use TDW to debug mouse-related events such as mouse
cursor movement and mouse clicks?
Answer:
Yes, but you need to do so with care, since the debugger traps
the mouse messages for itself and throws away those that don't
apply. For example, if you set a breakpoint on a WM_LBUTTONDOWN
(left mouse button pressed) for your scrollbar, run your program,
and click the mouse on the scrollbar button, TDW hits thebreakpoint
and switches to its screen. At this point, if you release the
mouse button that you were still pressing, the WM_LBUTTONUP
message goes to TDW, which isn't expecting it, so it gets thrown
away. When you continue running your program, it thinks that the
mouse button is still being pressed since it never received the
"up" message, and the scroll bar is continuously scrolling. The
solution is to press the mouse button in TDW before continuing
the program (after hitting the breakpoint) so that you release it
in Windows and your scroll bar sees the message.
Question:
I want to use TDW with an EGA card. Which DLL do I use?
Answer:
SVGA.DLL.
Question:
How do I run TDW in an OS/2 Windows session with an 8514 or
XGA video card?
Answer:
You need to use VideoDLL=(path)\SVGA.DLL in your TDW.INI. You
also need to run RC.EXE on the DLL with the -30 switch:
RC.EXE -30 SVGA.DLL
This prevents an error message that says that there was an error
loading TDVIDEO.DLL. The Windows resource compiler by default
marks an EXE or DLL as being Windows 3.1 compatible ONLY. WinOS2
uses a copy of Windows 3.0 (not 3.1), so when TDW tries to load
the DLL, WinOS2 won't let it. This will work for any of the TDW
DLLs, and it will also work for people using Windows 3.0 and not
Windows 3.1.
Also, you if you have an XGA card you should set XGA=YES in the
[VideoOptions] section of TDW.INI.
Question:
When I invoke TDW, my machine just hangs. I'm using ULTRA.DLL.
Answer:
Make sure that you are specifying a DebugFile in TDW.INI. The
ULTRA.DLL that shipped with TDW 3.1 may cause TDW to hang upon
execution unless you specify a DebugFile in TDW.INI. Also, make
sure that a TDW.INI file does NOT exist in the BIN directory. If
so, delete it and use the TDW.INI in the Windows directory instead.
Question:
How do I run TDW 3.1 under Windows 3.0? Why am I getting an
error message ERROR LOADING TDVIDEO.DLL?
Answer:
TDW will run fine. If you need to use a video DLL, then you
will need to run RC.EXE with the -30 switch on that video DLL. If
you don't do this, TDW will reply with: ERROR LOADING
TDVIDEO.DLL.
Question:
When I run TDW, I get an error message: CANNOT FIND WINDEBUG.DLL.
What's wrong?
Answer:
You will get this error if you are using TDW 3.0 with Windows
3.1. TDW 3.0 claims compatibility with Windows 3.0, and not with
Windows 3.1. You have three options:
1) Upgrade to BC++ 3.1 or TC++ 3.1. This will provide a much
more stable debugging environment with TDW and give you syntax
color highlighting, integrated resource compilation, as well as
support for multimedia, drag & drop, OLE, and pen windows.
2) Download TDWIN.ZIP from Borland's DLBBS, CompuServe, BIX, or
GEnie. (See the section "Where to find DLLs" earlier in this
document.) This file contains TDWIN.DLL, which can be renamed to
WINDEBUG.DLL. This is intended to provide only a temporary
solution. Option #1 above is highly recommended.
3) Use Windows 3.0 instead of Windows 3.1.
(This particular problem is not an SVGA issue.)
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/