Slashdot Mirror


Where are the PPC Emulators?

mikenetaim asks: "Numerous people have started projects aimed at emulating the PPC based Macintosh. Those that run on machines with a PPC tend to succeed (MacOnLinux, Sheepshaver, iFusion), and every single one which attempted to emulate the CPU failed. Everyone admits that an emulated CPU will run slowly, but no one has ever released a working PPC emulator at any speed (except for an incomplete one, whose name escapes me, that was released a long time ago to statically translate AIX binaries). There are a ton of 68k emulation code floating around the 'net, and a PPC emulator should be easier to produce (due to fixed instruction length, branch predication, opcodes that dictate if CCR flags must be generated, etc). Most of the authors just claim their project was harder than they expected before disappearing. Why do all these projects fail? Can anyone point me to any information or code?"

4 of 34 comments (clear)

  1. Sim and gdb by norwoodites · · Score: 4, Informative

    There is an emulator that is a GNU Project part of the gdb source. Located under the directory sim.

    So there are some PPC Emulators even some under the GNU license.

  2. PPC Emulator ? by EvilBastard · · Score: 3, Funny

    That would be here

    Preferred the Double-Gauss Sunders, myself, but they took that out of the current build.

  3. PPC Emulation... by Chasing+Amy · · Score: 5, Informative

    First of all, the "emulators" you speak of for PPC machines aren't really emulators at all, they use the PPC processor natively, just allowing a MacOS that could run on that machine anyway, to run simultaneously under BeOS or Linux. There's no PPC emulation going on, really, with apps like SheepShaver; the PPC chip itself is used, not a full emulation ofn the chip.

    There are many reasons why PPC emulation on x86 is difficult, and why the resulting emulators have probably always been too embarrassingly slow for their creators to make and release a finished emulator. You *can't* just map PPC registers to x86 registers like you can when emulating many lesser CPUs--*way* too many on the PPC, embarrassingly too few on x86. To even have a chance at being useful, you'd have to go the route of using a JIT compiler to dynamically translate PPC ops to x86 ops, and even then you're obviously paying a big speed penalty. In any event, while a usable G3 emulation is very possible, a usable G4 emulation will be impossible for many years thanks to the nice 128-bit Altivec unit.

    This is a hard way to work, from what programmers trying to produce PPC emulations tell me. This is why I think the best way to get PPC support on regular commodity PCs is by not emulating the CPU at all. Instead, one could use a real PPC processor on an add-in card, maybe even with its own system RAM to increase speed. Then, emulate the rest of the hardware on a given PPC Mac using some "glue" software. These cards have been available for a long time in PCI form factors, though not yet used for PPC/Mac "emulation"; most are sold as "processor upgrades" for older Macs, and some are sold on the high-end for PCI backplane machines, and some are add-in cards for extra processing power that come with plug-ins allowing Photoshop to use the extra processors and SDKs to develop support for other apps to use the extra horsepower. There are even a couple of whole-computer-on-a-PCI-card hardware firewalls available; I don't know offhand if any are PPC, but that may be. This, of course, makes the use of G4 and when available G5 processors, possible, if one uses an add-in card.

    Jim Drew of Microcode Solutions (whose website only says "new website coming soon" right now) was contacted by one of the manufacturers of PPC add-in upgrade cards for Macs, and contracted to write an emulator which would emulate the hardware of an (old) iMac while using one of their PPC processors on a card to run the actual PPC software, such as Mac OS 9. He was supposed to show this creation at Macworld Tokyo, but claims that the company which contracted with him was not ready to show it. This could be a lie to cover for the fact that he's still not done yet, or it could be the truth--any company releasing such a product, which could presumably let a PC run anything that would run on an old-model iMac, would surely incur the wrath of Apple Legal. So, it's entirely possible that such products are finished by one or more of the add-in PPC card companies, but they're too frightened of releasing them at the moment.

    Time will tell. Darek Mihocka claims to have already created working PPC Mac emulation, but that he isn't releasing it until PCs are "fast enough" to run it well enough. Jim Drew also claims that he's been working on a software-only PPC Mac emulation, but that it won't be released until the hardware assisted version is released due to contractual agreements with the hardware maker. Or something like that. :-) Several other enthusiasts have also been working on PPC emulation, though nothing usable is yet evident.

    In any event, I still happily play my old 68k Mac games under OS 8 or System 7.5.5 on occasion. I've come to love the open-source 68k Mac emulator Basilisk II for that. And, I have no doubt that sooner or later someone, somewhere, regardless of Apple Legal's threats, will release an emulator--whether all-software or hardware-assisted--which will let me smoothly run OS 9 and let me run OS X as well as or a bit better than an older iMac could. I kinda hope for the hardware sol,ution myself, since it would unlock a much faster Mac emulation, with the ability to upgrade the PPC CPU--and it would just be plain cool to have a real PPC machine running inside and accessible from my PC. Imagine the possibilities that an 800MHz G4 PPC processor card (or even a slower one) for PCs, maybe with a RAM slot or 2 on-card, with software to emulate the rest of the Mac, could bring to the PC. x86 Linux, OS X, and Windows all on the same box, at native speeds. :-) That's an enthusiast's wetdream. Apple would sh*t a brick, and may well sue, but hey--there'd be a lot of happy customers to finance the defense. :-)

    All in due time, my friends...

    --

    Chasing Amy
    (We all chase Amy...)
    "The more corrupt the state, the more numerous the laws"-Tacitus
  4. Jimmy Drew: by Chasing+Amy · · Score: 3, Insightful

    You're absolutely right that Jim Drew's reputation in the emulation community is crap. He always delivers what he promises years late and with big features which were advertised early on in the project lacking.

    In the case of his PPC emulation, it's over a year late already, and he announced around December that it would show at MacWorld Tokyo. Given his typical timetable for falling behind, even if it's not finished yet, it should be finished for sure and on the market (if the hardware company lets it be) before the year is out.

    That said, there's no telling whether the iMac emulation will be complete. I'm betting that it will initially only support OS 9 due to incomplete implementation--but that eventually, it should be able to run OS X with some finegling, especially since the Darwin layer is open-source and people have already hacked it to make OS X run on unsupported machines with processor upgrades.

    No, Jim Drew isn't timely and he's liable to hype. And in fact, most of the emulation scene hates him right now for letting everyone believe up until the last minute that his PPC emulator would be demoed at Macworld Tokyo. But he does *eventually* deliver products that offer good Mac emulation. Fusion was, for example, the best 68k Mac emulator by far when it first came out, and then for some time afterwards, although Basilisk II slowly but surely beat the crap out of both Fusion and its competitor SoftMac.

    At any rate, I think hadware-assisted is the way to rally go for PPC Mac "emulation" on the PC. There are so many high-quality PPC add-in cards out there now, that people really interested in running PPC code on their machines should pick one that's available in decent quantities and start coding the emulation support for it. After that, once the core "glue" emulation is done that can emulate the other Mac hardware and hand off instructions to the PPC add-in card, other PPC add-in boards could be supported, and Darwin could be hacked where necessary to allow OS X to work with any shortcusts that might need to be taken, much as it is hacked now to get OS X working on unsupported Macs with upgrade cards.

    It's very doable when approached that way; unfortunately, no one but Drew seems to have been interested in that path. It's a pity, because even though it's more of an accomplishment to emulate a PPC CPU, it's much more practical and could be done much faster if one just emulates the other hardware on a given PPC Mac and "glues" it into using the PPC card for processing. Plus, it would allow the PPC Mac OS to run simultaneously with a Linux or Windows that's actually usable, whereas a "pure" emulation would eat up *all* the x86 CPU's cycles and make it so that one could only practically use the Mac emulator and nothing else.

    Wouldn't it be great to have a fully working PPC processor card running Mac OS X, while simultaneously being able to use x86 Linux or Windows on your x86 CPU, all on the same machine? *That* is the idea we should really be going for, not a totally-emulated PPC core. PCI G3 and G4 Mac upgrade cards are *so* plentiful--why aren't more people trying to put them to use for Mac emulation on the PC?

    --

    Chasing Amy
    (We all chase Amy...)
    "The more corrupt the state, the more numerous the laws"-Tacitus