Skip to content
16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows
Branch: master
Clone or download
otya128 Merge pull request #231 from cracyc/palfixes
add basic support for 8bpp ddb bitmap and fix ugly mistake
Latest commit 5c2dc56 Mar 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
avifile
comm Fix AdditionalDependencies Jan 2, 2019
commctrl Fix MenuHelp Jan 5, 2019
commdlg improve print and setup dialogs, layout especially of setup still isn… Mar 11, 2019
compobj
convertwinefile
convspec Generate the correct .def file Dec 1, 2018
ctl3d
ctl3dv2
ddeml Fix AdditionalDependencies Jan 2, 2019
dispdib
display Fix AdditionalDependencies Jan 2, 2019
dummydll
gdi
haxmvm
keyboard
krnl386 Merge pull request #225 from cracyc/drivelabel Mar 17, 2019
lzexpand
mmsystem Fix AdditionalDependencies Jan 2, 2019
mouse
msacm
msvideo msvideo.dll16: Use the ARRAY_SIZE() macro. Sep 18, 2018
nddeapi Add NDDEAPI stub Sep 11, 2018
ole2 Add OleGetIconOfFile Jan 18, 2019
ole2conv
ole2disp Fix BSTR Jan 11, 2019
ole2nls
ole2prox
ole2thk
olecli Fix OLECLI structure definition Nov 1, 2018
olesvr
otvdm Fix set_dll_path Jan 22, 2019
shell Fix AdditionalDependencies Jan 2, 2019
sound Fix .def Nov 23, 2018
storage Add StgSetTimes Dec 15, 2018
system.drv16 Fix .def file Sep 18, 2018
timer
toolhelp
typelib
user
vdmwrapper
vdmwrapperexe fix build May 13, 2018
ver Fix .def Nov 23, 2018
vm86 Fix AdditionalDependencies Jan 2, 2019
widl
wifeman Fix .def file Sep 18, 2018
win87em
wine Fix AdditionalDependencies Jan 2, 2019
winecrt0
wing use correct wing halftone palette Oct 15, 2018
winhlp32
winnls Fix AdditionalDependencies Jan 2, 2019
winoldap
winsock
winspool Fix .def file Sep 18, 2018
wow32
wpp
.gitattributes
.gitignore add wDebug to .gitignore Sep 1, 2018
LICENSE
PropertySheet.props
README.md Update README Feb 17, 2019
READMEJP.md
install.reg Increase the priority of registry key Jan 25, 2019
otvdm.ini
otvdm.sln
screenshot.PNG add sc Jul 27, 2017
uninstall.reg Increase the priority of registry key Jan 25, 2019

README.md

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 compile

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

How to run

How to install

  • Download or compile
  • Edit install.reg
  • Register install.reg
  • You can execute Win16 binaries directly!

If you install v0.4.x, you should add these to install.reg and register install.reg again.

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\NtVdm64\OTVDM]
"CommandLine"="\"%m\" %c"
"InternalName"="*"
"MappedExeName"="C:\\PATH\\TO\\otvdm.exe"
"ProductName"="*"
"ProductVersion"="*"

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.reg

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.

You can’t perform that action at this time.