Emulation Decompiled

What emulators need: The game side

If you want to emulate a retro video game, you of course need a game to emulate. But how do you get a game, if you can't buy yourself a disc or cartridge for it? You need a ROM. Short for read-only memory, this is basically just the source code and data for the game that get stored on the disc or cartridge.2 A ROM is useless on its own, though. It’s written to work for the original console, so it can’t just be run on any computer.2 This is where the emulator comes in. As the name suggests, it emulates, or mimics, the original console and its functions.

The physical component in which ROM data is stored

What emulators need: The console side

One of the major things that needs to be emulated, particularly for newer consoles, is something called a BIOS. This is short for Basic Input/Output System, and it basically acts as the operating system of a console, handling the interactions with the hardware. The hardware itself gets emulated as well. You need code to perform all the functions of parts like the CPU, memory, and many other assorted parts.2


Some simple examples of how to replicate these pieces of hardware are a loop for the CPU and an array for memory. For as long as it has power, the main thing the CPU must do is interpret and run instructions. Meanwhile, memory is just a way to store values. An array is just a way to abstract and structure memory, so of course you could use an array to mimic memory for an emulator.2

Sources

  1. https://scholarlycommons.law.northwestern.edu/njtip/vol2/iss2/3
  2. www.retroreversing.com/how-emulators-work