MS-DOS-based programs in Windows XP

SUMMARY

This article describes how to troubleshoot MS-DOS-based programs in Windows.

MORE INFORMATION

Test the Ntvdm subsystem

The first thing to test when you are having problems with MS-DOS-based programs is the Windows Virtual DOS Machine (NTVDM) subsystem. You can use the Command.com utility to test whether the NTVDM subsystem is running properly. To start Command.com, follow these steps:
1.Click the Start button, and then click Run.
2.In the Open box, type command.com, and then click OK.



This should start a command prompt window. If this does not work properly, then there is a problem with the NTVDM subsystem, and you should check the following items:
Check the Config.nt and Autoexec.nt files in the SystemRoot%\System32 folder for non-standard settings.

Use a REM statement to remark out all entries except the following default entries:
   Config.nt
---------
dos=high, umb
device=%SystemRoot%\System32\Himem.sys
files=20

Autoexec.nt
-----------

lh %SystemRoot%\System32\Mscdexnt.exe
lh %SystemRoot%\System32\Redir
lh %SystemRoot%\System32\Dosx
lh %SystemRoot%\System32\Nw16 (only if CSNW is installed)
lh %SystemRoot%\System32\Vwipxspx (only if CSNW is installed)
Another way to accomplish this is to expand Autoexec.nt_ and Config.nt_ from the Windows CD-ROM to the %SystemRoot%\System32 folder.
Press CTRL+SHIFT+ESC to start Task Manager, close all running programs that are running, and make sure that there are no other NTVDM processes running.
Prevent all programs from running at startup. Programs can run from two places at startup: the Startup groups, and the Run and RunOnce lines in the registry. You can check these places as follows:
1.The Startup groups are folders on the local hard disk. They are in the following locations:
%SystemRoot%\Profiles\user_name\Start menu\Programs
%SystemRoot%\Profiles\Default user\Start menu\Programs
2.The Run and RunOnce lines are in the registry, under the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\
Examine the NTVDM system files in the %SystemRoot%\System32 folder. Check the following files and make sure that they are the correct version by checking the size and date:
   Ntio.sys
Ntdos.sys
Ntvdm.exe
Ntvdm.dll (Windows NT 3.1 only)
Redir.exe
The registry entries that are associated with the NTVDM subsystem are:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment
This key stores the environment variables from the Config.sys and Autoexec.bat files for use in Windows.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ VirtualDeviceDrivers
This key stores the device drivers that are used in an NTVDM session. Windows Setup creates these entries when a device driver is installed.

Back to the top

Check program-specific issues

The following functions do not work in Windows XP:
All MS-DOS functions except task-switching API (application programming interface) functions are supported.
Block mode device drivers are not supported. Block devices are not supported, so MS-DOS I/O control (IOCTL) APIs that deal with block devices and SETDPB functions are not supported.
Interrupt 10 function 1A returns 0; all other functions are passed to read-only memory (ROM).
Interrupt 13 calls that deal with prohibited disk access are not supported.
Interrupt 18 (ROM BASIC) generates a message that says that ROM BASIC is not supported.
Interrupt 19 does not restart the computer, but cleanly closes the current virtual DOS machine (VDM).
Interrupt 2F, which deals with the DOSKEY program callouts (AX = 4800), is not supported.
Microsoft CD-ROM Extensions (MSCDEX) functions 2, 3, 4, 5, 8, E, and F are not supported.
The 16-bit Windows subsystem on an x86 computer supports enhanced mode programs; it does not, however, support 16-bit virtual device drivers (VxDs). The subsystem on a non-x86 computer emulates the Intel 40486 instruction set, which lets the computer run Enhanced-mode programs, such as Microsoft Visual Basic, on reduced instruction set computers (RISC).
This means that Windows does not support 16-bit programs that require unrestricted access to hardware. If your program requires this, your program will not work in Windows NT, Windows 2000, or Windows XP.

You should next check to see whether the Autoexec.nt and Config.nt file settings are correct. Always try the default settings that are listed earlier in this article. Some programs require special settings or drivers to run in the Config.sys or Autoexec.bat file. If this is the case, there are two options for initializing these files when you starting your program:
Enter these lines in the Config.nt and Autoexec.nt files in the %SystemRoot%\System32 folder.
Create new Config and Autoexec files to be run when starting this program. To do so, follow these steps:
1.Create the files and save them with the extension .nt in a folder other than %SystemRoot%\System32 (these files are usually saved in the same folder as the program).
2.Right-click the desktop, point to New, and then click Shortcut.
3.In the Type the location of the item box, type the full path to the file that you want to run, and then click Next.
4.In the Type a name for this shortcut box, type the name for the shortcut, and then click Finish. This creates a new shortcut on the desktop.
5.Right-click the new shortcut, and then click Properties.
6.On the Program tab, click Windows to open a dialog box for the path to the Autoexec and Config files.
7.Type the full path to the files that you created, and then click OK in both dialog boxes.
Clicking this icon runs the Autoexec and Config file specified for the program. These settings are subject to the same restrictions as those listed for MS-DOS-based programs.
There are other settings in a program's properties. If your program is not working properly, check all of the tabs and make sure that the program settings are set to the manufacturer's specification. If the program is still not working, contact the vendor of the program to make sure that the program is supported under Windows.

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
171940 (http://support.microsoft.com/kb/171940/) MS-DOS application I/O operations cause floppy drive access
156687 (http://support.microsoft.com/kb/156687/) Entries in CONFIG.NT or AUTOEXEC.NT may cause NTVDM errors
102418 (http://support.microsoft.com/kb/102418/) NTVDM error: There is no disk in the drive
142026 (http://support.microsoft.com/kb/142026/) Err: 'Hidden console of WOW VDM' running 16-bit or DOS app
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Back to the top


APPLIES TO
Microsoft Windows XP Home Edition
Microsoft Windows XP Professional

From http://support.microsoft.com

Run Dos game on winxp

Get DOS games working in XP!
Table of Contents
Part 1: Preface
Part 2: Catch error messages
Part 3: Manage memory
Part 4: Custom configuration settings
Part 5: More customized tweaking
Part 6: Sound Blaster madness
Part 7: Slow DOWN your computer
Part 8: The famous "RUNTIME ERROR 200"
Part 9: Keyboard tweaking
Part 10: Smashy smashy! (Closing thoughts)



First things first. There is no DOS in Windows XP! What is called the "command prompt" is not really DOS ... it can be thought of as more of a simulation of DOS. Windows XP (and Windows 2000), unlike Windows 95, 98, and ME, are NOT built on an MSDOS foundation. So, while this makes for better speed and stability, it also makes for sometimes lousy backwards compatibility.



However, have no fear! This page will hopefully help you to get the majority of DOS games running under XP. Of course, it's important to remember that some games just won't work on your modern computer, no matter how hard you try, so don't be too disappointed. ;) Also please keep in mind that these tips are for Windows XP only ... for more general tips on getting games to run, please read the DOSGAMES.com Frequently Asked Questions page. Thanks!

One more thing, the majority of this guide was paraphrased from an article in the July 2002 issue of Computer Gaming Magazine, my favorite gaming mag. Thanks for the tips guys! (Don't sue me!!!)



Sometimes when you run old games, the error message that results when you run the game will pop up and disappear so quickly that it's impossible to read it! Here's how to fix that problem:

  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Program" tab, and uncheck the box marked "Close on exit".
  • Click "Apply" and then click "OK" to close the box.


  • This will stop the DOS window from closing automatically when the game ends, or when it refuses to start. The resulting error message(s) can help you solve problems with the game.



    Waaaaaay back in the MSDOS days, we had to play with our computer's memory to get games running. Stuff like conventional memory, EMS, XMS, upper memory, loadhigh ... lots of yucky stuff like that. Windows tries to manage memory for you automatically, but sometimes it doesn't do a very good job. Try giving the game the maximum amount of memory it could possibly want by:

  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Memory" tab.
  • Set all of the values in the drop boxes to the highest value available.
  • Make sure that the "Protected" and "Uses HMA" boxes are checked.
  • Click "Apply" and then click "OK" to close the box.




  • Sometimes using the maximum memory settings isn't enough! Sometimes you need to create custom AUTOEXEC and CONFIG files for the game to use. Luckily in XP this isn't too hard at all. Here's how:

  • Open up Windows Explorer, and go to the C:\WINDOWS\System32 folder.
  • Find the files "AUTOEXEC.NT" and "CONFIG.NT". Copy those files to the same folder where the game's files are stored. (ex. if you were trying to get DOOM working, and DOOM was installed in C:\DOOM, you'd copy the files to C:\DOOM!)
  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Program" tab. Click the "Advanced" button. Enter the full paths to the AUTOEXEC.NT and CONFIG.NT files you just copied. (ex. C:\DOOM\AUTOEXEC.BAT ...)
  • Also check the "Comaptible Timer Emulation" box, although it rarely helps anything. ;)
  • Now you can edit the AUTOEXEC.NT and CONFIG.NT files to add whatever specific settings the game needs to run. (Consult the game's manual if you have it.) If you don't know what settings to add, try adding the line "emm=ram" (without the quotes) somewhere after the line "dos=high,umb".
  • Click "Apply" and then click "OK" to close the dialog box(es) when you're done editing.

  • This should take care of any memory problems you're having, and by checking the "Compatible Timer Emulation" box, it may also fix speed problems. (ie the game runs too fast ... or too slow!)



    There are a couple of other tweaks you can do to make games run and/or make them run more smoothly:

  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Program" tab, and check the "Maximized" checkbox in the Run box.
  • Click the "Screen" tab, and click on the "Full-screen" radio button.
  • Click the "Misc" tab, and turn the "Allow screensaver" option off. Put the mouse in "Exclusive mode".
  • Click the "Compatibility" tab, and check the box beside "Run in compatibility mode", and choose "Windows 95" in the dropbox. (Although this doesn't seem to do anything, it's worth a shot.) Check the three other boxes: "Run in 256 colors" (most DOS games don't use more than that), "Run in 640x480 screen resolution" (unless you know that the game uses a higher resolution), and "Disable visual themes".
  • Click "Apply" and then click "OK" to close the box.




  • Getting sound to work properly in games can be one of the most annoying problems in XP. Windows XP tries to emulate DOS sound automatically, using the following settings: A220 I5 D1 T3 P330. If a game (or its setup program) is asking for sound card info, that is what you should enter.

    However, I've found that this rarely works. A better solution is to download VDMSound, a Sound Blaster emulator specifically made for Windows XP/2000. (VDMSound will NOT work in Windows 9x or ME!) Download and install the software found on that site. Then when you want to play the game, either create a shortcut using VDMSound as described in the game docs, or, just right click on a game, and choose the option to run it with VDMS. Hopefully, you'll hear sound! :)

    Note that sometimes the only way to get a game working is to turn off sound. It can kinda suck to play a game without sound, but its better than nothing. Often there is a "SETUP.EXE" or "CONFIG.EXE" (or something similar) file that comes with a game that allows you to select your sound options. Use this program to turn sound off and see if that allows you to run the game.



    If the game runs too fast, here's what to do:

  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Program" tab. Click the "Advanced" button.
  • Check the "Comaptible Timer Emulation" box. Click "OK", then "Apply", then "OK" again. See if that fixes the games speed.
  • If that doesn't fix the problem:
  • A utility called "Moslo" can help solve this problem. Read the FAQ on Moslo here: DOSGAMES.com FAQ #3: Moslo.




  • If you're getting an error which looks something like "RUNTIME ERROR 200" (possibly followed by "AT ADDRESS {blah blah blah}") or sometimes just something like "DIVIDE BY ZERO", there are two things you can try to do:

  • Try using Moslo to slow down the game. The error is occuring because your computer is running too fast! Read the FAQ on Moslo here: DOSGAMES.com FAQ #3: Moslo.
  • Try using the TPPatch program to "fix" the game. Read the FAQ on Moslo here: DOSGAMES.com FAQ #9: Runtime Errors.

  • If neither works, skip to and read Part 10 ...



    If you find that you need to use some specific keyboard sequences (like Alt-Enter, or Ctrl-Esc for example), there is a way to turn them off for specific games:

  • Find the game's executable file (the file you run, usually {somename}.exe) using Windows Explorer. Right click on the file, and choose "Properties".
  • Click the "Misc" tab, and uncheck the box(es) that correspond to the key(s) that you need to use for the game.




  • Okay, smashing your computer probably won't do any good. Unless you're rich. In which case, SHOW ME THE MONEY!!! Ahem. What I mean to say is that, as I mentioned above, some games just will not work in XP. The only solutions available to you then are:

  • Dual-boot your PC to an older version of Windows (ex. Windows 98SE) where you KNOW the game works. This can be a time-consuming and possibly dangerous (to your data) task unless you know what you're doing, so proceed with caution.
  • If you still have an old 386/486/Pentium lying around, convert it into a DOS-only box, and use it for all your DOS gaming goodness! If you don't have an old box lying around, ask friends and one of them will probably have an old computer they're willing to just give you, or sell you for really cheap.


  • THUS ENDS THE GUIDE TO RUNNING DOS GAMES IN WINDOWS XP. I hope that you have found this guide helpful! If you need more assistance, or some aspects of the guide are not clear to you, please post on the DOSGAMES.com Discussion Forum in the "Getting old games to work" group. Thanks, good luck, and good gaming! :)

    (www.dosgames.com)

    dos app on window xp

    Well folks Windows XP (and 2000 & NT) has a wonderful new feature. Occasionally it just decides that it no longer wants to run DOS software like the software posted on this site. So it doesn't.

    Our job is to convince Windows XP that we would really appreciate it if it would once again run DOS software. The following information is from the Microsoft site.

    Unfortunatly this requires that you mess with the system files on your computer because Windows XP has screwed them up. Be extremely careful following these instructions.



    SYMPTOMS
    If you try to start or install an MS-DOS-based or a 16-bit Windows-based program on your Windows XP-based computer, you may receive an error message that is similar to one of the following:

    16-bit MS-DOS Subsystem path to the program that you are trying to start or install C:\Winnt\System32\config.nt
    The system file is not suitable for running MS-DOS and Microsoft Windows applications.
    Choose 'Close' to terminate the application.
    16-bit MS-DOS Subsystem path to the program that you are trying to start or install config.nt
    The system file is not suitable for running MS-DOS and Microsoft Windows applications.
    Choose 'Close' to terminate the application.

    16-bit MS-DOS Subsystem path to the program that you are trying to start or install
    C:\Windows\System32\Autoexec.nt
    The system file is not suitable for running MS-DOS and Microsoft Windows applications.
    Choose 'Close' to terminate the application.

    Although you may be prompted to quit the program or ignore the error message, either selection makes the program quit.

    CAUSE

    This issue may occur if one or more of the following files are missing or damaged:

    Config.nt
    Autoexec.nt
    Command.com

    NOTE: It has been suggested (with success) that you only do instructions 7 - 17. If you do stop at instruction 17 you will still have to reboot your computer for the changes to take effect.

    In the followng instructions I assume that by "CD" Microsoft means the CD with Windows XP (or 2000 or NT) on it.

    RESOLUTION
    To resolve this issue:

    1. Insert the CD into the CD drive or DVD drive.

    2. Click Start, and then click Run.

    3. In the Open box, type cmd, and then click OK.

    4. At the command prompt, type the following commands, pressing ENTER after each command:

    expand CD-ROM Drive Letter:\i386\config.nt_ c:\windows\system32\config.nt
    expand CD-ROM Drive Letter:\i386\autoexec.nt_ c:\windows\system32\autoexec.nt
    expand CD-ROM Drive Letter:\i386\command.co_ c:\windows\system32\command.com
    exit
    5. Start or install the program. If the issue is resolved, do not complete the remaining steps. If the issue is not resolved, go to the next step.

    6. Note: The Command.com file is not edited or created in this in the following process. Because of this, you may have to expand it from your Windows XP CD-ROM.


    Start Notepad.
    7. In Notepad, type the following entries:

       dos=high, umb
    device=%SYSTEMROOT%\system32\himem.sys
    files=40
    8. On the File menu, click Save As.

    9. In the File Name box, type Config.nt, and then click Save. Close the Config.nt file.

    10. On the File menu, click New.

    11. In the new blank document, type the following entries:

    @echo off
    lh %SYSTEMROOT%\system32\mscdexnt.exe
    lh %SYSTEMROOT%\system32\redir
    lh %SYSTEMROOT%\system32\dosx
    SET BLASTER=A220 I5 D1 P330 T3
    12. On the File menu, click Save As.

    13. In the File Name box, type Autoexec.nt, and then click Save. Close the Autoexec.nt file.

    14. Start Windows Explorer. Locate the Config.nt file, right-click the Config.nt file, and then click Copy.

    15. Right-click the %SYSTEMROOT%\System32 folder, and then click Paste.

    16. Locate the Autoexec.nt file, right-click the Autoexec.nt file, and then click Copy.

    17. Right-click the %SYSTEMROOT%\System32 folder, and then click Paste.


    18. Locate the Command.com file, right-click the expanded Command.com file, and then click Copy.

    19 Right-click the %SYSTEMROOT%\System32 folder, and then click Paste. Restart your computer.

    From http://pages.prodigy.net


     

    Coding experience share Copyright © 2010 | Designed by Ipietoon for Free Blogger Template