
And a new release of Box64 is tagged. v0.3.8 has a new DynaCache feature and a ton of fixes and improvements to dynarec & wrappers. Lets dig in.
Fixes everywhere
There are numerous fixes everywhere in this release. Dynarec opcodes, wrappers, memory tracking and management. All those fixes, along with more wrapped function have improved compatibility. For example, games like Civilization : Beyond Earth now works with Box32 (it would be the same with Civ 5). It’s notable because this game doesn’t work properly with Box86. The improved dynarec and x87/sse support surely helps here.

There have been improvements and fixes to Volatile Metadata handling too, and more games just work, without needing any Strong Memory emulation settings, faster then ever (like Starfield for example).
More games using DRM (Digital Right Management) and anti-tamper/obfuscation are starting now, but work on fixes is not over and will continue on the next release.
DynaCache
DynaCache is the new feature of this release. It allow dynarec to save on disk the generated code, and then reloading this code on next run, so that code wont need to be generated again. This can lead to faster loading time, and also remove stuttering in game when compiling new chunk of code. Because the cache take disk space, the default behaviour is to use cache files if present, but to not generate any if not.
The cache files are per binary files, and per dynarec options. So if a program use emulated libstdc++, when generating cache for this program, you will generate a file for the main binary, but also another one for libstdc++. And if another program use that same libstdc++, and if run with the same dynarec option, that generated cache for the library will be used automatically. And it also works for exe and dlls.
To generate cache files, use BOX64_DYNACACHE=1
environnement var (or settings in rcfiles). The generated files will be located in ~/.cache/box64/
. You can just delete the file if you don’t want them. Box64 also have 2 new option on command line to list the files and to remove obsolete ones:
With box64 --dynacache-list
you will have a listing of cache files (you can use an optional name to filter the file listed). You will also have a brief information on each files (if they are valid or not, size, etc.)
With box64 --dynacache-clean
you will remove from the cache all files that are no longer valid (because the origin file is moved/changed or the file is obsolete/invalid).
To illustrate the speedup that DynaCache can bring, lets see how Factorio (the Linux version) start. I’ll use a manual timing from launching the game to the demo screen.
No DynaCache | 39 sec |
With DynaCache 1st run | 39 sec |
With DynaCache next run | 29 sec |
The game start visibly faster. For now, cache files are uncompressed, so they can take a bit of disk space. Also, some dynarec settings might disable DynaCache. But that’s a good first step already.
More AVX/AVX2 support
While AVX support on ARM64 backend is already pretty good, the other backend were a bit late on that front. LoongArch now have full support with the LASX cpu extension. This extension allows many opcode to have a 1:1 conversions. There are still a few issues to be ironed out to be able to enable AVX & AVX2 support by default on this architecture.
On the RiSC-V front, AVX & AVX2 are now partly supported in the dynarec too. But only the “Scalar” version of the dynarec. That means even if your cpu have full RVV 1.0 support, the vector hardware will not be used yet on AVX opcodes. It will come of course, but on another release.
The extensions AVX, AVX2 (and all other BMI1, BMI2, F16C, FMA, ADX and RDRAND) adds a tons of new opcode and new larger register, so adding support takes time and effort.
Go try Box64 v0.3.8
Here is a video with some gameplay. Those were capture on my ADlink machine, with an upgraded CPU: a 64 Cores Ampere Altra CPU clocked at 3.3GHz (it’s an upgrade for gaming, compared to my older 128 Cores clocked at 2.6 GHz).