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

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

Re: Qemu package and guide for OSX available

Post by Cat_7 »

New builds have arrived in the first two posts of this thread:

-a build from the official source for RC3 of Qemu 6.2
-an experimental build from the same source but with patches for 60hz screen refresh and fpu speed-up.

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

Re: Qemu package and guide for OSX available

Post by adespoton »

Just to clarify: Qemu 6.2RC3, while newer, doesn't have any applicable changes to the ppc binary that affect Mac OS, correct? So those using the Screamer builds wouldn't gain anything by updating to 6.2 other than M1 support?
User avatar
Cat_7
Expert User
Posts: 6145
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,

No, there are no real advantages using the build from official source for qemu-system-ppc. The experimental build has the faster screen refresh and fpu speed-up. I expect the 60hz patch to go into qemu 7.0
The screamer is another matter: I will build a qemu with screamer, 60hz and fpu when the openbios required for that is updated. Stay tuned.

There are also some patches for USB pass through that make life just a little bit easier with some devices in macOS and Windows hosts.
Perhaps I'll throw them in too, but they require writing up some additional guidance for at least Windows host.

None of these builds are M1 aware. I do not have such a machine nor access to one. And I would have to find out how to create a universal build with the tools currently used to build Qemu.
For M1 support I guess it is better to install the packages available through brew or UTM (which also is not shy to provide experimental software like the screamer)

Given the limitations in my build environments this makes me wonder why I even bother anymore when other options are available that are easier to use as well.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

I don't know about others, and I understand things might be very different on Apple Silicon hardware, but, at least, for those of us who still have Intel Macs, I really hope that Cat_7 and/or other expert users can continue to generate up-to-date versions of Qemu. It's highly appreciated.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Thanks Peter,

A new build was posted in the experimental builds post (2nd post in this thread).
It supports 60hz screen refresh, fpu speed-up and the latest vmnet networking.
See the post for the command line to use to get bridged networking going.

Note that the syntax to get the vmnet going has changed from our previous experimental build with vmnet support.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

No sound support?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Not yet:
The screamer is another matter: I will build a qemu with screamer, 60hz and fpu when the openbios required for that is updated. Stay tuned.
Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

New experimental build available in the second post in this thread:

-Supports sound, 60hz screen refresh, fpu speed-up and vmnet networking. Built on Monterey, also runs on Big Sur.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Many thanks, Cat_7!

EDIT: I'm probably missing something obvious or doing something incredibly stupid in my launch scripts. For instance, the one I use to launch Mac OS 9.2.2 is now as follows:

#!/bin/bash
cd "$(dirname "$0")"
./qemu-system-ppc-screamer-60hz-fpu-vmnet -boot c -L pc-bios -M mac99,via=pmu -m 512 -prom-env 'auto-boot?=true' -prom-env 'vga-ndrv?=true' -drive file=MacOS922.dmg,format=raw,media=disk -drive file=Exchange.dmg,format=raw,media=disk -netdev vmnet-bridged,id=vmnet,ifname=en0,isolated=off -device sungem,netdev=vmnet -rtc base=localtime

The above is one long line. Sadly, even when I run the command as Administrator, Terminal only displays
-bash: /Applications/Qemu/MacOS922_Launch.command: /bin/bash: bad interpreter: Operation not permitted

Any hints as to what I'm doing wrong?
User avatar
Cat_7
Expert User
Posts: 6145
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,

I don't have a hint: I have a solution ;-)
To use the vmnet networking option, you need to run qemu as root.

so run your start-up script as root:
sudo ./script-name
or add sudo to the script

#!/bin/bash
cd "$(dirname "$0")"
sudo ./qemu-system-ppc-screamer-60hz-fpu-vmnet -boot c -L pc-bios -M mac99,via=pmu -m 512 -prom-env 'auto-boot?=true' -prom-env 'vga-ndrv?=true' -drive file=MacOS922.dmg,format=raw,media=disk -drive file=Exchange.dmg,format=raw,media=disk -netdev vmnet-bridged,id=vmnet,ifname=en0,isolated=off -device sungem,netdev=vmnet -rtc base=localtime

If you don't need full network access with e.g appletalk, you can leave out the -netdev and the -device sungem arguments. Then you don't need to run as root.

