Object not found!

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

www.mamedev.org
Apache/2.4.46 (Unix) OpenSSL/1.1.1g PHP/7.4.10
Object not found!

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

www.mamedev.org
Apache/2.4.46 (Unix) OpenSSL/1.1.1g PHP/7.4.10

Tools for building MAME on Windows

The primary build of MAME is a command-line Windows program. It is compiled using gcc version 4.4.3 under the MinGW development environment. If you want to build your own version of MAME, there are two ways of acquiring the necessary tools to do so. The easy way is to download one of the pre-assembled packages from this site, as described below. The hard way is to acquire all the individual components that are used directly from the original sources and assemble the pieces together. Both approaches are described below.

Information about setting up the previous set of build tools from August 2007 is still available.

The Easy Way

1. Root Directory

Create a root directory; generally, this is called mingw.

2. Install one or both of the mingw-mame packages

This package is designed to be an easy pre-assembled installation for the development environment. It consists of a collection of mostly GPL-licensed tools from a variety of sources, and is the exact same set of tools and headers/ libraries that are used to compile the official sources. Go to mamedev.org and download one of the following packages:

Binaries Source
Thanks to our mirrors: GitHub, SourceForge, and Progetto-Snaps

Note that the packages expand greatly (over 100MB for each one), so if you only intend on ever compiling 32-bit MAME or 64-bit MAME, just grab the specific one you want.

Extract the package you downloaded into your mingw directory.

3. Compile

Open up a command-line window. First, ensure that the appropriate mingw/bin directory is part of your search path. Do that by typing:

set path=mingw\mingw64-w32\bin (32-bit)
set path=mingw\mingw64-w64\bin (64-bit)

Next, switch to the directory where the MAME sources live:

cd mame-source-path

And then execute make to build it:

make

Wait a while, and you will have a fully built MAME executable.

The Hard Way

1. Root Directory

Create a root directory; generally, this is called mingw.

2. mingw-w64

mingw-w64 is the official set compile tools for MAME. It is a repackaging of the gcc compiler along with the necessary tools, all ported to Windows. Part of mingw-w64 is an effort to produce Windows-compatible header files so that you can build executables linked against standard Windows libraries. This is a very complete solution for free Windows development, and much lighter weight than the Microsoft tools.

Go to mingw-w64.sourceforge.net, and download the following binary packages (source links are provided as well, but the source is not necessary to set up the environment):

Binaries Source

Extract one or both of these items into your mingw directory. They are independent of one another, and are designed to live side-by-side. The 64-bit toolchain extracts to a directory called simply mingw64, which has been renamed in the official toolchain to mingw64-w64 for clarity.

3. DirectX Headers

The mingw-w64 toolset is missing several legacy DirectX headers that MAME relies on. To obtain these, one of the mingw64 collaborators has taken the WINE DirectX headers and made them work with mingw. Just extract the files below into the i686-w64-mingw32/include directory (32-bit) and/or the x86_64-w64-mingw32/include (64-bit) as appropriate.

Binaries Source

4. Unicows

Unicows is a helper library provided by Microsoft to enable running Unicode applications (like MAME) on legacy Win9x systems. As part of the 32-bit toolchain, MAME links against the unicows library to enable this support. The libunicows project provides an open source version of this library, which is included with the 32-bit toolchain. Copy the file libunicows.a from the distribution below into the i686-w64-mingw32/lib directory.

Binaries Source

5. Win32 GNU-like tools

In order to build MAME, we rely on a few standard GNU tools. Fortunately, we only rely on basic behaviors of these tools, so we have taken the step of providing simple implementations of the common tools rm and mkdir.

In addition, the tools diff and patch are used for submitting code to MAME and for applying the latest intermediate 'u' update. These two tools have been built into Win32-native versions by taking the GNU tarballs and updating/modifying them as necessary to build under MinGW.

Binaries Source

Simply extract these items directly into your bin directory of one or both of the mingw distributions you started with.

6. SDL

This step is optional, but is nice if you wish to have a complete development environment for both native Win32 and SDL hosted versions of MAME.

Because SDL has not released a win64 version of SDL 1.2.14, we have built our own. The files below contain overlays to both the 32-bit and 64-bit mingw-w64 distributions that add the SDL files in their appropriate locations. The source archive contains the sources that were used to build these libraries, which are newer than the current 1.2.14 release (mostly containing bugfixes).

Binaries Source

Extract this file into your a temporary directory. Move the bin, include, and lib directories into your mingw directory, merging the contents with the existing directories.

7. Compile

Hop back to the Easy Way to finish these final two steps.

Object not found!

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

www.mamedev.org
Apache/2.4.46 (Unix) OpenSSL/1.1.1g PHP/7.4.10