-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VBI Overclock #13046
base: master
Are you sure you want to change the base?
Add VBI Overclock #13046
Conversation
21e517e
to
ffdae15
Compare
Implemented "secretly" multiplying CPU speed, and prevent <100% in Hardcore mode. I didn't test hardcore mode. In theory, the two might have this not-great interaction - with CPU Overclock at 100% and Hardcore Mode active, you reduce VBI overclock to <100%:
So a 4-level deep recursion. |
I'm not against this feature, but here's a few points. 1: We can add default cheatcodes/patches/etc. to GameINIs that users can enable/disable without having to go to the wiki to download them. If you were to add the framerate patches to the INIs (disabled by default, of course) I'm perfectly fine with merging that. Same with things like widescreen codes as long as they're verified to not cause serious issues, or if they do cause issues, to note them in the cheat description so users know when enabling it. Additionally - if this is going to secretly override the Emulated CPU clockrate, then we should probably disable/tell the user it's been disabled when this is enabled? Right now I don't know if I like doing it secretly. So yeah, separate from this pull request, we could start moving some wiki cheats/patches into Dolphin proper if we wanted, along with other things. I think Wind Waker has a few patches included by default if you're looking for an example of how that works. |
I threw probably ten 30fps Wii games at this. Hoping for bullet four. A majority of them were double speed, with a couple not changing speed at all. I'd say we'd have to see how many games this actually helps before deciding if it is worthwhile. EDIT: Reading samb's PR, I guess this is just enhancing the VI rate, so my results are expected. This does sound similar to the vbeam hack which was removed. |
I added a note in the description: "Also adjusts the emulated CPU's clock rate, to keep it relatively the same."
That hack could only double the VBI rate, and it was also touching audio timings. |
also trying lag the game same orignal hardware but keeps 60 fps |
I've been seeing your posts under my original VBI overclock PR and I'm not sure exactly what it's used for but it's really cool it works. One thing is I think that you should make it clear that people shouldn't go < 100% for performance reasons, because thats what VBI Skip does. VBI Skip effectively is like lowering the % to where it wont lag audio automatically, so setting it to 50% to avoid audio stutters isnt worth it compared to VBI Skip. But for increasing the frame rate I think this can be interesting. |
There are reasons to go < 100%:
Still, these two options should definitely be together in the UI. |
All VBI Skip does is skip over the current VBI interrupt if the computer is throttling, which is equivalent to lowering the %. The freezes occur when the CPU is too slow and no matter how many VBI's are skipped the computer can't stop throttling. I'd be ok with VBI Skip being moved next to the VBI Overclock, especially since it could better give context to what VBI skip does. I'm curious, would it be useful to make VBI Overclock configurable from a cheat code? i.e., a code is able to edit the VBI Overclock setting so that you could just have a "120fps" code? |
The code itself can't do it: AR and Gecko codes, AFAIK, are implemented at a low level. So, to achieve a "one 120 FPS checkbox and play", Dolphin would need a system to set multiple settings at once. (Whether a cheat code is enabled or not is a setting, after all.) |
ffdae15
to
ac7d77d
Compare
ac7d77d
to
1d379aa
Compare
Rebase of #11486, which seems to have been abandoned.
The highlight of this feature is the ability to play games at higher than 60 FPS, at normal gameplay speed, and without affecting the audio.
NFSNitro-144.mp4
(More videos on #11486)
This feature works, it's simple and non-invasive, and put formally, it is very cool.
However, the current user experience isn't the best.
Here are the current problems, with proposed solutions. I'm asking for feedback on the "IMO"s.
CPU OverclockA game with more FPS is obviously going to be more demanding for the emulated console, but if the emulated CPU clock doesn't change, then the console is basically going to be underclocked.
At best, this will cause the game to not run at the target framerate (which defeats the whole point).
At worst, the game will freeze.1
IMO, a simple solution would be that changing VBI Overclock will also "secretly" multiply the emulated CPU clock.Done!Cheat codes
There are different types of games.
3C888889
(1/60) with 1/DesiredFPS.So, the situation here is extremely game-dependent.
The golden standard for this is probably Cemu: its graphics packs, which are automatically downloaded, offer a choice of presets that patch the game and set the settings required to play at a specific framerate.
Dolphin could do something like it with its per-game settings, but... there can only be one per game. You can't "choose" a preset.
The discoverability of cheat codes in general is also bad. Currently, all "enhancement" cheat codes are only located in the Dolphin wiki, and must be manually inserted. This is in contrast to, for instance, PCSX2 and RPCS3, which do have patches included (for the former they are in a separate repo, for the latter they are scraped from the wiki).
This is a complicated issue, and affects more than this PR.3 However, because there are games that don't require this, I don't think that it needs to be tackled now, IMO.
Plus, giving cheat-makers the ability to cook these codes for the games that need it is valuable, even before the feature has good UX, IMO.
Where to put the option?
What this says: #11486 (comment)
IMO, it could be exposed exclusively in the in-game settings (like RPCS3)? That would make the options harder to discover for the users that shouldn't touch it, while allowing the cheat-makers to have fun with it.
Vsync
What if VBI Overclock makes framerate higher than the display's refresh rate, and Vsync is on?
Footnotes
For instance, Skylanders: Swap Force is affected by this. Do note that this happens when the emulated CPU is underclocked, even without VBI Overclock. ↩
Though, I guess being able to play a game in fast-forward without affecting audio is a use case, assuming the game doesn't depend on audio timings. ↩
Something I was thinking is, Dolphin currently has a problem in giving a user the choice of performance vs accuracy. The current situation is that performance is favored, and to get accuracy, the user needs to visit the wiki and manually apply the settings listed there. Whatever system is going to solve this could also be applied here. ↩