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.