Please report all your fixes at the Github repository at https://github.com/retropie/RetroPie-Setup/issues?state=open. You would make things most easy for me, if you could create a pull request there.
Reply To: DGEN MAME NEOGEO bugs retropie 1.61 beta image