Qemu package and guide for OSX available

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

The status of running various guests is recorded here: https://docs.google.com/spreadsheets/d/ ... edit#gid=0
See the next post for some experimental builds (including sound-enabled builds).

Read our guide: http://www.emaculation.com/doku.php/ppc ... mu-for-osx

Builds from the official source:

24-04-2024
Qemu-system-ppc-9.0-macOS-Intel-24-04-2024.zip
https://surfdrive.surf.nl/files/index.p ... 6/download
Note: Built for Intel CPU/runs in Rosetta

20-12-2023
Qemu-system-ppc-8.2-macOS-Intel-20-12-2023.zip
https://surfdrive.surf.nl/files/index.p ... R/download
Note: Built for Intel CPU/runs in Rosetta

Cumulative fixes and enhancements:
Fixes:
-Fixes issue when switching colour depths.

Enhancements:
-Qemu can now run with either cocoa, sdl or gtk graphical interface. It is required to set -display to either "cocoa", "sdl" or "gtk" (without the quotes) on your command line.
-Qemu now adds VMNet networking functionality on Big Sur, Monterey and newer hosts. This can provide full access to the host network, replacing the non-functional tap networking on these hosts. Example command line addition: -device sungem,netdev=network01 -netdev vmnet-bridged,id=network01,ifname=name-of-the-host-network-device
-Supports a serial connection over USB. For Mac OS 9.x a FTDI driver is needed from: https://www.ftdichip.com/Drivers/VCP.htm (download the 1.0f4 version)
In the qemu.command file add -device usb-serial,chardev=cons -chardev console,id=cons (id can be anything, but id= and chardev= have to match)

Note: Earlier builds are no longer available:

Best,
Cat_7


How to compile Qemu on macOS:
-install Xcode.
-install brew (/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homeb ... er/install)") (this will also install the xcode command line tools)
-brew install glib
-brew install pixman
-brew install libusb
-brew install pkg-config
-brew install ninja
-brew install libslirp

git clone https://gitlab.com/qemu/qemu qemu-master
cd qemu master
git submodule init
git submodule update --recursive
./configure --target-list="ppc-softmmu" --enable-slirp --enable-cocoa
make

(executables are found in the build folder)
Last edited by Cat_7 on Sat Jul 01, 2017 12:49 pm, edited 8 times in total.
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Experimental builds. Be warned!

Note: For all sound-enabled builds: When running Mac OS 9.x do not set memory to 1024Mb or higher, or else sound will break. Do not turn off Virtual Memory.
Make sure you always have the latest QuickTime and iTunes installed for your guest OS.
Note: If you encounter crashes in the Apple Audio Extension, start Mac OS without extensions and use the extension manager to disable the Apple Audio Extension.

20-01-2024 Qemu-system-ppc 8.2 for macOS with sound and virtio support
https://surfdrive.surf.nl/files/index.p ... k/download
Check any particular needs for the command line in the table at: http://www.emaculation.com/doku.php/ppc ... mu-for-osx
Note: The virtio options only work with Mac OS 9.x guests.
Be sure to read the command line options for file sharing, tablet driver and virtio-gpu at this post: viewtopic.php?t=11973

20-01-2024 Qemu-system-ppc 8.2 for macOS with sound support
https://surfdrive.surf.nl/files/index.p ... P/download
Check any particular needs for the command line in the table at: http://www.emaculation.com/doku.php/ppc ... mu-for-osx

29-05-2022 Qemu-system-ppc-7.1 for macOS with sound support, 60Hz screen refresh and FPU speedup
Qemu-system-ppc-macOS-7.1-pre-screamer-60hz-fpu-29-05-2022
https://surfdrive.surf.nl/files/index.p ... K/download
Built on Monterey, also runs on Big Sur. Best to put in the Applications folder.
Last edited by Cat_7 on Thu Jul 06, 2017 5:23 am, edited 5 times in total.
Budgiebrain994
Student Driver
Posts: 10
Joined: Fri Jan 08, 2016 12:27 pm

Re: Qemu package and guide for OSX available

Post by Budgiebrain994 »

Thank you very much cat_7, it's looking great so far.

