EMULATION BASICS
What’s inside the box? Another box…
OTHER THAN THE EMULATOR, you usually need two things: some ROMs and a BIOS. “ROM” is a blanket term for programs you want to emulate. Although it should refer to an image of a system’s Read Only Memory chip, it is often used in the context of normal disk images that can be altered. Either way, you search for ROMs on specialist ROM sites. The BIOS is another blanket term for the program responsible for controlling the machine.
Distributing ROMs is generally illegal, unless there’s a license that allows it—the exact legality varies between territories. Dumped copies of a system BIOS are legal under US law as long as the user owns the original machine. As you will see later, some emulators have their own substitute BIOS, which anyone can use legally and for free, developed through a process of reverseengineering, though usually at a cost of emulation accuracy.
SOME WINE? If you’ve used Linux for any decent length of time, you’ll have come across Wine. Wine lets you run Windows programs on Linux, but as any smarty-pants will tell you, Wine stands for “Wine Is Not an Emulator.” So what is it, then? Wine is what’s known as a compatibility layer. Compatibility layers take system calls from the foreign application and translate them for the native system.
For instance, if you’re running Microsoft Paint and click the maximize button, it sends a signal to the OS (a system call) to maximize the window. If you were running Paint in Linux with Wine, when you click the maximize button, Wine simply takes that Windows system call and substitutes it with a Linux system call.
The result is that rather than running a program under a Windows emulator, you are running the program natively as a Linux application—the main benefit being speed. Compatibility layers don’t stop there. Another variant is what’s known as a wrapper, which translates one kind of driver API into another.
For instance, in the late 1990s, 3dfx Voodoo cards were extremely popular for 3D acceleration. Although these cards supported OpenGL and Microsoft’s Direct3D, 3dfx had its own proprietary Glide API that would guarantee the best performance with its hardware. This is often called a wrapper.
With its deep pockets, Valve was able to build upon the existing Wine codebase with its own functionality. By changing from OpenGL to the new Vulkan API, Valve implemented huge performance gains, making conversion between Microsoft DirectX 12 and the Linux desktop genuinely viable. Although it’s still relatively early days, around 53 percent of Windows games work so far, giving Linux gamers an enormously increased library.