Setting up & Compiling

        _|_|_|  _|_|_|_|  _|      _|
      _|        _|        _|_|  _|_|    _|_|_|  _|_|_|  _|_|      _|_|
        _|_|    _|_|_|    _|  _|  _|  _|    _|  _|    _|    _|  _|_|_|_|
            _|  _|        _|      _|  _|    _|  _|    _|    _|  _|
      _|_|_|    _|        _|      _|    _|_|_|  _|    _|    _|    _|_|_|

								  sairuk

Before you begin
-  -  -  -  -  -
There are some preliminary steps to take before we compile the source code.
We need to setup the directories so everything can find what it needs.

Visit http://www.mame.net/. Download and install the Mingw environment so
you actually are able to compile mame if you need instructions on how to
setup and compile mingw go here http://www.logiqx.com/HowTo/WinMAME.shtml,
while you are there you will also need to download the latest mame source code. 
You will need the Mame32 source code from http://www.classicgaming.com/mame32qa/
so make sure you grab that also. Read the mame32_compile.htm for instructions
on how to install and compile a build of Mame32 from the source. Also while
you are there download the matching build of Mame32, Download the SFMame
source code.Also download UPX Compressor and PKZip 4.0 Commandline version.

To summarise. Before you begin anything you should have the following

	o MingW environment
	o Latest Mame Source Code
	o Latest Mame32 Source Code
	o Latest Mame32 Build
	o Latest SFMame Source Code
	o Upx 1.24w+
	0 PKzip 4 Commandline version

If you have all these continue with the next part.



Setting Up
-  -  -  -
It is now time to setup your directory structure so that everything works
together and we get the end result we are after, not errors. Install MingW
as per http://www.logiqx.com/HowTo/WinMAME.shtml. Now install the mame
source into the /mingw directory. See below for an example of the directory
structure.

      MingW +
            |
            /Mame +
                  |
                  /src
                  |
                  makefile
                  |
                  whatsnew.txt
                  |
                  +

Install Upx.exe and pkzipc.exe into the /mame directory.

Extract and install the Mame32 source code as per the instructions in the
mame32_compile.htm file.

Extract the SFMame source code into the /mame directory and overwrite all
files when asked.

Extract the latest Mame32 build into the directory /distro/sfmame see below
for an example.

      MingW +
            |
            /Mame +
                  |
                  /distro +
                  |       |
                  |       /sfmame +
                  |               |
                  |               <extract mame32 here>
                  |
                  /src
                  |
                  makefile
                  |
                  whatsnew.txt
                  |
                  +

You are now setup and ready to compile.



Compiling
-  -  -  -
Compiling SFMame couldn't be any easier (assuming you've setup your directories 
correctly). Type SFmame <version number> at the commmand line for example
your commandline for the first release of SFmame would be:

C:\MinGW\MAME> sfmame 065

You can leave out the version numbering if you like. If you do you will
need to go back and rename the zip file at the end to include the version
numbering as stated in the mame licensing.

If the compiling completed succesfully and the batch file ran without error
you should find sfmame32<version>.zip sitting in the /distro directory If not
you will need to scan back throught the output to find the error. If you do
successfully end up with a completed compile simply extract the zip to your
desired location and load/test SFMame32.exe

Note: Please make sure to update the readme files before doing a final compile.

regards,
sairuk