https://box86.org/2024/12/new-version-of-box64-v0-3-2-and-box86-v0-3-8/ Skip to the content Search Box86 / Box64 Linux Userspace x86 and x86_64 Emulator with a Twist Menu * Home * About * Blog * RSS * Contact Menu Search Search for: [ ] [Search] Close search Close Menu * Home * About * Blog * RSS * Contact * Home * About * Blog * RSS * Contact * box86 github * box64 github * Email Categories Benchmark Box64 Box86 New version of Box64 v0.3.2 and Box86 v0.3.8 * Post author By ptitSeb * Post date 6 December 2024 * 2 Comments on New version of Box64 v0.3.2 and Box86 v0.3.8 Portal with RTX launched from Steam on an Ampere ARM64 machine (with an RTX4060 GPU) Portal with RTX running on ARM64 A new version of both Box64 and Box86 have been released! While the changelog for box86 doesn't contains much, there is a load of news improvements, features and fixes for Box64. With some speed increase, improved compatibility and a new subproject, Box32, there is a lot. But lets dive into more details on the Performances improvements and that new Box32 (sub)project. Performances improvements There have been multiple improvements on performances for this development cycle. Along with the traditional small improvements on code generation here and there, and some more opcodes support on RV64 and LA64, there was added support for Native flags and some much needed rework on Strong Memory model emulation. Native flags on ARM64 Native flags support means that now, on ARM64 machine, box64 will try it's best to use the ARM Flags to match x86 Flags. While this is not always possible, there are still many cases when a 1:1 matching can be done. This can bring some big improvements on CPU intensive task. For example, the 7zip benchmark gain up to 30% of speed on ARM64 with native flags support! The test performed more or less the same for many years, until Native flags was added to box64 (and especially the handling of the Carry flag). Native flags on RiSC-V But we also added native flags to RV64! How would you say, because RV64 doesn't have any flags? True. But there is a trick. In many case, on x86 code, there is a comparison immediately followed by a conditional jump. And in many cases, the flags generated b the comparison (or math operation) are only used for the conditional jump. In that case, box64 will not updates the flags but instead will fuse the comparison and conditional jump to avoid useless internal flags update. The speedup here is also substantial for 7zip benchmark Loongarch already had native flags handling in previous version, so nothing new on that front. Strong memory emulation The Strong memory model also got some much needed refactor, to make it more clean (code-wise) and to allow more tweaking. The emulation works by inserting memory barrier when the code write to the memory, with a strategy to try put as les barrier as possible to avoid impacting performances too much. A new option has also been introduce to use weaker barrier (i.e. more speed). The refactor also fixed issue were barrier would not be place in the optimal way. Those lead with improved performances in games that needs strong memory barrier (like most Windows Unity3D games for example). Box64 vs Rosetta With all those speed improvements, it was time to see how box64 now compared with Rosetta on the Apple Silicon Macs. So using an M1 MacBook Pro running macOS (so using Rosetta to emulate x86_64) and Fedora (using Box64 to emulate x86_64), the 7zip benchmark, with the 23.01 version, will be used again. And yeah, while the native version of 7zip seems faster on macOS than on Fedora, Box64 is now faster than Rosetta on the 7zip benchmark! I also tested with another software: dav1d, which is an AV1 codec. This one use all sort of CPU extensions, with hand optimized assembly. It also use AVX if available. This time, Box64 is a bit slower. Box32 While Box86 allows to run 32bits programs on 32bits system and Box64 is for 64bits programs on 64bits system, there is a new need emerging: running 32bits programs on 64bits system. This bitness change is unnatural, but is forced but the current industry, that just force a 64bits everywhere tendency. Note that only x86 world keep 32bits alive, and even newer state of the art 64bits processors in that architecture keep some 32bits compatibility. While all RISC based arch move away from 32bits. ARM remove all 32bits capability in Armv9, RiSC-V 32bits process are separate from 64bits ones, and Loongarch is just LA64. So Box32 is there to allows 32bits program on 64bits OS. This is actually a subpart of Box64, for ease of maintenance and also because there are many part in common. But Box32 has many differences when it come to lib wrapping, because of the bitness change. Box32 is now disable by default on box64, and it's a build option. It's still a young project, and so not much things work (like steam and even steamcmd for example). But some Linux games works, and when they works, they are fast. Some windows games can also be play, using a "regular" 64bits version of wine. The upside of this solution, compare to the new WoW64 build of Wine (new WoW64 is the same as Box32: change bitness on function call, but inside wine instead) is that OpenGL will be full speed with box32, while wine might use intermediary buffer copies (to keep buffers in 32bits address space) that can induce slowdowns. Those buffers copy are not present on Vulkan, thanks to some extension (or box64 hack can also help if the extension is not present), so for dxvk, new WoW64 is still the prefered solution. Also, Box32 doesn't support Vulkan yet, so it's limited to WineD3D for now. Linux version of Limbo running on Loognarch with Box32 Stability improvements Along some small fixes on the dynarec code generator, there have been a few x87 emulation improvements, that allow some old 32bits windows games to now work properly (both box32 and box64 with Wine new WoW64 benefit from those fixes). The Strong memory model refactor also fixed a few issues, and there is now a new subproject in box: wrapperhelper. There was a first attempt at this before, but that new version is a complete new project, not based on llvm (implementing it's own C parser), and that allows generating library wrapping faster and more accurately than doing manually. A few bugs have been fixed thanks to this. If you want to contribute wrapping some new libraries on box64, the article how-to-create-a-wrapping has been updated with a chapter about wrapperhelper. Note that this article is only about box64 wrapping, and doesn't convert box32 wrapping, that is slightly different and more complex (and subject to change). Conclusion Heads up to github to grab the new sources for box86 and box64 and enjoy some faster execution than before! If you are an 64bits only platform, give Box32 a try, you might get some things to run fine, especially old linux games, like Undertale, Limbo or Anomaly Warzone Earth (but be aware of the limitations: no steamcmd, no steam, no vulkan, and some things in wine still don't work correctly, like registry access it seems). * Tags arm64, benchmark, box32, box64, box86, la64, Loongarch, release, RISC-V, rv64 --------------------------------------------------------------------- - Optimizing the RISC-V Backend --------------------------------------------------------------------- 2 replies on "New version of Box64 v0.3.2 and Box86 v0.3.8" [bc7b764076fe885f]Henrysays: 6 December 2024 at 19h44 Thanks so much! Never imagined I could play so many nostalgic classics on my phone. Reply [5ec5663e3ec974b8]Bseam bakhshsays: 6 December 2024 at 21h54 Thank you very much guys for that i appreciate [?] Reply --------------------------------------------------------------------- Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [ ] Save my name, email, and website in this browser for the next time I comment. [Post Comment] Current yeignore me@r* [7 ] Leave this field empty [ ] * box86 github * box64 github * Email About This Site Box86 can be found on https://github.com/ptitSeb/box86 Box64 can be found on https://github.com/ptitSeb/box64 (c) 2024 Box86 / Box64 Powered by WordPress To the top | Up |