Previous Thread
Next Thread
Print Thread
Page 1 of 8 1 2 3 4 5 6 7 8
Joined: Sep 2000
Posts: 481
Likes: 2
M
Senior Member
OP Offline
Senior Member
M
Joined: Sep 2000
Posts: 481
Likes: 2
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 Releases" download link in the sidebar. Download the "SDL2-2.28.2.dmg" disk image and open it once it downloads.
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; 08/17/23 03:50 PM. Reason: Updated to reflect latest SDL2 version.

The following statement is true...
The preceding statement is false.
Joined: Mar 2001
Posts: 17,202
Likes: 216
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,202
Likes: 216
Thanks. I'll sticky this smile

Joined: Mar 2001
Posts: 17,202
Likes: 216
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,202
Likes: 216
BTW, r0ni's still making canned Mac Universal binaries, so if you really would rather not compile, go here.

Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
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??

Joined: Mar 2001
Posts: 17,202
Likes: 216
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,202
Likes: 216
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.

Joined: Sep 2000
Posts: 481
Likes: 2
M
Senior Member
OP Offline
Senior Member
M
Joined: Sep 2000
Posts: 481
Likes: 2
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.
Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
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..

Joined: Mar 2001
Posts: 17,202
Likes: 216
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,202
Likes: 216
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.

Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
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..

Joined: Mar 2001
Posts: 17,202
Likes: 216
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,202
Likes: 216
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 8 1 2 3 4 5 6 7 8

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
0 members (), 35 guests, and 4 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,319
Posts121,844
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com