Box64 running on M1 with Asahi

The Asahi project has now released a first alpha version, so I tried that on a MacBookPro. Asahi is a full linux distribution that can be installed on mac with an M1 processor, it installs alongside your current macOS. It’s an alpha release so many things are missing for now, including 3D hardware acceleration, but on the other hand, for an alpha release, many things are already working, and working fine!

After a (quite) long installation process, I got linux running on that mac. Note that I add to restart the installation process, as the mac went to sleep mode during “root expension” and that actually froze the installation. I needed to break, remove all the create partitions (a risky process) to be able to start again.

Now, the M1 processor is very fast ARM64 processor, but it only supports 64bits operations. No ARM32 there, so no box86. Also, the Asahi readme mentions that the Pagesize is 16K, instead of the standard 4K. That breaks a few things on the way. Fortunatly, I had already encountered a system with 16K pagesize (Loongarch64 systems), so there is some supporting code on box64 already for it. And after enabling it (plus some compilation options), box64, with dynarec, was running!

To try things, I wanted to install a simple linux game. Remember that there is no Hardware acceleration yet, so I choose WorldOfGoo, with its simple graphics (it’s still an OpenGL game). Launching the install didn’t work, as by default, the setup tries to run x86 code (32bits, so needing box86 not available here). To work around that, I created a simple uname script that spoofs the setup into thinking this is an x86_64 system:

the file simply contains

And I created an x86_64 folder in my home directory to put some pc stuffs (and that uname script)

Then I launched the setup as PATH=~/x86_64:$PATH ./WorldOfGoo.Linux.153.sh et voilà, the setup launched… But as text only… Ok, gtk2 libs are not installed. So sudo pacman -S gtk2 and try again…

And yeah, the game runs perfectly!

Linux x86_64 version of WorldOfGoo running on mac M1 with box64

Quickly running a 7zip benchmark to see the brute force performance of that M1 chip (I just have a “regular” M1, not a Pro or Max version, but still, it’s already very powerfull)

The native version of 7z b gives me

While the x86_64 version with box64 gives

The performances penalty of box64 here is on par with what I already measured on other platforms.

That’s it for a quick test. That cpu is a beast, and even without 3D hardware support, it’s already quite usable and you can even use games on it! On box64 developement side, this platform will now enable me to use more advanced Arm64 CPU instruction in the dynarec, as there are some interesting opcodes in Arm 8.1 and more that are available on this cpu.

发布者

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注