Previous Thread
Next Thread
Print Thread
Page 1 of 7 1 2 3 4 5 6 7
#58897 - 02/04/10 05:58 PM New build instructions for SDLMAME on Mac OS X  
Joined: Sep 2000
Posts: 434
MAMEBase Online content
Senior Member
MAMEBase  Online Content
Senior Member

Joined: Sep 2000
Posts: 434
Madison, WI, USA
Once again, I've revised the build instructions for SDLMAME on Mac OS X.

As always, if you spot any glaring errors/omissions/outright lies, please let me know.

Also, if anyone would be interested in reposting this on their site. please let me know that as well... smile

----------

Building SDLMAME for Mac OS X - A Guide

Welcome to the world of SDLMAME. If you've built SDLMAME for Mac OS X in the past, you'll notice that since version 0.136u1, the build procedures have changed.

If you're new to building (compiling) SDLMAME on Mac OS X, with any luck, you'll find it's not as difficult as you might think.

Either way, Don't Panic! This guide will (hopefully) get you up and running in fairly short order.

Let's get started...

Step 0 - Preliminary Steps - (These need be done only once, with the occasional periodic updates) -

0a) Run Software Update
Your Operating System, and supporting files should be updated prior to compiling SDLMAME (and should be kept up to date regardless) The minimum supported OS for SDLMAME under Mac OS X is 10.7.x (Snow Leopard).

0b) Install/Update Xcode
Xcode is a free developer environment from Apple, and although it will be used to compile SDLMAME, you will not be required to learn how to run it.
It will need to be installed prior to compiling SDLMAME. As of this writing (November 2014) the current version of Xcode is 6.1 (for Mac OS X 10.10 (Yosemite)).
Xcode is free from Apple, in the Mac App Store.

Once you have downloaded Xcode, you'll need to run it. It will download and install a few more pieces at this time. Once it's done, you need to install the command line tools.

On Xcode 6.0 and later, open a Terminal window temporarily and type xcode-select --install and follow the prompts to install the command line tools. (This is a much easier version of this step that I recently found out about).

0c) Install/Update SDL
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and hundreds of Steam games for the Mac and Linux.
Go to http://www.libsdl.org/ , and click the "SDL 2.0" download link in the sidebar, then scroll down to "Mac OS X" under "Runtime Libraries". Download the "SDL-2.0.4.dmg" disk image and open it.
Click 'Macintosh HD' (or whatever your Mac's hard disk is named) in the left pane of a Finder window, then open the Library folder and drag the SDL2.framework folder from the SDL disk image into the 'Frameworks' folder.

Step 0 Recap -
- Run Software Update
- Install/Update Xcode
- Install/Update SDL2

=====

Step 1 - Gather files

1a) Create folder for build files
While not an absolute necessity, keeping various SDLMAME project files in a separate folder will help to avoid confusion while building. For purposes of this exercise, the folder will be called 'MAME Parts'

1b) Get 'Endings' script
Go to http://rbelmont.mameworld.info/?p=527 and download the 'Endings' file (endings.zip). Place this file in the 'MAME Parts' folder.

1c) Get Baseline MAME source
Go to http://mamedev.org/release.html and download the MAME source file (in zip format). Place this file in the 'MAME Parts' folder.

1d) Get update patch files
Go to http://mamedev.org/updates.html and download any of the diff files you do not already have. Place these files in the 'MAME Parts' folder

1e) Unzip, and place files
Go to the 'MAME Parts' folder. Unzip all the files you downloaded. Do not throw away the original zip files, as you may need them again in the future during the development cycle.
Place the endings file, and all patch files into the MAME Source folder.

Step 1 Recap -
- Create folder for build files
- Get 'Endings' script
- Get Baseline MAME source
- Get update patch files
- Unzip, and place files

=====

Step 2 - Prepare for building

2a) Launch Terminal, and set path
Open the Terminal (Applications->Utilities->Terminal). Type 'cd ' (that's cd, and a space), and drag the MAME Source folder to the Terminal window. Hit 'Return'. This sets the path for the subsequent commands.

2b) Run 'Endings'
Type the following line into the Terminal window (or copy and paste, if you prefer) -

./endings

Hit return. Wait for the prompt (This may take a while, and it may appear that nothing is happening... Be patient).

2c) Patch files
This is the variable part of the process, as each 'u' update patch needs to be applied in order to the source.

Type the following into the Terminal window -

patch -p0 <xxxxxxxx (that's [patch], [space], -p[zero], [space], <[diff file name])

Where 'xxxxxxxx' equals the name of the diff file you wish to apply. Hit Return, and wait for the prompt.

Repeat for each diff file in order (u1, u2, u3, etc.)

2d) Check the SDLMAME forums for last minute changes
Before proceeding to the next step, check for any last minute changes/fixex/modifications at the SDLMAME forum at http://www.bannister.org/forums/

Step 2 Recap -
- Launch Terminal, and set path
- Run 'Endings'
- Patch files
- Check the SDLMAME forums for last minute changes

=====

Step 3 - Build

3a) Build
Type the following into the Terminal window -

make

-OR-

make -j3 (for dual core processors)

-OR-

make -j5 (for quad core processors)


Hit Return. SDLMAME will auto detect your system type (32 bit or 64 bit), and build accordingly.

3b) Build Tools
As an option, you can build the optional tools that accompany SDLMAME (chdman, and the like) by typing the following into the Terminal window -

make tools

Hit return.

3c) Enjoy!
Congratulations! You've successfully built SDLMAME on Mac OS X!
You may want to rename the Source folder to reflect the version of SDLMAME you just built.
Attach your favorite front end application, and have fun!

Step 3 Recap -
- Build
- Build Tools
- Enjoy!

=====

Future Builds

Provided no modifications were made to the source prior to building, the next patch may simply be applied to the previous build, and the application built again (you can skip step 2b).

If, however, modifications were made to the source prior to building, it is advisable to start with fresh copies of the source, and all the diff files in order (the latest diff file will usually contain fixes for the previous versions).
If you kept the files from steps 1b, c, and,d, just proceed from step 1d.

=====

Troubleshooting FAQ

- I'm told I need to edit a file in Xcode. How do I do this?
Locate the file to be modified, and double click it. Xcode will open the file.
Chances are good that you were told what line of the code to modify. Under the 'Edit' menu, select 'Go to Line...'. Enter the line number, and click the 'Select' button. Make your modification(s), Save the change(s), and quit Xcode.

- I got an error while building. What do I do?
Check the SDLMAME forums at http://www.bannister.org/forums/ to see if this is a known problem, and if there is a fix available. If not, post a question, and someone will try to help you.
You may also want to try starting over at step 1, especially if you were patching an existing build.

- I got an error while patching the source. What do I do?
Start over from step 1, especially if you're patching an existing build. if you continue to have problems, you may be able to get help at the SDLMAME forums at http://www.bannister.org/forums/

- I had to make a modification of some sort prior to building. Will I have to make this modification again in the next version?
No. However, you may need to start over again with the original source, and latest diff files.

- Is there an easier way to do all this?
If you prefer not to build yourself, prebuilt versions of SDLMAME for Mac OS X are available for download at http://sdlmame.parodius.com/

- I've successfully built SDLMAME in Mac OS X... Now what?
That's a whole 'nother document... wink

Last edited by R. Belmont; 11/24/14 06:26 PM. Reason: Updated to reflect latest versions, SDL2 as the default, and the new command line tools install method.

The following statement is true...
The preceding statement is false.
#58899 - 02/04/10 10:17 PM Re: New build instructions for SDLMAME on Mac OS X [Re: MAMEBase]  
Joined: Mar 2001
Posts: 15,707
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,707
USA
Thanks. I'll sticky this smile

#59037 - 02/11/10 06:28 PM Re: New build instructions for SDLMAME on Mac OS X [Re: R. Belmont]  
Joined: Mar 2001
Posts: 15,707
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,707
USA
BTW, r0ni's still making canned Mac Universal binaries, so if you really would rather not compile, go here.

#59064 - 02/12/10 06:04 PM Re: New build instructions for SDLMAME on Mac OS X [Re: R. Belmont]  
Joined: Jul 2007
Posts: 181
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 181
California
Unfortunately Tiger users are left out there and still have to roll their own..

Just curious RB, do you know why r0ni includes the endings script with his binaries??
I was thinking of making my 136u2 I just compiled the other day for 10.4 available somewhere or other.. Do I need to give folks the endings script too for whatever reason??

#59065 - 02/12/10 06:55 PM Re: New build instructions for SDLMAME on Mac OS X [Re: Monotremata]  
Joined: Mar 2001
Posts: 15,707
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,707
USA
Tiger's not supported by SDL 1.2.14 so it's no longer officially supported by SDLMAME either. (We won't actively try to break it of course).

No idea why r0ni includes the "endings" script, probably an oversight.

#59091 - 02/14/10 06:27 AM Re: New build instructions for SDLMAME on Mac OS X [Re: R. Belmont]  
Joined: Sep 2000
Posts: 434
MAMEBase Online content
Senior Member
MAMEBase  Online Content
Senior Member

Joined: Sep 2000
Posts: 434
Madison, WI, USA
Did I miss something in the SDL documentation?

As far as I can tell, the minimum System requirement for SDL 1.2.14 is still 10.4.x (Tiger)

Perchance did you mean to say that SDL 1.2.14 is not supported by 10.3.x (Panther)?


The following statement is true...
The preceding statement is false.
#59133 - 02/15/10 11:54 PM Re: New build instructions for SDLMAME on Mac OS X [Re: MAMEBase]  
Joined: Jul 2007
Posts: 181
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 181
California
Ive been compiling Exult with 1.2.14 since it came out and havent run into any trouble yet. Although its got some bugs of its own that wreak havoc when you play Exult in full screen but other then that no problem..

#59136 - 02/16/10 12:49 AM Re: New build instructions for SDLMAME on Mac OS X [Re: Monotremata]  
Joined: Mar 2001
Posts: 15,707
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,707
USA
From what I saw on the SDL list, Tiger is missing an API they needed so it's possible with a sufficiently smart ld.so that not all SDL apps will trigger the fatal death on Tiger.

#59208 - 02/17/10 06:14 PM Re: New build instructions for SDLMAME on Mac OS X [Re: R. Belmont]  
Joined: Jul 2007
Posts: 181
Monotremata Offline
Senior Member
Monotremata  Offline
Senior Member

Joined: Jul 2007
Posts: 181
California
Guess its time to start looking for a used Intel Mac or G5 hehe.
I had Leopard on it up until last summer but it was just too much of a dog so I went back.
Logic Pro went from being able to play a 20 track song to crawling with 10 tracks so it had to go hehe...

Although with that said, u3 compiled fine yesterday. Crossing my fingers all is still well! Hopefully I can keep up for awhile. MAME OS X was always a fave but I like actually staying current with things hehehe..

#59210 - 02/17/10 06:32 PM Re: New build instructions for SDLMAME on Mac OS X [Re: Monotremata]  
Joined: Mar 2001
Posts: 15,707
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,707
USA
I do try to do what I can for PowerPCs - Run and Gun has proper graphics on 'em in u3 (should be fast enough for PS3 peeps like billb too).

Page 1 of 7 1 2 3 4 5 6 7

Moderated by  R. Belmont 

Who's Online Now
3 registered members (r09, MAMEBase, 1 invisible), 14 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,411
Posts108,909
Members4,757
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.030s Queries: 14 (0.009s) Memory: 5.0305 MB (Peak: 5.2573 MB) Zlib enabled. Server Time: 2017-09-21 22:48:12 UTC