Author Topic: Can we run Mac OS 9 faster under emulation than the original hardware?  (Read 2374 times)

Offline NigelNowhere

  • Valued Member
  • **
  • Posts: 13
  • New Member
the title says it all. I am wondering if the current emulations of os9 such as QEMU and Sheepshaver are actually faster than the old hardware. I have been using Sheepshaver and UTM on my 2015 MacBook Air and have thought that this seems pretty quick. I would imagine that a faster machine like the M1 MacBook would be a lot faster. I have also heard that you can get UTM running on an iPhone or iPad, and I wonder what the performance would be like. I have my old iPhone 11 Pro Max I might consider setting up as a dedicated mobile Os9 machine.

Anyone have any experience with this?

Offline teroyk

  • Platinum Member
  • *****
  • Posts: 623
  • -
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #1 on: October 08, 2023, 07:56:41 AM »
I am pretty sure that it would be slower than 400 Mhz G4, because it is slow to emulate its 128-bit Altivec code with modern 64-bit machines  ;) But older not G4 only programs might run quite fast.

But I will soon test mobile MacOS9 in Pinephone Keyboard with Maemo Leste OS (it has qemu-system-ppc in its repository).

Offline teroyk

  • Platinum Member
  • *****
  • Posts: 623
  • -
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #2 on: October 08, 2023, 11:18:19 AM »
Thanks for DieHard's Complete working QEMU v5.2 System background info, I could use that script with only little modification with Pinephone Keyboard. Because QEMU use only one core, it working about PowerMac 6200 75Mhz CPU speed and graphics update is even slower. It needs mouse, because using with touch screen is little hard.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4443
  • just a number
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #3 on: October 08, 2023, 11:23:54 AM »
dont underestimate the difference it can make between different types of applications.
insert arbitrary signature here

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 339
  • New Member
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #4 on: October 13, 2023, 08:49:22 AM »
Question: Can we run Mac OS 9 faster under emulation than the original hardware?

Answer: No.

