← Back to context

Comment by randyrand

3 years ago

It is not a "Windows Emulator", but it is certainly a "Windows Userspace Emulator"

Dolphin can run Wii binaries on top of Linux, by emulating a Wii.

Wine can run Windows binaries on top of Linux, by emulating Windows Userspace.

Why would one be an emulator, and the other is not?

Is there some distinction in what an emulator is that goes against common sense?

This reminds of the Transpiler/Compiler "debate." They're both still compilers. They're both emulators (VMs & Compatability Layers).

What the creators meant to say, IMO, is WINVM, "Wine is not a Virtual Machine".

Wine is more like a re-implementation of windows Userland using a different kernel (and graphics libraries).

Since the hardware is all the same, there is nothing to emulate or compile.

Or from the other direction - windows NT contains a re-implementation of the win16 API. Is that an emulator?

The creators also would not call virtual machines emulators because they don't translate CPU instructions, which is their narrow criteria for "emulator" that nobody else seems to use.

  • > is their narrow criteria for "emulator" that nobody else seems to use.

    Except the people actually writing or talking about real “emulators”. You know, for things like NES or Gameboy on x86, x86 on WASM, etc.

    Sure, you can argue that VMs or Wine are emulators in the broadest sense, but then I could argue that your CPU is an emulator too since it doesn't really runs ASM, and with that very loose meaning almost anything computers related is an emulator. And in practice that's never what people mean when we're talking about an emulator. (Even this thread started with the wrong postulate that WINE must have incurred a performance penalty because the commented believed it was an emulator).

    • Wine-like things have long been called emulators.

      When I was at Interactive Systems Corporation in the mid to late'80s and we were porting System V Release 3 to the 386 for AT&T, we wrote a Wine-like program called i286emul to run 286 System V Release 2 binaries. We and AT&T called it an emulator [1].

      Later AT&T and Microsoft and Sun were involved in various projects to merge features from System V R3, BSD, SunOS, and XENIX into System V R4. As part of that they wanted a way to run 286 XENIX binaries, and Microsoft contracted with Interactive for that. We wrote another Wine-like program for that called x286emul. We and Microsoft called it an emulator too [2]

      The XENIX emulator led to the stupidest meeting I have ever had to attend. Microsoft said there was an issue with the kernel that could not be resolved over the phone or email. So me and the other guy working on x286emul had to go to Microsoft for a meeting.

      A flag needed to be added to the process data structure that would tell the kernel to make some slight changes to a system call or two, due to some differences between System V and XENIX. It was something like XENIX having separate error codes for some things System V rolled into one, or something like that.

      The meeting was about how to set/clear that flag. Microsoft wanted to know if we preferred that it be done as a new flag to an existing system call or if a new system call should be added. I looked at the other guy from Interactive and said something like "A flag's fine for me", he said he agreed. We said "flag" to Microsoft, and the meeting ended.

      That couldn't have been handled by phone or email?

      [1] http://osr507doc.xinuos.com/man/html.C/i286emul.C.html

      [2] http://osr507doc.xinuos.com/man/html.C/x286emul.C.html

      3 replies →

    • Yes, those people are writing hardware emulators. Doesn't mean they're the only "real" kind.

      As for my Intel CPU, it isn't pretending to be another kind of CPU. Intel makes a leading implementation of x86. Wine follows Microsoft's Windows implementation and translates to Linux calls, and the entire point is so you can run programs intended for Windows on Linux instead. You can get relative about it, but it's not really, they're clearly different. Either way, doesn't support WINE's acronym.

      4 replies →

The Wii emulator is emulating the whole system including the CPU; WINE describes itself as not an emulator specifically because it's not doing anything about the CPU (hence not working on ARM Linux without extra work).

(I'm not 100% sold on this; I think "CPU emulator" and "ABI emulator" are both reasonable descriptions, albeit of different things, but that's the distinction that the WINE folks are making.)