MAME stand for multiple arcade machine emulator:
http://www.mame.net/index.php
Source code can be found here at the bottom of the page:
http://www.mame.net/release.html
MAME is free. Its source code is free. The project as whole is under distributed under the GNU General Public License, version 2 (GPL-2.0), but most of code (including core functionality) is available under the BSD-3-clause license.
Thanks in advance!