Just a couple things: in Windows instructions - startqemu.bat, one of the parameters is to load openbios-ppc-pcifix as the BIOS, but the one linked to download is just openbios-ppc. I changed the command to open the bundled openbios-ppc (new version from your second forum post), which resolved a QEMU crash and brought up OpenBIOS then the boot screen. You might want to edit the command line to prevent it happening to everyone.

Secondly, by running this (on OS X 10.4) I get the boot screen, with the logo and spinning wheel, but it stops spinning after about 10mins. I tried to enable verbose mode but I'm not getting it to do so (-prom-env 'boot-args=-v' seems consistent with OS X instructions, but not Windows). How do I enable verbose mode from here? I believe that perhaps the problem could be that there IS a ppc-pcifix version which you may have needed to bundle instead of the ppc version.

I'll keep waiting to see if it's just taking forever to load, and I'll keep trying to get to verbose mode running. I also may try 10.3 tomorrow. Thanks again for the astounding work :)
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

Thanks for reporting back.
one of the parameters is to load openbios-ppc-pcifix as the BIOS
I updated the guide to reflect the need to rename the file or edit the windows batchfile to point to the correct file name.
prom-env 'boot-args=-v' seems consistent with OS X instructions, but not Windows

So it seems. Replacing all quotes with " instead of ' will allow providing arguments. ;-) Fixed in the guide.
the problem could be that there IS a ppc-pcifix version
No there isn't. The latest bios file cumulatively adds all previous fixes.

Overall, the windows version is much slower compared to the OSX version and has the nasty habit of losing mouse control. I'll check the 10.4 installation issue.
Please note that the windows versions are created whenever there is a new official qemu release. The OSX versions are created when promising new developments are available. This leads to OSX versions probably having more/better functionality when compared to the windows versions.

EDIT: quotes fixed when providing arguments in Windows version. Windows version boots 10.4 CD image perfectly!

Best,
Cat_7
Budgiebrain994
Student Driver
Posts: 10
Joined: Fri Jan 08, 2016 12:27 pm

Re: Qemu package and guide for OSX available

Post by Budgiebrain994 »

Alright, thanks. It looks like most of these things can be avoided by using OS X instead, so I'll proceed to do so.

Edit: OS X 10.4 didn't like QEMU on OS X, so it may have been a faulty image I was using in the first place. 10.3 installed fine using QEMU on OS X, but not on Windows - lost mouse cursor through installation menus. Workaround: installed on QEMU for OS X, then moved image to QEMU for Windows. Works a charm.

Making a couple optimisations - screen size is flexible, as is RAM, no problems increasing those. I'm now looking into possibly enabling audio, or even video(!) but I'll need to look into whether PowerPC kexts even exist for any available emulated devices QEMU provides.

Super happy with the outcome so far. Thanks again Cat_7.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

Set up this QEMU distribution in OSX 10.10.5 for installing Mac OS X 10.3.

I used Disk Utility in OSX to create disk images from the three Mac OS X 10.3 install disks in DVD/CD Master (.cdr) format.

I used qemu-img to create a 6G raw disk image for the installation target volume.

First installer image is named "10.3InstallDisc1.cdr"
Target volume image is named "Qemu10.3HD.dsk"

qemu.command:

Code: Select all

cd "$(dirname "$0")"

./qemu-system-ppc -bios ./openbios-ppc -boot d -M mac99 -m 256 -cpu G3 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -g 1024x768x32 -netdev user,id=network0 -device rtl8139,netdev=network0 -drive file=./10.3InstallDisc1.cdr,format=raw,media=cdrom -drive file=./Qemu10.3HD.dsk,format=raw,media=disk
When I start qemu.command, I get the QEMU window and in it:

Code: Select all

Welcome to OpenBIOS v1.1 built on Jan 4 2016 06:04
Trying cd:,\\:tbxi...
No valid state has been set by load or init-program

0 > 
Something wrong with the CD image?
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Please take great care not to have additional line endings in your command file.
Did you create the image from your own disks?

Best,
Cat_7
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

The whole command is in one line, no additional line endings.

I created the images from my own install disks. They are regular retail install disks.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

This time it works.

