As stated above catlist has a good feature for this. Another option is to load EmuLoader (
www.mameworld.net/emuloader), place the catver.ini file in it's home directory, and then use the parental lock manager. It searches the catver.ini file for nude, nudity, adult, and mature and will find 178 games in MAME 0.62. You could them remove the roms for these games.
You could also recompile MAME so the games aren't even recognized anymore. Just edit driver.c and change the offending games entry from "DRIVER" to "TESTDRIVER" and recompile.
So why ban gambling games that you can't even win anything on your pc, but allow softcore and sometimes possibly illegal images in porn roms in Mame?
FYI, I was one of the few people probably still around when the gambling games were removed. Mame uses some odd logic, but it's Nicola's baby and overall the program is awesome. Just to set things straight, I dug up the whatsnew from MAME r36RC1 (the release that removed these games). Here's what Nicola had to say:
"A few drivers which didn't strictly fit MAME's purpose have been removed.
First of all there were a few drivers which, just like consoles or computers,
don't fall into the category of "arcade video games" that MAME attempts to
emulate. They should have never been added in the first place, and that mistake
is now being rectified.
One of the removed drivers is Street Fighter Zero for the CPS Changer, which
is not an arcade game even if it runs on arcade hardware. The source is left
in, commented out, because it could be useful as a reference for people
attempting to emulate CPS-2 (which, before you ask, won't happen anytime soon).
The so-called "home" versions of NeoGeo games have not ben removed because
there isn't anything in them suggesting that they are home-only games: they
accept coins just like all the others, and might just be different revisions
of the code.
Other removed drivers are four gambling machines. Note that a "gambling
machine" is different from a "video game with a gambling theme". The
discrimination is strictly a technical one, not a moral one (a gambling
machine gives back money/tokens/tickets, a video game does not).
The "Sente diagnostic cartridge" has not been removed because, even if it is
not a game, it is equivalent to the diagnostic tools that are built-in in many
other games - it's just that instead of pressing a service switch you had to
insert this special cartridge to test the board.
The last driver removed is Pong, which at this point was too much of a
simulation and too little of an emulation. It didn't really fit into MAME's
architecture which is CPU-based and targeted at accurately reproducing the
gameplay of the original.
That was a difficult decision to make, but thankfully I won't have to bother
about these things anymore in the future. Gotta go now! *waves*"
Hope this helps