When it comes to emulator design, there's something to be said for trying to capture the workings of the original system as accurately as possible, warts and all. But there's also something to the idea that emulators can improve on the original hardware, smoothing problems like frame rate slowdown that plagued the underpowered processors of the day.
That brings us to the latest update for storied, accuracy-obsessed SNES emulator bsnes, which adds the ability to overclock the virtual SNES processor. While bsnes is far from the first SNES emulator to allow for simulated overclocking, it does seem to be the first that does so "without any framerate or pitch distortion, and without harming compatibility in 99% of games," as bsnes programmer byuu puts it.
Fast, but not too fast
Most SNES games were locked to a 60fps frame rate, and designers of the time tuned their games so the SNES hardware could maintain that frame rate. But in some in-game situations, when the screen got too full of moving sprites, the processor could fail to create the next frame within the 16.66ms window, leading to noticeable display lag.
Today's beefy PCs can of course simulate the SNES' Ricoh 5A22 CPU at a rate much faster than its original 3.58MHz. But because the system's games were designed with that particular clock rate in mind, that kind of overclocking has a tendency to speed up the video and audio, too, which can in turn make the games difficult or impossible to play (or even run, in some cases).
To fix this side effect, byuu borrowed a technique from elsewhere in the emulation community. "For many years, NES emulators had a method of overclocking where additional scanlines are added for the CPU for each video frame," byuu tells Ars Technica. "Which is to say, only the CPU runs on its own for a bit of extra time after each video frame is rendered, but the video and audio do not do so... This new(ish) overclocking method gives games more processing time without also speeding up the video and audio rates... and so the normal game pace of 60fps is maintained."
The result, for most standard SNES games, is the complete removal of the infamous frame rate slowdown that showed up when too many sprites clogged up the screen. Byuu has posted side-by-side video examples showing how this improvement shakes out in Contra III and Gradius III.
28 years later, hacker fixes rampant slowdown on SNES‘ Gradius III(Emulation fans may remember another slowdown-free version of Gradius III that was released in May. But while that version required extensive hardware and software hacking, the bsnes edition should work on most any SNES software without modification).
There are some limitations to this new overclocking method, stemming mostly from SNES cartridges' many enhancement chips. "SuperFX games are kind of a special case," byuu says. "Since they tend to not run at 60fps due to the demands of software rasterizing entire screens on the SNES, the game logic is designed around the frame rates. So even if you speed up StarFox, the game engine will appear to be running too fast now."
You can see this side effect in this comparison video of SuperFX title StarFox. While the game animates much more smoothly with overclocking enabled, the gameplay ends up noticeably faster as well, adding to the game's twitchy challenge.
"I suppose you can think of the SuperFX like older 80286 DOS games that run way, way too fast on modern PCs," he continued. "It's as if they don't have Vsync, and just run as fast as they can. This new overclocking technique can't really fix that: if you speed the game up, the game logic runs faster. But for most cases, you could assume they're more akin to modern games that rely on Vsync to keep a consistent, smooth framerate."
HD emulation mod makes “Mode 7” SNES games look like newLimitations aside, we're excited to have yet another example of an emulator that actually improves on the original gaming classics we remember. We'll happily throw this new overclocking fix in with HD Mode 7 smoothing, widescreen NES games, controller lag mitigation, and 4K upscaling for low-end HD games.