Page 1 of 2

Variable Refresh Rate support added thanks to zakk4223

Posted: Sun Jun 26, 2022 6:02 pm
by aberu
Thanks to @zakk4223 for adding variable refresh rate support!

You currently (as of writing this) can only use this mode if you use a latest unstable build. The easiest way to get those is by heading to the "#unstable-nightlies" channel in the MiSTer FPGA Discord server and downloading the latest build. There may be bugs that need to be worked out and be sure to have a way to easily edit your .ini without display since your TV might not display anything when you change this setting at first. Here's some documentation on the new feature for your convenience.

https://mister-devel.github.io/MkDocs_M ... h-rate-vrr

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Sun Jun 26, 2022 8:48 pm
by Malor
Wow, that is really cool. I'm using a 27" LG 144Hz display, and while it syncs well with most cores, there are a few old arcade games that lose sync every couple of seconds. It seems to happen with refresh rates that are close to, but not quite at, 60Hz.

Hopefully this will get those operational.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Sun Jun 26, 2022 9:07 pm
by AngelicLiver
That's awesome, looking forward to giving that a whirl on a few of my displays!

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Sun Jun 26, 2022 11:59 pm
by Dacaskos
Can't make it work with a LG C1. If anyone could confirm if it works with this TV =s

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 12:18 am
by rhester72
Isn't it by definition only intended to work on monitors supporting GSYNC and FreeSync?

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 1:12 am
by FoxbatStargazer
Read the link, there's explicit options for Freesync and Forum VRR

Edit: although the nightly I downloaded explicitly labeled for it doesn't seem to be working at all, even changing the INI settings. Do we need new cores as well?

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 3:24 am
by PikWik
oh wow, this is something ive wanted for a while,

this will hopefully remedy the gameboy sync losses, some random arcade cores losing sync every few seconds, and of course, the SNES core missing the intro screen and chime when first booting a game in vsync 2 (ex link to the past, super mario world)

lets go

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 5:12 am
by aberu
Gsync = vesa HDMI forum vrr - they are the same thing basically.

The LG C1 should work. It worked fine on my LG G1. You need to go into the game optimizer and enable gsync or freesync (or both) and make sure your input that the MiSTer is on is set to the game optimizer display setting.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 5:18 am
by elvis
This is brilliant. Thank you zakk4223 for a very necessary feature that's going to help a lot of people enjoy a great deal of titles that were never really designed for consumer televisions, but are now playable smoothly and tear-free thanks to this feature.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 12:43 pm
by AtomicShroom
How does this impact the current video options? Do I have to turn off specific video mode for PAL? Do I need to set the old refresh_min and refresh_max values to 0 or does it supersede them? Etc.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 5:46 pm
by FoxbatStargazer
So I did get an LG C1 to sync 75hz correctly on the Wonderswan core, perfect smooth scrolling in Final Fantasy, something it couldn't do before. So signs of freesync working there probably.

