Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: bumbervevo on July 19, 2018, 04:15:39 am

Title: Groovy Arcade - Force csync on everything?
Post by: bumbervevo on July 19, 2018, 04:15:39 am
I'm wanting to run Groovy Arcade on my PVM 14N6U with my HD 4350 via RGBs. I've been working on and off with Groovy Arcade for about three weeks now, trying to get everything (Arch Linux shell, switchres, AdvMENUPlus, GroovyMAME) to use composite sync. I got AdvMENUPlus to output csync by modifying xorg.conf and setting H/V polarities to positive, but that's all I've been able to get working so far. I'm wondering if anyone else is running Groovy Arcade and has a similar setup, and what steps you took to get it running? Thanks!
Title: Re: Groovy Arcade - Force csync on everything?
Post by: Calamity on July 19, 2018, 12:44:48 pm
That cannot be done with the Linux build. You'd need a modified version of GM to do that. It shouldn't be too hard if you have some experience with C++.

Or you can switch to Windows.
Title: Re: Groovy Arcade - Force csync on everything?
Post by: bumbervevo on July 19, 2018, 11:37:50 pm
Ahh, that's kinda unfortunate. Was looking forward to working with Linux a bit more. Thanks for the quick answer!
Title: Re: Groovy Arcade - Force csync on everything?
Post by: Doozer on July 20, 2018, 02:07:52 am

Just for my understanding. What is the issue you are talking about? What is/are the required development?
Title: Re: Groovy Arcade - Force csync on everything?
Post by: Calamity on July 20, 2018, 04:59:24 am

Just for my understanding. What is the issue you are talking about? What is/are the required development?

Basically OP wants GM to add the -csync flag to the modelines sent to xrandr.

The easiest way to do this is to hack the existing GM so it forces the -csync flag, in a custom build.

Currently the modeline code does not support a composite sync flag. In Windows csync is enabled as a global option.
Title: Re: Groovy Arcade - Force csync on everything?
Post by: Doozer on July 20, 2018, 03:19:16 pm

Enabling CSYNC with libxrandr is not so difficult. Like the HSYNC and VSYNC flags you have to specify CSYNC flag in the call to the creation of the new mode via XRRCreateMode function call.  CSYNC implementation is driver specific but seems available in the radeon module. Here is where mode flags are set in current code version (0197).

xmode.modeFlags  = (mode->interlace?RR_Interlace:0) | (mode->doublescan?RR_DoubleScan:0) | (mode->hsync?RR_HSyncPositive:RR_HSyncNegative) | (mode->vsync?RR_VSyncPositive:RR_VSyncNegative);

Constants are available since v1.2 of the protocol.

+#define RR_CSync      0x00000040
+#define RR_CSyncPositive   0x00000080
+#define RR_CSyncNegative   0x00000100
Title: Re: Groovy Arcade - Force csync on everything?
Post by: Calamity on July 21, 2018, 05:29:30 am
That's great Doozer.

I guess that fits better in a custom build since Windows doesn't allow to enable csync per modeline.