Small software to run 16-bit apps

3

1

I cannot run a small Windows 16-bit app on my 64-bit system. Suggestions I found online involve running the 16-bit app inside a virtual machine, but running a whole OS just to run a small app seems like overkill.

I'd imagine it would be possible to make a small software that emulates the necessary stuff the 16-bit app needs. Does anyone know of such a solution?

Armand P

Posted 2013-11-20T12:30:43.443

Reputation: 701

A Virtualbox is not heavy at all. Heck, even XP seems tiny on a modern computer running 7 or 8. And 16-bit? Just run something even older than XP and you are settled. – Apache – 2013-11-20T12:32:47.797

Its not possible to run 16-bit software on a 64-bit operating system so this limits you to using a virtual machine or a 32-bit application that provides the ability to emulate the functionality you need ( i.e. DOSBox ). We are unable to provide specific product recomendations here at Superuser. – Ramhound – 2013-11-20T12:34:13.877

I've been researching this for some time and thought maybe I have missed some simpler solution.

On a new pc the VM runs quickly, but running the app involves many steps (run VM, wait to boot os, then run app). And setting up so the 16-bit app can save to my documents folder is a hassle. – Armand P – 2013-11-20T12:39:47.643

Answers

1

I'd imagine it would be possible to make a small software that emulates the necessary stuff the 16-bit app needs. Does anyone know of such a solution?

Actually that is not trivial. An x86 CPU in amd64 mode does not only gain a lot of functionality (double registeres, double MMX registers, 64 bit address mode, ...) it also looses access to some legacy options. It can run 32-bit apps without problems, but there is no longer a way to run 16 bit apps natively. Thus you really need to emulate an older CPU. Emulation is relative slow and not entirely trivial.

The usual solution to that is to put the whole thing in a VM, e.g. one powered by qEMu which can emulate other CPUs.

Suggestions I found online involve running the 16-bit app inside a virtual machine, but running a whole OS just to run a small app seems like overkill.

It is somewhat overkill. The right solution would be to either recompile the application and run it as a 64 bit executable (often trivial if the app is written well and uses things like size_t rather than just assuming that things will never change). That does require you to have access to the source code, which is not always the case.

Workarounds would be:

  • Keep an old DOS/windows 2/3/3.11 system around (Please G-d NO)
  • run it inside a VM.
  • Emulate the older machine via WINE.

The first solution is not recommended. You would be stuck with on old OS, e.g. windows 7 32bit (do not use an older OS which no longer has updates. Do not use XP unless you would to switch OS before 8th of April 2014. Or use a dedicated host with no network access, all USB ports glued shut etc. This has the obvious downside of impairing usability.

Running it in a VM is great. It works, it can be isolated. It is easy to backup and you can migrate the VM to a new machine whenever needed. Future proofing is a good thing.
The obvious downside is running the VM, but part of that can be automated (e.g. automatically boot it when you power on your desktop. Tie the VM's shutdown into windows power-off etc etc.

Emulation will also work, and it usually will be slower. (most exceptions where emulation is faster involved WINE, Linux and games where the OpenGL call were much faster in Linux, causing an unexpected 40% speed gain for some games). Still, slower is not bad, considering that the old app probably ran on some 16-ish MHz 286 (16 bit era) and now on a multi-GigaHertz modern core. Even if it slowed down by 99% it would still be faster.

Still, for easy of maintenance and future proofing: Get a VM with win7-32 bit and run your app in that.

Hennes

Posted 2013-11-20T12:30:43.443

Reputation: 60 739

@ArmandP done

– user2284570 – 2019-07-20T19:41:21.060

Thank you for the thorough explanation. I still think a simple emulator would be possible (WINE is proof of that). But it seems at this point a WM with full OS is the only way. – Armand P – 2013-11-20T15:26:27.667

1WINE on 64bit MacOSX runs my 16bit app with no problems. So waiting on a WINE port for windows. – Armand P – 2013-11-20T20:38:09.573

0

For me otvdm was the unofficial replacement of Ntvdm I was looking for. While 16 bits Windows uses protected mode, and thus doesn’t require real mode accessing at all unlike Microsoft is claiming (the requirement is 16‑bits segments access).
It emulates the ᴄᴘᴜ either completely like Ntᴠᴅᴍ or through Intel Haxm for better performance, but it does so just in order to wrap Syscalls like Wine would do on Linux : no virtual Network card ; no Virtual hard disk (%systemdrive% is %systemdrive%) ; no allocated but unused memory ; and there’s the option I’m looking for but which is disabled by default : that changes written to the registry is done to the one of the system !

It’s even more powerful than the official Ntᴠᴅᴍ : the transparent level of hardware access is so high that It should be possible to use the full processing power of original graphics hardware. Though there were no ᴀᴘɪ for doing that at that time…

Like Ntᴠᴅᴍ, it’s launched transparently and automatically when a 16 bits program is encountered.

It can be downloaded pre‑compiled here.

user2284570

Posted 2013-11-20T12:30:43.443

Reputation: 1 160