Hello,
First, thanks MkChamp for the patch, but there is one problem for me applying these modifications.
Since I'm using a fixed 60hz display, I'm using the refreshspeed option for mame to slow down a little bit some games, correcting audio glitches.
I don't want to change the speed option to say 0.98, since it will slow down all games even those that run under 60hz.
It seems that the calculation is done during startup screens (they're now gone!), so the calculation is wrong. For example on a 60hz display, using refreshspeed 1 in mame.ini, dkong should run steady at 98.00%. Now it's random and audio glitches appear.
Here is what I did to patch the problem. But if you find a better way, I'll welcome it with open arms!
Or is there a way you could include this little patch?
-------------------------------------------------------
For mame 0.123:
In mame.ini, set: refreshspeed 60 (instead of 0 or 1, Boolean changed for an Integer)
In ./src/emu/video.c:
Line #291:
global.refresh_speed = options_get_bool(mame_options(), OPTION_REFRESHSPEED);
Change for:
global.refresh_speed = options_get_int(mame_options(), OPTION_REFRESHSPEED);
-------------------------------------------------------
Line #752:
if (global.refresh_speed)
Changed for:
if (global.refresh_speed != 0)
I might not need to modify this one since "60 == True" in C language
-------------------------------------------------------
Line #754:
float minrefresh = render_get_max_update_rate();
Changed for:
float minrefresh = global.refresh_speed;
Basically, what I do, is just set the refresh speed to 60hz statically. I can actually change it to whatever I want, something like 59 if I want to be safe with my display.
I guess the dynamic calculation is more precise depending on the display used.
Any comments?
Thank you.
Pitou!