Hi ozfalcon,
Sorry for my late answer. Last couple of weeks have been crazy finishing stuff in order to get some holiday.
If you have a look at video.c you have this in the video_manager constructor:
m_syncrefresh(machine.options().sync_refresh())
The syncrefresh option is taken from there, then it's used internally by the class as m_syncrefresh, specifically in update_throttle is used to determine whether the function should exit immediately or not.
I'm going to fix the patches today, hopefully they'll be ready in a while.
Thanks for the reply, Your holiday is priority - Your a busy man and deserve the relaxation time!
----> m_syncrefresh(machine.options().sync_refresh())
Yes - I thought that was all that was used.
The code in video.c seems fairly straight forward.
I made a small diagnostic patch, and you can see the results below.
The patch simply shows the value of m_syncrefresh from within /emu/video.c
and is inserted in the update_throttle section (Hence the use of throttle in the test).
The patch leaves the sync_refresh option in /osd/osdepend.c
While it does work, I am still to learn how the reference to sync_refresh is available in /emu/video.c
diff -Nru old/emu/video.c src/emu/video.c
--- old/emu/video.c 2014-07-22 08:14:56.000000000 +1000
+++ src/emu/video.c 2014-08-09 22:50:15.042927000 +1000
@@ -86,6 +86,7 @@
m_overall_valid_counter(0),
m_throttled(machine.options().throttle()),
m_throttle_rate(1.0f),
+ m_syncrefresh(machine.options().sync_refresh()),
m_fastforward(false),
m_seconds_to_run(machine.options().seconds_to_run()),
m_auto_frameskip(machine.options().auto_frameskip()),
@@ -726,6 +727,9 @@
3,4,4,5,4,5,5,6, 4,5,5,6,5,6,6,7, 4,5,5,6,5,6,6,7, 5,6,6,7,6,7,7,8
};
+ // if we're only syncing to the refresh, bail now
+ osd_printf_verbose("(/emu/video.c/update_throttle) m_syncrefresh = %i \n", m_syncrefresh );
+
// outer scope so we can break out in case of a resync
while (1)
{
diff -Nru old/emu/video.h src/emu/video.h
--- old/emu/video.h 2014-07-22 08:21:56.000000000 +1000
+++ src/emu/video.h 2014-08-09 22:31:41.231600000 +1000
@@ -145,6 +145,7 @@
// configuration
bool m_throttled; // flag: TRUE if we're currently throttled
float m_throttle_rate; // target rate for throttling
+ bool m_syncrefresh; // flag: TRUE if we're currently refresh-synced
bool m_fastforward; // flag: TRUE if we're currently fast-forwarding
UINT32 m_seconds_to_run; // number of seconds to run before quitting
bool m_auto_frameskip; // flag: TRUE if we're automatically frameskipping
(The patch is really just to see the code inserted, Not actually to be compiled)
RESULTS
$> ./mame xybots -verbose -throttle -nosyncrefresh
...
(/emu/video.c/update_throttle) m_syncrefresh = 0
Average speed: 100.00% (8 seconds)
$> ./mame xybots -verbose -throttle -syncrefresh
...
(/emu/video.c/update_throttle) m_syncrefresh = 1
Average speed: 100.00% (6 seconds)