open-paren 8 days ago

> FEX allows you to run x86 applications on ARM64 Linux devices, similar to qemu-user and box64. It offers broad compatibility with both 32-bit and 64-bit binaries, and it can be used alongside Wine/Proton to play Windows games.

> It supports forwarding API calls to host system libraries like OpenGL or Vulkan to reduce emulation overhead. An experimental code cache helps minimize in-game stuttering as much as possible. Furthermore, a per-app configuration system allows tweaking performance per game, e.g. by skipping costly memory model emulation. We also provide a user-friendly FEXConfig GUI to explore and change these settings.

> On the technical side, FEX features an advanced binary recompiler that supports all modern extensions of the x86(-64) instruction set, including AVX/AVX2. The heart of this recompiler is a custom IR that allows us to generate more optimized code than a traditional splatter JIT. A comprehensive system call translation layer takes care of differences between the emulated and host operating systems and implements even niche features like seccomp. A modular core enables FEX to be used as a WoW64/ARM64EC backend in Wine.

Used by the new Steam Frame (https://store.steampowered.com/sale/steamframe) which is an ARM64 Snapdragon 8 Gen 3 that will run PC and PCVR gaming titles.

cultofmetatron 2 hours ago

I'n incredibly impressed by valve's commitment to playing the long game. It makes sense to have the frame by arm since the system is lighter and its clear this is just the trojan horse to get arm linux into every gamer's house. I wouldn't be surprised if we end up with an arm steamdeck 1-2 version from now when the tech is ready.

  • sitkack an hour ago

    Too bad Arm doesn't allow architectural licenses, because this is exactly the kind of thing Valve and the FEX developers would want to extend the ISA to support. I bet we see a RISC-V backend to FEX in the next 6 months, it probably already exists in a private repo.

    FEX is the shootstring, extra special discount budget (not maligning) version of Rosetta. Apple should sell Rosetta to Valve.

    • jsheard 38 minutes ago

      My understanding is that Rosetta sidesteps a bunch of tricky memory model issues by using non-standard hardware extensions only present in Apple Silicon, so even if Apple did share Rosetta, which they certainly won't, it wouldn't work properly on Valves hardware anyway.

      • fooblaster 11 minutes ago

        yeah that is correct. The m series chips can turn on total store ordering memory model solely for Rosetta. There's also some hardware extensions to arm to support x86 condition codes in the hardware because it's way more instruction efficient that way.

    • geerlingguy 42 minutes ago

      Box64 already runs on RISC-V. Just, the available processors are so slow it's hard to even play 5-10 year old games.

    • JoshTriplett an hour ago

      > Too bad Arm doesn't allow architectural licenses

      QEMU exists. I doubt they want the bad press of suing an Open Source project everyone is using.

  • theoldgreybeard 38 minutes ago

    It’s amazing what you can do when you have a business that prints money hand over first and you have no obligations to shareholders.

fooblaster 9 minutes ago

How does fex deal with the fact that the memory model on arm is weak and x86 is total store ordering. It seems like would need to hammer performance by putting memory barriers everywhere to handle all cases. Perhaps fex only works when there are well defined mutexes it can gain visibility into? anyone know?

  • nialv7 a few seconds ago

    I think that's right, there is no better way than just adding barriers. On Apple hardware it can probably make use of the special memory ordering mode, but on normal ARM64 there's probably nothing it can do.