OS X PowerPC on Qemu

In the latest release notes, I saw that Qemu can now run OS X!

Screen Shot 2013-08-14 at 9.35.57 PM

Language selection

Screen Shot 2013-08-15 at 12.12.08 PM

dmesg

 

The installer for 10.4 will run, but it’ll then freak out saying that this model of mac is not supported.  The ‘working’ cli I’m using is:

ppc-softmmu/qemu-system-ppc -L pc-bios/ -m 256 -M g3beige -hda osx1046.vmdk  -cpu G3 -cdrom Mac\ OS\ X\ Install\ DVD.toast -boot d

Sure the colours are off, and it is kind of pokey, but still the more guest OS’s on Qemu, namely for something like the PowerPC.  If anyone has any better idea of how to fully run OS X on Qemu drop me a note!  Plus there is additional information on the mailing list.

This entry was posted in OS X, powerpc, qemu by neozeed. Bookmark the permalink.
avatar

About neozeed

What is there to tell? I’ve loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX… I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since…!

17 thoughts on “OS X PowerPC on Qemu

  1. For OS X 10.4 to work, you should launch QEMU with -M mac99 in order to emulate newer hardware.

    The incorrect colours are interesting, as they indicate the framebuffer is inverted (i.e. BGR instead of RGB) because of a missing endian swap between host/guest framebuffers.

    Do you see the incorrect colours all the way from boot, including OpenBIOS and the Apple logo? Or is it only once the OS has booted? Also does using SDL instead of VNC make a difference?

    • I’m using the mac99, although with 10.4 booting the CD it freaks out saying my Mac isn’t supported… I was thinking of upgrading from 10.2 to 10.3 then 10.4 although that does sound like a lot of work! 😉

      I’m not sure on the framebuffer as I have no idea what it should look like. On OS X, it is always yellow with black text, the apple logo on boot is grey on a yellow background… maybe it is all backwards on OS X’s UI as it is expecting the older PowerPC host? I don’t know but the x86/x64 stuff displays correctly…. FWIW.

      I haven’t tried the SDL framebuffer, but I can give it a shot.

      What ethernet adapter (if any) is supported? What about sound?

      I’d like to have a more complete PowerMac experience if possible…

      Thanks again!

  2. Ah okay I just noticed that you were using -M g3beige in your command line above which I’m fairly sure isn’t supported above 10.2. Possibly experiment with/without the -cpu option to see if that makes a difference? I know Alex reported his initial success with 10.4.

    Sound – I’m not sure about that, but for NICs then since Macs have a PCI bus then I guess you can just dig out drivers for the standard cards provided by QEMU if they are not detected by the OS automatically?

    The OpenBIOS background should be a light yellow colour while the Apple Logo is grey on grey, so if you don’t see those colours on boot then something is wrong 🙂 Double-check config.log to make sure you’re using the internal pixman just to be sure.

    Also just to clarify – the colours look okay with a x86/x64 host but not on your G5 PPC host? It could be that the problem only occurs on same-endian host/guest combination.

    • oops, when I use the 99 machine it just hangs at the apple logo, no spinning wheel thing on boot.. I should look to see how I can boot the CD with a -v flag for any hints on what is wrong…

  3. That’s a shame. You should be able to get some diagnostics by adding the following onto the QEMU command line:

    -prom-env ‘boot-args=-v’

    which is the equivalent of setting that NVRAM option in Open Firmware.

  4. Don’t know if qemu supports OS9, but if you can somehow get XPostFacto running to “kickstart” the installer boot process, it can likely be used as a workaround to get 10.4 running. It manages to disable all those pesky “not supported” installer messages. Tiger runs fine on my G4 upgraded PM8600 and Beige G3 despite Apple saying its impossible.

  5. Hi everybody,

    has there been some progress on the color issue yet? Interestingly, when I set my vitual OS X 10.4.6 to black and white display (in System Preferences) it turns black and yellow instead, just the same yellow that I see on loading the bios… On the other hand, color reversing is not possible from that menu… However, I didn’t figure out much more…
    Any ideas?

    Thanks,
    Joe.

  6. Hi everybody,
    has there been some progress on the color issue yet? Interestingly, when I set my vitual OS X 10.4.6 to black and white display (in System Preferences) it turns black and yellow instead, just the same yellow that I see on loading the bios… On the other hand, color reversing is not possible from that menu… However, I didn’t figure out much more…
    Any ideas?
    Thanks,
    Joe.

    • The colour swapping definitely looks like a framebuffer endian bug, but I suspect the reason no-one has done anything about is because it hasn’t been reported yet. Note that I myself use a x86-64 Linux host running a PPC guest images (which requires a framebuffer endian-swap) and the colours are correct for me, which may suggest it is something limited to OS X hosts rather than all x86-64 hosts.

      There are also different display clients that can be used, so try using all of GTK, VNC and SDL using the various command line options to see if that makes a difference too.

      I would suggest filing a QEMU bug report (http://wiki.qemu.org/Contribute/ReportABug) so that someone can try and reproduce the issue on your platform, as once the cause is discovered then the fix itself should be fairly minimal.

  7. Have there been any news about emulation of PPC Macs since this blog post was made? I’m very happy that Previous is almost complete for NeXT machines, but the joy won’t be complete until we have a working emulator for PPC Macs. The G3, G4, and G5 Macs are machines I’d really continue using through emulation if it existed.

    • At this point in time, all we have is Sheepshaver which is an interesting piece of software on it’s own. It basically relies on 68000 hooks in the PowerPC ROM to pull a Basilisk II, using it’s paravitualized drivers for inputs, display, sound and networking. What makes it tricky is that the jit emulator relies on having the PC’s memory space match the PowerMac’s so you need to be able to use the address 0x00000000 as memory. Sadly Windows is letting you do that with 64bit exe’s nor is the newer OS X versions. It’ll sort of run in 32bit mode, but it’s all too common for it not to be able to directly map the memory. Looking at the dynamips PowerPC jit, it may be possible with a LOT of work to get that working but I honestly just don’t see that many people interested TBH. And of course the dynamips authors have all but disappeared.

      PearPC is another emulator for the early OS X versions. It’s cool and all but sadly the primary author was killed in an accident.

  8. qemu 2.9.0 working on macOS Sierra 10.12.4 host using guest Mac OS X Tiger/10.4.11 -and- OS 9.2.2 as Classic (also boots 9 from within the VM guest.)

    ./qemu-system-ppc \
    -drive file=Tiger.img,format=raw,media=disk -M mac99 -m 1024 -g 1024x768x32 -netdev user,id=network0 -device rtl8139,netdev=network0 -prom-env boot-args=-v -prom-env “auto-boot?=true” -boot c -drive file=TransferDisk.img,format=raw,media=disk

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.