Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
Go to file
2024-10-26 17:06:45 +02:00
.github [CI] Added xtheadvector testing (#1894) 2024-10-02 17:50:47 +02:00
debian Bumped version to v0.3.0 2024-07-09 11:02:43 +02:00
docs [ARM64_DYNAREC] Added BOX64_DYNAREC_NATIVEFLAGS to disable the use of native flags, as there is still a bug or two in that mode (for #1947) 2024-10-20 13:21:08 +02:00
pkgbuilds build: fix PKGBUILD-rk3xxx pkgname was set to box86 (#1681) 2024-07-16 08:10:35 +02:00
src [RV64_DYNAREC] Refined fpu_{push,pop}cache for vector (#1960) 2024-10-26 17:06:45 +02:00
system [ARM64_DYNAREC] Added BOX64_DYNAREC_NATIVEFLAGS to disable the use of native flags, as there is still a bug or two in that mode (for #1947) 2024-10-20 13:21:08 +02:00
tests Now x86_64 bash can be installed as box64-bash and will be automaticly used if present 2024-10-18 14:53:13 +02:00
tests32 Added preliminary Box32 support (#1760) 2024-08-26 17:45:13 +02:00
wrapperhelper [WRAPPERHELPER] Removed double line added by mystake 2024-10-05 14:22:59 +02:00
x64lib Added x64 version of libcrypto.so.1.0.0 and libssl.1.0.0 2024-07-08 18:18:04 +02:00
x86lib [BOX32] Addes 3 more x86 libs for convenience 2024-10-06 14:03:30 +02:00
.clang-format [LA64_DYNAREC] Added more opcode and fixes (#1423) 2024-04-06 11:38:04 +02:00
.gitignore [WRAPPERHELPER] Added box32 and line number support in the wrapperhelper (#1890) 2024-09-30 12:31:45 +02:00
.travis.yml remove executable bits 2023-07-21 02:10:26 +02:00
cmake_uninstall.cmake.in Added some minimal set of source (now box64 compile and say hello at least) 2021-02-28 14:19:04 +01:00
CMakeLists.txt [WRAPPER] Added wrapped libbrotlidec with new warpperhelper (for #1860) 2024-10-25 16:01:28 +02:00
LICENSE Moved LICENSE file back to root (for #93) 2021-08-21 17:40:45 +02:00
postinst Refined .deb build script with arch naming and postinst 2021-07-10 10:01:49 +02:00
README_CN.md [RCFILE] Added support fro cursor (for #1778) 2024-08-31 09:05:36 +02:00
README_UK.md [RCFILE] Added support fro cursor (for #1778) 2024-08-31 09:05:36 +02:00
README.md [RCFILE] Added support fro cursor (for #1778) 2024-08-31 09:05:36 +02:00
rebuild_wrappers_32.py [BOX32] Added more 32bits wrapped function and reworked 32bits memory allocator 2024-10-03 19:36:42 +02:00
rebuild_wrappers.py [WRAPPER] Fixed RV64 isSimpleWrappers (#1898) 2024-10-03 12:49:18 +02:00
runTest.cmake [CTEST] Use BOX64_LD_LIBRARY_PATH instead of default LD_LIBRARY_PATH (#1764) 2024-08-27 18:34:58 +02:00

Official logo

Linux Userspace x86_64 Emulator with a twist

View changelog | 中文 | Українська | Report an error

build stars forks contributors prs issues


Box64 lets you run x86_64 Linux programs (such as games) on non-x86_64 Linux systems, like ARM (host system needs to be 64-bit little-endian).

You can find many Box64 videos on the MicroLinux, Pi Labs or The Byteman YouTube channels.

Since Box64 uses the native versions of some "system" libraries, like libc, libm, SDL, and OpenGL, it's easy to integrate and use with most applications, and performance can be surprisingly high in many cases. Take a look at thoses bench analysis for an example here.

Box64 integrates with DynaRec (dynamic recompiler) for the ARM64 and RV64 platform, providing a speed boost between 5 to 10 times faster than using only the interpreter. Some high level information on how DynaRec works can be found here.

Some x64 internal opcodes use parts of "Realmode X86 Emulator Library", see x64primop.c for copyright details

Box64 now have an option Box32 part, that allows to run 32bits x86 program on 64bits system. Note that this option is experimental and a work in progress. Basically, nothing work with it yet, so unless you plan an helping with the development, don't bother enabling it (and don't create issue ticket about box32 not being able to run X or Y program). The main goals with box32 is to be able to run SteamCMD first. Then Linux Steam and Wine/Proton might come later.

Logo and Icon made by @grayduck, thanks!


Usage

There are a few environment variables to control the behaviour of Box64.

See here for all the environment variables and what they do.

Note: Box64's Dynarec uses a mechanism with Memory Protection and a SegFault signal handler to handle JIT code. In simpler terms, if you want to use GDB to debug a running program that use JIT'd code (like mono/Unity3D), you will still have many "normal" segfaults triggering. It is suggested to use something like handle SIGSEGV nostop in GDB to not stop at each segfault, and maybe put a breakpoint inside my_memprotectionhandler in signals.c if you want to trap SegFaults.


Compiling/Installation

Compilation instructions can be found here
Instructions for installing Wine for Box64 can be found here


Version history/Change log

The change log is available here.


Notes about 32-bit platforms

Because Box64 works by directly translating function calls from x86_64 to host system, the host system (the one Box64 is running on) needs to have 64-bit libraries. Box64 doesn't include any 64-bit <-> 32-bit translation.

So understand that box64 will only run 64-bit linux binaries. For 32-bit binaries, you need box86 (with all the multiarch or proot trickery it implies on a 64-bit OS). Note that many installer (mojo setup based) will fall back to "x86" when detecting ARM64 OS, and so will try to use box86 for the setup, even if an x86_64 version exist. You can hack your way around with a fake "uname" that return "x86_64" when the argument is "-m"

An alternative solution is to use Wine with new WoW64, but you will be limited to 32bits windows apps and games.


Notes about Box64 configuration

Box64 now have configurations files. There are 2 files loaded. /etc/box64.box64rc and ~/.box64rc. Both files have the same syntax, and is basicaly an ini files. Section in square brakets define the process name, and the rest is the env. var. to set. Looke at Usage for detail on what parameters can be put. Box64 comes with a default file that should be installed for better stability. The file in in system/box64.box64rc and should be installed to /etc/box64.box64rc If, for some reason, you don't want to install that file here, at least copy it to ~/.box64rc or some game may not function correctly. Note that the priority is: ~/.box64rc > /etc/box64.box64rc > command line So, your settings in ~/.box64rc may override the setting from your command line...


Notes about Unity game emulation

Running Unity games should just work, but you should also note that many Unity3D games require OpenGL 3+ which can be tricky to provide on ARM SBC (single-board computers). Also many newer Unity3D (like KSP) games use the BC7 compressed textures, which is not supported on many ARM integrated GPU. Hint: on Pi4 and Pi5 use MESA_GL_VERSION_OVERRIDE=3.2, with BOX64_DYNAREC_STRONGMEM=1 to prevent freezes and enable strong memory mode, and use Panfrost PAN_MESA_DEBUG=gl3 to use higher profile if the game starts then quits before showing anything.


Notes about GTK programs

GTK libraries are now wrapped on box64, both gtk2 and gtk3.


Notes about Steam

Note that Steam is a hybrid 32-bit / 64-bit. You NEED box86 to run Steam, as the client app is a 32-bit binary. It also uses a 64-bit local server binaries, and that steamwebhelper process is now mandatory, even on the "small mode". And that process will eat lots of memory. So machine with less the 6Gb of RAM will need a swapfile to use Steam.


Notes about Wine

Wine64 is supported on box64. Proton too. Be aware that 64-bit Wine also includes 32-bit components, to be able to run 32-bit Windows programs. The 32-bit apps will need box86 and will not run without it. On a system where both box64 and box86 are present and working, a wine 64-bit setup can run both 32-bit and 64-bit Windows programs (just use wine and wine64 respectively). Note that the new 32-bit PE in 64-bit processes that the Wine team is currently implementing in Wine 7.+ is now supported. It's called "new WoW64" and it's working fine on box64, allowing the use of 32bits windows program on 64bits only system.


Notes about Vulkan

Box64 wraps Vulkan libraries, but note that it as mostly been tested with an AMD RX550 card and on the Freedreno driver, so some extensions may be missing depending on your graphics card.


Final word

I want to thank everyone who has contributed to box64 development. There are many ways to contribute: code contribution, financial, hardware and advertisement! So, in no particular order, I want to thank:

And I also thank the many other people who participated even once in this project.

(If you use Box64 in your project, please don't forget to mention it!)