r/bashonubuntuonwindows • • Jan 15 '19

So, can we run 16-bit Windows programs using this (aka finally installers for old programs will works as a lot are 16-bit)?

What it says on the tin.

0 Upvotes

19 comments sorted by

4

u/larrygbishop Jan 15 '19

Need 32bit Windows to run some 16bit Windows programs.

4

u/0x6A7232 Jan 15 '19

I'm aware; I was wondering if WINE emulates the NTVDM 16-bit emulator. That's why Win x64 doesn't work with 16-bit; MS removed NTVDM support. Put it back and it would run. It's even been partially implemented natively (not using WINE) here, if I understand correctly: https://github.com/leecher1337/ntvdmx64

4

u/crozone Jan 16 '19

Isn't the reason for this because x64 protected mode has no hardware feature to run 16 bit real mode applications? It isn't a feature MS decided to just remove - you can't do it natively without being in 32 bit protected mode.

4

u/zdimension [Insider - Fast] Jan 16 '19

You can. The NTVDM has been available for many years even on platforms other than x86; NT had it on SPARC and MIPS iirc. Basically on x86 it uses the V86 mode but on other platforms it uses an embedded emulator that can run DOS. Not supporting x86_64 is an artificial decision. Proof in case: ntvdmx64 linked above.

2

u/crozone Jan 16 '19

Wow, TIL. Knowing MS, it was probably to close that massive support rabbit hole. MIPS customers complaining about a legacy application not working is one thing, spreading that to the entire userbase of x64 Windows is another.

4

u/zdimension [Insider - Fast] Jan 16 '19 edited Jan 16 '19

Maybe a necessary evil? I'll bet a dollar that decision helped force people to make the leap and port their program to Windows instead of relying on a compatibility layer.

Everyone is always complaining about Windows' old features and bugs but on the other hand people complain when those same features are removed. </Devil's advocate>

2

u/rivertownesq Jan 15 '19

Are you asking if you can run Windows 3.1-era programs on WSL?

You should know you can already run some on Windows 10 in 32-bit mode.

You can also install DOSBox to run many on Windows 10, 32 or 64 bit.

Failing that, yes, you can install qemu and boot an entire Win 3.11 system.

Fedora has a very good qemu guide here: https://fedoraproject.org/wiki/How_to_use_qemu

1

u/0x6A7232 Jan 15 '19

Yes, you can run 32-bit programs on Windows 10 x64, however, since NTVDM was removed you cannot run 16-bit Windows programs. Let's say you have an old Windows '95, '98, or even 3.1 program that's 16-bit. Can you run this in WINE without emulating an entire PC (the problem with that is you can't interact with the system outside the box). See also here: https://github.com/leecher1337/ntvdmx64

3

u/[deleted] Jan 16 '19

Can you run this in WINE without emulating an entire PC (the problem with that is you can't interact with the system outside the box)

I'm unclear on why you feel wsl would be any different? It's virtually a native linux userland running on an emulated kernel, not unlike wine itself.

You'd still have to use select mounts/shares with fixed permissions, only you'd also need to bring in an X server for windows.

At this point the difference between just running legacy stuff in a vm or dosbox+win3.x/win9x and running your legacy stuff through wine on wsl is minimal. You'll still need to funnel interactions through specific exported filesystem paths.

1

u/0x6A7232 Jan 16 '19

I've tried using DOSBox for that stuff before. Reaching "outside the box" as it were, can be difficult. WINE already has a lot of this down for interacting with Linux, ans WSL has this down for interacting with Windows 10. If the handling is already set up, it should prove a bit easier.

2

u/[deleted] Jan 16 '19

Well dosbox works about the same in this context. You mount a local path as a drive and go from there. Put it in the autoexec section of the configuration file to make it stick.

Virtual machines just work similarly, you configure some form of shared host folder and go from there.

I mean you're welcome to try the whole wsl + windows x11 server + wine stack if you want, I just don't feel it will be particularily easier than any of the other options.

1

u/0x6A7232 Jan 23 '19

Hmm. I suppose you could make a symbolic link inside the shared directory (drive) to reach outside the box... should work, right?

2

u/MadCervantes Jan 16 '19

Is wsl an emulated kernel? My understand is that it's a windows kernel with a translation layer between Linux and windows using some kind of api.

1

u/[deleted] Jan 17 '19

I'm using "emulated" loosely here, I don't mean that wsl runs a linux kernel through some form of hardware emulation, just that that they reimplement the system calls and interfaces.

It functions actually shockingly like wine, just with the addition of PicoProcesses instead of wrapping full NT semantics like cygwin.

1

u/MadCervantes Jan 18 '19

ah gotcha. cool thanks for the information. You clearly know more about this than me, so it's good to get more explanation from someone.

1

u/[deleted] Jan 18 '19

No problem, if you'd like more relevant reading, this blog article is a good starting point

1

u/HenkPoley Jan 16 '19

WSL can even only run pure 64bit software. AFAIK.

1

u/JonnyRocks Jan 16 '19

you are going down the wrong path. can you name one program you want to get running? I can help you find a better way.

0

u/0x6A7232 Jan 16 '19

Been a while since I needed anything like this, but I'm the kind of person who would like to fire up progman.exe (or maybe even fileman for some giggles, but that might cause some issues due to the file system lol) for the fun of it.