ok.....
1) Try sirk123au suggestion above
2) Try Eliminating hardware (Try another PC/ Video card/ monitor)
3) Try another versin of mame
4)
I change the resolution for each rom individually before i play each rom,
Worst case scenario you can make a .ini file for each rom you have a problem with.
eg make a ini directory within your mame directory. Copy the mame.ini into the folder. Rename it to pacman.ini or invaders.ini.(whatever) Then edit this ini file for the needs of that particular game. Then when you run mame and it finds a game with it's own .ini it will override the settings set in mame.ini just for that game.
This last option is far from ideal but is a bandaid solution to keep you sane for now :-)