Low-latency MAME for Linux?

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
irakatz
Posts: 9
Joined: Tue Jul 27, 2021 5:17 pm

Low-latency MAME for Linux?

Post by irakatz »

Hi all,

I wanna get a low latency MAME on Linux.
On windows, I play Shumpmame 4.2, but I am not sure it can be used on Linux.
Also, since my goal is to play a low-latency MAME, I am not sure playing Shumpmame in wine is good, it seems to introduce additional latency.
Actually, MAME is supported on Linux, but I worry that its latency is a bit large.

Can someone recommend a low-latency MAME?
User avatar
pulsemod
Posts: 122
Joined: Thu Jul 09, 2015 6:35 am

Re: Low-latency MAME for Linux?

Post by pulsemod »

I would have to recommend GroovyMAME when it comes to low latency, though I've only used it especially with a CRT, it should be configurable to have good results with a freesync or standard LCD compared to mainline MAME. the only thing is that learning to configure it for your needs can be tricky.
irakatz
Posts: 9
Joined: Tue Jul 27, 2021 5:17 pm

Re: Low-latency MAME for Linux?

Post by irakatz »

pulsemod wrote:I would have to recommend GroovyMAME when it comes to low latency, though I've only used it especially with a CRT, it should be configurable to have good results with a freesync or standard LCD compared to mainline MAME. the only thing is that learning to configure it for your needs can be tricky.
Thanks, I have downloaded the source code of Groovymame in https://github.com/antonioginer/GroovyMAME. Then, shall I "make" and direct play? Or shall I do something else to reduce the latency?
I am using Ubuntu 20.
User avatar
Lethe
Posts: 470
Joined: Tue Mar 03, 2020 9:49 am

Re: Low-latency MAME for Linux?

Post by Lethe »

The purpose of GroovyMAME is to 1. reduce vsync lag and 2. have much better compatibility with CRT setups. From my own (very casual) testing on Windows:
If vsync is off, Groovy is no more responsive than main MAME with lowlatency = 1. I get about +1 frame throughput on each.
If vsync is on, main MAME gets +3 or +4 frames. Groovy with frame_delay = 6 gets +1. But with the variety of refresh rates of arcade games, I'm not going to try to vsync on a mundane LCD anyway.
VRR obsoletes Groovy's improvements on LCD.
User avatar
To Far Away Times
Posts: 2060
Joined: Tue Sep 11, 2012 12:42 am

Re: Low-latency MAME for Linux?

Post by To Far Away Times »

V Sync really adds 3 or 4 frames? How much lag is MAME usually running with by default?
User avatar
Lethe
Posts: 470
Joined: Tue Mar 03, 2020 9:49 am

Re: Low-latency MAME for Linux?

Post by Lethe »

That's not exactly what I meant: the total latency was 3-4f, not what vsync added. My above post is wrong anyway. I was confusing in results involving Windows' DWM being, as ever, an utter piece of shit. MAME's vsync only adds ~1 frame @ 60 fps, which is much more sensible. But if you let DWM interfere it compounds it with its own lag and consistency issues. In a Linux environment, there should be options to mitigate any similar effects.

Here are some new tests I did last night. It's very unscientific, just recording pressing left or right 15 times and then counting frames at 120fps, which isn't a sufficiently high resolution in any case, besides the whole extremely unreliable human thing. But it should give you an idea of what I mean; the results are comparable to each other even if the specific numbers are bunk.

Code: Select all

(frame count @ 60 FPS)
Gun.Smoke - internal latency 1f
    Fullscreen, no vsync:   ~1.8 (low 1.5, high 2)
    Fullscreen, MAME vsync: ~2.7 (low 2, high 4)
    Windowed, DWM vsync:    ~3.4 (low 3, high 4.5)

Dangun Feveron - internal latency 2f
    Fullscreen, no vsync:   ~2.5 (low 2, high 3)
    Fullscreen, MAME vsync: ~3.2 (low 3, high 3.5)
    Windowed, DWM vsync:    ~4.2 (low 3.5, high 5)

Giga Wing - internal latency 4f
    Fullscreen, no vsync:   ~4.5 (low 4, high 5)
    Fullscreen, MAME vsync: ~5.3 (low 5, high 5.5)
    Windowed, DWM vsync:    ~6.6 (low 6, high 7)
The effects on MAME are actually less than expected, +3 frames is typical for native Windows games, especially older ones.
User avatar
blazinglazers69
Posts: 135
Joined: Sun Mar 14, 2021 3:45 pm

Re: Low-latency MAME for Linux?

Post by blazinglazers69 »

FBNeo in Retroarch can use Run Ahead. MarkMSX on youtube has a good setup video.
Post Reply