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 TickSource-based turbo mode #6456
base: master
Are you sure you want to change the base?
Conversation
It should not be static at all, it should have a separate multiplier per
Should be in CPU tab IMO.
No, it should be in hotkeys since it is a hotkey, not regular controller button binding.
Does it need a default hotkey? If it's not something most people will use I think it's fine to be unbound by default. Just answering some of the questions, I didn't look at the code yet or the overall approach. I think this is usually called "Speed Hack" (or at least Cheat Engine seems to have a similar setting that they called that). |
Moved the setting to the CPU tab (Put it under a "Hacks" header), removed the global, and made the hotkey unbounded by default |
Here's a video of what it looks like in action in ys origin: Ryujinx_G1rF89lbBh.mp4 |
Some open questions I had after testing this feature:
|
I personally mostly use features like this for short periods of time on most games (e.g when moving in a straight line, since maneuvering at a higher speed can be very hard, or when speeding up a short battle animation mid fight, etc) which is why I made it a hold. I'll try adding a setting to switch between "hold" and "toggle" for now in case that ends up the desired behaviour.
I think this might be what peri meant by "if this is added, it should also increase the vsync rate". I agree it's not entirely clear if this should be the same setting. I should mention that on at least one game I've tested (Xenoblade 1 DE) speeding up TickSource increased FPS, even with VSync on. Ryujinx_fzkEHkFJGa.mp4
I've run into cutscenes that were not sped up with this change in games that normally were, I assume that is related to either video decoding or audio playback speed, so there might be a benefit to implementing something like this in some games? I personally enjoyed being able to play games sped up without butchering the music (Which was my prior experience on GBA emulators), so if added it should probably be a toggle. I'm not sure if the potential benefit is worth the effort and the settings screen real estate. |
This PR adds a hotkey that, while held, toggles on a "turbo mode" flag that multiplies elapsed CPU TickSource ticks, which should speed up any games that use delta time between frames for physics calculations.
TODO:
TickSource currently stores the multiplier as a public static. Is this alright, or should it be turned into a private static and a method added?Changed to an instance field.Should the multiplier setting go in System settings? (It's where it's currently at)Moved to CPUKeyboard hotkeys cannot be assigned to a controller. Should the hotkey instead be in the input config?It's implemented as a "Hold" button. Did not see any such buttons in the avalonia UI (Only "toggle on press" buttons) so the way this was implemented might be a bit hacky, It checks IsPressed whenever (currentHotkeyState != _prevHotkeyState) and if it differs from turboMode it updates the multiplier.Need to define a default hotkey. I set it to F3 but didn't think much about it.Unbounded._ticksPerFrame
inSurfaceFlinger.cs
, but the game I've been testing on (Xenoblade DE, 30fps game, unmodded) was getting FPS over 30 with VSync on even without modifying that.