I used two copies of MAME one specifically for cocktail games. I then wrote a little program to read the MAME xml file and generate cfg files with the cocktail mode set if available. Then you can use "Launch With" to use the cocktail mode or go in set that to default emulator for the cocktail games. I put the code that makes the cfg files on github so anyone can use it:
https://github.com/wolfgangmahler/mamecocktail
Added note: If you're using a three sided cabinet like mine, the mame.ini will need the autorol or autolol option to rotate the vertical games