What does HackerNews think of box86?

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

Language: C

#12 in Linux
Qemu does something similar. And Box86 does that while keeping 3D acceleration on converting X86->ARM linux binaries.

https://github.com/ptitSeb/box86

You can already do x86 emulation on linux ARM devices via other means[0] including on the Raspberry Pi. Keep in mind performance will be greatly degraded, but its possible.

[0]https://github.com/ptitSeb/box86

It definitely isn't. I've been a huge linux nerd since my preteens in the late 2000s, I jumped on to squeeze more performance out of the thoroughly mediocre hardware I had access to. I wanted to program, and I found Visual Studio to be incomprehensibly dense and confusing, while Linux tools were so much simpler, with GCC, GEdit, makefiles and the like being more to my liking. I fell deep into the rabbit hole, learned emacs, then vim (it was more responsive on my intel atom-powered netbook), became a "shell guru", eventually went to college at 16 and started doing cybersecurity work/pentesting professionally. I've even made a tiny contribution to the Linux kernel, which I'm pretty proud of.

All this anecdata to say, I consider myself pretty okay at using Linux, I "prefer" Linux, but I don't use Linux for gaming. Not unless it makes sense. I play Minecraft on Linux, and FOSS games that were developed on Linux. There's a POWER9 desktop on my desk that runs Linux, and all my professional and hobby work goes there. I love it.

But any commercial games? They go on my old college-days Intel desktop, running Win10. I can do the work to get games running on Linux, but why bother? Like Linus says in that video, when I have time to play video games, I really don't want to pull out a debugger and strace and crap to do more $DAYJOB work.

Not to say I never do that for fun. I do. I've done some work with https://github.com/ptitSeb/box86, and that involves a similar process. But I just frankly don't find doing it to your average Steam game to be very fun. Sometimes the muse strikes, usually it doesn't.

And for your average Linux user, much less your average computer user overall, you can forget about it. IMO, unless you have a strong ideological reason to only use FOSS OSes (and all the power to you!), the reason you use Linux is because it's a vastly superior tool for certain problems.

Playing your average commercial game is not one of them.

> But probably not AAA gaming, since gaming on Linux is a tough proposition even in the best of circumstances.

Just in case that's unknown to you or to other readers: It's really not true. Have a look at https://www.protondb.com/ - Linux is excellent for gaming, even AAA gaming. The PI processor just would be too weak either way, and not being x86 would prevent the games from running directly. Maybe that incompatibility and not having proprietary games compiled for ARM available is what you meant? That would need something like https://github.com/ptitSeb/box86, which actually seems to work way better than expected.

I came across box86 yesterday during FOSDEM. It have not yet tried it, but is similar and actively maintained: https://github.com/ptitSeb/box86
> if you wanted performance you'd probably be better off starting from scratch with an emulator design that cared about performance and which was really clear about its use-cases

See box86:

https://github.com/ptitSeb/box86

> Wine doesn't work on ARM.

You'll be delighted to hear that that's not entirely true - there is a Linux x86-on-ARM emulator Box86 [1] that allows you to run Wine apps [2]. While your expectations should be realistic, it's made to defer as much as possible to platform native implementations so there's a bunch of things you can run!

[1]: https://github.com/ptitSeb/box86

[2]: e.g. here's Warcraft 3 on a Raspberry Pi 4: https://www.youtube.com/watch?v=85bfzDSWHNQ

Also check out Box86: https://github.com/ptitSeb/box86

Impressive to see people playing Half-Life 2, Unreal Tournament 99 and 2004 on a Raspberry Pi 4.

Curious if this could be extended to Emscripten (JIT for WebAssembly/Emscripten?) which would be perfect for archiving and portability. Closest project I have seen is DOSBox-X which seems to already have an Emscripten port: https://github.com/joncampbell123/dosbox-x

HL2: https://www.youtube.com/watch?v=Lq5dJ0oc_6k

UT2004: https://www.youtube.com/watch?v=4VOAeOQcrdo

> Docker w/ arm linux kernel + x86 userland images: I don't what existing projects might me candidates, but any translation solution would be found within the linux guestOS, not macOS.

That could be something doing dynarec like box86, which is mindboggingly the only way to run (x86) Zoom on a arm7hf Linux atop a Raspberry Pi 4 (I tried it on a Pi3B: it works but it’s way too slow)

https://github.com/ptitSeb/box86

Upstream which part exactly?

The library thunking stuff wasn't included in any of the projects involved, so I couldn't upstream that. My glshim project was most of the work involved and is still around and still capable of proxying opengl through a usermode emulator, and rendering fixed function GL via GL ES or software rendering.

My performance changes to QEMU would definitely not have been accepted based on sentiment when talking to the QEMU core team at the time.

My changes to WINE were extremely minimal (read the commits) and don't make sense to live in WINE unless you mash together a dual arch WINE distribution in the exact same, manual, way I did, so they don't make much sense to upstream.

A sort of spiritual successor to my work here is https://github.com/ptitSeb/box86 which is more like the OP and does HLE.

I wonder if box86 [1] could be made to emulate only calls to FBX.

1: https://github.com/ptitSeb/box86

This is exactly it. They're using box86 [ https://github.com/ptitSeb/box86 ] which allows you to run x86 but not x86_64 Linux programs on ARM Linux.
Have you tried box86? https://github.com/ptitSeb/box86 Let's you run x86 (not x86_64 though) programs on ARM Linux. It does a neat thing where system library calls are converted to ARM system library calls rather than using x86 ones for better performance.

Lots of games work fine with it too: https://www.youtube.com/watch?v=z-4aGNqZ724

Windows ARM seems to be a bit faster than that running x86. An older video showed pretty good performance: https://www.youtube.com/watch?v=DRBMBkL7SCM . Using an abstraction layer to convert system library calls to call native ARM system libraries instead so you don't have to emulate x86 versions of the system libraries.

This is the same concept box86 implements on Linux. https://github.com/ptitSeb/box86 . It's good enough to run lower end Linux games on a Raspberry Pi 4