To make the script a bit more readable/editable, you can end lines with the \ so:

#!/bin/bash
cd "$(dirname "$0")"

sudo ./qemu-system-ppc-screamer-60hz-fpu-vmnet \ --> sudo only needed when using vmnet
-boot c \
-L pc-bios \
-M mac99,via=pmu \
-m 512 \
-prom-env 'auto-boot?=true' \ --> this is default, so can be omitted
-prom-env 'vga-ndrv?=true' \ --> this is default, so can be omitted
-drive file=MacOS922.dmg,format=raw,media=disk \
-drive file=Exchange.dmg,format=raw,media=disk \
-netdev vmnet-bridged,id=vmnet,ifname=en0,isolated=off \ --> only needed when full network access is required
-device sungem,netdev=vmnet \ --> only needed when full network access is required
-rtc base=localtime

Without my comments, as nothing can be behind the \

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Thanks for the detail and the valuable comments. Unfortunately, that doesn't work for me. After removing the comments and running that as a new "test.command", I'm never asked for a password (for sudo), and I still get "-bash: /Applications/Qemu/test.command: Operation not permitted". I don't know what specific operation that might be.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

"Operation not permitted" comes from the vmnet network that cannot be started when not running as root.

Can you run when you remove the two network related entries from the command file?

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

No, that's not it. The real reason, and it's a stupid one on my part, is that one needs to run xattr -c on the command file (test.command in my case) after every edit. Otherwise, it won't run!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Ha,

Yes, that is a nuisance. I guess you are running Monterey? It is strange that even for a file you own you need to change the attributes.
I run into that every time I create a build and try to test it....

However, when you move the Qemu folder into the Applications folder that should stop. Hopefully ;-)
You're the first to test that outside my environments, so please let me know whether that solves the need for the repeated xattr command

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

No, unfortunately "my" Qemu folder was already inside /Applications. I got Mac OS 9.2.2 to launch successfully, although, much to my surprise the guest screen resolution had changed. I changed it back to the previous resolution and no problem.

I can't get Tiger to get to the Desktop. It simply shows a full progress bar that says "Starting Mac OS X..." and that's that. Any idea what I might do?

And, yes, I'm on Monterey.

EDIT: Tiger works just fine if the network portion of its launch command DOESN'T use vmnet. This might not be the best solution, but, in case it helps someone, here's my current Tiger_Launch.command:

#!/bin/bash
cd "$(dirname "$0")"

./qemu-system-ppc-screamer-60hz-fpu-vmnet \
-boot c \
-L pc-bios \
-M mac99,via=pmu \
-m 512 \
-drive file=Tiger.dmg,format=raw,media=disk \
-drive file=Exchange.dmg,format=raw,media=disk \
-netdev user,id=network0 \
-device sungem,netdev=network0
User avatar
Cat_7
Expert User
Posts: 6145
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,

I can't reproduce an issue with Tiger. It runs OK with vmnet on my virtual machine and gets a correct network configuration.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Yes, I believe you, naturally. I don't know what might be causing the odd circumstance shown on my Tiger VM. I don't think this is really relevant, but my Monterey machine is a Mac Pro 5,1 that is booted via OpenCore.

The above syntax is just a quick and dirty solution that happens to work for me, but, more likely than not, the syntax you've presented will work for most users. Thanks once again.

EDIT: For what it's worth, and not understanding at all what is going on here, I've just changed one ridiculously minor thing in the syntax and, much to my surprise, the following works:

#!/bin/bash
cd "$(dirname "$0")"

sudo ./qemu-system-ppc-screamer-60hz-fpu-vmnet \
-boot c \
-L pc-bios \
-M mac99,via=pmu \
-m 512 \
-drive file=Tiger.dmg,format=raw,media=disk \
-drive file=Exchange.dmg,format=raw,media=disk \
-netdev vmnet-bridged,id=vmnet,ifname=en1,isolated=off \
-device sungem,netdev=vmnet

Why using ifname=en1 instead of ifname=en0 should make a difference is a mystery to me.

EDIT2: Two further attempts to boot Tiger using the "en1" syntax failed miserably. I have to conclude this type of syntax is unstable in my case for unknown reasons.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for OSX available

