Here we go:
http://www.municade.com/municade/software/Note -- I wrote this guy back when mame was at 0.58. It still works today, but once the source code is changed, mame will no longer compile. The problem is that in MAME, I insert comments where the code was changed, and the compiler gets mad b/c 1) sometimes the code is inside of a macro (compiler does not like comments in a macro) and 2) sometimes the code is already commented out. In C/C++ comments inside of comments are generally a no-no.
So, have a look and good luck!
I about a year ago, I lost the source code in a hd crash, so I can't change the behavior of the proggy anymore.