Skip to content

otya128/winevdm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

This reverts commit a45ac8e.

Windows 3.1 and NTVDM do not remove a stray period.
3aa0700 makes this workaround
unnecessary.
41df204

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
September 24, 2019 22:03
gdi
August 4, 2023 14:50
gvm
October 24, 2021 20:33
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
May 13, 2019 18:30
September 30, 2023 15:21
August 12, 2020 16:39
May 30, 2021 01:37
May 13, 2019 19:02
May 13, 2019 18:30
May 13, 2019 18:30
October 24, 2021 16:50
May 13, 2019 18:30
May 13, 2019 18:30
July 12, 2023 09:04
May 13, 2019 18:30
wpp
October 24, 2021 16:50
November 9, 2019 13:24
September 1, 2018 11:29
May 16, 2018 00:46
May 20, 2019 22:23
November 13, 2021 20:48
October 24, 2021 19:39
April 9, 2019 22:33
November 2, 2019 16:51
July 27, 2017 20:31

winevdm on 64-bit Windows

screenshot

Download stable version

Download latest version (unstable)

16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows

An altered version of winevdm (a 16-bit Windows emulator), ported to 64-bit Windows.

How to run

How to install

  • Download or compile
  • Run "install" shortcut or right-click on install.inf and select "Install"
  • You can execute Win16 binaries directly!

If the registry is initialized by Windows Update, perform the above procedure again.

You can uninstall it by running uninstall.reg.

Configuration

See otvdm.ini.

How to compile(Visual Studio)

  • Install Visual Studio 2017
  • Edit PropertySheet.props
  • Compile

How to compile(cmake)

git clone https://github.com/otya128/winevdm.git
cd winevdm
mkdir build
cd build
cmake ..
make

How does it work?

This program contains the following items

  • CPU Emulator
    • 64-bit Windows cannot modify LDT(NtSetInformationProcess(,ProcessLdtInformation,,) always returns error)
  • wine based Win16->Win32 conversion codes:
    BOOL16 WINAPI DestroyWindow16( HWND16 hwnd )
    {
        return DestroyWindow( WIN_Handle32(hwnd) );
    }
    Relay routines from 16-bit to 32-bit are autogenerated by convspec
    53  pascal -ret16 DestroyWindow(word) DestroyWindow16
  • DOS emulation for Win16
  • 16-bit <=> native HANDLE conversion
  • Fix compatibility problems, fix compatibility problems

install.inf

When 64-bit Windows detects a 16-bit installer, it has a mechanism to start an alternative installer which is not 16-bit. This program uses it.

WINDOWS directory redirection

Some Win16 programs try to save their settings in %WINDIR%<filename>.ini

In recent Windows, it is not allowed to save to %WINDIR%, so it redirects.

winevdm

winevdm.exe [--app-name app.exe] command line
winevdm.exe CALC.EXE

It can also run DOS executables (DOS emulator-like). You can set the DOS version with the VDMDOSVER environment variable.

DOS emulation is incomplete and it is recommended to use DOSBox or MS-DOS Player.