Virtual DOS machine

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Virtual DOS machine (VDM) is Microsoft's technology that allows running legacy DOS and 16-bit Windows programs on Intel 80386 or higher computers when there is already another operating system running and controlling the hardware.

Contents

[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 DOS Protected Mode 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 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.

[edit] History

VDMs appeared with Windows/386 2.1 and are present in all subsequent 32-bit versions of Windows (as well as Wine)[1]. 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.

Versions of Windows NT for 64-bit architectures (x64 and IA-64) do not include the NTVDM and are unable to run DOS or 16-bit Windows applications. This is because an x86-64 CPU in its full 64-bit mode cannot go to virtual mode without a hard reset. Virtual mode is not part of the x64 specification; the CPU needs to be running in x86 mode.[clarification needed]

[edit] References

  1. ^ 8.8.2. Win16 processes support, Chapter 8. Kernel modules, Wine Developer's Guide

[edit] See also

[edit] External links