I’m not asking why emulators run slow in general. I know there’s a performance hit when you’re faking being another OS. That’s not what I’m asking, but that’s all my web searching results.

I mean the game plays fine until it gets to a certain point in a certain level that I remember running slow all those years ago. Like there are 20 enemies on the screen or something and that’s the same way the NES would lag 40 years ago.

The emulator is on my PC, which has orders of magnitude more power. Even accounting for emulation’s inherent performance hit, it seems like it should be able to handle it.

  • @[email protected]
    link
    fedilink
    72 months ago

    The thing is, you don’t want to “fix” that.

    Your x86 is a supercomputer from an alien world compared to an NES. It’s not just extremely faster, it works in entirely different ways physically.

    Some features of old console games rely on a deep understanding of the entire hardware of the console. As you wrote the game in assembly language, talking directly to each individual hardware component, you had to follow certain rules from the operating manual. There is no operating system doing this for you. Now, what happens if you don’t follow the manual strictly?

    There is some undefined behavior that still works reliably, if you just get the timing for a certain instruction to a component just right.

    If you now were to naively interpret the instructions in an emulator, even at exactly the right timings according to the frequency of processor, the game would suddenly be broken, because your emulator is missing micro corrections for signal delay that the original console had due to physical properties.

    So even making the game run as it would on the console is a major challenge.

    If you add optimizations in one place, because of your one level stuttering, it might break dozens of other games. The emulator doesn’t want to be a software to play your game as well as possible. The emulator wants to replicate the way the original console worked as perfectly as possible. Your game stuttering exactly the same way as you remember it is a sign of a good emulator.