However I also have an MSI G273, it has always worked with 70-75hz+, but does frame conversion at 50hz. It's still doing that, leading to some awful judder on scrolling in Amiga or EU Mega Drive. On a PC I can get perfect 50hz with retroarch doing freesync on Amiga, but still not on Mister.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Mon Jun 27, 2022 6:33 pm
by Del_Pierro
Some quick testing on an LG XC with the Amiga / SNES Cores and DoDonPachi. LG CX goes to Instant Game Response Mode without any problems, works great!

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jun 28, 2022 3:17 am
by Malor
Discord demands a phone number to join that channel; improving their surveillance is not high on my list of priorities. Is there another way to get beta builds early?

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jun 28, 2022 6:40 am
by SegaSnatcher
Works well on my LG C1. Arcade cores with weird off spec refresh rates which use to stutter while scrolling are now smooth. It didn't fix issues with Atari 2600/7800 core while playing 2600 games unfortunately. I still hope the 7800 core gets an optional buffer for finicky 2600 games that change lines on the fly. Nevermind, it seems the best option for 2600 games is just to setup a separate ini file with a buffered sync mode.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jun 28, 2022 5:16 pm
by justaguy
PikWik wrote: Mon Jun 27, 2022 3:24 am this will hopefully remedy the gameboy sync losses, some random arcade cores losing sync every few seconds, and of course, the SNES core missing the intro screen and chime when first booting a game in vsync 2 (ex link to the past, super mario world)
I was hoping for that last one myself, but the results on my LG 27GN650 weren't any better than vsync_adjust=2 without VRR. I have to wonder if this isn't for displays (VRR or not) that work fine with nonstandard fixed refresh rates, but rather for VRR displays (especially TVs) that don't. For now I just use vsync_adjust=1.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jun 28, 2022 11:59 pm
by PikWik
justaguy wrote: Tue Jun 28, 2022 5:16 pm
PikWik wrote: Mon Jun 27, 2022 3:24 am this will hopefully remedy the gameboy sync losses, some random arcade cores losing sync every few seconds, and of course, the SNES core missing the intro screen and chime when first booting a game in vsync 2 (ex link to the past, super mario world)
I was hoping for that last one myself, but the results on my LG 27GN650 weren't any better than vsync_adjust=2 without VRR. I have to wonder if this isn't for displays (VRR or not) that work fine with nonstandard fixed refresh rates, but rather for VRR displays (especially TVs) that don't. For now I just use vsync_adjust=1.
awww :(
that was the one i was most hopeful for as well.

i still havent tried this using my computer monitor, but will report back when i do

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jul 05, 2022 9:30 pm
by thesimplesimon1
Hi, I've tried to get this going and nothing is working. I've got the nightly build and edited the ini file but nothing happens. Anyone else have this problem? Got a LG CX OLED by the way.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Sat Jul 09, 2022 10:25 pm
by naylord
Awesome stuff though it breaks my heart that black frame insertion won't be combinable with VRR on my LG OLED. I guess I'll only use it on cores with really strange timings (or more likely just use a CRT for those). BFI is basically required for 2d scrolling games to not look terrible.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Sat Jul 09, 2022 10:51 pm
by FoxbatStargazer
BFI@60hz on the C1/C2 is nearly two additional frames of lag compared to boost mode, it's hard to see that a worthwhile tradeoff for 2D action games.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jul 12, 2022 9:42 pm
by DTechNation
FoxbatStargazer wrote: Sat Jul 09, 2022 10:51 pm BFI@60hz on the C1/C2 is nearly two additional frames of lag compared to boost mode, it's hard to see that a worthwhile tradeoff for 2D action games.
That smoothness though. Oled (I have a C1) with BFI is the closest motion has felt to a CRT for me. Depending on the game, it is a no brainer for me.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jul 12, 2022 10:45 pm
by AtomicShroom
AtomicShroom wrote: Mon Jun 27, 2022 12:43 pm How does this impact the current video options? Do I have to turn off specific video mode for PAL? Do I need to set the old refresh_min and refresh_max values to 0 or does it supersede them? Etc.
Quoting myself because no one has answered this:

Do the VRR settings override refresh_min and refresh_max or not?

Thanks!

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Wed Jul 13, 2022 12:06 am
by FoxbatStargazer
From the main updates
- video: send freesync/VRR enable frames if the display supports it (zakk).
- added experimental VRR logic (cores require update).
So no need for discord builds, this is now part of main!

Interesting note about "cores require update", there may be more features to come that have not been fully implemented. Maybe an attempt at smooth refresh or resolution switching.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Wed Jul 13, 2022 2:21 am
by Malor
As a little anecdata, this update seems to have fixed some old cores that wouldn't sync properly to my cheapo LG 27GN850 (I tested a few of the Donkey Kong sequels, which my monitor couldn't lock with before), but not all of them. When I went further afield, I found that at least the Frogger cores are still endlessly losing sync.

No rush on fixing anything, just sharing that A) it's helping, and B) at least the Frogger cores weren't changed.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Thu Jul 14, 2022 2:54 pm
by mistahsnart
Tried this out today now that it's in main.

LG CX magic formula that worked for me:
- HDMI input set to UHD Color
- AMD Freesync enabled

When I had Freesync off, the MiSTer wasn't picking up the VESA VRR support when set to Auto. Turning on Freesync and leaving the MiSTer on Auto and it works.

This may be completely localized to the firmware of my TV, but in case other LG owners stumble across this.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jul 19, 2022 9:36 pm
by thisisamigaspeaking
aberu wrote: Mon Jun 27, 2022 5:12 am Gsync = vesa HDMI forum vrr - they are the same thing basically.

The LG C1 should work. It worked fine on my LG G1. You need to go into the game optimizer and enable gsync or freesync (or both) and make sure your input that the MiSTer is on is set to the game optimizer display setting.
Here's my understanding:
  • G-sync is proprietary to Nvidia and only works with their LCD controller boards and video cards over DisplayPort.
  • Freesync is AMD's adaptive sync technology for DispayPort that is also available now without any license for HDMI. Confusingly Nvidia calls a Freesync monitor "G-Sync compatible" if it works with Nvidia graphics cards (which they added support for after a long time of refusing to do it).
  • HDMI Forum (HDMI 2.1) VRR is a third technology and it actually can matter which you use. LG CX/1/2 TVs support both and you can enable them separately. Freesync over HDMI is different from HDMI Forum (HDMI 2.1) VRR.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Tue Jul 19, 2022 10:16 pm