Post by adespoton »

PeterHolbrook wrote: Sun Dec 12, 2021 8:22 am Yes, I believe you, naturally. I don't know what might be causing the odd circumstance shown on my Tiger VM. I don't think this is really relevant, but my Monterey machine is a Mac Pro 5,1 that is booted via OpenCore.

The above syntax is just a quick and dirty solution that happens to work for me, but, more likely than not, the syntax you've presented will work for most users. Thanks once again.

EDIT: For what it's worth, and not understanding at all what is going on here, I've just changed one ridiculously minor thing in the syntax and, much to my surprise, the following works:

#!/bin/bash
cd "$(dirname "$0")"

sudo ./qemu-system-ppc-screamer-60hz-fpu-vmnet \
-boot c \
-L pc-bios \
-M mac99,via=pmu \
-m 512 \
-drive file=Tiger.dmg,format=raw,media=disk \
-drive file=Exchange.dmg,format=raw,media=disk \
-netdev vmnet-bridged,id=vmnet,ifname=en1,isolated=off \
-device sungem,netdev=vmnet

Why using ifname=en1 instead of ifname=en0 should make a difference is a mystery to me.

EDIT2: Two further attempts to boot Tiger using the "en1" syntax failed miserably. I have to conclude this type of syntax is unstable in my case for unknown reasons.
What host machine are you using, Peter? I've had similar network issues in UTM using qemu-ppc-screamer on an M1 Pro MBP. Doesn't seem to happen on other hardware.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Ah, yes,

You need to find the name of the ethernet device your machine is using and will be bridged with the vmnet device and enter that after ifname=
Never occurred to me it could be the case you were not using en0 ;-)
Might en0 or en1 be a wireless connection?

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

adespoton wrote: Mon Dec 13, 2021 4:40 pm What host machine are you using, Peter? I've had similar network issues in UTM using qemu-ppc-screamer on an M1 Pro MBP. Doesn't seem to happen on other hardware.
A Mac Pro 5,1 (booted via OpenCore 0.7.6). Both en0 and en1 are regular Ethernet wired connections. In addition, en0 works just fine for a Mac OS 9.2.2 guest. Only Tiger fails more or less consistently with vmnet.
User avatar
Cat_7
Expert User
Posts: 6145
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,

Did you by any chance have two instances of Qemu running with the vmnet option enabled?
If so, you need to provide a mac address different from the default one (52:54:00:12:34:56) for at least one of them, otherwise the dhcp request will not be honored as the server in your network sees two instances of the same card.

To do so add e.g.: -device sungem,netdev=vmnet,mac=52:54:00:12:34:66

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

No, there was only one instance of Qemu running. It was either Mac OS 9.2.2 or Tiger, not both at the same time.
cafe-megabyte
Space Cadet
Posts: 5
Joined: Mon Dec 06, 2021 11:19 am

Re: Qemu package and guide for OSX available

Post by cafe-megabyte »

Hi!

First of all, thank you VERY MUCH for providing and maintaining qemu builds here! :-)))

Until now, I was using "Qemu-5.2-OSX-12-12-2020.zip" very successfully. :-)
I tried updating to "Qemu-system-ppc-macOS-6.2-rc3-01-12-2021.zip", but now it says:

RAM size more than 2 GiB is not supported

I'm using 3 GB of RAM (Option: -m 3072).

Why isn't that possible with the latest build anymore? Seems to me like a downgrade. :-(
User avatar
Cat_7
Expert User
Posts: 6145
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,

We cannot help such restrictions appearing. That is something that is decided by the Qemu developers.
I can, however, link to issue that was solved with this restriction: https://bugs.launchpad.net/qemu/+bug/1922391

Best,
Cat_7
cafe-megabyte
Space Cadet
Posts: 5
Joined: Mon Dec 06, 2021 11:19 am

Re: Qemu package and guide for OSX available

Post by cafe-megabyte »

Hey cat!

Thanks for the link. :-)

Hm... they say that "the machine doesn't support more than 2 GB" and therefore apply this restriction.
I assume that "the machine" refers to the option "-M mac99".
Are there more options to boot up OS X beside "mac99"? Maybe there is one that supports more RAM…

Kind regards!
Post Reply