Mame emulation speed faster on Retropie than on my PC
-
@Floyd I reported this problem several days ago, it happens on a lot of games.
https://github.com/libretro/mame2003-libretro/issues/75
Turning off Vsync in the RetroArch menu doesn't make any difference (well not for me anyway). We'll have to play them at the wrong speed and hope people don't notice when they come round to play you're arcade machine !
-
@windale said in Mame emulation speed faster on Retropie than on my PC:
@Floyd I reported this problem several days ago, it happens on a lot of games.
https://github.com/libretro/mame2003-libretro/issues/75
Turning off Vsync in the RetroArch menu doesn't make any difference (well not for me anyway). We'll have to play them at the wrong speed and hope people don't notice when they come round to play you're arcade machine !
I think every game that runs at 57.xx Hz is going to be having this problem. And most of the cab games run around that clock. It's not a big deal if you don't play games where precision is a big factor (but what mame game isn't?). Like you've said, the issue is extremely noticeable if you've played the game on cab or even at windows pc.
Setting video_frame_delay to 5 (which is still a safe setting without getting sound and majoy input lag) might make things a bit better, but still very noticeable. At frame delay around 10 sound looses sync. What is a real head scratches is why this issue doesn't occur on pc when connected to same monitor/TV?
Thanks for the bug report. -
@windale How do you actually turn off vsync ... editing the file in:
/opt/retropie/configs/arcade/retroarch.cfg,
or
/opt/retropie/configs/mame-libretro/retroarch.cfg
? -
@Floyd I tried the Vsync setting in the RetroArch GUI Video menu.
-
I think I've found a fix.
Here is the solution. As it seems, retroarch isn't detecting mame refresh rate properly and instead it automatically forces it to 60hz. Now to fix this, you just need to go to Select + X to call the Retroarch menu and undeo Settings > Video scroll to Refresh rate. It defaults to 60.0000 Hz. Now change that value to game's proper refresh rate (which you can find by running the game in mame on your pc and reading the values right before the game starts).
After changing the refresh rate, in my case Super Pang had a refresh rate of 57.420 save that setting (Overide per game). The setting should be saved in /home/pi/.config/config/mame-2003/spang.txt
Little hint, it takes a long time to change the refresh rate via gamepad in RetroArch Gui. Instead just save it before changing the value and it will create the gamename.txt file. There you can open it (via putty) or file explorer and edit the value. Look for "refresh_rate" and change from 60.00000 to your desired refresh rate.
That should do the trick and the game should run at normal speed. -
@Floyd This is more of a workaround than a fix. This means we will have to keep an eye on the framerate of every game we play and check if it's correct with the Windows etc. version of MAME and then manually edit the refresh rate for all of them ! I hope there is an easier solution, maybe a bug in RetroArch. I don't know if @dankcushions is looking into it ?
-
@windale said in Mame emulation speed faster on Retropie than on my PC:
@Floyd This is more of a workaround than a fix. This means we will have to keep an eye on the framerate of every game we play and check if it's correct with the Windows etc. version of MAME and then manually edit the refresh rate for all of them ! I hope there is an easier solution, maybe a bug in RetroArch. I don't know if @dankcushions is looking into it ?
Well , let's not argue semantics. Call it as you wish, but although a bit tedious, it works in my case. On the other hand, I don't have hundreds of games, and it's not a biggie to change these parameters for my games. After all this workaround can be used for games that are nearly unplayable. Anyways, I also hope the real fix will come eventually.
-
@Floyd Just to rule out something, please can you try this and see if it makes a difference
sudo wget -q http://malus.exotica.org.uk/~buzz/runcommand.sh -O/opt/retropie/supplementary/runcommand/runcommand.sh
This will grab a slightly modified runcommand.sh and install it. Because we default to having threaded video on, retroarch is not able to calculate the video refresh rate, so for the RPI, I set it based on the actual current screen refresh. I'm just wondering if that is possibly affecting it since manually adjusting the refresh seems to fix it as you have mentioned.
-
BTW to revert back to the previous runcommand you can do
sudo ~/RetroPie-Setup/retropie_packages.sh runcommand
-
It's also worth seeing if setting
video_threaded = false
makes a different in/opt/retropie/configs/all/retroarch.cfg
(set to true by default on retropie for performance). -
@BuZz. I'll try to see if this fix helps. Will get back to you. I've already messed with threaded video this morning and it does recognize the refresh rate but I've only tried this on already modified game refreshrate.. Will tryreport it on unmodified game setting.. Will report findings
-
@BuZz
Last night I did some extensive testing.
The results are following. As it seems, the modified runcommand has no impact whatsoever and it even disables pressing "a" button to access the additional settings menu after game launch.
What did make a difference is disabling video threading which then recognized the refresh rate of a monitor and lowered below 60Hz only at some games. This allowed me to just click on the monitor refresh rate setting which then also changed the game refresh rate. But again, this had effect only if you manually click on the monitor refresh rate and did work only at some games.
I really don't know what causing this issue. Maybe an old emulator core? -
According to the reply on the mame2003 Github issues, this fixes it :-
The solution is to go to settings > frame throttle and set 'maximum run speed' to 1.0. This means you can't fast-forward anymore but it will run at the the proper fps.
I haven't had time to check it yet (not at home) but if it does work hopefully @BuZz or someone else can apply it as the default setting. (I don't see the need for fast-forward in MAME).
-
@windale. Nice, will check tonight.. Let's hope this fixes it.
-
I just tested the 'Maximum Run Speed to 1.0x', it fixes the correct refresh rate but unfortunately makes the audio crackle.
-
@windale said in Mame emulation speed faster on Retropie than on my PC:
I just tested the 'Maximum Run Speed to 1.0x', it fixes the correct refresh rate but unfortunately makes the audio crackle.
Does this happen on every rom?
-
@windale
I tried setting Maximum Run Speed and still getting bad refresh rates :/ bummer . Try the game "Super Pang" and see for your self. -
@Floyd said in Mame emulation speed faster on Retropie than on my PC:
@windale
I tried setting Maximum Run Speed and still getting bad refresh rates :/ bummer . Try the game "Super Pang" and see for your self.Super Pang in MAME 0.78 is 60Hz. It was corrected to 57.42Hz in MAME 0.133.
-
@windale said in Mame emulation speed faster on Retropie than on my PC:
@Floyd said in Mame emulation speed faster on Retropie than on my PC:
@windale
I tried setting Maximum Run Speed and still getting bad refresh rates :/ bummer . Try the game "Super Pang" and see for your self.Super Pang in MAME 0.78 is 60Hz. It was corrected to 57.42Hz in MAME 0.133.
Yes that's right. I'm using the latest spang rom from romset 0.181. Hmm what core are you using for mame? I'm using the default core that came witj mame folder lr-mame2003. Maybe It will work with different core/version?
-
@Floyd I'm not sure I understood you. You said that Super Pang in lr-mame2003 is playing at the wrong speed. In MAME 0.78 (lr-mame2003) it's supposed to be playing at 60 fps (Hz), which is correct. The MAME team didn't fix this until MAME version 0.133 (which is 57.42Hz). So in lr-mame2003 it's correct,
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.