Adinnieken said:
WinE originally meant Windows Emulator.
What you're calling translation isn't translation. Translation is taking C++ and converting it into C# or VB#. Windows calls aren't a language. Nor are Linux calls.
Every computer language is meaningless to a computer other than binary. From Assembly on up to Javascript is simply a computer coding language intended to make programming easier for programmers. If I open a file in Basic, C++, or Perl, I'm issuing essentially the same commands in Binary. I'm just using an easier language to do so. Where as it may take 3,000 lines of code to open a file in binary, it may only take four in VB or two in C.
So when an application makes a call to the OS to open a file, such as Word may do in Windows, the programmer makes a reference to a C Lib to open the file and pass it onto the application, where then the application does more with it. That call to the OS that the application makes is the same in Windows as it is on Linux. Now to save a file, the OS may do something different. Maybe when the file is saved the application gives the user the ability to associate a unique icon with the file (as Word does), this may require a call to another file. In order for WinE to emulate that or handle that call gracefully, they would need to emulate that call OR gracefully error out.
While WinE doesn't have access to original source code to understand every hook and relied upon reverse engineering to identify the calls to the OS that applications were making, it is still an emulator. What you're calling translation is actually what happens when you emulate a system. You take a call that an application makes, then you emulate that call on a facimile of it. Most of the time people are emulating (virtualizing) the hardware in software, WinE is simply emulating a portion of an OS functionality.
Where WinE differs from a true emulator is that it doesn't emulate the entirety of Windows or even the hardware. It is an application layer that emulates Windows calls. Much in the same way that Windows NT itself could run POSIX and OS/2 applications, or OS/2 could run Windows 3.1 applications. They're application layers that emulate a different OS.
I would encourage you to educate yourself. Emulation is a subset of virtualization. They are almost synonmous.
|
Assembly is basically binary. It's machine code, the words are just mnemonic references. Let's take ADD 101, 110. The ADD instruction may be represented by the binary 10 in that architecture, so the machine will have 10, 101 and 110 and it know that the first is the code for the instruction and the next two are values, registers or memory positions. So yes, it's the lowest you can go and words are just a mnemonic so you don't have to remember number sequences. You will use the exact same number of instructions in binary that you will in Assenbly because it is the same thing, it's 1:1. Using C or any other language, the relation between language calls and the real machine calls could bebe 1:1 for somethings, 2000:1 for others and so on. What Wine will do is get the machine language, detect sets of calls that make something meaninful together, find what is does and try to translate to what works in another OS, wich was made using reverse engineering (something that MS wouldn't need for 360/X1 since they have the full specs and other data). It won't need to change any call, since they are defined by the architecture and it is the same for Windows and Linux in this case. It will simply see a set of calls and know that is is, as an example, to draw a window and it will be replaced by whatever is necessary to do the closest thing on Linux.
Emulating a hardware device like the 360 is basically implementing it's hardware in software and then trying to optimize it to add direct translations whenever possible for a more Wine-like approach, something that won't be possible for all hardware components in the said device, adding a translation layer. Wine could originally be called Windows Emulator but since some good years, it's called "Wine is not an emulator". They refer to it as a translation layer and it's what Wine is. Even virtualization nowadays simply pass direct access to the guest OS so it can simply talk straight to the hardware (that sometimes even contains special functions to allow this). Most virtualization solutions won't allow you to run OS for different architectures just because they aren't emulating another hardware and simply passing it through (other like QEMU and libvirt will allow it simply because they have an emulation layer for that).