There is an ini folder under the main Mame directory. Create a .ini file that has the same name as the rom you wish to make changes for. Under that .ini file you would just enter the buffer option and that should be it.
Someone please correct me if this is incorrect, but it seems to work for me for games I want to change.