Skip to content
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

Support cores with refresh rate higher than primary display #155

Closed
mitchmindtree opened this issue Dec 28, 2020 · 7 comments
Closed

Support cores with refresh rate higher than primary display #155

mitchmindtree opened this issue Dec 28, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@mitchmindtree
Copy link

Thanks for your work on Lemuroid, it seems like a lot of fun!

I tried running a Pokemon Silver ROM, and while it appears to work well in GBCoid, it runs in slow motion on Lemuroid. By slow-motion, I mean the game appears to run consistently at around 2/3 of the original speed.

Going into the settings while in-game and pressing the fast-forward button causes the game to speed up, but becomes much too fast. Is there a way to tweak the playback rate? Or perhaps some other settings I should try messing with to get the expected behaviour?

While GBCoid runs at the correct rate, the audio has some severe clipping in polyphonic sections and saving doesn't work. I also much prefer the virtual gamepad layout of Lemuroid and that the position of the screen is closer to the top of the display in portrait 👍

Phone: Hisense A5 Pro CC (Oct-core 1.8ghz android phone with colour e-ink display)
Android 10
Lemuroid 1.8.0-beta1

@Swordfish90
Copy link
Owner

Hi @mitchmindtree . Thank you for reporting this. The issue is that Lemuroid currently can't go faster than your display refresh rate. I'm guessing here your e-ink display doesn't reach 60hz but rather ~40hz or (~80hz with fast-forward enabled).

It's definitely an interesting feature, which will also be useful for consoles that don't run at 60hz (such as the Atari Lynx).

@Swordfish90 Swordfish90 added the enhancement New feature or request label Dec 29, 2020
@mitchmindtree
Copy link
Author

Good spot, this indeed seems to be the issue. Running OpenGL gears demo (which uses vsync) shows the phone running consistently at 42 FPS.

Do you know if it's possible in Android to slow the refresh rate of the display system-wide? I wonder if it's possible to force my display to 30 FPS and then use the fast-forward button in lemuroid.

But yes, having the option to detach display rate from the gameplay clock would be nice. Does this limitation currently come from libretro?

@Swordfish90
Copy link
Owner

Thank you for double-checking it. I guess we have gathered enough evidence. Timing is entirely up to the frontend, so there is no inherent limitation within Libretro.

I guess tampering with the default refresh rate will not be straightforward (maybe root and custom kernels?), so the best solution is definitely implementing this.

@Swordfish90 Swordfish90 changed the title GBC ROM running in slow motion Support cores with refresh rate higher than primary display Jan 3, 2021
@Swordfish90
Copy link
Owner

Hi @mitchmindtree . I just gave this a go. Would you be available for a quick test to confirm that the timing is correct also on your device?

Here you can find a debug build, it can be installed alongside the release version: https://drive.google.com/file/d/1UDHyb4TJNWPjU1_ENh5J7gbC5VAZKAVs/view?usp=sharing

@mitchmindtree
Copy link
Author

Nice work, this appears to work beautifully out of the box with both Silver (GBC) and Soul Silver (NDS)! Thanks for the quick response and patch, and for hacking on such a fun project :)

@Swordfish90
Copy link
Owner

Thank you for taking a look at the test build. I'll merge the changes with the next major release 1.9.0.

@Swordfish90
Copy link
Owner

I just released 1.9.0 which includes this fix, so I'm closing the issue. Feel free to let me know if something else feels wrong with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants