How translation layers are changing the computing landscape and making it better for everyone

url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url

In the computing world, translation layers have become a key technology that has changed the way we interact with technology today. These layers, which essentially allow software to run on hardware and operating systems it wasn't designed for, have become a crucial part of cross-platform compatibility. Not only do they help preserve legacy applications, but they also democratize access to software no matter what machine you're using.




Today, translation layers come in the form of software like Rosetta 2 on MacOS or Proton on the Steam Deck, but translation layers have a lot to offer that makes them some of the most interesting and important software being developed in 2024. The long history of translation layers really took off in the 1990s with the release of Wine (originally WINE, which stands for Wine Is Not an Emulator) and Wabi by Sun Microsystems.

Translation levels, how they work and their history

Think of it as languages

Opening a Windows app in Wine


If you think of computers and operating systems in terms of languages, translation layers essentially take software designed for different types of machines and software and translate it in real time for what you actually want to run it on. This concept has been around for quite some time and is different from emulation. Emulation tries to recreate the correct conditions in a virtual environment for the software to run in, whereas translation takes place between the software and the computer, redirecting each instruction to the machine to the appropriate place on the operating system where it will run. Strictly speaking continues.


Sun Microsystems' Wabi was developed for Solaris, a Unix operating system, and was designed to run applications written for Windows 3.1, Windows 3.11, and Windows for Workgroups. It implemented the Windows Win16 API and interpreted and translated instructions so that software developed for Windows would run on its own operating system. The same year, Wine was released, inspired by Wabi and the Public Windows Interface, an attempt to fully implement the Windows API in the public domain as an ISO standard.

Originally aimed at 16-bit Windows 3.x software, Wine implemented support for and translated Windows APIs. It translates Windows API calls into Portable Operating System Interface (POSIX) calls while also recreating a Windows directory structure and providing alternative implementations of system services. Wine does not use emulation or virtualization to run Windows binaries.


Essentially, applications written for Windows can only run on Windows because they use the Windows API. Applications like Wine understand what these applications are looking for and what Linux equivalents they have. Wine runs the application and redirects everything the application needs to Linux equivalents, while running the background software that the application also expects from a normal Windows system. There is also no need for emulation or a virtual environment.


For example, imagine that a Windows application needs to create a message box on the screen that contains information for the user. This calls the MessageBox Windows API, but a Linux machine obviously does not understand the Windows API. Wine sees the request to create a MessageBoxand understands that the equivalent on Linux machines (via Xlib) could be XCreateSimpleWindow. It then understands that the parameters used to call the MessageBox under Windows can instead be taken and passed on to XCreateSimpleWindow. As soon as the user interacts with it (for example by clicking a button), the result goes back to Wine and is translated back into a format (by the MessageBox function) that the application expects from a Windows computer.


How translation layers are changing computing

The Steam Deck and Apple Silicon are examples of products that are not possible without them

Bedrock Minecraft runs on Steam Deck

The Steam Deck and Apple's latest Macs are examples of products that rely heavily on translation layers, although the latter isn't so much the case these days. The Steam Deck uses Proton, a translation layer built on top of Wine. Proton predates the Steam Deck by a few years, having first been released in August 2018. At the time, Valve said that “Windows games that don't currently have a Linux version available can now be installed and run directly from the Linux Steam client, complete with native Steamworks and OpenVR support.”


The other side of Proton that is essential to the gaming equation, however, is its ability to translate Direct3D API calls. It includes DXVK, a Vulkan-based translation layer for Direct3D 9, 10 and 11, with support for Direct3D 12 via VKD3D-Proton, a fork of VKD3D from Wine. This means that games can run on a platform they were never intended for, as it takes those direct feature requests and translates them into equivalents that work on Linux.

While all of this comes with a performance penalty, it's nowhere near as much as virtualizing Windows 11. In fact, some people have even found that games run better in Proton on Steam Deck than Windows on Steam Deck, as the computational overhead of running Windows on Steam Deck can outweigh the performance loss from real-time translation. Elden Ring is an example of this.


A MacBook with Cyberpunk 2077 via the Game Porting Kit and Rosetta 2

Source: Sydney Louw Butler / XDA

This means that hardware developers no longer have to pay Microsoft to license Windows on a gaming handheld or other machine, as a translation layer ensures that the games run reasonably well. It also allows for a growing competitor to Windows, as gamers may switch to Linux since games can finally run on the platform. A growing player base on a rival operating system encourages developers to compile their games natively for that operating system, which will Overall, it offers better performance and is ultimately less demanding for the end user.


However, Rosetta 2 is a whole different caliber to Proton, and that's because the translation is different. Instead of translating from Windows to MacOS, Rosetta translates from x86_64 to Arm, ensuring that your programs that ran on older Intel-based Macs can still run on your Arm-based one today. It's a complicated process because the translation is done at the processor level.

Without translation, your Arm-based Mac's processor wouldn't understand applications designed for Intel-based Macs. And the Arm processor would either not understand instructions intended for an Intel CPU or might perform a different operation because the same binary code represents different instructions on each CPU.


It is a marvel of technology

Bring Your Game to Mac, Part 1_ Make a Game Plan _ 10123 _ WWDC 2023 3-34 Screenshot

Apple released the Game Porting Toolkit in June last year, which allows developers to quickly test their games on the Mac to see how well they run. On the surface, it works similarly to Proton on the Steam Deck. It uses Wine as a base to translate Windows API calls into POSIX (Portable Operating System Interface) calls and then translates DirectX calls into Apple's Metal API. Wine recreates a Windows directory structure and provides alternative implementations of system services. It does not use emulation or virtualization to run Windows binaries.


What is even more amazing, however, is that unlike Proton, there is an architectural conversion here too. These games still run on Apple Silicon, so they are not only developed for Windows, but also for x86_64. It must take another Step to convert x86 to Arm, that is, you convert from x86_64 to Arm, from Windows API calls to MacOS API calls, and from Direct3D calls to Metal. The fact that games work at all is impressive, but what is even more amazing is that these games run very well. I was able to play Cyberpunk: 2077 for quite a while at the time, along with Spider-Man: Miles Morales.


So software translation is clearly changing the way we think about computers today. Not only does it force developers to think about other systems when developing their apps and games, but it also means consumers can freely switch platforms without fear of losing access to the apps and games they use every day. It's the only reason the Steam Deck can exist in this form, and it's a big part of what made the transition to Apple Silicon so easy. Software translation is an incredibly important and exciting development that will only get better with time, and I'm excited to see how it improves over time.

Leave a Comment