If you are an old school video game nerd like me, you probably enjoy MAME. However I was disappointed to find that my new Windows laptop did not run MAME properly. It would often freeze the computer in the middle of the game, and loop the last bit of audio played, over and over. The computer would crash so hard that I could not do anything except for power it off via the power button.

After playing with the command line options, I found a fix for this. Basically this is a screen and/or refresh rate issue. If MAME gets ahead of your computer's display, everything will go haywire.

Therefore, use the command line options -refreshspeed -waitvsync to start MAME.

It's very easy.

You probably started Pacman by typing:

mame pacman


Instead of that, now type:

mame -refreshspeed -waitvsync pacman



Fixed it for me, and will probably fix it for you as well.