box86

Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices

Github星跟踪图

box86

Linux Userspace x86 Emulator with a twist

Donate

Box86 will let you run x86 Linux programs (games) on non-x86 Linux, like ARM (host system needs to be 32bit little-endian).

Because Box86 uses the native version for some "system" libraries, like libc, libm, or SDL and OpenGL, it's easy to integrate and use, and performances can be surprinsigly high in some cases.

Most x86 Games need OpenGL, so on ARM platforms, a solution like gl4es is probably needed.

Box86 now integrate a DynaRec for ARM platform, providing a speed boost between 5 to 10 times compared to only the interpretor.

Many games already work, like for example: WorldOfGoo, Airline Tycoon Deluxe or FTL. Many of the GameMaker linux games also run fine (there a long list, among them are UNDERTALE, A Risk of Rain, and Cook Server Delicious)

If you are serious about developing Box86, you should install ccache and activate it's support in the cmake project (use ccmake for example)
To have TRACE enabled (i.e. dumping to stdout all individual x86 instructions executed, with dump of registers), you'll also need Zydis library accessible on your system.

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

Here are 6 videos, the first 2 of "Airline Tycoon Deluxe" and "Heretic 2" running on a gigahertz OpenPandora (the second one use the dynarec), and the next 2 of "Bit.Trip.Runner" and "Neverwinter Night" running on an ODroid XU4 (without dynarec), and the last 2 on a Pi4: Shovel Knight (video from @ITotalJustice) and Freedom Planet (video from @djazz), also without dynarec.

Play on Youtube Play on Youtube Play on Youtube Play on Youtube Play on Youtube Play on Youtube


Compiling

How to compile can be found here


Usage

There are a few environment variables to control Box86 behaviour.

See here for all variables and what they do.


Version history

The change log is here


A note about 64bits platform

Because box86 works by directly translating function calls from x86 to host system, the host system (the one box86 is running on) needs to have 32bits library. Box86 doesn't include any 32bits <-> 64bits translation. So basically, to run box86 on, for example, an ARM64 platform, you will need to build box86 for arm 32bits, and also need to have a chroot with 32bits library.

Also note that, even if, on day, there is a box86_64, this one will only be able to run x86_64 binary on 64bits platform. You will still need box86 (and see 32bits chroot) to run x86 binary (in fact, like it is the case on actual x86_64 linux)


A note about Unity game emulation

Running Unity games is not possible for now. Mono itself uses signals that are not well emulated enough. So the solution is to use a native version of the libmono used by Unity. It can be found here: https://github.com/Unity-Technologies/mono and it needs to be built from source. When built copy libmonosgen-2.0.so to libmonounity.so and put it somewhere it can be dlopen'd (so in usr/lib or friend or somewhere in your LD_LIBRARY_PATH).
Note that libmonounity is not completely wrapped yet, and the mechanism to call x86 library from libmonounity is not done yet, so the use of libmonounity is not enable for now.

TL;DR: mono games are not working for now anyway.


Final words

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

主要指标

概览
名称与所有者ptitSeb/box86
主编程语言C
编程语言CMake (语言数: 6)
平台
许可证MIT License
所有者活动
创建于2019-01-09 10:49:32
推送于2025-04-28 10:02:56
最后一次提交2025-04-28 12:02:52
发布数17
最新版本名称v0.3.8 (发布于 )
第一版名称v0.0.2 (发布于 )
用户参与
星数3.5k
关注者数70
派生数241
提交数5.1k
已启用问题?
问题数670
打开的问题数178
拉请求数261
打开的拉请求数0
关闭的拉请求数18
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?