Compile MAME

This is the tutorial I used to compile. I compiled it primarily to remove the nag screens. Below is a re-creation of that tutorial, in case it gets wiped.

This is to compile MAME starting with version 0.155 through 0.158.

Build the MinGW compiling environment

Download the appropriate compiling package of files from the MAMEDev webpage under the Easy Way section.

  • mingw-mame-w64-20140905.exe if you are running a 64-bit version of Windows
  • mingw-mame-w32-20140905.exe if you are running a 32-bit version of Windows

Double-click on the file that you downloaded

Extract to: C:\MinGW.

Build the MAME Source Tree

Download the current source from the MAMEDev website.

Inside this zip file is another zip file named

Extract the contents of to where you plan on keeping your MAME source tree (The rest of this page is going to assume C:\mamesrc).

You should now have a folder that looks like the following:


DIFFs, Extra Files, and Stuff

In order for the nag screens to go away, you need to include the DIFF files. Go here and select the DIFF file for your version.

Extract DIFFs to your C:\mamesrc folder.

As an option, download this file here.

This ZIP contains the following files:

  • PatchMAME.bat – a batch file to help run patch.exe
  • MakeMAME.bat – a batch file to help compile MAME
    cmd.bat – a batch file that runs a command prompt window at your source folder, with Administrative rights (to fix issues with “patch.exe”)

Extract to C:\mamesrc

You should now have a folder that looks similar to the example here.


This example shows the main source tree, the first five updates for MAME 0.146, and the three batch files.

If necessary, edit MakeMAME.bat:

Right-click on the file, and choose Edit. This will open the file in Notepad.

  • If you extracted MinGW to a different folder, change the red area to the correct path
  • If you are building a 32-bit version of MAME, change w64 to w32

Do the same for PatchMAME.bat.

Apply the “u” Update DIFFs

If you are just compiling the main source code, then you can skip this section.

  • Double-click the command prompt shortcut to open a command-line window.
  • The actual command to patch with a DIFF file is:patch -p0 -E <0155u1.diff

(in this example, using 0155u1.diff)

The batch file makes it a little easier to type; you can use the command:

patchmame 0155u1

(in this example, using 0155u1.diff)

You will see a window similar to the one shown. These are all of the source files that are changing.

When applying DIFFs, make sure to apply them in order (0146u1, 0146u2, 0146u3, etc.)

Create the MAME Executable

At the command prompt, type makemame, then wait, as it’s going to take a bit. You’ll see a bunch of lines of code scroll by. That’s the compiler doing its work.

When the code is done compiling, go back and check your mamesrc folder. You will have a shiny new MAME:

The 32-bit version will be named mame.exe; the 64-bit version (shown here) will be named mame64.exe

Copy to whichever folder you use for MAME.

If you also want a copy of the various tools that come with MAME, use the command make -all

CONGRATULATIONS!! You have now entered the world of compiling! You can now stay up to date within the world of MAME on your own, without having to wait for another website to upload a pre-compiled version.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s