What did I do different?
For creating the CD image in OSX Disk Utility: The first time I selected the CD volume in the left column in Disk Utility (as I normally do) but this time I selected the CD drive.

I will report back when I did the 10.3 installation in QEMU.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

Did a default 10.3 installation from install disks 1 and 2.

The 6GB image I created with qemu-img wouldn't work. I could partition it with Disk Utility on the install disk, but the installer labeled it with a red exclamation mark as not suitable for installation. No change after re-partitioning.

I tried various images created with Disk Utility on the 10.10.5 host OSX. The only ones that worked consistently as target volume were created with "Hard disk" as value for Partitions:

Name: QEMU10.3HD
Size: Custom... (6 GB)
Format: Mac OS Extended (Journaled)
Encryption: none
Partitions: Hard disk
Image Format: read/write disk image
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

But now another problem.

After completing the installation by configuring the new installed system and an account, I looked at my 10.3 Desktop and everything seemed OK. I shut down the emulated machine and went shopping.

Started again QEMU but now startup is stuck at the grey screen with Apple logo.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

Installed 10.3 again. This time I left out all software that I will not use. Again everything looks OK after installation and setup. But after shutting down the emulated machine, again a new startup gets stuck at the grey screen with Apple logo.

:?:

Edit: Oops :oops:
Sorry, startup does not get stuck. It stays longer at the grey screen than I expected.
Last edited by Ronald P. Regensburg on Mon Jan 11, 2016 3:28 pm, edited 2 times in total.
Reason:  
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

Internet connection works, but apparently Apply does not provide software updates for 10.3 anymore.
User avatar
mabam
Forum All-Star
Posts: 502
Joined: Wed Apr 10, 2013 9:32 am

Re: Qemu package and guide for OSX available

Post by mabam »

You can download the Combo update from https://support.apple.com/kb/DL496?locale=en_US manually. I'm not sure whether that includes the 'latest' security update though.
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Disk image creation updated in the guide.

Thanks,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4345
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for OSX available

Post by adespoton »

There are a few security updates later than the combo update -- they're all available from the support downloads site: https://support.apple.com/en_US/downloads/10.3
User avatar
Ronald P. Regensburg
Expert User
Posts: 7863
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Qemu package and guide for OSX available

Post by Ronald P. Regensburg »

Installing the combo-update proceeded fine. Now running 10.3.9.

The emulator is slow, but usable. With file sharing enabled on the host, I can access files and folders on the host from within the emulator. Will probably work also with other computers in my home network, didn't try yet. With 10.3 drivers for my Canon printer installed, I could probably print to that printer on my network. Didn't try that yet either.

Issues so far:

1. No sound (known, I suppose)

2. I accidentally chose sleep (instead of shut down) from the Apple menu and the emulator froze. No mouse cursor, no reaction on any key press.

3. For mounting CD images ("change ide1-cd0" from the Machine menu), the Open dialog only allows choosing .iso files. It should also allow choosing .cdr files.
(A .cdr file entered in the command as CD file works fine, and when I change the .cdr extension to .iso the file can be used for mounting from the Machine menu.)
gorans
Inquisitive Elf
Posts: 26
Joined: Wed Dec 16, 2015 5:10 pm

Re: Qemu package and guide for OSX available

Post by gorans »

I followed the guide, installed 10.4 and updated to 10.4.11. Had a lot of trouble with various cdr and iso images from the net until I ripped my own retail Tiger DVD and installed from there.
I lost network after update to 10.4.11.

What bothers me the most is the long wait at boot. Apple is displayed for 1-2 minutes and then boot proceeds (verbose). Also the "a" key is "pressed" when switching from host (10.10.5) and QEMU.

To sum up, for me it's usable and working but slow.
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

Thank you for the feedback. Emulation is indeed slow, and loosing network support after updating to 10.4.11 is a known issue.

Best,
Cat_7
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: Qemu package and guide for OSX available

Post by Programmingkid »

Ronald P. Regensburg wrote: 3. For mounting CD images ("change ide1-cd0" from the Machine menu), the Open dialog only allows choosing .iso files. It should also allow choosing .cdr files.
(A .cdr file entered in the command as CD file works fine, and when I change the .cdr extension to .iso the file can be used for mounting from the Machine menu.)
I just fixed this problem today. Now you should be able to open .cdr files.

