Hi Haze,
Yes, I agree the -mt feature in base line MAME is flawed. Chris Kennedy (bitbytebit) and I noticed this in 2011, so patches for both SDL and Windows were submitted, however only the SDL patch was admitted. Anyway, it's no surprise the Windows patch was not admitted, as it somewhat defeated the whole multithreading idea (in case this was ever a good idea, I mean, having window and core threads decoupled):
http://forum.arcadecontrols.com/index.php/topic,106405.msg1154882.html#msg1154882There's an additional problem with the -mt feature of base line MAME. In certain circumstances it can lead to extremely bizarre input lag, I don't mean the kind of lag that some people say they "feel", but the one that persists during seconds after leaving the joystick/mouse alone. There's an explanation for this: having the window thread busy with rendering means that it can't process input messages until the video routines return. If you're v-syncing, this can represent a lot of time. But if you happen to be v-syncing to a refresh rate that is lower than the native game refresh, and you have -mt enabled, then you're likely going to have some frames that are virtually deaf to input. This happens to be the case when running many vertical games like Arkanoid on horizontal arcade monitors: you usually can't get 256 lines at 60 Hz, this means the monitor will refresh at 55-57 Hz while the game will try to keep running at 60 Hz. Combine this with a spinner and its load of input events that need to be processed and you'll see what I mean.
GroovyMAME benefits from the multithreading "infrastructure" in MAME (so for us it's good if it's kept) but implementing things a slightly different way, that fixes the existing problems (at least as far as I understand) and allows some extra features, like truly asynchronous tearing-free rendering, in other words, genuine triple buffering, not the fake implementation DirectX provides, and (apparentely) improving input responsiveness, by having input messages being processed alone in their own thread. Unfortunately, I have to say this implementation is not 100% safe either, due in part to Direct3D not being a thread-safe API, this makes it a nightmare to keep all threads synchronized and avoid the program crashing or enter a deadlock upon a simple ALT + TAB. This is the main obstacle I've found to even consider submitting these changes.