Files You Will Need.
For now just leave the files on your desktop or wherever you browser downloads them to.
For MAME...
1. MingW
http://mamedev.org/tools/mingw-mame-20070810.exe
MingW is the program used to compile MAME.
2. DirectX Extensions
http://alleg.sourceforge.net/files/dx80_mgw.zip
These are for MAME to use Windows DirectX.
3. MAME Source Files
http://mamedev.org/release.html
This is the full souce for MAME. Choose the official source file in zip format.
4. Compile Extras
http://www.mameworld.net/mrdo/files/compile_extras.zip
These are a couple of really useful batch files to help you compile from the command line.
For MameUI...
You need all the above files and these too..
5. MameUI Source Files
http://mameui.classicgaming.gamespy.com/
You need a fileplanet account to get the file from here. It may be mirrored elsewhere. The source version file must match the current source file downloaded for MAME.
6. MameUI Compiler Extras
http://www.mameworld.net/mrdo/files/mameui_extras.zip
These are a few files to compile MameUI's help files.
7. MameUI Compiler Batch File
http://www.mameworld.net/mrdo/files/compileui_extras.zip
Again a couple of useful batch file to help the compilation process.