Arm faster for PPC emulation.

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
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Arm faster for PPC emulation.

Post by darthnvader »

AMD Ryzen 7 1700 3.75Ghz

Image

Image

Apple iPhone XR

Image

Image

Just about says it all.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Re: Arm faster for PPC emulation.

Post by darthnvader »

Got the wrong photo saved, don't feel like fixing it now, but the XR's FPU score was 63%.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Arm faster for PPC emulation.

Post by adespoton »

Makes sense; ARM is essentially PPC, just with a few different extensions. ARM learned from the failed MIPS architecture.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Arm faster for PPC emulation.

Post by adespoton »

I just noticed... there's no test result for the iOS floating point benchmark. This might be worth investigating, as it will affect audio output.

Also:
How does UTM work?
The majority of the work is done by qemu. Because iOS devices lack hardware virtualization support, we cannot use the KVM accelerator and instead use the TCG accelerator which does dynamic code translation and JIT compilation. UTM also includes a SPICE client written for Metal. This connects with the SPICE server in qemu and allows for some para-virtualization as the QXL graphics driver running on the guest OS can send low-level draw commands directly to Metal APIs.
Would something like this be doable on the macOS version as well? Offloading to Metal where possible could be a big performance speedup.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Re: Arm faster for PPC emulation.

Post by darthnvader »

adespoton wrote:I just noticed... there's no test result for the iOS floating point benchmark. This might be worth investigating, as it will affect audio output.

Also:
How does UTM work?
The majority of the work is done by qemu. Because iOS devices lack hardware virtualization support, we cannot use the KVM accelerator and instead use the TCG accelerator which does dynamic code translation and JIT compilation. UTM also includes a SPICE client written for Metal. This connects with the SPICE server in qemu and allows for some para-virtualization as the QXL graphics driver running on the guest OS can send low-level draw commands directly to Metal APIs.
Would something like this be doable on the macOS version as well? Offloading to Metal where possible could be a big performance speedup.
The FPU score was double the x86 score.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Arm faster for PPC emulation.

Post by adespoton »

This got me playing around with UTM. Unfortunately, it looks like my phone with 2GB RAM and 12.4.7 has very very limited resources available before crash time. That said, all I've tried so far has been various versions of Android and Linux. Mac OS 9 and OS X PPC takes up fewer resources for the most part, so maybe I'll get something working eventually.

I may have to just switch to qemu-ppc for iOS if I can't fix the stability issues with UTM.
robottxt2
Space Cadet
Posts: 1
Joined: Sun Apr 25, 2021 11:37 pm

Re: Arm faster for PPC emulation.

Post by robottxt2 »

My M1 Mac for example is even fasterImage
Luposian
Space Cadet
Posts: 3
Joined: Thu Jun 10, 2021 10:17 pm

Re: Arm faster for PPC emulation.

Post by Luposian »

I'm running a binary build of QEMU 5 w/ Screamer for Intel Macs (I assume), running on my M1 Mac Mini (16/512). Sound works, but... it's a tad glitchy. Pops and echo occur on the built-in sounds. I'm assuming any sound would do likewise.

Performance (even at 100% speed) is stodgy. I'm assuming it's throttling the processor. But the M1 should be able to emulate a 900MHz G4 processor without breaking a sweat, shouldn't it? So, is it a tightrope walk, where, you unleash the actual M1 to run the emulation as fast as possible, it screws everything up emulation-wise and nothing works (the environment crashes spectacularly!) or is it that the emulation isn't perfect (or the fact you're running an emulator (QEMU) in Rosetta 2 (an emulation of Intel Macs) and thus, you're running an emulator under emulation, thus doubling the layers of emulation complexity, which slows things down?

Any idea when/if an M1-native binary build of QEMU w/ Screamer will be made available for Macs? :smile:
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Arm faster for PPC emulation.

Post by Cat_7 »

But the M1 should be able to emulate a 900MHz G4 processor without breaking a sweat
The speed indication is purely cosmetic, aside from the fact that Leopard will not install when the machine reports a speed below (I believe around) 866 Mhz.
The screamer code still has some performance issues and therefore is not part of the official qemu code base.

I've been providing these build for some time now, but I do not have a M1 Mac available (and will probably not have one available for some time to come).
If you decide to get all adventurous, you might follow our guide at the bottom of the first post here:
viewtopic.php?f=34&t=8848
and build your own version ;-)

Best,
Cat_7
Luposian
Space Cadet
Posts: 3
Joined: Thu Jun 10, 2021 10:17 pm

Re: Arm faster for PPC emulation.

Post by Luposian »

I'm able to play one of my MIDIs as an .MID file in QuickTime music player, just fine (albeit with clicks and pops and such), but when I try to play an .AIFF in iTunes or .GME file within iPiano, it's like the first note gets stuck and just repeats over and over, getting louder and louder, like a feedback loop! It's horrible!

