WineVDM integration

Preface:

DxWnd can be integrated with WineVDM to allow handling of Win16 programs.


Context:

Windows offered some compatibility with the Win16 world (for Win3.x up to Windows NT) through 16 bits emulation on Win32 platforms, but after the arrival of Win64 systems this support was discontinued and Win16 programs were no longer executed.

Currently it is possible to run Win16 programs using virtual machines or DOS emulators (like DOSBox) adding the Windows 3.1 support, but the operation is rather complex and delicate.

WineVDM offers a compatibility layer for Win16 on Win32 and Win64 and could be used alone, but in combination with DxWnd there are several advantages: DxWnd offers special features to improve portability and adaptation of programs, for instance to run fullscreen programs in a customized window and many other tweaks. Combining DxWnd and WineVDM I is possible to merge the two features and customize the behavior of Win16 programs on modern Windows versions.

There is a further advantage in using DxWnd+WineVDM versus some sort of emulation: the emulation of the native 16 bit platform (be it Windows95, 98 or ME) requires a dedicated space for the operating system, time for the OS start and, most dangerous, extreme care to shut down the virtual OS properly in the end. Terminating the emulation suddenly may easily corrupt the operating system with need of complex recovery operations. Using DxWnd+WineVDM you don't have to worry about this problem.

WineVDM installation:

To install WineVMD in such a way that it could be run by DxWnd you can follow the following steps:

1) Download the latest WineVDM bundle from the "GitHub page" .

2) Create a winevdm folder in the DxWnd folder

3) Drop (uncompress) the WineVDM files inside this new folder


Win16 programs detection:

While hooking a new program, DxWnd detects the target program architecture selecting between Win32 and Win16 and, in the Win16 case, proposing to run the program through WineVDM otvdmw.exe emulation.

Win16 program installation:

The installation of a program usually requires running a dedicated INSTALL.EXE or SETUP.EXE program.

The installer program is often (practically always for Win16 programs) another Win16 program that you can run through otvdmw.exe directly or hooking it to DxWnd.

In the DxWnd case, once the program is installed you may want to delete the installer entry in DxWnd panel since it will be no longer necessary. Win16 programs configuration in DxWnd: Usually Win16 programs require a default setting that is different from a common Win32 default, so a default Win16.dxw profile is provided in the bundle.

The Win16 default profile includes the following configuration settings:

1) locked window size

2) initial resolution value of 640x480 pixels

3) 8 bit color depth (though in a few cases it would be necessary to set 16 bit)

4) scaled GDI mode

5) set the Mouse flag “Fix mouse lParam” (in addition to “Correct mouse position”)

6) set the “Remap system folders” flag to bound the system changes inside the DxWnd entry scope.


Special configuration modes for Win16 programs:

When DxWnd configures a Win16 program it will also add to the DxWnd configuration tabs a new and dedicated tab named “WineVDM”, In this tab will be present configuration elements that are exclusive for WineVDM configuration.

When adding a new Win16 hooked program it may be convenient to use the drag & drop feature dropping the new program over the Win16.dxw profile or to another Win16 program entry, so that the new program will inherit most of the good values.

For a Win16 program running graphics it is probably necessary to add support for specific libraries, QuickTime in particular.

It is recommended to run the installer through DxWnd and WineVDM as well, so that the needed system extensions will be loaded in the WineVDM folders.

It is also possible to make use of the “Remap system folders” flag to redirect the system customization to a game private area to avoid conflicts with the system customization of other programs.

In that case both the installer and the program should be run with the same remapping flag.

BEWARE: when setting 8 or 16 bit color depth modes, WineVDM needs the application of system compatibility shims. DxWnd will do it for you automatically, but the effect will be permanent until you clear that setting either manually or setting the “No SHIMs” flag.