Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: robbo43 on October 18, 2020, 04:40:30 pm

Title: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 18, 2020, 04:40:30 pm
Hi All,

Bit of background info, I've used CRU to enable Freesync on my 43 inch Samsung TV and Ryzen 3400G. It works beautifully with Groovymame. The TV will only accept Freesync between 48 and 60 Hz, so I need to enable autosync, refreshspeed and frame delay for games with refresh rates 60Hz and higher.

Is there an easy way to scrape refresh rate information from MAME and auto generate source/driver ini files to enable those options for games >= 60Hz?

Many Thanks

Rob
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: Substring on October 18, 2020, 05:25:59 pm
You should be able to do that using mame's dat file + xpath. Shouldn't be that hard for someone with a little knowledge ox xml/xpath + required tools
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: schmerzkaufen on October 19, 2020, 03:45:39 am
I assume you've checked if your TV can run the desktop at like 61Hz already ?
http://forum.arcadecontrols.com/index.php/topic,161033.msg1697722.html#msg1697722

Guess 62 would be even better for MAME, but who knows what each existing 60Hz display will accept beyond.
(and that's why displays review that don't investigate such things are useless)
It is so unbelievably stupid from all manufacturers to have produced quantity of displays featuring VRR but capped at 60 which utterly ruins it.
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 19, 2020, 05:21:56 am
You should be able to do that using mame's dat file + xpath. Shouldn't be that hard for someone with a little knowledge ox xml/xpath + required tools

Thanks, I'll take a look. I may actually import the xml data into excel and use a vbscript to generate a txt/batch file
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 19, 2020, 05:26:44 am
I assume you've checked if your TV can run the desktop at like 61Hz already ?
http://forum.arcadecontrols.com/index.php/topic,161033.msg1697722.html#msg1697722

Guess 62 would be even better for MAME, but who knows what each existing 60Hz display will accept beyond.
(and that's why displays review that don't investigate such things are useless)
It is so unbelievably stupid from all manufacturers to have produced quantity of displays featuring VRR but capped at 60 which utterly ruins it.

It's a bonus for me that the TV accepts Freesync at all - it's not supposed to!

I can run the desktop at 1920x1080@63Hz, but unfortunately as soon as I start MAME the TV displays a corrupt image. This happens even if I launch a <60Hz game (rtype/MK etc.) directly from command line.

Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: schmerzkaufen on October 19, 2020, 07:26:29 am
Neither is my monitor's but I get VRR from CRT_Emudriver and this guide: http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=374
It's a completely different method but at least I am not bound by such issues.

Anyway, maybe your case is fixable, dunno, sounds weird that it doesn't work unless your 63Hz is not genuine but a compatibility mode dropping frames instead.
If you're lucky it's real and only a matter of settings.
I personally can't be of any valuable help since since this scenario is so different from my own setup's.

Hopefully if you drop a groovymame log or two (using current settings, then your attempt @63) maybe then you will be graced by the dev's visit and advice. ¯\_(ツ)_/¯
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: Substring on October 19, 2020, 07:36:49 am
Mame's dat is like 200MB, not sure Excel will survive, nor if it can open xml files.
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 19, 2020, 04:39:26 pm
Mame's dat is like 200MB, not sure Excel will survive, nor if it can open xml files.

Yep, it's huge. I managed to strip out the machine and refresh rate details and generate a much more managable 3MB XML. I then imported it into Excel and created a batch file to generate the sourcefile inis for each system.
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 19, 2020, 04:41:38 pm
Neither is my monitor's but I get VRR from CRT_Emudriver and this guide: http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=374
It's a completely different method but at least I am not bound by such issues.

Anyway, maybe your case is fixable, dunno, sounds weird that it doesn't work unless your 63Hz is not genuine but a compatibility mode dropping frames instead.
If you're lucky it's real and only a matter of settings.
I personally can't be of any valuable help since since this scenario is so different from my own setup's.

Hopefully if you drop a groovymame log or two (using current settings, then your attempt @63) maybe then you will be graced by the dev's visit and advice. ¯\_(ツ)_/¯

I'd love to get my TV to accept Freesync up to 62Hz. I may do as you suggest to see if there's any tweaks I can do.
Title: Re: Generating Source/Driver Specific ini Files Based on Refresh Rate
Post by: robbo43 on October 21, 2020, 03:31:00 pm
I decided to take a slightly different approach to 60Hz and higher games. I decided to alter the game speed to keep the game within the TV's Freesync range rather than go down the vsync/autosync + frame delay route. Works really well.

I used the excel file I created from the mame xml to generate the batch commands and could filter so I could set up per system ini files to tweak the game speeds e.g. 60Hz: speed 0.998,  >60-60.1Hz: speed 0.996, 60.1Hz-60.6Hz speed 0.988 etc.