by aberu
thisisamigaspeaking wrote: Tue Jul 19, 2022 9:36 pm Here's my understanding:
  • G-sync is proprietary to Nvidia and only works with their LCD controller boards and video cards over DisplayPort.
  • Freesync is AMD's VRR technology for DispayPort that is also available now without any license for HDMI. Confusingly Nvidia calls a Freesync monitor "G-Sync compatible" if it works with Nvidia graphics cards (which they added support for after a long time of refusing to do it).
  • HDMI Forum (HDMI 2.1) VRR is a third technology and it actually can matter which you use. LG CX/1/2 TVs support both and you can enable them separately. Freesync over HDMI is different from HDMI Forum (HDMI 2.1) VRR.
Okay, you convinced me, I'm gonna go read some Bakunin.

Just kidding (am I?). Yeah Nvidia's gunked it up a bit, but the manufacturers also are not aligning on enforcing a strong standard that everyone follows. Everything you said checks out I think, good summary!

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Thu Jul 21, 2022 8:39 pm
by Malor
I think "G-Sync Compatible" is just a Freesync monitor that NVidia has tested as working correctly. They support FreeSync in general, and then test some monitors, probably at the manufacturer's expense, and give them permission to use the GSync labeling.

Actual GSync was run under tight restrictions, I think even using NVidia-blessed hardware modules in the displays. It cost a lot more money, but was pretty much certain to work well, where Freesync can be chancy. Freesync implementations are all over the map, some being very good, and some being terrible.

A Freesync monitor with the G-Sync Compatible label is likely to be pretty decent. NVidia is still demanding at least some of the original qualities that made GSync work well. If I were buying a monitor new, that's what I would probably focus on.

How that differs from HDMI Forum VRR, I really don't know. I didn't even know there was a third standard until I read thisisamigaspeaking's post.

(btw: I can totally hear that handle, every time I read it.)

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Fri Jul 22, 2022 6:14 pm
by FoxbatStargazer
Just recently figured out that NVIDIA supports freesync over displayport only, and forum VRR over HDMI only. This document explains the support. I have a 2060 and Adaptive Sync only works over displayport for the MSI G273QF, while the LG C1 will only get adaptive sync over HDMI with VRR/GSync setting (not freesync setting.) That might be why some people (including LG) equate forum VRR with g-sync, but it's probably less confusing to consider g-sync just that proprietary communication between Nvidia cards and g-sync modules in monitors, and ignore Nvidia's attempts to re-brand Freesync and Forum VRR as their own g-sync variant.

Freesync setting on the LG does work with Mister (the freesync premium pro line comes up.) I wonder if there are any protocol (not just specification) differences between freesync premium and standard freesync, which might explain why the MSI monitor doesn't seem to have VRR working with the Mister?

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Fri Jul 22, 2022 7:09 pm
by akeley
FoxbatStargazer wrote: Fri Jul 22, 2022 6:14 pm Nvidia's attempts to re-brand Freesync and Forum VRR as their own g-sync variant.
I'm not sure they have ever tried to actually do this. The distinction has always been pretty clear, at least to PC gamers, and the whole "G-Sync compatible" thing is an attempt at fending off countless questions from people who own their GPUs but were looking at buying cheaper Freesync monitors. And since they have already made it possible via drivers it only makes sense, though of course it is also some sort of corporate wheelin/dealin, since other FS monitors without this label might work fine too.

I'm not an Nvidia fan, don't condone their practices and would much rather there was one standard, preferably "open" as the one which AMD first tried. But, I also do have an OCD when it comes to stutter, have been following this tech since it first appeared, and must admit G-Sync did have big advantage at the beginning. I go through bouts of modern gaming and in 2016 did buy a GSYNC AOC, despite a big price difference, but the FS back then was reported to be a hit & miss experience so, I think it was worth it. In 2020 when building a new gaming setup I went with Freesync monitor first (with Nvidia GPU) but later changed to G-Sync one when going up from 1080p to 1440. This time around FS was pretty close to GS regarding quality (compared it in many games because for a while I had both) but still GS is marginally better - though it's probably only observable by obsessives like me.

This refers strictly to modern games, I have no clue how it affect MiSTer since I haven't tried VRR with my PC monitor.

Re: Variable Refresh Rate support added thanks to zakk4223

Posted: Fri Jul 22, 2022 7:18 pm
by FoxbatStargazer
akeley wrote: Fri Jul 22, 2022 7:09 pm I'm not sure they have ever tried to actually do this. The distinction has always been pretty clear, at least to PC gamers, and the whole "G-Sync compatible" thing is an attempt at fending off countless questions from people who own their GPUs but were looking at buying cheaper Freesync monitors.
They did not need to brand something "g-sync compatible" when it involves no g-sync modules and follows the exact same communication protocol as freesync. "NVIDIA adaptive sync certified" would be far more accurate for instance, because all that label means is certification for meeting minimum performance standards.