MAME NoNag Compilation Guide for Windows

  1. Grab the latest msys2 tar.xz archive from http://repo.msys2.org/distrib/x86_64/

  2. Extract the tar within that file with 7zip, then extract the msys64 folder from that to somewhere you have write privileges (the desktop or documents should be fine). This is a portable setup where everything you are working on is contained in the msys64 folder.

  3. Follow these instructions to get your msys2 environment setup: https://bot.libretro.com/docs/compilation/windows/ You use the msys2_shell.cmd to open your msys2 shell. You can ignore the shortcuts section of that guide since you can just run the cmd and mingw64.exe directly from the msys64 folder. You can stop following the guide at the Nvidia toolkit part unless you want to compile RetroArch too.

  4. After closing the msys2 shell window, you can start up mingw64.exe. In that prompt type:

git clone https://github.com/libretro/mame

The MAME source will start downloading. Once it’s done and you’re back to the $ prompt type:

cd mame
  1. Edit: This step can be skipped for now since NoNag works already in the current source without a patch. If this changes in the future this might be useful again.

Now we will apply Enverex’s NoNag patch. I had to regenerate it for some reason. Download it from here: https://www.dropbox.com/s/hpzyoxx5jgmxuya/mame-nonag.patch?dl=0 Move it to msys2\home\mame. Now in your mingw64 prompt type:

pacman -S patch

Type Y and hit enter to install the ability to use patches. Now type:

patch -p1 < mame-nonag.patch

The patch is now applied!

  1. Now type:
make -j5 -f Makefile.libretro STRIP_SYMBOLS=1

And hit Enter to start compiling. You can change the number next to the j to match the number of cores/threads your processor has + 1 for optimal compiling. The strip option will cut down on the core size by removing debug symbols you probably don’t need. Optionally, if you want an arcade only core, you can instead type:

make -j5 -f Makefile.libretro STRIP_SYMBOLS=1 SUBTARGET=arcade

Or to make a console/computer/MESS core:

make -j5 -f Makefile.libretro STRIP_SYMBOLS=1 SUBTARGET=MESS

Compiling MAME takes awhile; maybe more than an hour depending on your processor. When the $ prompt appears, compilation is done.

  1. Look inside msys64\home<username>\mame for your fresh mame_libretro.dll. It’ll be named differently if you do the arcade or MESS subtarget. You can pop this in your RetroArch\cores folder and enjoy :slight_smile:

  2. If you want to easily update your core, you can open the mingw64.exe and type:

cd mame

Then:

git pull

Which will update your source files. Then you can make again to compile. Sometimes if the build has issues after updating you can try using:

make clean

To clean up precompiled stuff and then make again to compile cleanly.

Sorry , but your are late :slight_smile: it’s pretty useless since we remove libco dependency and then we had to bypass nag.


void mame_ui_manager::display_startup_screens(bool first_time)
{
	const int maxstate = 3;
	int str = machine().options().seconds_to_run();
	bool show_gameinfo = !machine().options().skip_gameinfo();
	bool show_warnings = true, show_mandatory_fileman = true;
	int state;

	// disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
	// or if we are debugging
	if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
		show_gameinfo = show_warnings = show_mandatory_fileman = false;

#if defined(EMSCRIPTEN) || defined(__LIBRETRO__)
	// also disable for the JavaScript port since the startup screens do not run asynchronously
	show_gameinfo = show_warnings = false;
#endif
	// loop over states

at least , it could be a good starting point for mame compilation guide on windows.

Should still be useful for some people when the buildbot is down too.

Yes the buildbot did not update since we change the mame repository (from 0.174 to 0.180) , and I can"t help here since there are no logs on buildbot about the mame windows build. I hope someone here can look at the buildbot mame build.

@r-type I did some work on the Windows buildbot last night and hope to have it back in working order by this evening, so hopefully we’ll get some MAME build failure logs. Thanks for all the effort you’ve put into this latest MAME core, it’s really nice :slight_smile:

[QUOTE=hunterk;53006]@r-type I did some work on the Windows buildbot last night and hope to have it back in working order by this evening, so hopefully we’ll get some MAME build failure logs. Thanks for all the effort you’ve put into this latest MAME core, it’s really nice :)[/QUOTE]

hi hunterk , thanks for looking at seem there are no core build for windows since 16/12. for mame cores , log say " /bin/sh: gcc: command not found" for 2010/2014/git

It’s compiling well here in windows and MSYS2 with

make -j4 -f Makefile.libretro

like Awakaned said.

Not sure which environment the buildbot uses though.