Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: strontium on August 03, 2020, 01:28:36 pm

Title: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 01:28:36 pm
This may be a dumb question but I haven't had my cabinet plugged in or on for two years ( how painful is that ) becuase of a house move and reno. The day finally arrived where it was time to get the cabinet out and fire it up. Unfortuantly it didn't so a new motherboard and install later it's back up and running but I'm dissapointed.

I run a G3258 with a H81m-p33 Mobo and would expect most games to run full speed but I'm hearing just terrible sound in anything from Rastan, Rainbow Islands, through to killer instinct. Now I know some times things regress in terms of emulation perfection but the fact I'm seeing this regression on all games makes me think I'm missing a driver or something isn't right.

The video is perfect, ATI HD4500 with shadow primary turned on as xorg server is over 1.19 no tearing at all.

I'm hoping I can get some feed back on things to look at and try as this really is ruining the whole experiance to the point I'm thinking about buying another Mobo in case it's HW related which I am sure its not.

portaudio is enabled and configured and I can see from running lspci -k that the sound card is detected and using the snd_hda_intel module.

Any of the linux gurus out there that think they may have any ideas what could be causing the terrible audio slur your suggestions would be super appreciated.

Thanks again

Strontium
Title: Re: Groovymame Sound Slowdown
Post by: Calamity on August 03, 2020, 02:18:04 pm
You shouldn't need to enable shadow primary. Tearing shouldn't happen if everything else is correctly configured.

Are you using latest GM?
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 02:28:50 pm
thanks for the quick response.

So I had to roll back to the 2017 version of GA live as attractmode is freezing in any kernel over 4.* even after I tried all the suggested fixes.

I then updated everything apart from linux and linux-headers pacman -Syu

I think built attract mode from source and installed mame using pacman to ensure I had all deps for groovymame.

finally I downloaded groovymame 222 and the latest rom set and all works apart from the performance issues I'm seeing.

I found I was getting a load of tearing and artifacts in attractmode but when I enabled shadow primary that went. I'll try and disable it now and see if it helps.

I've just double checked my mame.ini and all looks good. I was hoping it would be something to do with portaudio or maybe frame delay but I've changed framedelay to 1 from 5 and still getting the terrible slowdown and sound slur. Its so frustrating.

Title: Re: Groovymame Sound Slowdown
Post by: Calamity on August 03, 2020, 02:32:17 pm
Make sure your mame.ini is up-to-date with GM 222, many stuff has changed since 2017. Create a new mame.ini from your GM executable.
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 02:33:06 pm
Yep doing that now, good call. I'm not sure what else to try
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 03:01:51 pm
So the config looks good, I've been messing and turning autosync of seems to stop the audio slur.

Could that affect it?
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 03:09:49 pm
so I realised that autosync is kind of the point of groovymame and turned it back on as it's not a solution.

my next thing is to try different monitor types in case there is a timing issue or something. I have a Polo/2 monitor

I was using generic 15khz from the selection menu. Maybe that could have something to do with it?
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 03, 2020, 03:30:08 pm
So I can safely say for any one interested in this thread that it's working near as perfect now wtih this mame.ini the only thing I turned off was the autosync

I'll leave it like that for now here are my core options for anyone interested:

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip             0
frameskip                 0
seconds_to_run            0
throttle                  1
syncrefresh               0
autosync                  0
sleep                     1
speed                     1.0
refreshspeed              0
lowlatency                1
Title: Re: Groovymame Sound Slowdown
Post by: Calamity on August 04, 2020, 04:35:46 am
Hi strontium,

Without autosync, syncrefresh won't be turn on automatically when needed, making GM pointless.

Title: Re: Groovymame Sound Slowdown
Post by: RobeeJ on August 05, 2020, 04:28:50 am
The two things that have caused me problems in the past with GroovyMAME on (Arch)Linux are:

1. Video card drivers not correctly supporting whatever sync option GM uses, but I doubt this is your issue because this for me was an nVidia driver problem
2. High CPU usage, usually on certain games, mostly because of graphic related options that my system wasn't able to handle (prescale, bgfx filters, video subsystem choice)

