Virtual DOS machine
From Wikipedia, the free encyclopedia
Virtual DOS machine (VDM) is the name of Microsoft's technology allowing to run MS-DOS programs on Intel 80386 or higher computers when there is already another operating system running and controlling the hardware.
[edit] Overview
Virtual DOS machines rely on the virtual 8086 mode of the Intel 80386 processor, which allows real mode 8086 software to run in a controlled environment by catching and forwarding to the normal operating system (as exceptions) all operations which involve accessing hardware. The operating system can then perform an emulation and resume the execution of the DOS software.
VDMs generally also implement support for running 16- and 32-bit protected mode software (DOS extenders), which has to conform to the DPMI interface.
When a DOS program running inside a VDM needs to access a peripheral, Windows will either allow this directly (rarely), or will present the DOS program with a Virtual Device Driver (VxD in short) which emulates the hardware using operating system functions. A VDM will systematically have emulations for the Intel 8259A interrupt controllers, the 8254 timer chips, the 8237 DMA, etc.
In general, the VDMs and similar technologies (including products like VMware) do not satisfactorily run many older DOS programs on today's computers. Emulation is only provided for the most basic peripherals, although Windows XP added emulation of the Sound Blaster and other multimedia devices. Emulation of supported peripherals is incomplete and quirky. NT-family versions of Windows only update the real screen a few times per second when a DOS program writes to it, and do not emulate higher resolution graphics modes. Because software runs mostly native, all timing loops will expire prematurely. This either makes a game run much too fast or causes the software to not even notice the emulated hardware peripherals, because it does not wait long enough for an answer.
A common solution to these problems is to use a full CPU emulator such as DOSBox. The disadvantage is that it does not allow a totally transparent integration with the host operating system and it is slower.
[edit] History
VDMs appeared with Windows/386 2.1 and are present in all subsequent 32-bit versions of Windows. In the Windows NT family, they are however relegated to running DOS and Windows 3.x programs and no longer participate in the implementation of the Windows API. The Windows NT executable which is used to handle a single DOS (and Windows 3.x) environment is called ntvdm.exe.
VDMs were also used in OS/2 2.0 and later.
Recent versions of Windows NT for 64 bit architectures, including Windows XP Professional x64 Edition (AMD64) , Windows XP 64-bit Edition (IA-64), Windows Server 2003 (x64) and Windows Vista , no longer include the NTVDM and can therefore no longer run MS-DOS (or 16-bit Windows) applications.