deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (hnrss.org)

winevdm port brings 16-bit Windows 1.x to 3.x apps back to 64-bit Windows

A port of the winevdm emulator, highlighted on Hacker News, lets 64-bit Windows run applications built for Windows 1.x through 3.1 using a CPU emulator and Wine-derived API conversion.

winevdm port brings 16-bit Windows 1.x to 3.x apps back to 64-bit Windows

An emulator port that restores support for 16-bit Windows applications on 64-bit systems has been drawing attention on the Hacker News front page. The project, hosted on GitHub under the name otya128/winevdm, is a modified build of winevdm, a Win16 emulator, adapted so that programs written for Windows 1.x, 2.x, 3.0 and 3.1 can run on current 64-bit editions of the operating system.

Why Win16 broke on 64-bit

Sixteen-bit code has been locked out of 64-bit Windows for years; 32-bit editions could still lean on the NTVDM subsystem, but that path does not exist in 64-bit builds. According to the project's README, the underlying blocker is that 64-bit Windows no longer allows the Local Descriptor Table to be modified: calls to NtSetInformationProcess with ProcessLdtInformation always return an error. Without that facility, the classic approach to hosting 16-bit code collapses, which is why the emulator interprets the code rather than executing it directly.

How the emulator is built

The README breaks the implementation into several parts:

  • A CPU emulator that interprets 16-bit instructions in user space.
  • Conversion code derived from Wine that rewrites Win16 API calls as Win32 equivalents. The README illustrates this with a DestroyWindow wrapper that converts a 16-bit window handle and forwards the call to the 32-bit function.
  • Relay routines bridging the 16-bit and 32-bit sides, generated automatically by a tool called convspec from short specification lines.
  • A DOS emulation layer for Win16 programs that need it, translation between 16-bit and native handles, and a stack of compatibility fixes.

Installation and everyday use

The practical workflow is straightforward. Users can drag a Win16 executable onto otvdm.exe or launch it through otvdmw.exe; the command-line form accepts an application name directly, with CALC.EXE given as an example. If Windows complains about a missing VCRUNTIME140.dll, the README says to install the 32-bit Visual C++ 2017 redistributable.

A deeper integration is available through install.inf: running the install shortcut, or right-clicking the file and choosing Install, registers the emulator with the system so that 16-bit binaries can be launched directly, like any other executable. The README warns that if Windows Update reinitialises the registry, the install step has to be repeated, and a separate uninstall script reverses the whole process. Configuration lives in otvdm.ini, and the project can be built either with Visual Studio 2017 or with CMake.

Two integration details stand out. Windows already contains a mechanism that launches a substitute installer whenever it detects a 16-bit one, and the project hooks into that so old setup programs work again. And because modern Windows forbids writing into %WINDIR%, the emulator redirects older programs that still try to store their settings there as .ini files.

DOS support is deliberately thin

The same executable can also run DOS programs in a mode resembling a DOS emulator, with the reported DOS version adjustable through the VDMDOSVER environment variable. The README is blunt about the limits here: DOS emulation is incomplete, and it recommends DOSBox or MS-DOS Player for anything serious.

Why it matters

A large body of software written between the mid-1980s and the early 1990s is effectively stranded on modern hardware, whether it is a museum piece, a long-lost utility or a line-of-business tool that never got rewritten. Projects like this one are the only practical bridge left, since Microsoft has shown no sign of restoring 16-bit support. It is also a neat inversion of Wine's usual purpose: conversion code originally written to bring Windows applications to other operating systems is being reused to fill a compatibility gap inside Windows itself. The project is open source, so anyone who needs to audit or extend the emulation layer can build it from source.

  • #windows
  • #emulation
  • #open-source
  • #retro-computing
  • #wine

Related posts