Mame emulation speed faster on Retropie than on my PC
-
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,
-
@windale Oh well that makes sense.. The lr-mame2003 uses an old 0.78 core no matter if I use 0.181 roms.
Anyways, I'trying to apply frame throttle and was looking through /opt/retroarch/config/all/retroarch.cfg but wasn't able to find a parameter which is responsible for frame throttle.. Can you point me where that max.run speed parameter resides? -
@windale said in Mame emulation speed faster on Retropie than on my PC:
@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,
hey, sorry for taking ages but Hz is something that can be fixed pretty easily in the mame2003 code i think. is it just super pang that has should be 57.42hz? currently the following mitchell games are set to 60hz in the same driver (i think i can easily create a new driver for super pang if it's the only that should be changed):
"Dokaben (Japan)"
"Pang (World)"
"Pang (bootleg)"
"Buster Bros. (US)"
"Pomping World (Japan)"
"Capcom World (Japan)"
"Adventure Quiz 2 Hatena Hatena no Dai-Bouken (Japan)"
"Super Pang (World)"
"Super Buster Bros. (US)"
"Quiz Tonosama no Yabou (Japan)"
"Quiz Sangokushi (Japan)"
"Block Block (World 911106 Joystick)"
"Block Block (World 910910)"
"Block Block (Japan 910910)"
"Block Block (bootleg)"maybe there's a good resource for current mame game frequencies that I could refer to?
-
@dankcushions There are several games that play at the wrong Hz, some of them I reported on the lr-mame2003 GitHub. These all play at 60 Hz (which is wrong) :-
Robocop (57.4 Hz)
Bad Dudes vs Dragon Ninja (57.4 Hz)
Midnight Resistance (57.4 Hz)
Burger Time (57.4 Hz)
Caveman Ninja (58 Hz)There are probably a lot more. I got my references from the latest PC version of MAME 0.182 Arcade Only (which has a folder list of all game refresh rates in the left side bar) http://www.progettosnaps.net/arcade/ (you need to put the Arcade.exe in the offical MAME download folder http://www.mame.net/ before running !) and MAME32 0.78 which can be downloaded here http://www.progettosnaps.net/mameui/packs/MAME32_0.078_25-12-2003.7z
-
I've been Reading about this, and well, I don't have problems with my favourite games speed but yes I do have one single thing that bugs me and it's about Double Dragon 1. The game speed seems ok but the sound pitch is a Little higher than the original and sometimes sfx's sound really way too different from they actually are. Would this Hz thing fix that too?
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.