I just realized that my own comment on PPC might be pointless, because maybe you could just put a lot of focus on Rosetta. Getting that to work ought to ease some stress for you.
Today, I put up the project on github instead my own git server, so that could hopefully entice more curious developers.
you may get some code, loader etc insight from the old emulators http://en.wikipedia.org/wiki/SheepShaver
"SheepShaver is a MacOS run-time environment for BeOS and Linux that allows you to run classic MacOS applications inside the BeOS/Linux multitasking environment. This means that both BeOS/Linux and MacOS applications can run at the same time (usually in a window on the BeOS/Linux desktop) and data can be exchanged between them. If you are using a PowerPC-based system, applications will run at native speed (i.e. with no emulation involved). There is also a built-in PowerPC emulator for non-PowerPC systems."
SheepShaver runs with varying degree of functionality on the following systems:
- Unix with X11 (Linux i386/x86_64/ppc, NetBSD 2.x, FreeBSD 3.x)
- Mac OS X (PowerPC and Intel)
- Windows NT/2000/XP
- BeOS R4/R5 (PowerPC)"
"Some of SheepShaver's features
- Runs MacOS 7.5.2 thru 9.0.4. MacOS X as a guest is not supported."
people seem to be still patching it.
you might even find something useful here too use if your after the older API's etc
They have already implemented the Mach ports as a kernel modification.
In theory, there is no reason why you couldn't implement Darwin binary compatibility using the same method that Solaris / Sys V compatibility was achieved with Linux.
Perhaps creating a mailing list / forum for this project would be helpful seeing as there is bound to be interest from others on developing this further.
I've always wondered why no OS X app compatibility was done for Linux, seeing as the base API (OpenStep) is both public and implemented as OSS (GNUstep), all the loader bits are available via Darwin. All that is missing is re-implementing Apple's proprietary services (Quartz / DisplayServer)
- The additional amount work.
- The syscall interface is not the official ABI. There is no point in keeping it. They may choose to randomly renumber their syscall numbers without breaking anything. Because libc is the ABI for the syscalls. Linux emulation in FreeBSD is a completely different matter, these systems are much more alike.
- Mach syscalls are crap and we're better off emulating them in userspace where feasible. I'm getting remarkably better performance when emulating some of them in userspace, because those calls just don't belong into the kernel (thread synchronization primitives).
- Ease of installation. No need to patch the kernel, check for the right kernel version or anything.
- Ease of development. Without any doubt. Even the fact that I need to use plain C for kernel development is very limiting.
- Ease of getting the product released. Going through reviews of the kernel code may be useful, but it also means I can't easily distribute any experimental hackish code to the users.
When mentioning NetBSD's Darwin emulation, note that their code was highly experimental. A better part of IOKit was just dummy code and while browsing some of their Mach Ports code I got the feeling that they misunderstood certain aspects of this feature. And I'm not surprised. I have the feeling that no-one except for Apple's and GNU Hurd's developers knows how to use these :-D
My biggest worry though is the state of GNUstep. Once I started writing various tests, I started finding bugs immediately in stuff you'd expect to be stable and proven by now. It's quite bad, worse than I thought. Half of the OS X apps I've tested don't start because GNUstep can't even load the NIB (UI definition) file properly. I got me to the point of thinking whether it wouldn't be better in long term to implement Cocoa on top of something stable like Qt: that way we wouldn't have to worry about that many implementation details, slowly work through all the APIs and then replace GNUstep.
Of course, such an endeavor needs human resources and I don't have these.