What is emulation ?

    1

Fri Apr 07 2023

What is emulation ?

Introduction

Emulation in a general way is the fact of recreating the behaviour of a specific hardware (e.g. a video game console) by transcribing its functioning to run the games (or programs) developed for this hardware, on another type of hardware initially not compatible (e.g. a computer, a smartphone).

emulation

Emulation will often try to reproduce as closely as possible the original behaviour in a more or less successful way. It may slow down the game if it lacks power or requires optimisation, but it can also improve the result, for example by improving the fluidity of a game or its graphic quality for a more modern and pleasant rendering.

This emulation can be done in two ways, software emulation and hardware emulation.

Software emulation

This is the most common form of emulation. In this case, a program (an emulator) will be developed, which will transcribe the behaviour of the original hardware into a language that your computer can understand.

This is what is found in Recalbox, all versions, on all media (Rapsberry Pi, PC, Odroid, etc.).

Recalbox

But it can be found in other contexts. If we stay in the field of video games, for example, on the Nintendo Switch Online service, which includes access to old games, these run on emulators developed for the Nintendo Switch. This is also what Sony uses to run older generation games (notably ps1 and ps2) on their newer consoles.

Hardware emulation

This form is much less common because the hardware required is expensive, and the work to develop an emulator is more complex than software emulation.

Developers usually rely on FPGAs (Field-Programmable Gate Arrays) which are chips containing programmable logic, which are programmed to behave exactly like the original hardware.

FPGA

This is what is found in the DE10-Nano board (a small board like a Raspberry Pi but including an FPGA) which is used as part of the MiSTer FPGA system for console emulation.

DE10-Nano

On what basis are emulators created

As you will have understood, emulators will try to recreate the behaviour of the original hardware as well as possible. Depending on who develops it, several sources of information are used to create and improve these emulators. There are two main cases.

Documentation of the original architecture

One can rely, if one has access to it, on the architecture documentation of the original hardware. The disadvantage in general is that these documents are rarely public and therefore often the only ones who can use them are the manufacturers of the original hardware. It is however the easiest way to replicate the original behaviour.

This is what is usually used by manufacturers like Nintendo in their emulators. This statement is not always true depending on the manufacturer and the documentation they have left from the time.

Swtich Online

It sometimes happens that some of these architecture documents leak and end up on the internet, against the will of the manufacturer. Emulators available to the general public on the internet, such as those present in Recalbox, do not rely on this information, as there is a high risk of being illegal due to the fact that they are stolen documents.

Retro-engineering

This is the case that we will encounter on Recalbox and on all emulators developed by individuals or teams of enthusiasts, without the agreement of the original hardware manufacturer.

For the development of the emulator, the developers will do what is called retro engineering and will therefore simply rely on what is publicly available, mainly the original hardware, and sometimes its software (firmware or bios) which may have been extracted from the hardware.

This involves analysing this to deduce the behaviour, both at the hardware and software level. This may sometimes involve completely dismantling the original hardware, or occasionally even destroying certain chips in a controlled manner to observe them in detail.

Is it legal

Justice

The legality of emulation will depend on the laws of the country you are in.

For example, in Japan, the laws are very protective of manufacturers in this aspect and emulation of old video game consoles is totally forbidden (apart from the one proposed by the manufacturers), and all Japanese youtubers and streamers for example have to play only on original hardware.

In many other countries, like France or the United States, emulation is often legal, and the usage of roms will be conditioned to the different laws, or if the copyright owner has given you the authorization to use it (sometimes with payment).

This will be the case for the games included in Recalbox for free, for which the authors have kindly authorized us to redistribute them. You can find the list of these games at this address

Sometimes manufacturers even use what has been developed by the community in terms of emulation, such as Sony and its Playstation mini, which itself uses an open source emulator: PCSX ReARMed.

Bios

The bios is a firmware that corresponds to the software loaded on the hardware and allowing the console to operate. The bios is generally a proprietary software of the hardware manufacturer and cannot be provided with the emulator publicly if it is necessary.

Bios

Some of these bios are freely accessible, such as those included in Recalbox, and the others remain private data and it will be up to you to extract them from the original hardware.

However, they are not always necessary for the emulators to work properly, some developers have succeeded in reproducing their behaviour in the emulator's code, always by reverse engineering.

Roms, Roms quality and groups

A ROM (Read Only Memory) is the program containing the game you wish to play. It is necessary to play the game via an emulator. It can either be extracted from the original media (cartridge, disk, etc.), or be read directly by the emulator, provided you have the right equipment.

For those of you who retrieve roms from the internet, you should know that, depending on the extraction method used, the roms are not always a perfect image of the original media, and therefore the quality of the emulation may be impacted or not work at all with some poor quality roms. Some roms have also been modified by teams of dumpers (those who extract the roms to publish them) to insert their signature in the code or even add an additional intro to the game.

Some groups of enthusiasts have also set themselves the goal of developing methods to extract roms from the original media, without altering the content, in order to help preserve these old games, and the video game heritage more broadly, and to catalogue them.

For example, the no-intro group started this project because of the dumpers who were adding intro to cartridge games (hence the name of the group).

Groupes

More information about these groups can be found in our wiki at this address.

Quality of emulation

Emulation of a system is rarely perfect because you are trying to reproduce the behaviour of the original hardware on a completely different hardware. Some emulators have greatly improved in quality over the years of development to have a rendering extremely close to the original, especially for emulators of consoles dating from the 16-bit and previous generations.

However, some hardware being more complex from a hardware architecture point of view, and also more recent, for example the Sega Saturn and the Nintendo 64, the work for the developers is more consequent to arrive at a result close to the original.

Below, for example, on the left is an image taken directly from a Nintendo 64 and on the right is an image of the first public version of the Nintendo 64 emulator for the Switch, on the game Zelda: Ocarina of time, you can clearly see the difference in the treatment of the fog and the rendering of the water.

Zelda 64

Lesser known or less popular consoles are also often less well emulated because fewer people are looking at them.

It may therefore sometimes be necessary to use different emulators for the same console depending on the game you are playing in order to have better compatibility.

Emulation and Recalbox

Recalbox relies of course on these emulators to integrate the consoles, some of them are even developed by members of our community or our developers.

To integrate an emulator (or core) in Recalbox, we impose some rules on ourselves. The emulators we integrate must be open source, just like Recalbox is, and we only add to Recalbox consoles whose commercial life is over. Finally, we only integrate an emulator if its overall performance is correct for retrogaming in good conditions.

For the same console, you will often see several cores appearing, which we make available to you in order to increase the chances of finding the one that will make your favourite games run as closely as possible to how they run on original hardware.

The world of emulation being in constant development, Recalbox's mission is to test and offer you the latest versions of the best emulators.

Emulation
Recalbox
User
by kid