View Full Version : Future of emulation?

May 10th, 2005, 09:50
It seems Intel and AMD are mainly focussing on multiple cores to get more performance rather than higher clock speed.

How do you think this will influence emulators?

My view is rather pessimistic. To emulate 1 core, you will need a much faster core. These much faster cores may not exist anymore in the future. PCs in the future may have MORE cores than the consoles, but not FASTER cores.

The only way to emulate a core in the future is to use multiple PC cpu cores to emulate 1 console cpu core. This is however a very difficult problem. People have tried to build compilers for instance that produce parallel programs without the programmer worrying about multiple threads. This has not yet been very succesful. The emulator problem is equivalent, I believe.

On the other hand I do not know much about emulation. Maybe high level emulation provides some possibilities.

There are some gamecube and xbox emulators around, but they are not yet fast enough (and not compatible enough, but that's another story) to emulate at full speed. I guess they are mainly single threaded. In the past we would simply wait for faster CPUs and within a few years the emulators work fine. With the current multiple core direction Intel and AMD are going, this may not happen. So Dolphin and other may NEVER get cpus that are fast enough to run them.

May 10th, 2005, 10:43
Intersting, I agree some ideas from you. Anyway, I'm not such as pessimistic, the CPU clock speed it's of course a important feature, but processing power not only depends by clock speed. Multiple cores might have more CPU power than a faster but not so complex CPU. For example, it's been said the IBM G5 64-bit CPU has more processing power than any Intel or AMD x86. Consoles are going multi core, too: PS3 cell processor and Xbox 360 IBM G5 based CPU. Newer consoles are depending more and more of GPU power, that's the most important bottleneck about emulating last gen machines such as GC, and the progress of PC GPU with newer architectures as PCI-X it's very far from the limit.

May 10th, 2005, 11:16
The extensive use of GPUs in modern consoles also add a lot to the complexity of emulators I guess. Fortunately, we are not yet at the point where GPUs go multicore. So for them we can still try to emulate a old GPU on a modern one (1 on 1). As soon as this changes, GPUs will run into the same problem. Actually recent developments like SLI suggests even multicore GPUs may occur not that far in the future...

May 10th, 2005, 12:00
The bottom line here is that emulation has a strong foundation and future.

To assume technology progression would KILL emulation is foolhardy and misinformed. Consider this. The Nintendo Entertainment System (aka Famicom) came out in 1983. It took 14 years before we even saw the first PC based NES emulator, yet today fucking 1337 kiddies scream and bitch if an emulator for N64 or PSX isn't perfect by now.

Amazing if you ask me. Fucking amazing. I think NES emulation still isn't 100% either. Genesis is coming damn close with Kega Fusion (screenshot feature Steve, screenshot key damn you !!) In another 14 years we will probably be emulating the next best system that just came out a few months earlier or something...

Hell, with any luck in another 14 years, Old Skool Games will be doing reviews on the newest next-generation consoles that we are going to be hearing about soon, and kids will once AGAIN be reminded of their gaming roots by us, featuring reviews for such games as Gran Turismo and Halo

May 10th, 2005, 12:26
I don't say multi core cpu/gpu will kill emulation. I only think it requires a new approach, with some hard unsolved problems to tackle (that's why I'm pessimistic). I don't know if any people here have experience in developing emulators, but I would be interested in their opinion.

May 10th, 2005, 12:50
You're out of luck pretty much. No one here I know of has ever worked on one
I still don't see multi cores being a problem. Once the procedure on how to program for multi cores and how they talk to the hardware are determined, it will be no more difficult than it is now.

In the sense that it may take more people with more skills, and some unique solutions, then yes it could imfuence development for a short period of time. There is really no need to be pessemistic or negative about it in any way however.

May 10th, 2005, 13:54
"I still don't see multi cores being a problem."

The problem is as follows:
One of the cores in the console executes a series of commands. The emulator needs to execute the same series of commands to achieve the same effect. And the emulator needs to execute this series of commands in the same amount of time. The system running the emulator may not have exactly the same commands available in hardware as the emulated system. So the emulator needs to translate the console commands to commands the system running the emulator understands. This takes time. To still finish the series of commands in the same time as the console, the system running the emulator needs to be faster than the console core. The problem is that it seems the cores in PCs do not gain a lot more speed anymore, so 1 PC core can perform about as many operations as a console core. To still finish the series of commands in time, the PC needs to use multiple of its cores to emulate 1 console core. It is simply the only way to finish in time.

The problem is: how does the emulator decide to distribute the commands over the cores? If the commands are unrelated, there is no problem. If however the order in which the commands are executed is important, there is a problem. One of the cores may need to wait for the result of another core, before it can continue. This may take a lot of time. So the trick would be to avoid the situation where a lot of time is lost by waiting. Unfortunately there is no way for the emulator to know how to do this in general.

If we are lucky the individual commands are of a rather high level and require a lot of work. Than the emulator can distribute the work of a single command over multiple cores. This simpkly requires some clever programming and should be possible. That's why I suspect something with high level emulation could be helpful.

If the individual command understood by the emulated console are simple, then they should probably be executed by a single core on the PC too. Then the only way to finish the series of commands in time is to cleverly distribute the commands over the cores. This is a problem for which currently no good solution is known.

May 10th, 2005, 15:18
The way are you thinking clearly points to HLE, which increases performance at the cost of accuracy. That's why offcial Mame would never go to HLE, as it's not "pure" emulation. However, newer and not so new arcade boards are using almost the same, I'd say the same hard & soft than any current PC (Taito Type-X (http://www.system16.com/taito/hrdw_typex.html) comes to mind). If emulation it's preservation, thre's no problem for me about when it's emulated, so if Mame team doesn't consider HLE necessary because of accuracy, then won't be any problem to emulate those machines. I'm pretty sire they have already thought about it, and if that's not a problem, console emulation it's not so different. Sony , IBM & Toshiba announced they gonna use the Cell Processor (PS3) architecture for common computing tasks, it's power & complexity would be overtake by PC/Mac machines not so far.

May 13th, 2005, 17:53
"...at the cost of accuracy"

Well I guess in this case accuracy can be a little misleading.

In software series of commands (operations/instructions, like moving a piece of memory or multiplying 2 numbers) can be grouped together to perform a well defined task, like opening a file or calculating a square root.

The idea of HLE would be to skip the level where you emulate the hardware, but emulate those well defined series of commands. This obviously gives more freedom in the way the task is performed (if you recognise the game wants to calculate a square root, you calculate it on your computer directly, rather than follow the exact intructions of the game that were intended for the console).

The advantage is that you gain some speed, the disadvantage is that it becomes harder to be compatible with all games (there may be a lot more high level tasks than basic instructions). This is not necessarily less accurate, but in practice it may be less compatible because it requires more work.

I guess the reason the MAME people can afford this approach is that they mainly emulate very old systems.

Anyway, I guess my initial post was too pessimistic. I realised many more approaches to play old games on new hardware are possible. You could for instance try to translate all console instructions in the game to instructions understood by your new hardware. This may not be easy and it may take some time. But after the translation you can run the game as if it was just another executable for your hardware, without bothering about time consuming "on the fly" translations anymore. You only need to translate it once and then you can play it as many times as you like.

May 13th, 2005, 22:13
Mame doesn't use HLE because they consider it's not as accurate as emulation should be, as you told HLE it's not possible for a big range of emulated systems, and with a line x line engine it is: You can only be completely accurate like this. Aaron Guiles show in its Radikal Bikers emu what can be achieved by using HLE with Mame, to show its code with a bit of work can be really fast, but they doesn't care about speed because if some driver works slow now, will work at 100% fps in the future: That's what I mean, computers processing capabilities will grow anyway, so achieve speed with a line per line enigne it's only a matter of time by Mamedevs point of view.

About instructions translation, well, should be a hard task and I'm not sure about if it's actually possible whitout a omionus effort. In in multi system emulator like Mame I think it won't be possible to mantain the core compatibility, remember it's a continuosly ebolving system and the drivers should keep easier as possible integration. The authors of some Xbox emu are trying what you said. It's very interesting anyway ;)