On Wed, 28 Aug 2002, Lionel Ulmer wrote: [...]
Anyway, if you do that, you would need to simulate also a full Linux kernel on this emulator (as otherwise, on what system would emulated Wine run).
Not necessarily. What you propose to do for Wine can be done for the C and X11 libraries. Then you get an emulator that lets you run x86 Linux applications on a PPC machine... including Wine.
It is similar, though more complex, to FreeBSD's Linux emulation mode.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ $live{free} || die "";
On Wed, Aug 28, 2002 at 04:51:29PM -0700, Francois Gouget wrote:
Not necessarily. What you propose to do for Wine can be done for the C and X11 libraries. Then you get an emulator that lets you run x86 Linux applications on a PPC machine... including Wine.
Well, yes... But if you have a system that creates for you a 'translation' layer for all the libraries used by Wine, why not use it directly on Wine itself ?
I do not see why it would so much more difficult for Wine than for libc or X11 libs (the only additionnal problem I see would be endianness problems for ressource loading, but a part from that, I see none).
Lionel
On Thu, 29 Aug 2002, Lionel Ulmer wrote:
On Wed, Aug 28, 2002 at 04:51:29PM -0700, Francois Gouget wrote:
Not necessarily. What you propose to do for Wine can be done for the C and X11 libraries. Then you get an emulator that lets you run x86 Linux applications on a PPC machine... including Wine.
Well, yes... But if you have a system that creates for you a 'translation' layer for all the libraries used by Wine, why not use it directly on Wine itself ?
You cannot have a tool that is going to write the translation layer automatically. I guess it is simpler to write it by hand for the Unix APIs (maybe a couple thousands at most?), rather than for the Windows APIs >> 10 thousands, plus tons of messages, plus tons of callbacks, plus poor documentation, etc.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ It really galls me that most of the computer power in the world is wasted on screen savers. Chris Caldwell from the GIMPS project http://www.mersenne.org/prime.htm
You cannot have a tool that is going to write the translation layer automatically. I guess it is simpler to write it by hand for the Unix APIs (maybe a couple thousands at most?), rather than for the Windows APIs >> 10 thousands, plus tons of messages, plus tons of callbacks, plus poor documentation, etc.
Well, who would need documentation as we HAVE the source of these APIs (ie the Wine source code itself). My conception of a tool would have been something like that : each time in the Wine code that a function is 'exportable' to the application itself (be it via DLL loading, GetProcAddress, COM, ...), its signature could be stored somewhere (as is already done for relay traces in the .spec files but much more precise). Then, a tool could then, for any two given architectures, generate translation thunks from one to the other (which would convert structures with the various alignements for each platform, ...). Of course, Varargs function would be hell to simulate (but well, same problem for glibc translation than for Wine).
The remaining problems would be callbacks. But for these too, as we have access to the code filling the data given to those, we could also do some special code handling the various translations.
So, all in all, I still do not see why it would be much more difficult for Wine rather than for any other library....
Lionel (playing devil's advocate)