DEV Community

sholm
sholm

Posted on

What is Emulation (doing in the background)

Intro

In this DEV post I'm going to explain what emulation is, and what its doing in the background to get anything running at all. With some of the biggest headway in emulation happening in the past 7 years, emulation has come a very long way, but first we must ask.

What Is Emulation

Emulation is software that enables a computer system (called the host) to act like a different computer system (called the guest). An example of this would be running PlayStation 2 software on a computer's hardware.
Running old video game consoles on a computer is possibly the most famous approach to emulation, but virtual machines are also a form of emulation that are done fairly often in there own regard as well.

How Emulation Works

While not all emulators work in the same way, they all can be put into 2 different categories to give us a better understanding of what's going on in the background. That would be Low and High level emulation.

  • High Level
    High Level emulation is when our host replicates specific functions of our guest and attempts to piece together everything automatically. to be more specific, our emulator will have functions that communicate to our host's hardware to act as close as it can to the guest hardware. This essentially tricks the ROM(game) into thinking its being run natively. This method of emulations is great because the hardware that could run the emulation would just have to be slightly better then the native hardware. Since this is the case emulation of retro titles can be done all within a browser.

  • Low Level
    Low Level emulation is when our host software replicates the guest's hardware kind of like a virtual machine to get the ROMS running on the virtual hardware. This approach can be very important when these older games rely on a hardware bug of some kind to produce the same functionality each time. with a virtual machine being booted on startup each time, the hardware of the host would have to be several times greater then the guest hardware to run effectively without any slowdown or frame drops.

So to break it down,
HLE or High level emulation is when the host uses functions to get as close to the same result as the native guest hardware.
While LLE or Low level emulation is creating virtual hardware to be used by the rom to get the exact same result as if you were on the real thing.

Emulation On Newer Hardware

Emulation of a newer device like a Ps4 or Nintendo switch is still in development, and will most likely take multiple years before becoming anything close to playable for a vast majority of its library. Current versions of Ps4 emulation are impressively enough able to currently run 2d and indie titles (somewhat)perfectly fine with AAA titles having unplayable graphical issues. Current Nintendo switch emulation is also capable of running less hardware intensive games with more intensive ones most likely not even booting.

Conclusion

Emulation is an extremely important task for the preservation of older software and video games, and with so many incredibly talented people keeping software of many kinds alive to this day through emulation, but that does not mean that emulation should be used to illegally download operating systems like the ps2 bios or any roms found through the internet. There are many ways to legally get hold of your console of choices rom/bios file through backing up the data to a cloud that you own and inserting it into the proper file. I hope that this DEV post was helpful in understanding a bit more how emulation works and please check the "Sources Used" section to further your understanding.

Emulators to try

Depending on the type of software you want, your going to need a different emulator. So here are a few you can try out, but keep in mind there are many out there!

Sources Used

IGN - How emulators work
Academic - High level emulation
Bago games - How do emulators work, a beginners guide
Stackoverflow - how do emulators work and how are they written

Top comments (0)