Page 1 of 1

SheepShaver on Apple M1

Posted: Tue Nov 24, 2020 4:04 am
by shearer
Is there any possibility of seeing SheepShaver receive a native Apple M1 build in the future?

Currently the emulation runs quite slow compared to Intel, although this slowdown only appears mostly in the Finder. Many of the applications I tried that take over the screen have been running well.

Love this project and would love to see it continue to run well on current and future Macs.

Re: SheepShaver on Apple M1

Posted: Tue Nov 24, 2020 12:54 pm
by Ronald P. Regensburg
Good to know that SheepShaver runs on M1 Macs with the help of Rosetta 2.

I expect future arm64 or universal (x86_64 arm64) builds.

kanjitalk755 made his fork ready to build for Apple Silicon. It has not been tested yet. It seems the code was excluded later to avoid errors in Xcode 12.2

See his post in the forum here: viewtopic.php?p=67308#p67308
His fork is here:

(kanjitalk755 fork is the source we use since a couple of years for BasiliskII and SheepShaver builds posted here in emaculation forum.)

Re: SheepShaver on Apple M1

Posted: Tue Nov 24, 2020 11:24 pm
by Elyus
I've been experimenting with this on and off for a few days, and kanjitalk's fork does build, although you have to build a universal or native SDL2.framework to embed.

However, in a bizarre set of errors I've not really encountered before, arm64 SheepShaver currently refuses to launch. I've tried all sorts of different signing configurations, beta Xcode, and looking in various places to track down the errors. This is one problem with Apple's new processors which makes it tricky for developers—they're not really exposing enough information for developers to effectively debug certain issues.

Not being able to decrypt the errors or find any helpful resources myself, I gave up and joined Apple's Developer forum yesterday to ask about it: Of course, it's good to have a post here as well; kanjitalk is exceedingly knowledgeable and may have some ideas about the source of the problem.

It's worth noting, even if we can get the build to launch, there's still some things to overcome. Notably, sigsegv for handling illegal instructions doesn't seem to support arm64 threads and registers. Regardless, I'm confident the jump to M1 will happen soon, and I'm looking forward to seeing the types of speed benefits the single-core focus of Apple's M1 will provide.

Re: SheepShaver on Apple M1

Posted: Mon Dec 14, 2020 10:46 pm
by shearer
Good to hear - can’t wait to see how it will perform on the new chips!

Re: SheepShaver on Apple M1

Posted: Thu Jan 14, 2021 10:38 pm
by emendelson
Has anyone tried building SS or BII for M1 recently??

Re: SheepShaver on Apple M1

Posted: Fri Jan 15, 2021 12:00 pm
by Ronald P. Regensburg
Not that I am aware of. Earlier trials resulted in error messages. I suppose that kanjitalk755 will need assistance with debugging.

BTW: It may be better to speak of building for arm64 or for Apple Silicon, M1 is only the first member of that family.

Re: SheepShaver on Apple M1

Posted: Fri Feb 19, 2021 7:44 am
by Jagmn
Just a heads up that I've been experimenting with building SS on the M1. It looks like the main issue is that the zeropage_size linker setting results in binaries that just won't run on aarch64 - though I'm willing to be challenged on this.

After some considerable delving into SS's memory management, I've got something booting that creates a more dynamic Mac<->host memory map but I need to spend more time understanding and cleaning everything up before it'd be ready for a patch. If anyone has a cleaner approach (amidst the plethora of memory approaches there already seems to be) do shout out!

Re: SheepShaver on Apple M1

Posted: Mon Feb 22, 2021 2:30 pm
by Jagmn
For those interested in a native M1 build:

I've managed to get a fairly minimal set of changes to build SS for the M1 using the NATMEM_OFFSET build time option.

Running MacBench 5 against a few build combinations on the M1 shows that the SheepShaver JIT on x86_64 (under Rosetta 2) beats the native aarch64 build (which does not have JIT enabled / needs more work to port the JIT across). If you disable the x86_64 JIT then the aarch64 native build is faster but not by orders of magnitude.

Re: SheepShaver on Apple M1

Posted: Mon Feb 22, 2021 2:57 pm
by Ronald P. Regensburg
What is the difference between aarch64 and arm64, or is it the same? Apple refers to it as arm64 (or Apple Silicon).

Re: SheepShaver on Apple M1

Posted: Mon Feb 22, 2021 5:49 pm
by adespoton
aarch64 is what the QEMU project calls its ARM 64-bit Architecture core. It's essentially synonymous with ARM64.