Box86 and Box64 are two pieces of software that allow applications designed for X86 to run on ARM devices like the Raspberry Pi. It also aims to be both simple to use and able to run on low-end devices.
First and foremost, it’s a fully open-source project, which means it has the full support of the community behind it.
However, one man is at the forefront of this effort, and I had the pleasure of chatting with him about what Box86 and Box64 are, where they came from, and what the future holds for the project.
Here’s what we discussed.
Interview with the main developer of Box86 and Box64: Ptitseb
I hope the questions and their answers will make for a good read and give you a better understanding of X86 emulation and ARM peripherals in general.
Q. What were your main reasons for creating Box86 and Box64?
Ptitseb: My main goal was to create an x86 emulator that worked on low spec hardware. I am quite active in the Open Pandora community [a small single-core ARM computer from 2012] and I wanted to create a usable emulator for it. Simply put, I wanted a small and fast emulator for my Open Pandora
Q. Who is your target audience with Box86 and Box64? Is it intended to be used only by Linux enthusiasts or only by the average Linux user?
Ptitseb: Besides speed, one of my other goals with Box86 and Box64 is to have something that everyone can use. I designed Box86 to be as unintrusive as possible; you install it, and then it works. For now I’m only providing the source code, so until it’s pre-compiled it’s not for everyone as it still needs to be compiled from source (even though it’s is relatively easy to do).
For now, it’s for power users, but the end goal is to make it easy for everyone to use.
Q. How are Box64 and Box86 different from previous attempts to run X86 applications using QEMU?
Ptitseb: As I said before, my goals were to have something quick and easy to use. So I made a lot of choices that the QEMU team didn’t. For example, the main goal of QEMU is to be as accurate and as close to real hardware as possible. My goal is not that. Instead, I want something fast, even if I have to do some guesswork to do it.
I guess the biggest difference between Box86/Box64 and QEMU is that I want Box86 to be as close to real hardware as possible and not as close to emulated hardware (like you would find in QEMU). For example, X86 processors use 80-bit data, which ARM processors simply cannot handle. Although I can emulate this, it would reduce the speed drastically, so I’m using 64-bit double data instead. And it works! Even if it doesn’t work 100% of the time, for games, who cares!
Simply put, with this approximation, I get a lot more speed, at the cost of accuracy.
Q. Linux runs on an incredibly large number of devices. Due to this diverse target, I guess not all hardware will work. So what type of hardware is currently supported?
Ptitseb: For Box86 to work, the computer must be Little Endian. This is a strict requirement, because Box86 translates code, not memory. Other than that, there isn’t much stopping Box86 and Box64 from working, other than a few other things.
Obviously, for Box86 to work you need a 32-bit operating system and for Box64 a 64-bit operating system, which is another essential requirement. Finally, if you want to use Dynarec, which increases the speed considerably, you must use ARM and not test on an X86 PC.
Q. With the release of the Steam Deck, Valve promised vastly improved compatibility with Windows games thanks to the Proton Compatibility Layer. Once the new version of Proton is released, do you think it will be possible to run these games with Box64?
Ptitseb: Honestly, I don’t know, I still have to start working on that. It’s definitely something I want to work towards, mainly because it would be nice to have that! However, before I can get this to work, I have a few other things that need to be completed first. For example, Steam is not working very well yet, so it will need to be improved before I can start working on Proton.
So yes, it is a goal, but it will still take time before it works well.
Q. I’m sure you’re familiar with Apple’s Rosetta 2 translation layer. How do Box64 and Box86 compare?
Ptitseb: It’s hard to say, because I haven’t analyzed Rosetta 2 much yet. My understanding is that Rosetta uses an offline code converter, which neither Box86 nor Box64 have. Unlike Rosetta, Box64 does not keep translated code, but does everything in the runtime.
Other than that, Apple will always do the translation better than Box64 because they control the entire operating system. After all, I can’t just change Linux to fit Box64, it has to be the other way around.
Q. What future plans do you have for Box64?
Ptitseb: I am currently thinking of a new Box software, Box32, because why stop at two emulators when I can do three? Box32 will be a 64-bit emulator that runs 32-bit software. I can see, especially on ARM, that 32-bit hardware is being phased out, and as such Box86 will soon become obsolete as we won’t have any hardware to run it on.
But this one will be tricky because the wrapper will need to be much smarter than the implementations in Box86 and Box64. It’s a huge amount of work, so I always try to find a good solution that doesn’t require too much work on the conversion phase while still having something quick and usable. However, this is a future project, just because of its size.
Q. Looking at your GitHub profile, it looks like you’ve already done a lot of work porting individual games to Open Pandora. Is Box86 an extension of that, or is it a completely different project with different goals?
Yeah, I guess it’s an extension of that in some ways. On Pandora, I wear a lot of stuff, and to make the process easier, I forked GLshim, creating Gl4ES. This allows automatic translation from OpenGL to GLES2, which makes porting much faster.
After that I created Box86 which was yet another step to make porting easier. Now, even though I don’t have the sources, I can still port things to Open Pandora.
So yes, it’s kind of an extension of porting and making software available for hardware that it wouldn’t otherwise be available for.
Q. How does GL4ES fit into the picture? Is it necessary to play most games?
It really depends on the hardware. Some hardware doesn’t have a full OpenGL driver (or at least supported by Mesa), so you’ll need GL4ES to play games on hardware like this, because full PC games don’t care about GLES.
If the hardware is supported by Mesa, like the Raspberry Pi 4 or RK3399 SoC with Panfrost, you should be fine without it; you won’t need Gl4ES.
So if Mesa doesn’t support the hardware or the hardware doesn’t support OpenGL, you will need GL4ES to run games.
Q. Finally, is there anything you would like to say to the community?
Well, I see Intel, AMD, and the X86 world as a whole is dying. We saw in 2020 that Apple really shook up the world with the M1, and suddenly we saw that X86 isn’t the only thing that might be powerful enough for desktop computers.
We are now seeing alternate architectures such as RISC-V emerge, and ARM is also starting to appear on desktop computers. So, X86 isn’t the only way to have a powerful PC for gaming and general use, and Box86 and Box64 are really trying to help that movement.
After all, there is life after X86’s death.
With all the amazing work that Ptitseb has done, it was truly an incredibly interesting experience to get a deeper insight into how a project like Box86 works. The mention of a possible Box32 release was also very exciting to hear, and I hope you’re excited too.
If you want to learn more about Box64, I strongly suggest you read our post about it.
With that, are you using Box86 or Box64? What do you think of the future of these projects? Please let us know in the comments below.