The Ministry of Cheesy Hacks presents:http://www.ianm3igb.plus.com/ym2151.zip
Try the patch against MAME 0.129u4 or just overwrite your source files with those included.
While playing a YM-2151-based game:
* Use the numeric keys 0-7 to toggle each channel on/off.
* Press '8' to enable all channels.
* Press '9' to dump the FM parameters for all active channels to an .OPM file (gamename.opm). Each dump is appended to the last, so dump yourself dizzy.
I've been having fun making patches from some of my FM favourites. Get them from here:http://www.ianm3igb.plus.com/unclephil.opm