Topic: Guide for variable refresh rate on LCDs using CRT Emudriver
By Calamity. I'm just saving it here as somebody suggested but it comes from this thread at BYOAC:
Check video here: https://www.youtube.com/watch?v=N6c32mp_VoQ
GroovyMAME and the CRT Tools can dynamically modify the timings output to an LCD monitor when using an AMD HD 5000 or newer card. In order to do this in an useful way, you first need to overcome some obstacles.
The first and most important obstacle is that the current desktop video mode is read-only. This means neither GM nor Arcade OSD can alter these current video timings. Because LCDs are supposed to work at the desktop (native) resolution all the time, without switching modes, this becomes a problem.
Fortunately there's a very easy workaround. You need to create a dummy mode with the same resolution as your monitor's native resolution, and a different refresh rate. This way, Windows assumes these are separate video modes, and it allows you to change the timings freely.
The second obstacle is to guess your monitor's timing values in order to build a custom "crt range" that can be used by GM. Again, this is very easy to do as I'll show you in a minute.
So the first step is to launch Arcade OSD, select your desktop video mode (which should be marked in cyan to indicate its currently used by the desktop):
Now press "2" to enter non-fullscreen edit. Select "Copy modeline to clipboard". Exit Arcade OSD.
Now open Notepad. Press CTRL+V. You'll see something like this:
modeline "2560x1600_60 98.71KHz 59.97Hz" 268.50 2560 2608 2640 2720 1600 1603 1609 1646 +hsync -vsync crt_range 98703.24-98723.24, 50.00-60.00, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1928, 3200, 3857
We're interested is in the second line. Arcade OSD has created a crt_range for you that corresponds to your current LCD timings. What you have to do is make that crt_range a bit more general so it can produce a higher number of refresh rates.
First, limit the progressive line range to the exact vertical resolution (in my case: 1600), and set the interlace range to zero:
crt_range 98703.24-98723.24, 50.00-60.00, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0
Now, as the vast majority of arcade games use refresh rates between 54 and 60,61 Hz, we'll adjust the vertical frequency range:
crt_range 98703.24-98723.24, 54.00-60.61, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0
The next step is vital: we need to adjust the horizontal frequency to make a valid crt_range. This is very easy to do if we have the vertical total value taken from the monitor's default timings. It's the last value in the modeline we got from Arcade OSD (don't mistake modelines and crt_ranges!):
modeline "2560x1600_60 98.71KHz 59.97Hz" 268.50 2560 2608 2640 2720 1600 1603 1609 1646 +hsync -vsync
So what we need to do is to multiply this vertical total value by each one of the vertical refresh limits:
1646 x 54.00 = 88884
1646 x 60.61 = 99764
and fill the crt_range line accordingly:
crt_range 88884-99764, 54.00-60.61, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0
That's it. Finally, add a zero to the crt_range word, and we're done:
crt_range0 88884-99764, 54.00-60.61, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0
NOTE: Older versions of GroovyMAME and the CRT Tools had an HfreqMax limitation of 100000 Hz. This was too low for 4K monitor unfortunately. Starting from CRT Tools beta 14 and GroovyMAME v0.203, this limitation has been removed.
The next step is to configure VMMaker using this custom crt_range. So let's launch VMMaker, and go to Settings->Monitor settings->Edit monitor presets.
This will open monitor.ini in Notepad. Now we'll create a new monitor preset, by adding our newly created crt_range and a monitor header, like this one:
monitor "u3011", "Dell U3011", "4:3" crt_range0 88884-99764, 54.00-60.61, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0
Here I've filled the fields in the monitor header with my monitor's name. Leave default aspect as 4:3. Save the file and exit Notepad.
Now the new monitor definition will be selectable from the monitor presets dropdown menu.
Now go to the Video card and make sure to select the right output in the Device dropdown menu. When done, press Ok to go back the VMMaker's main window.
Once in VMMaker's console (next to the Ready> prompt), type this:
mode add 2560x1600@59
Notice the "59". This is a dummy refresh. We should type one that's not used by the system. VMMaker will show this:
>>mode add 2560x1600@59 "2560x1600_59 97.06KHz 59.00Hz" 263.99 2560 2608 2640 2720 1600 1603 1609 1645 +hsync -vsync 1 mode added to modelist.
Now type this:
VMMaker will prompt:
>>modelist install Installing modelines in system... 1 modelines installed.
We can close VMMaker now, and go back to Arcade OSD, were we'll see the new mode:
Perfect. The final step is to configure GroovyMAME to use this custom monitor preset. So open mame.ini, and edit these options:
monitor custom crt_range0 88884-99764, 54.00-60.61, 0.179, 0.119, 0.298, 0.030, 0.061, 0.375, 1, 0, 1600, 1600, 0, 0 resolution 2560x1600@59
Pay attention to the "resolution" option. We're forcing GroovyMAME to pick this dummy mode we've created. GroovyMAME will take this mode and adjust its refresh rate to whatever refresh is required.
E.g., let's launch rtype:
There it is!
If you notice that the scroll is not smooth, then your LCD can't sync to that refresh. This particular monitor I'm testing shows smooth scrolling between 58.50 and 60.61 Hz. Yours will be different. The only way to know it is by testing different games.