I don't know if this helps you at all, but those were my main sources of issues.
Title: Re: Groovymame Sound Slowdown
Post by: Calamity on August 05, 2020, 08:09:27 am
Currently, on Linux, the only functional video backend for GM is -video opengl (I'm wondering if this is OP's issue).
Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 05, 2020, 06:57:44 pm
honestly I don't know. I really want to get to the bottom of this and happy to try things. As it stands autosync is off becuase when it's on I see a serious performance issue.

With autosync off I largly see good emulation in most games.

I'm trying to understand with all the movements and changes in the last two years and with a lot of things being adopted in the mainline mame how autosync differs to the new low latence features and others that are now native to mame.

15khz drivers are essential
switchres too

but what is autosync doing that mainline can not now? Sorry for my ignorance I'm just refreshing my knowledge. From memory it used to be related to audio and video tearing.

Thanks

Strontium
Title: Re: Groovymame Sound Slowdown
Post by: RobeeJ on August 06, 2020, 04:54:53 pm
Currently, on Linux, the only functional video backend for GM is -video opengl (I'm wondering if this is OP's issue).

I'm sure I'm using BGFX, and Vulkan, or at least my ini says I am. It all works really well anyway.

I've attached my ini file in case it's any help.
Title: Re: Groovymame Sound Slowdown
Post by: Max_FS on August 07, 2020, 04:47:38 am
honestly I don't know. I really want to get to the bottom of this and happy to try things. As it stands autosync is off becuase when it's on I see a serious performance issue.

With autosync off I largly see good emulation in most games.

I'm trying to understand with all the movements and changes in the last two years and with a lot of things being adopted in the mainline mame how autosync differs to the new low latence features and others that are now native to mame.

15khz drivers are essential
switchres too

but what is autosync doing that mainline can not now? Sorry for my ignorance I'm just refreshing my knowledge. From memory it used to be related to audio and video tearing.

Thanks

Strontium


I made similar obeservations. With autosync activated I have sound slowdowns and an overall bad sound quality. Therefore, I am also very interested in the question asked by strontium.
Title: Re: Groovymame Sound Slowdown
Post by: Calamity on August 07, 2020, 05:12:51 am
but what is autosync doing that mainline can not now? Sorry for my ignorance I'm just refreshing my knowledge. From memory it used to be related to audio and video tearing.

From  here: (http://forum.arcadecontrols.com/index.php/topic,151459.0.html)

Quote
- New option -autosync:
     * With -autosync enabled, -syncrefresh will be activated automatically if the refresh difference is below -syncrefresh_tolerance. If the refresh difference is greater than -syncrefresh_tolerance, -triplebuffer (multithreaded blitting) will be activated for Windows builds, while -nosyncrefresh will be used for SDL builds.

     * With -autosync disabled, -syncrefresh (and -triplebuffer for Windows builds) will be configured manually, either from command line or ini files.

Basically, autosync options automates the use of syncrefresh where it's required. Ideally syncrefresh should be enabled for all games, but there are some common suboptimal use cases where there's a non-solvable mismatch between game's and screen's refresh (LCDs, vector games, vertical games on horizontal monitor, etc.) that require syncrefresh to be disabled, that's what autosync does.

By turning autosync off, you're preventing GM from using syncrefresh, making GM pointless (unless you're enabling syncrefresh manually, that's not the case).

GM requires syncrefresh on, period. If that causes poor performance it can be caused by a system that's too weak for what you intend to emulate or that it's not working correctly (drivers, system clock, etc.).




Title: Re: Groovymame Sound Slowdown
Post by: strontium on August 07, 2020, 05:37:52 am
I want to be clear turning off autosync is not the solution. Like Calamity has clearly said this makes groovymame pointless.

So to update on my situation which I have been working on I have had some success. Long story short turning off auto sync never sat well with me so I downloaded the iso that substring has worked so hard on. And bingo perfect emulation, auto sync is on and working.

I opened another thread about lock ups in attract mode, these were also gone as well as some things I was seeing like black screens when closing a game ( Original Atari StarWars ) for example.

All in all my cabinet was not happy and now thanks to this community it's working on a very recent kernel ( added bonus my wireless card works out the box ) with all the lovely things groovymame gives me.

So to sum up, don't give up, don't turn off auto sync and definitely give @substring excellent iso release a go.  :D :)
Title: Re: Groovymame Sound Slowdown
Post by: Substring on August 07, 2020, 05:42:39 am
 :cheers: