libretro/mupen64plus-libretro-nx

Fix/clean up overclocking options of the core

Tasosgemah opened this issue · 4 comments

As it is now, there seems to be no way to reliably overcklock the emulated system as much as needed for some games to run at 60fps consistently (Goldeneye being the test game).

I know Goldeneye (and PD) can run at consistent 60fps in Pj64, by using the 3x overclock, which practically means the N64 gets 3 times faster, which is enough for the desired result.

But there is no way to do this on RA/Mupen. No matter what i do, the best result i can get is the game running at 60fps in some areas and slowdown to almost the original frame rate at some more intense situations. You can test this in the very first level. The game starts at 60fps but after you exit the first tunnel (where everyone shoots at you) the game will slowdown no matter what option or combination of options you choose.

I tested this on 2 different PCs. One has an i5 4670 and a 1060 GPU and the other has a more modern AMD CPU (don't remember the model) and a 1660 GPU. I'm using GlideN64 to make sure the emulation is as fast as needed.

Another problem is that there are a lot of options that seem to be related to overclocking but it's unclear how they work. Most don't seem to have any effect.

  • The “Framerate” setting with “original” and “full speed” options.

  • The "VI Refresh (overclock) setting with “1500”, “2200” and “Auto” options.

  • The “Count per OP” setting with 6 different options.

  • And the more recent “Count per OP divider (overclock)” that has 11 different options itself (that don't seem to make a difference after a point).

This creates a confusing situation where you don't really know which option does what and how one affects the other. I tried a lot of combinations and the results are very similar but never good enough. It feels like there are a bunch of useless options cluttering the menu. Doesn't help that the explanation text under these options seem to be directed to programmers and not the end users.

So, i opened this issue in hope that all these things gets more clear and figure out what to use for the desired, consistent, 60fps frame rate in unlocked games. Or even better, replace all the clutter with some more practical options like 1x, 2x, etc, so we can better test how faster we want the system to be.

Wouldn't that though interfere with mupen-nx's goal of a shallow fork?

Wouldn't that though interfere with mupen-nx's goal of a shallow fork?

Not sure how a more sane and simpler overclocking option that actually works would interfere.

Well timing can depend on various things:

  • as you said, the counter factor
  • the count per scanline
  • the VI refresh count
  • the timing for interrupts
  • the AI bytecount/rate

At least thats what I see when PJ64 alters timing at least. I could be wrong. Having those configurable might involve deep changes?

True, PJ64 does have most of these options you mention. But you only need to change 2 of them to achieve a "linear" or steady overclocking. At least on the build i use, not sure if other builds have different defaults.

The defaults seem to be like so:

  • Counter factor "2" (or "0" for reading the value for each game from the ini)
  • VI Refresh Rate "1500"
  • AI count per Byte "0"
  • Overclock modifier "1"

In order to overcklock the N64, you first need to set Counter Factor to "1" which is the faster response option so to speak. This was always the case and by changing that alone does make many games react faster anyway.

After that you only have to play with the Overcklock modifier. "2" means the N64 should run twice as fast. "3" three times as fast and so on. That boost is consistent and doesn't depend on the game scene. If you set it at "3", the N64 should always run 3 times faster at all times, which is enough to brute force all single player scenarios in Goldeneye, including the most intense ones, at smooth 60fps. That's the result i'm getting with PJ64.

That's it, you don't have to ever mess with any of the other options. It's pretty simple.

I never managed to achieve the same result with Mupen64+Next, despite having so many options to play with (counter OP divider has 11 different settings but there's no noticeable difference after 4 or so).

And whatever boost you get doesn't seem to be consistent/linear either. For instance, if i set the OP divider at 4 or any other number up to 11, Goldeneye starts at 60fps but when i get to a heavier scene, the frame rate drops at almost the original levels, as if i'm not even using any overclock function at all. It's like the function gets disabled when it's mostly needed.

So i thought maybe i'm missing something and i have to change the other options, for instance change the VI to "1500" instead of the default "auto" to be on par with the PJ64 default. But there is no difference in the result. Though if i use "2200", the game does run at 60fps at all times, but it also runs in fast forward, that is, the game speed is wrong.

I tried a lot of different combinations but never managed to find the magic one that works. Maybe someone else can find the correct settings? Or explain what each of these options do in practice so end users can figure it out themselves? Maybe simplify the settings that have to do with the function so you don't mess with unrelated things for no reason? Or maybe the overclocking isn't working properly at all in Mupen and needs a fix/overhaul?