User:Petr-akhlamov/NTVDM

From ReactOS Wiki
Jump to: navigation, search

NTVDM (NT Virtual Dos Machine) is a virtual machine which enables running 16-bit apps, together with WoW16 in modern Windows versions.

Starting

For a long time, this component was missing, until Aleksandar Andrejevic (ReactOS Developer) offered his help for implementation. A branch was created in 16.06.2013, where he implemented basic NTVDM components.

Current state

As of March 13, 2014 in NTVDM; 486-compatible CPU-emulation, very basic video, basic memory management, basic sound, a 32bit BIOS, and 32bit DOS was implemented.

Quite a few things are still missing though, including in the previously listed features. For example, video support does not exist for VESA+ or EGA fonts. Sound only works via the internal PC speaker, not through an emulated SoundBlaster. The CPU emulator also does not have a floating point unit.

Previously, to run DOS apps, you needed to NTVDM manually. Now, thanks to work on CSRSS, NTVDM detects it and starts automatically, when you open 16-bit app. Later, CSRSS will also be responsible for deciding whether to start a new instance of NTVDM or reuse an existing one. The latter feature is especially important for Terminate and Stay Resident programs, including a lot of games.

One thing to note about ReactOS NTVDM is unlike Windows version, ReactOS does not set the CPU into a 16-bit emulated mode. This mode, in theory, reduces overhead compared to the emulation done by ReactOS, but in these days CPUs are fast enough, so performance should not be an issue. An advantage of ReactOS approach is usability of our NTVDM on 64bit x86 processors and potentially ARM processors as well.

06.05.2014 NTVDM was merged to trunk and since then, is developed there.

Additional functions

  • 17.04.2015 - mouse driver was added (CORE-9166)
  • 26.03.2015 - real support for DOS devices was added (CORE-9370)
  • 07.03.2015 - VDM Configuration Files was added (CORE-7832)
  • 06.07.2016 - VBE support was implemented
  • 28.08.2016 - VESA support was implemented

PIF

A program information file (PIF) defines how a given DOS program should be run in a multi-tasking environment, especially in order to avoid giving it unnecessary resources which could remain available to other programs.

PIF is created after creating of LNK-file of DOS app or changing its properties.