Page 1 of 1

Arm faster for PPC emulation.

Posted: Thu Jun 25, 2020 8:34 pm
by darthnvader
AMD Ryzen 7 1700 3.75Ghz

Image

Image

Apple iPhone XR

Image

Image

Just about says it all.

Re: Arm faster for PPC emulation.

Posted: Thu Jun 25, 2020 8:37 pm
by darthnvader
Got the wrong photo saved, don't feel like fixing it now, but the XR's FPU score was 63%.

Re: Arm faster for PPC emulation.

Posted: Tue Jul 07, 2020 5:43 pm
by adespoton
Makes sense; ARM is essentially PPC, just with a few different extensions. ARM learned from the failed MIPS architecture.

Re: Arm faster for PPC emulation.

Posted: Fri Jul 10, 2020 5:25 pm
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.

Re: Arm faster for PPC emulation.

Posted: Sat Jul 11, 2020 10:35 am
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.

Re: Arm faster for PPC emulation.

Posted: Sat Jul 11, 2020 3:19 pm
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.

Re: Arm faster for PPC emulation.

Posted: Sat May 15, 2021 11:39 pm
by robottxt2
My M1 Mac for example is even fasterImage

Re: Arm faster for PPC emulation.

Posted: Thu Jun 10, 2021 10:38 pm
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:

Re: Arm faster for PPC emulation.

Posted: Fri Jun 11, 2021 5:16 am
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

Re: Arm faster for PPC emulation.

Posted: Fri Jun 11, 2021 6:15 am
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?

Re: Arm faster for PPC emulation.

Posted: Fri Jun 11, 2021 10:34 am
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

Re: Arm faster for PPC emulation.

Posted: Thu Jul 01, 2021 11:27 pm
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.

Re: Arm faster for PPC emulation.

Posted: Thu Jul 15, 2021 6:22 pm
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.