Jump to content
IGNORED

MAME refresh rates questions


Recommended Posts

I've been figuring out RPi4 240p HDMI video modes with accurate refresh rates recently and have a couple of questions for any refresh rate experts.

 

Trying to figure out which refresh rates are the more common ones is getting trickier as I work more out. So far I've got accurate

50hz

54.707 (closest to 54.70684 I've found) - Midway 90s games eg Mortal Kombat etc

55.017606 - R-Type

57.5 - Snowbros and a bunch of other games

58.97 (closest I have to 58.970001) - Taito F3

59.185606 - NEOGEO

59.6 - Raiden

59.637405 -CPS 1 & CPS 2

59.70149254hz (closest I've found to 59.7) - late 90s Namco eg. point blank, outfoxies

60hz - thousands of games

60.0962 (closest I have to 60.096153) - Robotron2084, Wonder Boy, other classics too I assume

60.60606061 - Galaga, Donkey Kong, Rolling Thunder, other classics

 

Does anyone have a list of the most commonly used refresh rates in MAME?

 

Does anyone have an opinion on how accurate the video timing needs to be to be considered accurate? Could anyone realistically tell the difference between Raiden playing at exact 59.6 or at CPS1 refresh speed of 59.637405?

 

Also found an anomaly in MAMEs reporting. 55.83847 - actually unsure what uses this it was reported by MAME on my PC as Zoo Keeper (prob Qix too) refresh at startup but is wrong - in game MAME reports 60.021127 which I don't have yet...

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 4 months later...

Sorry, Only just noticed this thread.

 

Not exactly what your after but might be useful?

https://www.aussiearcade.com/forum/a...-refresh-rates

 

Been awhile since I made that post, So it probably needs some corrections.

 

 

 

I do have a bash script that gets the refresh rate from a list of (200) games.

You can use your own list of any length with the script.

(It requires "xmllint" to extract the refresh rate)

 

Here is the output in csv

GameRefresh.0223_R001.txt

 

#!/bin/bash
# Read each line of a text file

# Set Mame version
mame_exe="./sdlmamearcade64.V0223.Mainline"

if [[ -z "$1" ]]
then
# Empty
echo "file_list.txt required"
exit
fi

# Get filelist
filelist=$1

# Iterate through input file line by line
while read rom_name
do
# Read Game Refresh Rate
rom_xml=$("${mame_exe}" -listxml "${rom_name}")
game_data=$(<<<"${rom_xml}" xmllint --xpath "string(//display/@refresh)" - )
echo "${rom_name},${game_data}"
done < "${filelist}"

# Finished

 

Link to comment
Share on other sites

I ended up with about 35 different refresh rates... hopefully it covers the bases adequately. ARpiCADE 3.X out now. https://arpicade.com/forums/viewtopic.php?f=12&t=2137

 

Just to note,

Some games refresh rates have been corrected in newer Mame releases. So What an earlier version reports may be different to what a newer version of Mame reports.

Link to comment
Share on other sites

 

Just to note,

Some games refresh rates have been corrected in newer Mame releases. So What an earlier version reports may be different to what a newer version of Mame reports.

 

I have encountered that. There also seems to be some cases where MAME reports 1 refresh rate in the info box at startup and a different refresh rate in the MAME menu once the game is up and running. I have also noticed a couple of games in MAME 0.78 that are being ran at different to original hardware refresh rates by MAME.

 

On the scripting side of things I'm reading the game info from a reference file (same file shared by all MAME versions). Essentially the same logic you are using. Originally I was using the same reference file to check screen height, rotation etc. so it was easiest to simply continue doing it that way. Can't remember which MAME version I made the reference list from, I may have to update it.

 

On ZSystem are you using a list of resolutions/refreshes or do you generate them dynamicly? (I still haven't found a way to automate making resolutions with accurate refresh rates for RPi, my method involves putting numbers into a spreadsheet and manually looking for good results... which is still better than how I was doing it before that....) If you are using a list of refresh rates how many refresh rates do you have to cover the full spectrum of MAME? (I think I'm up around 40 at this point).

Link to comment
Share on other sites

 

I have encountered that. There also seems to be some cases where MAME reports 1 refresh rate in the info box at startup and a different refresh rate in the MAME menu once the game is up and running. I have also noticed a couple of games in MAME 0.78 that are being ran at different to original hardware refresh rates by MAME.

 

On the scripting side of things I'm reading the game info from a reference file (same file shared by all MAME versions). Essentially the same logic you are using. Originally I was using the same reference file to check screen height, rotation etc. so it was easiest to simply continue doing it that way. Can't remember which MAME version I made the reference list from, I may have to update it.

 

On ZSystem are you using a list of resolutions/refreshes or do you generate them dynamicly? (I still haven't found a way to automate making resolutions with accurate refresh rates for RPi, my method involves putting numbers into a spreadsheet and manually looking for good results... which is still better than how I was doing it before that....) If you are using a list of refresh rates how many refresh rates do you have to cover the full spectrum of MAME? (I think I'm up around 40 at this point).

 

Originally I created predefined modes, I have some vague memory that I ended up with about 35 modes.

If you have only 5 or so modes (Like ArcadeVGA used), Then speeds can vary 2% fast or slow.

It's when the game core runs slow that audio pops are most noticeable.

 

I generate them dynamically, Though my target resolution is always static and the refresh is the only variable (Mame is very good at scaling).

This relies on Mame versions 0.107 & greater that are able to output XML on a per game basis.

Basically,

0) Run Mame/Game in -listxml mode

1) Read the game refresh from XML

2) Run cvt or gtf to build a modeline

3) Create & Activate the new mode

4) Run Mame in sycrefresh mode

5) Activate a default video mode

6) Remove/Delete the mode

7) Return to Attract Mode

 

If your unable to create video modes on the fly, Then I think you should be pretty good with 40 predefined modes.

What happens when you try to create modes on the fly?

 

Link to comment
Share on other sites

If your unable to create video modes on the fly, Then I think you should be pretty good with 40 predefined modes.

What happens when you try to create modes on the fly?

 

I don't have an fully automated way to figure out the RPi pixel clock freq for a particular refresh rate. I think I could probably do it but haven't tried scripting it yet. Something I'll probably try in the future.

 

One plus to using the set list is you can manually adjust the porch&pulse sizes to line up various resolutions, not sure how I could automate that side of things yet.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...