by WarChortle · 4y ago · 0 comments
The whole point of wine is to take a native Windows app, only compiled for Windows and translate its Windows calls to Linux calls.
Ehhh. I know it’s in the name, but I feel like the significance is debatable. It’s not a CPU emulator, true. It is emulating calls, which is emulation of a sort.
Related note: if WINE is an emulator why isn't Linux or GNU? They both reimplement parts of UNIX, which was even more proprietary than Windows is today.
On most of these architectures the software eventually executes as x86 machine code, and the distance between x86 machine code and the actual processes inside a modern CPU implementing the x86 code set is so vast you can call a modern CPU an "x86 emulator built in hardware."
I mean, it depends on the context. I don't think it would be wrong to say that Linux "emulates a UNIX environment" or some such, which is closer to what OP actually wrote about Wine.
You've probably used a "terminal emulator" at some point today. ;)
They... are? I mean for that matter Intel/AMD instruction sets are CISC emulators on top of RISC silicon.
Exactly the same way as wine. Wine does not translate the calls, it for most part actually implements the underlying logic.
Win32 is just a bunch of shared libraries: https://en.wikipedia.org/wiki/Microsoft_Windows_library_file...
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".
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?
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).
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?
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.
(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.)
WINE should simply stand for WINdows Emulator.
Wine does not aim to emulate a "Windows computer system" (aka a machine which booted into Windows). For instance, it doesn't allow one to run windows device drivers. WINE is taking an approach that ultimately means it is doing a subset of what is possible with full emulation (hopefully in return going much faster).
To put it another way, a mobile phone app with a HP49 interface that understands RPN is not necessarily a calculator emulator. It could just be an app that draws a calculator interface and understands RPN and some drawing commands. It doesn't necessarily have the capability to run firmwares or user binaries written for the Saturn processor.
The "Wine is not an emulator" suggestion was first made in 1993, not because Wine is not an emulator but because there was concern that "Windows Emulator" might run into trademark problems.
Eventually that was accepted as an alternative meaning to the name. The Wine FAQ up until late 1997 said "The word Wine stands for one of two things: WINdows Emulator, or Wine Is Not an Emulator. Both are right. Use whichever one you like best".
The release notes called it an emulator up through release 981108: "The is release 981108 of Wine, the MS Windows emulator".
The next release changed that to "This is release 981211 of Wine, free implementation of Windows on Unix".
As far as I've been able to tell, there were two reasons they stopped saying it was an emulator.
First, there were two ways you could use it. You could use it the original way, as a Windows emulator on Unix to run Windows binaries. But if you had the source to a Windows program you could you could compile that source on Unix and link with libraries from Wine. That would give you a real native Unix binary. In essence this was using Wine as Unix app framework.
Second most people who would be likely to use Wine had probably only ever encountered emulators before that were emulating hardware. For example there was Virtual PC from Connectix for Mac, which came out in 1997, and there were emulators on Linux for various old 8-bit systems such as NES and Apple II.
Those emulators were doing CPU emulation and that was not fast in those days. It really only worked acceptably well if you were emulating hardware that had been a couple of orders of magnitude slower than your current computer.
Continuing to say that Wine is an emulator would likely cause many people to think it must be slow too and so skip it.
I'm using an accepted definition of emulation:
> emulate (transitive verb)
> To imitate the function of (another system), as by modifications to hardware or software that allow the imitating system to accept the same data, execute the same programs, and achieve the same results as the imitated system.
This usage is pretty common, for example FreeBSD has a linux emulation layer that takes Linux syscalls and translates them into FreeBSD syscalls. WINE saying it stands for "Wine Is Not an Emulator" is irrelevant to the fact that it is blatantly is one.