Is that a Screamer issue or a QEMU emulation issue?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Arm faster for PPC emulation.

Post by Cat_7 »

Well,

As it only happens when playing sound I assume it is a screamer issue. The screamer builds also use a different openbios file, so the effect is the result of both.
The same issue can be observed when opening the sound preferences while a sound is playing.

There is no solution yet.

Best,
Cat_7
grebben
Space Cadet
Posts: 3
Joined: Mon Jun 29, 2009 8:08 pm
Location: Rochester, NY

Re: Arm faster for PPC emulation.

Post by grebben »

I have an OS 9.2 image that I've been passing along from Sheepshaver to QEMU over the past several years and was amazed that all I had to do was attach it to a new UTM machine on my M1 Macbook Pro, and not only did it work without any issue, it's running it faster than ever. The last machine I was running it on was an i9 Windows PC with QEMU screamer, which was fine, but the M1/UTM combo is even faster and stabler so far with the audio and video applications I run. Pretty soon I'll have been using this 9.2 image longer than any actual Mac hardware I've owned... The only issue that continues to persist is having to leave Virtual Memory on, which means I can run some audio applications but not others which require it to be off to function properly. I have forgotten at this point why that's a thing, but it has something to do with screamer being able to play audio smoothly and handle MIDI? I remember that was a problem before screamer came along. Either way, it's amazing work.
ajshell1
Student Driver
Posts: 10
Joined: Tue Jul 13, 2021 3:45 pm

Re: Arm faster for PPC emulation.

Post by ajshell1 »

Another thing that might be worth considering is running QEMU on a Talos II or a Blackbird.

For those who don't know, the Talos II and the Blackbird are workstations by Raptor Computing System that use IBM POWER9 CPUs. POWER9 is a distant relative of PowerPC, and apparently the two architectures are just close enough that it's possible to use QEMU with KVM when emulating a PowerMac.

It seems like a bit of a hackjob, but it seems to work. I found a guy who made some blog posts about it:

https://www.talospace.com/2018/08/makin ... r-mac.html

https://www.talospace.com/2018/08/makin ... ac_29.html

https://www.talospace.com/2020/04/some- ... n-kvm.html

He doesn't seem to post any benchmarks unfortunately. And I don't own either a Blackbird or a Talos II (a Blackbird costs at least $3,480, and a Talos II costs at least $4,380, and can go up to $7,200). At that price, it would be smarter to buy a PowerMac unless you had something in mind for the Blackbird or Talos II.
User avatar
Nowhere Man
Student Driver
Posts: 19
Joined: Sun Sep 30, 2018 4:38 am

Re: Arm faster for PPC emulation.

Post by Nowhere Man »

ajshell1 wrote: Thu Jul 15, 2021 6:22 pm Another thing that might be worth considering is running QEMU on a Talos II or a Blackbird.

For those who don't know, the Talos II and the Blackbird are workstations by Raptor Computing System that use IBM POWER9 CPUs. POWER9 is a distant relative of PowerPC, and apparently the two architectures are just close enough that it's possible to use QEMU with KVM when emulating a PowerMac.

It seems like a bit of a hackjob, but it seems to work. I found a guy who made some blog posts about it:

https://www.talospace.com/2018/08/makin ... r-mac.html

https://www.talospace.com/2018/08/makin ... ac_29.html

https://www.talospace.com/2020/04/some- ... n-kvm.html

He doesn't seem to post any benchmarks unfortunately. And I don't own either a Blackbird or a Talos II (a Blackbird costs at least $3,480, and a Talos II costs at least $4,380, and can go up to $7,200). At that price, it would be smarter to buy a PowerMac unless you had something in mind for the Blackbird or Talos II.
This would be the coolest way to emulate a Power Mac, for sure. I imagine that Cameron might also have cut down his TenFourFox build times considerably by compiling with a virtualized Power Mac instead of using real hardware, but I guess that won't matter now that he has given up on that project.

M1 and beyond is going to be a very worthwhile target, though. I'm on a Mini that I just ordered and received, and it is such a nice little system. Fast as all get-out, yet silent and cool. I have UTM installed and plan to play with system emulation on that, and I see that it does have Screamer sound support, though so far it's just giving me a black display when I go to start the VM.
zeus360
Space Cadet
Posts: 1
Joined: Thu Mar 02, 2023 10:51 pm

Re: Arm faster for PPC emulation.

Post by zeus360 »

robottxt2 wrote: Sat May 15, 2021 11:39 pm My M1 Mac for example is even fasterImage
What settings are you using or are you using one of the pre-defined images in the gallery? I only got 3889 with my M1 Max
Post Reply