We all know the feeling. You just want to use some of your favourite 16bit Windows applications, only to realise that since you moved to 64bit, Windows no longer runs them. This gets me every time, probably 4-5 times a day. Every time I’m like – there’s got to be a better way than firing up my old 386 laptop, or running an entire Windows 3.x VM just to get my daily fix of Skifree.
Right?
I jest, of course, but when Brad Robinson’s partner, Jen, wanted to play some old 16bit Windows games, he did actually want to create a less frustrating user experience. So, he decided to write a Windows 3 emulator.
The basic idea is to write a program that can read a 16-bit Windows executable file, run it on an emulated CPU and map any 16-bit API calls that it makes onto the x64 equivalents.
The emulator itself isn’t available just yet, but his series of articles on Medium detailing its development are fascinating reads.
… though it might be fun!
I was in the same boat recently. I like to play a game called Stars! which is a Win95 game from about 1997.
Couldn’t play it any more on my last 64-bit Windows machine reserved for Windows games.
It plays on *every* Linux computer I have even if the CPU is 64-bit! Linux has better Win95 compatibility these days than Windows itself!
Edit: OK I could be making a capital mistake: not sure how good Wine is for Win 3.x if at all possible!
Edited 2016-11-14 00:53 UTC
It has had its regressions. For example, I’ve still got my PlayOnLinux set to Wine 1.2 for the copy of BrickLayer I like to play when most of my 32-bit games run on the system Wine.
That aside, the big issue is that Wine doesn’t do the “emulated CPU” part… it relies on the Linux kernel’s support for running 16-bit code on 64-bit x86 with the help of the Wine loader, unlike 64-bit Windows kernels.
If we’re ever going to see 16-bit classics show up on GOG.com, they’ll need a way to run them on their largest market by far (64-bit Windows).
Something that is here is not that wine 100 percent depends on the Linux kernel.
https://wiki.winehq.org/ARM
There is such thing as don’t reinvent the wheel. When on OS X and Linux for cpu emulation you can use qemu user-mode.
Next wine does not run all 16 bit code by Linux kernel. 16 bit and 32 bit Dos application windows applications demand to run under wine on 64 bit Freebsd, OS X and Linux are run by dosbox emulator because 64 bit kernels does not have vm86 mode unless it custom patched. Please note if you do patch in vm86 mode switching to and from vm86 mode causes that much disruption on a 64 x86 system its not worth it.
http://v86-64.sourceforge.net/
If you want to see how bad get that patch and run it.
There are a lot of early win 3.11 and 95 applications with installers written in dos. So dos MZ exe and com support will be just as important as NE exe support. Including incorrect dos MZ exe what are ones that start with ZM instead of MZ.
Also a large number of wine libraries in fact build for windows. Biggest thing wine is lacking is a loader designed for Windows and a emulator for win16 mode because the dosbox emulator used for 16 bit and 32 bit dos applications could be used on Windows no problems.
So wine is part emulated cpu and takes advantage of non emulated where possible. Also NE applications would have become emulated under wine if it had been impossible to fix the security fault in Linux kernel 16 bit protected mode. So someone making a emulator for 16 bit protect mode would be of interest to the wine project if it was cross platform.
Just because wine uses dosbox for dos mode on 64 bit systems does not mean wine source code has removed the means to use native vm86 if the system offers it.
So wine path seams to be use platform native where possible. Use emulation where that is not possible and if possible recycle a third party emulation.
I guess you mean the modify_ldt information leak.
Actually the discussion on the kernel mailing list
http://lkml.iu.edu/hypermail/linux/kernel/1404.1/02629.html
didn’t go in that direction. Worst case it would have become disabled by default instead of enabled by default.
Could DOSbox be used? Later versions of Windows 3.x tried to prevent running on non-msdos/pcdos.
Edited 2016-11-14 01:34 UTC
And speaking of 16bit emulators, this could also be of interest to someone:
http://takeda-toshiya.my.coocan.jp/msdos/index.html
“This is MS-DOS emulator running on Win32-x64 command prompt.
16bit MS-DOS compatible commands can be executed on Win32-x64 envrionment.”
I used it with some mixed results, but worked great for some old compilers or other CLI tools like compressors/archivers.
Edited 2016-11-14 02:40 UTC
Huh. I don’t read Japanese but it looks like it’s probably a Windows analogue to dosemu, which I use for integrating things like Pacific C (from FreeDOS) into the build process for test files for an EXE parser I have planned.
(Since the EXE files generated by Pacific C cause /usr/bin/file to produce output distinct from any of the native Linux-to-DOS cross-compilers I’ve tried so far.)
Edited 2016-11-14 14:16 UTC
reinventing the wheel?
there is not only wine, bot there were also the Willow Twin Libraries in the 90s:
http://www01.heise.de/ct/english/98/10/166/“ rel=”nofollow”>https://web.archive.org/web/19990913191434/