This topic is old, but as I have faced what I believe to be the same issue, and managed to SOLVE IT, I would like to share my solution with you.
I have had kind of the same issue, and never understood how it happened. The result/problem was that as soon as I touched the "right direction" button of my D-pad, or right direction of the Joystick of my arcade cabinet (my RaspberryPi is installed in an arcade cabinet), a Mame settings menu appeared on screen. Or, to be more precise and exact, the following settings bars would appear alternatively (depending on my pressing the "up" or "down" buttons, then) at the bottom of the screen, while I was still playing: "Gamma correction", "Volume", "Brightness", "Contrast", etc.
Here is how I have got rid of those annoying settings bars, although I confess I do not understand quite well why it works.
As I have said, my RasberryPi is inside an arcade cabinet, so I have to access it via "My Local Networks" in my Windows Explorer. The exact path I have followed is:
"My Local Networks/RECALBOX/Share/roms/mame/mame2003/cfg.
Once I arrived in that "cfg" folder, I noticed there was a ".cfg" file for each game that I had been playing (or simply tried) on Mame since I owned my arcade cabinet. I simply deleted all such .cfg files, went back in front of my arcade cabinet, launched a game, and miraculously it worked i.e. the annoying settings menu would no longer display when I would press the "right" direction on the D-pad, or joystick !!!
I hope this description will help those of you which have the same problem.