Applying Changes

WARNING: Before I can go any farther, I must notify you that the distribution of binaries with altered code without prior permission from the authors is against the MAME license. It's not cool and this page should make it easy for anybody to build their own. If you want to lend a hand, post your source, not binaries. OK?

    To edit source and make changes, all you need is a text editor. It is recommended to have a slightly more advanced one than notepad (one that will show you what line number you are looking at) but if you don't you can always use your software's search function and be careful. Knowing what to change is another matter. There are different places to find these changes and as they pop up, I will add links to this site or I will post them on the appropriate changes page here for preservation.

    Please note: Some changes you may try, may affect more than you think. Once you have completed a successful build, make a change, then end up with something broken in your new build, it is highly recommended to delete your /obj directory and try to rebuild it from scratch. I know this takes a really long time, but I promise you will come across that situation if you mess around with the source enough. Performing a clean build can make all the difference in the world. 

    Most changes you will find are convenient, copy and paste, or delete changes. You will be told which file to look in, such as /src/drivers/neogeo.c, which line number to look for (or you will need to search for that line) and what to do. Other changes are in the form of a .diff file.

     pat253b.zip patch version 2.5.3               patch.zip version 2.5.4         cygwin_patch.zip  cygwin1.dll is required and included for this one

    These files are for patching source code with a .dif file. Place the .dif file and patch.exe into your top level source directory (c:\mame32) or have patch.exe in your path (with no other files named patch in your path) and use from a command prompt. Usage: patch -p0 -E <dif_name.dif   Update: It's probably better to place patch.exe into your windows/command folder. I've had reports of people having problems with certain versions of patch.exe with certain versions of windows, so if you've made an official build first, but get errors while you're patching the source or while trying to build a patched source, please try a different version (and redo the patch over a fresh source). Also be sure to use the patch command EXACTLY how it's written here because WinXP users may find problems adding an extra space in there after the <.

TO CREATE A .DIFF

Add Diff.exe to your mingw/bin directory. Use the command diff -Nru (old dir) (new dir) >diffname.diff

To make this absolutely clear I will give you an example of how I'm set up. I keep the "official" source in c:/mame, while making my changes in c:/mame32. When I'm ready to make my .diff file  I go to c:\ in the command prompt, set my path (path=c:\mingw\bin) and type :

diff -Nru c:/mame c:/mame32 >Mame_Add.diff.

Mame_Add.diff will then end up in my c:\ directory.  

    One final thought. Sometimes, you will be asked to uncomment something in the source. One line items are generally commented out by placing // in front of the line. Multiple lines that are commented out are usually commented by placing /* at the beginning of the comment and a */ at the end. You will learn very quickly how to read the changes and apply them. Trust me. Once you learn it's as easy as pie!


User Interface changes            Adding Game drivers