No No No People... Please read the messages before replying.
I know the difference betweeen my 6502, 6800, Z80, 68k, x86, 7400. I know Wine is focused on running MSWindows based software on x86 processors. I also know there exists PowerPC code in the wine project because people were interested in bridging the gap to running x86 code via emulation...
For the record... I am not looking to run another full out emulation. The best example of what I have in mind is what Apple did when they moved their processor base from 68K to PPC. And I am wondering if the same could be done for Wine. By the looks of things some of the framework to make that happen are already there in the form of thunk code... Apple used what they called trampolines iirc.
I am not sure that WineLib is what I am looking to use as the wine script & loader seems to achieve much of what I am already looking to do.
My understanding is that Wine has run on PowerPC at some time via native and Qemu/Qemu-user. Since the Darwine (PowerPC work) project went dormant, I have not been able to find much of the information I am looking for... What was the last known Wine/Darwine version known to work on PowerPC? I some had thoughts of getting that version and progressing forward to see what and where things break.
Am I mistaken that the connection between wine/server appears to be broken?
My previous statements in my first message still apply.
Michael
Am Montag, 25. Mai 2009 20:33:28 schrieb mghughes@embarqmail.com:
No No No People... Please read the messages before replying.
I did, but they were not clear to me. To be honest, I am still not sure what you want to achieve.
For the record... I am not looking to run another full out emulation. The best example of what I have in mind is what Apple did when they moved their processor base from 68K to PPC. And I am wondering if the same could be done for Wine. By the looks of things some of the framework to make that happen are already there in the form of thunk code... Apple used what they called trampolines iirc.
Do you mean running the Windows app in an emulator, Wine on the native CPU and inserting trampolines or something else that switches in and out of the emulator whenever there's a call from the app to Wine code, or from Wine code back to the app?
Something like that exists - the Win16 support that switches the x86 CPU in 16 bit or 32 bit mode whenever the control is passed between Wine and the app. It would probably be comparably easy to adopt this for Win16 on PPC.
There are a number of issues that make this much, much harder on Win32 vs PPC.
1) COM interfaces. They pass around function pointers, and there is no DLL entry point for a COM method. You'd have to write a thunk DLL for each DLL that uses COM objects.
You'll need a glue DLL that has some PPC code that knows how to convert parameters and call into the emulator. And you'll need glue x86 code that knows how to break out of the emulator and call the PPC side of the glue DLL.
2) Wine vs App call. If I understand things correctly, Wine never calls a Win16 entry point in Wine. There are many cases where a Wine DLL calls another Wine dll. E.g. WineD3D calls gdi32 and opengl32. You'll have to find a way to figure out where a call came from, and more important, figure out where a call is going to if you're calling a callback function.
3) API explosion: Back in the Win 3.1 day the Win16 API has been pretty compact. Nowadays there are hundreds of DLLs that have hundreds to thousands of functions or COM methods.
So running Win32 apps in an emulator on a PPC-native Wine is most likely possible from a technical point of view, but it is a very complex job. In terms of final usability the needed effort is probably spent more efficiently by improving the emulator, just run Wine in the emulator and thunk the comparably small Linux syscall interface(qemu already does that).
The advantages of Wine-level thunks is that the theoretical best performance is better. This is probably true especially with D3D rendering. E.g. instead of converting a A8R8G8B8 texture from big endian to little endian one might just replace the pixelformat with B8G8R8A8. A setup like that could also allow us to run 32 bit apps on Wine64, and end the "you guys need a proper ABI" whine from distro maintainers.
It's an open source project, so everybody is free to take the code and give it a try :-)
mghughes@embarqmail.com wrote:
No No No People... Please read the messages before replying.
I know the difference betweeen my 6502, 6800, Z80, 68k, x86, 7400. I know Wine is focused on running MSWindows based software on x86 processors. I also know there exists PowerPC code in the wine project because people were interested in bridging the gap to running x86 code via emulation...
For the record... I am not looking to run another full out emulation. The best example of what I have in mind is what Apple did when they moved their processor base from 68K to PPC. And I am wondering if the same could be done for Wine. By the looks of things some of the framework to make that happen are already there in the form of thunk code... Apple used what they called trampolines iirc.
The question is: Were there any programs written for WindowsNT for the PPC? I don't know of any, off hand.
The real problem is that most, if not all, Windows based programs were written for the X86 platform. The makes the use of a CPU emulator necessary. I know of only on FOSS project that is working on this, and that is the Qemu (?) project. The Darwine project was trying to combine the PPC->X86 emulator with Wine. Again, this project has stopped progress and probably needs help getting restarted. The Darwine project does exist on SourceForge and could be revived with someone displaying interest in getting it running again. I do have PPC Mac here, but I think I messed up the power port on it and thus batteries are not fully charging. I stopped working on another FOSS project because running the test suite takes over a day and I could not trust the power supply to last that long.
James McKenzie
On Thu, May 28, 2009 at 04:00, James McKenzie jjmckenzie51@earthlink.net wrote:
The question is: Were there any programs written for WindowsNT for the PPC? I don't know of any, off hand.
A few seem to exist... Probably nothing without a x86 versions though.
Compatibility with PowerPC NT applications might at least give a few programs, even if just MS's applications that got bundled with PPC NT, to test with. It would probably not have much (if any) real-world uses, but it might point out portability issues that might affect other architectures, which might have more applications available, such as x86_64 and Itanium.
Please bottom-post on wine mailing lists.
2009/5/26 mghughes@embarqmail.com:
No No No People... Please read the messages before replying.
I know the difference betweeen my 6502, 6800, Z80, 68k, x86, 7400. I know Wine is focused on running MSWindows based software on x86 processors. I also know there exists PowerPC code in the wine project because people were interested in bridging the gap to running x86 code via emulation...
So you also know you can't run x86 apps on PPC platforms without emulation, just like you can't run z80 code on x86 without emulation. Also, where is this PPC code in Wine exactly? What source file exactly?
For the record... I am not looking to run another full out emulation. The best example of what I have in mind is what Apple did when they moved their processor base from 68K to PPC. And I am wondering if the same could be done for Wine. By the looks of things some of the framework to make that happen are already there in the form of thunk code... Apple used what they called trampolines iirc.
I believe 68k and PPC are architecturally quite similar, along the lines of the 80386 (which has 16bit and 32bit modes). With Windows programs being x86 apps, the translation between the two architectures is very tricky (as has been previously noted on this thread).
I am not sure that WineLib is what I am looking to use as the wine script & loader seems to achieve much of what I am already looking to do.
Winelib would be good if you had the source code for your Win32/Win16 apps and wanted to produce PPC binaries of them. Sounds like that's not what you're trying to do though.
On May 28, 2009, at 01:49 AM, Ben Klein wrote:
So you also know you can't run x86 apps on PPC platforms without emulation, just like you can't run z80 code on x86 without emulation. Also, where is this PPC code in Wine exactly? What source file exactly?
Files containing PPC specific related code: tools/relay.c lib/wine/port.c lib/port/interlocked.c dlls/ntdll/signal_powerpc.c server/context_powerpc.c iirc: include/ntdll.h
Next contain code Macintosh/MacOSX/Darwin specific PPC/x86 generic dlls/winecoreaudio/* dlls/kernel32/locale.c dlls/ntdll/cdrom.c
I am sure there are other files with PPC parts too.
Winelib would be good if you had the source code for your Win32/Win16 apps and wanted to produce PPC binaries of them. Sounds like that's not what you're trying to do though.
The particular program I wish to run is close source.