Arm faster for PPC emulation.

About QEMU, 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: 174
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: 174
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: 3392
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: 3392
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: 174
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: 3392
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: 5384
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: 5384
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
Post Reply