Hello there (first post, wall of text incoming),
I just wanted to write about my MAME setup that works without screen tearing and hopefully minimal lag for _some_ games.
It's basically a combination of running MAME in sync with the refresh rate, and making sure the games' refresh rates are available in my monitor settings. I haven't really found anyone describing a setup like that when googling. So here goes!
Computer setup:
Windows 8 64-bit
MAME64 0.149u1
DELL U2412M 16:10 LCD monitor (native resolution 1920x1200)
ATI HD4850
I'm using Custom Resolution Utility (cru 1.0.1)
http://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU. With this utility I can add custom resolutions AND REFRESHRATES to my monitor settings.
What I did was select a few games that I want to run at 100% exactly, and check for their monitor refresh rates in the MAME game xml. There is a limit of 4 custom resolutions in CRU (probably Windows' fault). The games I currently use are:
(The numbers are from memory, but that's not really important.)
Mortal Kombat 54.5 Hz
ESP RaDe 57.55 Hz
Donkey Kong 60.60 Hz
I would've liked to use the neogeo refresh rate as well, but my monitor did not like it, so i had to use 59.95 Hz instead of 59.16(?).
These refresh-rates are added with CRU using the native resolution of my monitor, 1920x1200, on each entry, but with a different refresh rate for each entry (one for each game/system).
This is combined with the following MAME.ini settings:
throttle 0 (If this is not set to 0, no speeds over 100% will be allowed)
multithreading 0 (With mt on, syncrefresh seems to not work and run games at 400% and above)
syncrefresh 1
resolution 1920x1200 (This is important: I want to run the panel at native resolution always. And: when not specifying refresh rate, MAME selects the best available)
switchres 1 (MAME must actually switch the resolution/refresh-rate combination)
waitvsync 0
triplebuffer 0
Since syncrefresh will make sure the game runs in sync with the monitor, we can disable the other 'screen tearing'-fixes.
With this setup, there is a small delay when launching different games since the monitor must adapt to the new refresh rate.
This runs Mortal Kombat, ESP RaDe and Donkey Kong at 100% without audio glitching (like happens with waitvsync and triplebuffer for donkey kong). Other games that don't match exactly run at e.g. 101% (neo geo games).
I might improve on this by using these settings only for games that are confirmed to run at 100%, and use triplebuffer, throttling, and multithreading for games with refresh rates that my monitor does not accept.
When trying refresh rates on your monitor, some may not work. In that case, just exit MAME and it will revert back to your desktop refresh rate. Then use CRU to try a different refresh rate, reboot, and launch the game again.
For some reason, not all refresh rates between 57-61 Hz work even though those 'endpoints' work. I guess it's trial and error to get the 'perfect 4' refresh rates for the favorite games to run as close as 100% as possible.
Comments are welcome if you know how to improve on this