Question

I've been doing some reading about the people building an emulator for the Wii and it seems that given that it is nothing more then a beefed up GameCube, or the Nintendo64, so what makes build emulators for these systems so hard?

On a slight bit of a side note the hardware for these systems is surprisingly low:
Wii:
   729MHz PPC CPU
   88MB Memory
   243MHz GPU
N64:
   93.75MHz CPU (64-bit)
   4MB Memory

Was it helpful?

Solution

The CPU architecture for game consoles is often somewhat exotic compared with your average desktop machine. Emulation means to perform in software everything that the original hardware did. That is, while the original console may have had dedicated graphics, audio, etc. chips as well as a CPU with a different instruction set, the emulator must perform all the functions of these parallel resources at speed.

Unless the console's GPU is old, it almost certainly must be emulated on the GPU of the host machine, as modern graphics cards, even cheap ones, have many times the throughput (for graphics workloads) of even the most expensive multicore CPUs. Compounding this difficulty is the fact that communication between CPU, GPU, any other onboard DSPs, and memory was probably highly optimized on the console to take advantage of the specifics of the hardware configuration, and therefore these resources must be rate-matched as well.

Compounding all these difficulties, usually little is known about the specifics of the console's hardware, as this is kept very much under wraps by design. Reverse engineering is getting less and less feasible for hobbyists to do.

To put things into perspective, an architectural simulator (a program which can run, for example, a PowerPC program on an x86 machine and collect all sorts of statistics about it) might run between 1000x and 100000x slower than real-time. An RTL simulation (a simulation of all the gates and flip-flops that make up a chip) of a modern CPU can usually only run between 10Hz and a few hundred Hz. Even very optimized emulation is likely to be between 10 and 100 times slower than native code, thus limiting what can be emulated convincingly today (particularly given the real-time interactivity implied by a game console emulator).

OTHER TIPS

There are a number of reasons why emulation is difficult.

  1. Emulating a system requires a lot more power than the target system

Sometimes the host system needs an order of magnitude more power (speed) than the target system. This is easy to understand if you consider the host machine needs to do all the work of the original system and then some more work to manage all communication between components while also sharing the system resources with other applications. This is why it takes a 2GHz processor to faithfully emulate a SNES which runs at a measly 21MHz.

  1. Sometimes the instruction sets and/or subsystem workings are unknown to people

Most hardware is essentially a black box and understanding how it works is figured out through reverse engineering which takes a lot of time and patience. Not to mention, companies try their best to make reverse engineering difficult and companies have gotten much better at this post Playstation 1 era.

  1. Lack of people building emulators

Emulation is a pretty niche area that requires a lot of working knowledge in many domains. To be frank, there's not a lot of people capable of emulating many of the modern systems. Emulating these systems takes a lot of time and effort and only the most dedicated will actually do it.

Writing emulators is hard because you must exactly/completely/absolutely replicate said hardware behaviour, including it's OS behaviour in software.

Writing emulators for older consoles was in some cases harder than writing emulators for modern consoles. Because, a lot modern consoles use some form of Linux or *nix so once the hardware is emulated software is a matter of dumping the machine's bios and handling over control.

Older consoles did everything in hardware, which means that reverse engineering played a much bigger role. You needed very good low level hackers to help you document how the old console worked and what each magic number meant.

Today, there's less magic numbers but instead standard GFX cards and CPUs. Although modern hardware has a lot more instructions and shiny doodads to emulate. A lot of what the more modern consoles do is well documented, unlike older consoles.

It is just because the game program is written for that particular hardware so it can utilize its all of the hardware benefits. Even if you have a super computer it cannot run properly a particular programs which cannot communicates to the hardware of the super computer itself. The same situation if you run PC games on consoles such as PS3/4 or xbox One. The only emulator that works 99% is Snes emulator and PS1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top