Running DOS games on XP
By Roger Gann
August 27, 2002
When Microsoft released Windows XP in October 2001, it was its first consumer operating system that wasn't based in any way on legacy Dos code. For most users, this was good news as it promised a more stable and user-friendly experience. And despite the absence of Dos, XP is still capable of running most ye olde Dos apps perfectly well. It even makes a decent stab at running Dos games, which can be tricky. But its track record here isn't 100 per cent; it can run some games but not others, or maybe run the graphics but not the sound or vice versa. Sound is typically the biggest problem. It's complicated by the fact that many Dos games treat music and sound effects as separate issues and you may wind up getting one and not the other. Luckily, there are ways to get round some of these game snafus.
Check your properties Before attempting the steps below, try running the game by simply clicking on it, then try various settings on the compatibility tab, perhaps to trick it into thinking it is running under Windows 95. If a Dos game doesn't run properly, the odds are that its program window will open and close so quickly you can't even see its contents. Since you can't troubleshoot a program without seeing the error message it's giving you, you need to access the MS-Dos shortcut for it so you can modify its run parameters. To do so, right-click the game's executable, choose Properties and disable the Close on exit checkbox found on the Programs tab. Once you've set this option, try opening your Dos game's executable again. This time the Dos window should remain open after the program bombs out, allowing you to see the error. Sometimes this will be something that Windows XP can't get around, but other problems are fixable. If it's a memory problem, usually having to do with not enough XMS or EMS memory, there's a simple fix.
Since many Dos games required what was then a lot of memory, and Dos could only offer 640KB of Conventional memory, you had to use commands such as himem.sys and emm386.exe to give your games use of Extended and Expanded memory. If a game is going to have memory problems, you'll typically get some form of no Expanded/Extended memory error when you try to run it. To try to fix this problem, right-click the program and select Properties. This time, choose the Memory tab. On this tab are sections for configuring Conventional, Expanded, Extended and Protected memory. By default, you should find that the dropdown list in the Total field of the Conventional memory area is set to 'Auto'. You'll also find that the dropdown lists for Expanded and Extended memory are set to None and 0, respectively. Choose 'Auto' for both of these options and click OK to close out of the Properties window. The initial environment should also be set to its highest setting of 4096. Under the Total dropdown box is a box labeled 'Protected'. This protects the system memory from modifications made by the selected program and should be checked.
If this doesn't solve your memory problems, there's still one trick up XP's sleeve. Those of us old enough to remember the twin evils of autoexec.bat and config.sys will remember the constant tweaking of command lines, attribute settings and so on in order to squeeze the last ounce of performance from our machines. Well, these old files haven't completely gone away, they've just assumed new identities.
If you open My Computer and go to your Windows/System32 folder, you'll find them disguised as config.nt and autoexec.nt and, guess what, you can tweak them just like you could tweak their predecessors and each game can also have its own private copies of these files.
As a precaution, copy these files into your Dos games directory before making changes to them. It's important to remember that the autoexec.bat and config.sys files in your root directory have nothing to do with Dos programs.
To make a Dos game use a new set of config and autoexec files, right-click its executable file and choose Properties. This time, return to the Program tab and click the Advanced button. This opens a dialogue box labeled Windows PIF Settings, which contains two fields: one for an autoexec filename and one for config. By default these two fields point to your %SystemRoot%/System32 directory but, if you put copies of your config and autoexec files in a 'Games' directory, then you'd change them to: C:/GAMES/AUTOEXEC.NT and C:/GAMES/CONFIG.NT in these two fields.
If you find when playing a Dos game that its speed is way too fast, try enabling the Compatible Timer Hardware Emulation checkbox that appears beneath these two fields.
To edit the contents of config.nt or autoexec.nt use something like Notepad. Both files are well commented. Unfortunately, the changes you can make here are restricted, confined mainly to things such as the EMM=RAM command. Some games require this option to be set before they'll recognize your Expanded Memory.
If you're experiencing audio problems, you can also try to alternate settings for the existing Set Blaster command in autoexec.nat. This command tells a Dos game at what address your audio card is located, which IRQ and DMA setting it uses and which type of card it is (the format for these settings and a list of Soundblaster card types are included in the file).
Typical audio card settings that Dos games look for are address 220, IRQ 5 or 7, DMA 1 and Type 3 (Soundblaster 2). This means the Set Blaster command in your autoexec file should be: SET BLASTER=A220 I5 D1 T3. General Midi support defaults to an address of 330.
Windows XP has Soundblaster emulation built into the NTVDM (NT Virtual Dos Machine - the part of XP that runs Dos apps), meaning you get almost full support for sound in old Dos games. It's not perfect (you don't get OPLx emulation if your sound card doesn't have an OPLx chip on it, and some DSP functions don't work), but it works for most things.
For clean audio, using General Midi or your PC's internal speaker is your best bet. Even with a Soundblaster card, choosing 'Soundblaster' rarely results in flawless functionality. If you have the option, enable as few separate audio streams as possible, preferably just one. This helps avoid some of the slowdowns that occur in some titles when using Soundblaster for sound effects.
If you're having problems getting your Soundblaster card to work then you'll need Vlad Romascanu's clever VDMSound program. Not only does VDMSound provide Soundblaster emulation in software (which works with any Windows-supported sound card), and not only does that emulation con Dos programs into thinking they're talking to a kosher Soundblaster, but VDMSound makes configuring XP's Dos subsystem fairly easy.
The video modes available on your graphics card can
also affect whether a game is going to run or not: 'Vesa Compatibility' is important here.
Some newer Dos games (such as Duke Nukem 3D) use Vesa, the nearest Dos has to DirectX, for high-resolution graphics. As with Soundblasters, using Vesa requires talking direct to the graphics card, bypassing Windows. Microsoft has implemented Vesa support in the XP kernel, meaning Dos games ought to run flawlessly. Alternatively, use the VGATest utility (a free download from here) to see if your 3D can natively do 'Vesa'.
Finally, don't forget the '8.3' naming limits of Dos, so keep the names of folders containing Dos games under nine characters. Also, Windows XP can't make Dos shortcuts from batch files or other non-executables so, if your game runs from a CD and uses a batch file on the hard drive to launch, your configuration options (including memory management) are going to be very limited.
[This message has been edited by Angel Draco (edited 08-07-2003 @ 11:13 PM).]