Why do old emulated games still suffer from slowdown and lag when they run on modern computers?


Why do old emulated games still suffer from slowdown and lag when they run on modern computers?

In: 36

Bumping. I’d also love to know why this is the case. I was playing Bloons the other day and sure enough it was lagging. Very interesting. So yeah. Hopefully this doesn’t get deleted by the auto bot.

I think alot of it just has to do with the back end of the game. The coding essentially. What the game was wrote on was high speed at the time. The technology in your computer didn’t exist yet

Instruction Set Translation.

If I ask you to read a letter I wrote in your native language you’ll be able to read it fast and without mistakes. If I write it in a language you don’t know, you’ll need to translate it into your language first, and you might make mistakes.

This is the same process that takes places when emulating games. The language of the original game is written in an instruction set the current CPU cannot understand. The translation from one language to another is expensive. This overhead takes more processing powering and can result in slow downs.

The short of it is that old consoles used specialized hardware for different effects. And they needed to to get playable games with slow clock speeds.

All that stuff happens in parallel in the background, in hardware not depending on the actual console cpu to do stuff. And lots of it happens asynchronously or with wierd timing that needs to be reverse engineered by poking at the hardware.

Like the SNES despite being only 25MHz had something like 5 separate purpose built processors, and some extra coprocessors types that lived on the game cartridge.

On a modern computer though you need to emulate that specialized hardware. Each bit of hardware you try and emulate takes up processing time. Eventually that just adds up and you can’t do it all without a lot of CPU power.

Here’s a good article on the SNES stuff specifically.

Old consoles have CPU running synchronized with video and audio chips. Some games depend on the exact time of code execution to issue commands in the right time. Games can, for ex., change graphics settings in the middle of frame drawing – this can produce visual effects, that the video chip cannot do on its own. Emulator, of course, have to simulate all delays, because they can be meaningful.

Example: Super Mario Bros. has scrolling levels, and a status bar, which does not scroll. But NES’ video chip can only scroll the entire screen. So, the game sets 0 scroll, waits until the last line of status bar is sent on the TV, and then changes the scroll. But for that the program on the CPU must be able to keep the time somehow. NES doesn’t have timers, so the game can only rely on instruction timings for timekeeping.