Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mame doesn't apply the right framerate on game start #28

Closed
Tatsuya79 opened this issue May 21, 2017 · 7 comments
Closed

Mame doesn't apply the right framerate on game start #28

Tatsuya79 opened this issue May 21, 2017 · 7 comments

Comments

@Tatsuya79
Copy link

Tatsuya79 commented May 21, 2017

I was testing a custom resolution of 54.7Hz to run Mortal Kombat 1 and observe the scrolling on title screen (when you insert a coin).

I specified video_refresh_rate = "54.7" in a Mame.cfg override that is working on core start.
I see my TV switching to it and reported it in retroarch video settings "Estimated screen framerate".

But the scrolling is jerky showing the game is not running at that framerate.
When I change Throttle in Mame core options, a re-init happens and the scrolling is now perfectly smooth!

The thing is, you can just change that throttle setting from OFF to ON and then back to OFF again, resume, it's smooth.

I think the reason is SET_SYSTEM_AV_INFO is called while it wasn't called on initial boot?

@r-type
Copy link

r-type commented May 21, 2017

https://github.com/libretro/mame/blob/master/src/osd/libretro/window.cpp
in

 int retro_window_info::window_init()
...
		if(fb_width>max_width || fb_height>max_height)
			NEWGAME_FROM_OSD = 1;
		else NEWGAME_FROM_OSD = 2;

i think first time it call only NEWGAME_FROM_OSD = 2 if res not > resmax (so only update geometry)
and not update the fps.
a good try will be to force at start NEWGAME_FROM_OSD =1 at init fct , to see if it update fps.

At least test if retro_fps is different from old fps and then force NEWGAME_FROM_OSD =1.

@Tatsuya79
Copy link
Author

Can't compile it on win7 x64. Trying:
make -j4 -f Makefile.libretro SOURCES=src/mame/drivers/midyunit.cpp

I end up with a non working core crashing retroarch.

https://mega.nz/#!59dwCCSa!snkMA02hlBKCI-X3qqi5QNB9NwB_O84jQOhhKKwEExA

Full Mame compile failed without any core in the end.
Buildbot version works.

@r-type
Copy link

r-type commented May 21, 2017

You have to check your tc is seh or sjlj.
Compare your build with the buildbot one.
http://stackoverflow.com/questions/17967597/obtaining-current-gcc-exception-model

@Tatsuya79
Copy link
Author

Oh you already told me something about that before...
I'm so bad with all this compiler stuff, I don't really want to mess it up for a test. 😕
I'm just following the "compile on windows" guide without understanding much more than that.

Sorry to ask, but if you have time to compile a test for me I could tell you how it behave.

@r-type
Copy link

r-type commented May 22, 2017

no time to do a mame build ,but I change code to do so . so wait the buildbot and see.

@Tatsuya79
Copy link
Author

It starts with the right timing now that's good!
MK1 scrolling at 54.7Hz is fine (if your monitor is set to that).
Tried Asteroids which is a 61HZ+ game: sound was stuttering before, now it's better (on a 60hz monitor).

I see a "game focus is: OFF" message though at start and the mouse cursor is visible.

@Tatsuya79
Copy link
Author

Tatsuya79 commented May 22, 2017

Yes it's good.
People complaining about blinking shadows in KOF should be happy now.
Thank you, closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants