Tech News
← Back to articles

Loongarch Improvements with Box64

read original related products more articles

Happy new year, and happy new release of Box64!

The new version brings a ton of new enhancements and fixes to all 3 supported platforms, with Steam running not only on Arm64, but also on RiSC-V and on Loongarch! And this is the Linux version of Steam, not the Windows one (but the Windows one works too if you really prefer that one). While Box32 (used to run Steam) is still experimental and unstable, stability did improve. Still, expect some crashes when downloading things with steam. And it’s not all, Battle.net is also getting stable, and some games are working too. Not all unfortunately, and your success might depend on your geographical region, as program versions might differ. At least, you can try it on ARM64 & Loongarch. It’s still to be tested on RiSC-V.

Highlights

So, what’s new in this release? Apart from the traditionals fixes, speedups, opcodes implementation and new wrapper functions, there has been a number of refactors. Some are more groundwork for later use, like the libdl one. But some have immediate benefits. The prefix opcode decoder, now implemented on the interpreter and the 3 dynarec backend is one of those. This allows to more generically handle exotic opcode prefixes without doing hacks or adding duplicated code. This one lead to the removal of many source files, now useless, making the maintenance of box64 a bit easier. Also, this automatically added support for many rare (or less rare) occurrences of many opcodes in the Dynarec, with 0 extra coding.

There has been some work on the memory footprint of box64 too. Some applications use a lot of memory once launched with box64 (Steam for example, or other things that use libcef or a variant of it). So some work was started to develop mechanisms to try to identify blocks of code that have been converted to native, but that seem to not be used anymore, so they can be deleted and the memory recycled for some fresh code. The work is still in progress on this subject, and more work will come in next release.

Capture card

I have (finally?) invested in a capture card (an Elgato HD60X) for all my video capture. I did all the Loongarch & RiSC-V game captures using OBS on my Ampere ARM64 machine (plug’n play), and I did the Ampere game footage captures using a Lenovo T14s (XElite/ARM64) running Ubuntu also with OBS. While the capture done on the Ampere (using the NVidia card and encoder) were fine, the ones done on the T14s (using software encoder) were a little too compressed for many captures. I have adjusted the settings, but not redone most of them, so you will see some compression artefacts in the ARM64 gameplay video. But at least the performances are not hurt by the capture anymore…

Side note: the editing was also done on the Ampere ARM64 machine (with OpenShot), so no x86 machine was involved in those videos at all!

Architectures

While there is not much news on the ARM64 side (there is added support for the GB10 cpu as a build profile for Box64), there was still some refactoring to improve performances of the Dynarec there. There is still ongoing work to detect and optimize more code loops; for instance, pre-loading used XMM/YMM register just before entering the loop, to avoid loading and saving these registers when it’s not needed. That can give some big speedup in some case. More speedup will be expected when more loop cases are getting detected and handled.

... continue reading