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.58 (Unix) OpenSSL/3.2.0 PHP/8.2.14
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.58 (Unix) OpenSSL/3.2.0 PHP/8.2.14

Tools for building MAME on Windows

The primary build of MAME is a command-line Windows program. It is compiled using gcc version 3.4.5 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 a pre-assembled package from this site, as described below, and add the DirectX headers to it. 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.

IMPORTANT: This current set of tools contains the necessary fixes to allow MinGW to work on Vista. If you have previously employed workarounds, you will need to disable them in order to make this work. This means removing extra paths from your environment, and removing the GCC_EXEC_PREFIX environment variable.

IMPORTANT: These build tools have been superceded by a more recent set of tools. Use these only for building old versions of MAME..

The Easy Way

1. Root Directory

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

2. Install the mingw-mame package

This package is designed to be a relatively simple 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 the following package:

Binaries Source

Extract this package into your mingw directory.

3. DirectX

Officially, you should go to microsoft.com and download the DirectX SDK, tweak the headers and libraries to work with MinGW, and then paste the results into your include and lib directories. Fortunately, the Allegro project has already done this for you.

Go to alleg.sourceforge.net, and download the following package:

Extract this file into a temporary directory and copy the following files into your mingw/include directory:

  • d3d8.h
  • d3d8caps.h
  • d3d8types.h
  • ddraw.h
  • dinput.h
  • dsound.h

4. Compile

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

set path=%PATH%;mingw\bin

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

cd mame-source-path

And then execute mingw32-make to build it:

mingw32-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

MinGW 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 is an effort to produce Windows-compatible header files so that you can build executables linked against standard Windows libraries. Apart from DirectX, this is a very complete solution for free Windows development, and much lighter weight than the Microsoft tools.

Go to mingw.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 all of these items into your mingw directory in the order listed, accepting any overwrites of existing files.

3. Vista MinGW fixes

The current version of MinGW has some issues with changes that were made to the standard C library implementation in Vista (namely, Vista now returns an error if invalid arguments are passed). The MinGW team has been slow in releasing an update to their tools, even though the fix is understood and present in source form.

Thanks to the efforts of other folks who have taken the time to build their own toolsets, we now have patched and fixed versions of these tools available:

Binaries Source

Extract this item into your mingw directory, accepting any overwrites of existing files.

4. 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 echo, 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 into a temp directory, and copy the specific .exe's needed for MAME into your mingw/bin directory.

5. 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.

Go to http://www.libsdl.org/, and download the following package:

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.

6. DirectX and Compiling

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.58 (Unix) OpenSSL/3.2.0 PHP/8.2.14