Here is the patch: https://lists.nongnu.org/archive/html/q ... 06761.html
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Qemu package and guide for OSX available

Post by 24bit »

These are really amazing proceedings!
Thanks Cat_7 for providing the self contained package, saving me from the dependency hell.
Thanks Ronald for posting your experience with the HD image.
Last not least thanks to all developers and contributors making this happen, I would not have believed this until seeing it with my own eyes.

I´m installing 10.3 from ISO images on a 10.10.5 C2D host right now.
Installing from ISO 1 works fine so far, but after changing boot volume to "c" it looks like nothing is happening - yellow screen for some time, than black screen endlessly.

Edit:
After removing the CD image from qemu.command it boots! Obviously I have missed that in the guide.

Now, could someone please enlighten me how to set up a shared folder?
/Classic would be my shared folder on the host, in case that matters.
Thanks again!
kristerwirtanen
Space Cadet
Posts: 4
Joined: Mon Mar 28, 2016 4:48 am

Re: Qemu package and guide for OSX available

Post by kristerwirtanen »

Thanks Cat_7 for your precompiled qemu for OSX. I always been able to install Mac OS 10.3 from the Mac OSX 10.3 Install Disc1 but not with the last compile qemu_2.7-rc0-OSX from 23juli. I got so far that I can select language but then the mouse and keyboard disappears and the only thing to do is close qemu from the outside. With the emu_2.7-pre-OSX precompile from 15juli everything works OK. Maybe everything will be good in RC1. (I work on an Macbook 2010 with OSX10.11.5).
kristerwirtanen
Space Cadet
Posts: 4
Joined: Mon Mar 28, 2016 4:48 am

Re: Qemu package and guide for OSX available

Post by kristerwirtanen »

I noticed in the new topic http://www.emaculation.com/forum/viewto ... =34&t=9005 that I have to spec -cpu G3 in the command line with the latest QEMU because it default to G4. So now I'm happy :lol: with no problems with MacOSX 10.3 installation.
MetalSnake
Granny Smith
Posts: 120
Joined: Fri Nov 09, 2007 5:42 pm

Re: Qemu package and guide for OSX available

Post by MetalSnake »

I'm trying to get Mac OS 9.1 running using the guide.
I'm using the Qemu 2.7-rc0 package linked in the guide and a german Mac OS 9.1 image.

Code: Select all

$ file D693-2581.img: lif file
$ crc32 36b2e15b
$ md5 c9eab03c72dc427e52d384e98701617a
When I double click it, I get an error saying it's and old image and needs to be converted

Trying to use that image in qemu with "file=D693-2581.img,format=raw,media=cdrom" gives me this:

Image

Then I converted the image using Disk Utility using the read only option, this gave me a .dmg file

Code: Select all

$ file D693-2581-converted.dmg: Macintosh HFS Extended version 4 data last mounted by: '8.10', created: Mon Jan  8 18:21:38 2001, last modified: Tue Jan  9 05:14:30 2001, last checked: Tue Jan  9 05:11:07 2001, block size: 4096, number of blocks: 119522, free blocks: 851
trying to use that with the same parameters gives me this:

Image

Do I need a different image file?


Host is Mac OS X 10.11.6
qemu.command:

Code: Select all

cd "$(dirname "$0")"

./qemu-system-ppc -bios ./openbios-ppc -boot d -M mac99 -m 256 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -g 1024x768x32 -net user -net nic,model=rtl8139 -drive file=D693-2581-converted.dmg,format=raw,media=cdrom -drive file=empty_disk.raw,format=raw,media=disk
User avatar
Cat_7
Expert User
Posts: 6222
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

You command line seems OK.

Please note that you need to put the disk or cdrom entry you want to boot from as first entry in the parameter list and also adjust the boot "c" or "d" setting accordingly.

I would assume your images are not OK. Why don't you try first with some sure to work images?
Look for 9.1 or 9.22 in the macintosh garden

Best,
Cat_7
Post Reply