Detailed answer: Emulators like Sheepshaver and the like are locked to 30 FPS maximum, AKA every looks and feels like shiet, particularly games. If compiled with special flags, the likes of QEMU can do 60 FPS, but are SLOW AS HELL, even on ultra high-end, $10000+ machines. A lot is playable, though, and not everything is as slow as I said. It depends on what you do or play. You can make it bearable here and there, but you CANNOT replace the hardware. Period. What we have is just not powerful enough, and our emulation software not well-written enough to utilize all of the hardware, nor to catch up with the speed of the likes of our MDDs and whatnot, particularlu those equipped with a legendary dual 7448 2.0GHz PPC processor, let alone the 64-bit "quad-core" G5s at 2.5GHz and dual-processor 2.7GHz G5s. (G5s can't boot into OS 9, though.)

Some read/write operations CAN be FAST, though, and arguably surpass the original hardware, when you consider the original is limited to SATA I at best (SATA II on G5s, maybe SATA III even?), whereas we emulate OS 9 with hardware on SATA III SSDs or nowadays even NVMe SSDs, which are even faster.

Then you have issues like compatibility and accuracy. Even if you got things to run faster (which you can't), would you really be able to say you achieved such a goal, when software that should work does not work? (Compatibility.) Or when software behaves differently under emulation compared to its behavior in real hardware? (Accuracy.)

Emulation is a convenient tool, but never really a true replacement for what it is emulating. Especially for something as powerful as PowerPC-based Macs.

You can write code to contribute to such goals if you wish to do so, however. A lot of people share such ambitions, afterall. I think it has its uses, and is particularly cool for things like System 6 and earlier 68k crap, but not in lieu of the actual hardware.

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2373
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #5 on: October 13, 2023, 10:18:25 AM »
Aside from gamers, there are musicians and other groups of people that will never be able to use emulation...even if the speed catches up or is actually faster it would still be a mute point for those that need to address their hardware (like an audio interface via ASIO).

This, for me, is why emulation is just a novelty.  After devoting weeks to trying to get "USB hardware passthru", Virtual memory off, and other emulation rabbit holes navigated; I threw in the towel.  I still appreciate it as a testing environment, but when it comes to creativity it's like VR sex, the real thing is much better.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4443
  • just a number
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #6 on: October 13, 2023, 02:45:34 PM »

Detailed answer: Emulators like Sheepshaver and the like are locked to 30 FPS maximum

creating visual output to the monitor is like 3% of what computerprogams can do - you are basically limiting computing to "playing games" here.

it would be more than interesting to see some real life tests for arbitrary computing jobs between the fastest PPC and the fastest M2.

unfortunately most of the applications i would like to run in a MacOS9 emulator have custom copy protection methods, requires access to hardware, or wont run in emulators for other reaons. :/
insert arbitrary signature here

Offline DrNo7

  • Enthusiast Member
  • ***
  • Posts: 79
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #7 on: October 13, 2023, 11:27:15 PM »
Wouldn't results be slightly better/more accurate with a PPC platform running QEMU (like a Raptor machine under Linux)?
Or is QEMU unable to leverage hardware similarities and serve as adaptation layer for the differences?
Ti 1 GHz / 1 GB / FW SSD / Airport Extreme PCMCIA (triple boot)
Alu 12 1.5GHz / 1.5 GB / 256 GB mSata SSD (dual boot for now)

Online ssp3

  • Platinum Member
  • *****
  • Posts: 718
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #8 on: October 14, 2023, 12:34:49 PM »
Aside from gamers, there are musicians and other groups of people that will never be able to use emulation...

Aside from gamers? IIRC, this place started its life as audio oriented, not the other way round.
If you're not part of the solution, you're part of the problem.

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2373
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #9 on: October 15, 2023, 11:11:02 AM »
Sorry to be so ambiguous, that statement meant that gamers can enjoy emulation, but musicians need to interface with more than just the internal audio and that emulation does not work for DAW users.  I kinda write my ideas backwards as a sign of old age, sorry :(

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #10 on: October 17, 2023, 08:54:49 AM »
Question: Can we run Mac OS 9 faster under emulation than the original hardware?
Answer: No.
Because CISC CPUs, as Intel and AMD, are really bad at emulation RISC CPUs, as PPC family, the main emulation depends only on the max speed in Mhz, no matter the number of cores... And It usually performs only around 25% of this speed compared to an original hardware. So a top intel cpu running a 3 Ghz barely surpasses a G4 at 750Mhz in basic task. Generely a G4 even at lower speeds than 750 Mhz will surpasses any emulation thanks to the extra enhancements as Altivec, Multiprocessors, video acceleration, audio DSP's etc...
Please don't PM about things that are not private.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4443
  • just a number
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #11 on: October 17, 2023, 05:53:12 PM »
no matter the number of cores

i am pretty sure that it should be possible to make an emulator software for whatever system using all cores of an M2 ultra, it is probably just very difficult. and the userbase which requests that is too small.
insert arbitrary signature here

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 339
  • New Member
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #12 on: October 26, 2023, 10:23:34 AM »
creating visual output to the monitor is like 3% of what computerprogams can do - you are basically limiting computing to "playing games" here.

it would be more than interesting to see some real life tests for arbitrary computing jobs between the fastest PPC and the fastest M2.

unfortunately most of the applications i would like to run in a MacOS9 emulator have custom copy protection methods, requires access to hardware, or wont run in emulators for other reaons. :/

Be it "3%" or "50%" of "what computer programs do" (that really will depend on the back-end workload, could be actually less than 1%, and could be 99%), it is 100% of the user experience, simply put.

It's not just games, even merely browsing and poking around the Finder is a lackluster experience, which is one of the reasons Classic mode is so unbearable to put up with on Panther/Tiger as an OS 9 user. Even without a GUI, a CLI interface or text editor will not be as smooth. Not that it's required for achieving much, but it's relevant for the usage experience (and it can have a minor usage impact for users who very quickly respond to visual feedback). This is also why CRTs are a thing (lowest display lag), be it in gaming or otherwise.

(Btw, demoscene is a thing, too, as is watching media in general. That will be 100% of the experience, again.)

For background tasks, like I mentioned, the likes of an M2 or Talos II should be able to surpass the real machine only for I/O, not any actual processing. It is not just a matter of leveraging the native M2 / Talos II hardware with better software, but it is also the hardware itself that cannot virtualize well enough because the hardware is not powerful enough. Cameron Kaiser put a bunch of posts in his Talospace blog some years back, doing tests with his POWER9-based (!) Talos II, meaning CPU emulation is skipped, and it simply is not cut for the job (of surpassing or even catching up to the performance of the real thing, although he seemed happy with his crappy results).

For PowerPC, we simply do not have the hardware that can do it. As far as emulators are concerned, the closest to the real thing, and certainly surpassing the speed of the real thing, is mini vMac, but that's 68k. Basilisk ][ and the others are not as smooth and proper, although they also surpass the original's speeds, but, again, that's 68k.

Better than emulation are things like Wine, and Darling (OS X apps on GNU/Linux). Basically making apps run natively, no virtualization ("emulation") bullshit, regardless if CPU instructions need to be emulated or not. We see this with Executor on Windows and OS X, but it only runs a handful of apps accurately (i.e. Lemmings), but those that do run, run perfectly, just like a native app, which is beautiful and a sight to behold. Along those lines we also have MACE (https://mace.software/files/), although you need to do some hackeroo to get it to run arbitrary software, since the devs of it are just simply not releasing the source code, nor releasing it in a way you get to create your own app packages. But this also works brilliantly-well much like Executor, if what you want to run is compatible.

Answer: No.
Because CISC CPUs, as Intel and AMD, are really bad at emulation RISC CPUs, as PPC family, the main emulation depends only on the max speed in Mhz, no matter the number of cores... And It usually performs only around 25% of this speed compared to an original hardware. So a top intel cpu running a 3 Ghz barely surpasses a G4 at 750Mhz in basic task. Generely a G4 even at lower speeds than 750 Mhz will surpasses any emulation thanks to the extra enhancements as Altivec, Multiprocessors, video acceleration, audio DSP's etc...

From what I could tell, regarding the whole RISC/ CISC thing, we were utterly lied to: Intel processors have been RISC processors since the Pentium II and the Pentium Pro (P6 microarchitecture). It's just that Intel/AMD added a CISC instructions emulator on top of it. In marketing material, they call it the likes of "RISC caching" and whatnot, if memory serves right, but make no mistake: those processors NATIVELY can ONLY run RISC instructions. All CISC instructions are broken down into the native RISC ones, meaning all CISC instructions are emulated. It seems like there was a rush for RISC processor architecture benefits during the late '80s and early '90s by all CPU companies, and Intel chose the emulation route for their huge backwards compatibility requirements. No single CISC instruction is executed natively in those. (I had a lot of references to material in this topic I had put in the Macintosh Garden some years ago. We can dig those back up, if anyone is curious.)

The clock speeds are relevant, but more than that seems to be execution pipeline size. I honestly don't know the technical details of that, but you can see the relatively "irrelevance" of clock speed when you compare, say, a 3GHz Pentium 4 (huge pipeline, ultra slow processor that is also extremely inefficient and hot) and one of those Intel Core processors at the same clock speed (Core i3, i5 etc.). The latter will smoke those poor Pentium 4s. Of course there's CPU cache and all that, but this can be observed even otherwise. I believe this is what was dubbed "the GHz myth" or "the MHz myth". There's also IPC (instructions per clock/cycle) etc..

But you are right about your point: Even a "slow" PowerPC machine will run much, much faster than even a 3GHz or 4GHz modern-day Intel CPU. Even POWER9, which does away with CPU emulation entirely, is not cut for the job, since the main issue lies in (system environment) virtualization. Somewhat surprisingly, CPU emulation is not that much of a big deal. We have even early PowerPC chips running 68ks apps in a way indistinctive from a real 68k Mac in our PowerPC System 7 ~ Mac OS 9 systems all the time, afterall.

Those are my (very inflated) 2 cents.

Offline goodoldmacs

  • Newcomer
  • Posts: 3
  • New Member
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #13 on: March 08, 2024, 03:10:07 AM »
there is a project where someone is making a fully compatible and complete 512k mac using modern hardware without emulation (actual 68k cpu, etc.)
and of course there are similar projects where they have built totally new amigas and such

instead of emulation it would be cooler if someone found a way to create a OS 9 compatible machine using any of the newer super fast PPC cpus that were made since 2005

Online Knezzen

  • Administrator
  • Platinum Member
  • *****
  • Posts: 990
  • Pro Tools Addict!
    • Macintosh Garden
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #14 on: March 08, 2024, 03:33:18 AM »
instead of emulation it would be cooler if someone found a way to create a OS 9 compatible machine using any of the newer super fast PPC cpus that were made since 2005

I agree! Or make a Mac OS 9 compatible OS from scratch, like what Haiku is for BeOS.
Pro Tools addict and admin at Macintosh Garden, Mac OS 9 Lives! and System 7 Today

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 339
  • New Member
Re: Can we run Mac OS 9 faster under emulation than the original hardware?
« Reply #15 on: March 08, 2024, 10:50:57 AM »
there is a project where someone is making a fully compatible and complete 512k mac using modern hardware without emulation (actual 68k cpu, etc.)
and of course there are similar projects where they have built totally new amigas and such

instead of emulation it would be cooler if someone found a way to create a OS 9 compatible machine using any of the newer super fast PPC cpus that were made since 2005

In MacRumors PPC (sub)forums, I pitched and insisted we get schematics for the best OS 9 machines, such as the MDD. We did get as far as getting custom CPU and daughtercard upgrades, such as a dual 7448 @ 2.0GHz, has twice the amount of L2 cache than the 7447 (fastest G4s Apple sold). Similar upgrades using dual 7457 instead have also been made (has L3 cache, and a big one at that).

I hoped we could reverse-engineer the motherboards, though, and the daughtercards. GPUs are also of similar concern.

We have LCS (liquid-cooling) solutions for the MDD, too. I also looked into replacing the power supply and fans to be silent and better-performing, as well. I was doing all of this back when I still had access to my property (including all my MDDs).

I wish I could get some MDD motherboards shipped to me, so that I would work it into an original case of my own, but where I am this is not so simple due to BS laws.

In any case, your idea is good. @Knezzen's idea is also excellent, for those willing to make it happen. Closest thing to that second one is Executor, MACE and Advanced Mac Substitute, but they didn't get very far in terms of giving us a real alternative.