Had a few reports of this from different people, and happens with different games (not all of them).
The only common factor is Windows 10 with nVidia drivers. Everything else on the computer works fine except for MAME (and derivatives).
Some people worked out solutions which only work for them, such as changing the Hz rate, or removing custom nVidia settings.
Sorry I can't be more specific.