Previous Thread
Next Thread
Print Thread
Page 1 of 52 1 2 3 51 52
Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
Here's how to build SDLMAME 0.137 on Linux/*BSD/OS X:

0a) It's assumed you have SDL installed. For Linux/BSD refer to our sticky post for the correct thing to tell yum or apt.

0b) For Mac OS X, go to the SDL download page and download the .dmg under "Runtime Libraries" then "Mac OS X". When the .dmg opens, use the Finder to drag the SDL.Framework folder into your /Library/Frameworks folder. That's it. (If you've previously run SDLMAME you probably don't need to do this again unless your installed SDL is older than 1.2.14).

1) Download MAME 0.137 from mamedev.org. You want the .zip. Unzip it (which creates mame.zip) then unzip that to create a mame0137 folder and contents.

2) In a command window, cd into the mame0137 folder. If this is an integer release (0.137, 0.138, etc) skip to 3). For a u1/u2/uX release, continue with the "2.5" steps immediately below this.

2.5a) For non-integer releases (u1, u2, etc), unzip the .diff files and the "endings" utility from here into your mame folder.

2.5b) Run tne "endings" utility with ./endings.

2.5c) Patch the source. For each patch starting with u1, type patch -p0 <0.137u1.diff (change the .diff filename to match your version). Go in order: apply u1, then u2, then u3.

2.5d) EXCEPTION: if you previously patched your source and a new "u" version is out, you only need to do a make clean and apply the new patch. The previous patches will stay there unless you unzip the base version again.

3) For Intel 32 and 64-bit and PowerPC builds on Windows, Linux, *BSD, and OS X the makefile will auto-detect your OS and you simply can type "make" or "make -j3" for dual-cores.

Last edited by R. Belmont; 03/27/10 10:56 PM.
Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
Thanks for the instructions. I tried to follow them to the letter, but I'm still getting the error I already reported in the shout box when using then endings batch file:

Code
sed: 1: "./0136u1.diff": invalid command code .
sed: 1: "./docs/config.txt": invalid command code .
sed: 1: "./docs/license.txt": invalid command code .
etc...

Last edited by Carbon; 01/16/10 05:35 PM.
Joined: Jan 2010
Posts: 18
P
Member
Member
P Offline
Joined: Jan 2010
Posts: 18
same here on Snow Leopard

Joined: Sep 2000
Posts: 481
Likes: 2
M
Senior Member
Senior Member
M Offline
Joined: Sep 2000
Posts: 481
Likes: 2
I concur with Carbon and Prethorian...

Dual 1.8 G5
Mac OS X 10.5.8


The following statement is true...
The preceding statement is false.
Joined: Feb 2008
Posts: 20
Member
Member
Joined: Feb 2008
Posts: 20
according to my googlefu edit endings to add either -e or "" to sed so:

FROM:
find . -type f -not -name uismall.png -exec sed -i 's/\//' {} \;

TO:
find . -type f -not -name uismall.png -exec sed -ie 's/\//' {} \;
or
find . -type f -not -name uismall.png -exec sed -i "" 's/\//' {} \;

Seems to work, but then I have trouble still with the patch, so hopefully someone can clear this up

Joined: May 1999
Posts: 616
Likes: 1
Senior Member
Senior Member
Joined: May 1999
Posts: 616
Likes: 1
I'm using a utility called LineBreak to the change the line endings. The patch can then be successfuly applied, except for the following 3 files:

Code
patching file src/emu/cpu/tms9900/tms9995.c
The next patch would create the file src/emu/cpu/unsp/unsp.c,
which already exists!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/emu/cpu/unsp/unsp.c.rej
The next patch would create the file src/emu/cpu/unsp/unsp.h,
which already exists!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/emu/cpu/unsp/unsp.h.rej
The next patch would create the file src/emu/cpu/unsp/unspdasm.c,
which already exists!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/emu/cpu/unsp/unspdasm.c.rej

Launching make anyway, compilation stops after this file:
Code
Compiling src/emu/cpu/dsp56k/dsp56k.c...
In file included from src/emu/cpu/dsp56k/dsp56k.c:36:
src/emu/cpu/dsp56k/dsp56def.h:113:1: error: "L_SET" redefined
In file included from /usr/include/unistd.h:72,
                 from /usr/include/c++/4.2.1/i686-apple-darwin10/bits/os_defines.h:61,
                 from /usr/include/c++/4.2.1/i686-apple-darwin10/bits/c++config.h:41,
                 from /usr/include/c++/4.2.1/exception:42,
                 from src/emu/emucore.h:25,
                 from src/emu/emu.h:53,
                 from src/emu/cpu/dsp56k/dsp56k.c:32:
/usr/include/sys/unistd.h:132:1: error: this is the location of the previous definition

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
The following works on Mac. I will replace the downloadable version with it momentarily.

Code
find . -type f -not -name uismall.png | xargs perl -pi -e 's/\r\n?/\n/g'

Last edited by R. Belmont; 01/16/10 07:09 PM.
Joined: Jan 2010
Posts: 18
P
Member
Member
P Offline
Joined: Jan 2010
Posts: 18
Also did you mean to download source from mamedev.org or from sdlmame http://rbelmont.mameworld.info/sdlmame0136.zip

1st I tried to build official source from mamedev.org but not success, then I downloaded sdlmame0136 and I building passed success. But patching doesn't work in both cases.

Also about sdlmame0136, I built it without ./endings but with simple make TARGETOS=macosx -j3

EDIT: about line breaks, I will try to use dos2unix (install with ports) against this 'endings' batch script. I will inform did it works later.

Last edited by Prethorian; 01/16/10 06:27 PM.
Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
Jesus, no. DO NOT TRY TO BUILD U1 FROM SDLMAME 0.136 OR YOUR COMPUTER WILL EXPLODE.

Patching works on OS X using the modified endings script I posted above.

Last edited by R. Belmont; 01/16/10 06:27 PM.
Joined: Jan 2010
Posts: 18
P
Member
Member
P Offline
Joined: Jan 2010
Posts: 18
Originally Posted by R. Belmont
Jesus, no. DO NOT TRY TO BUILD U1 FROM SDLMAME 0.136 OR YOUR COMPUTER WILL EXPLODE.

Patching works on OS X using the modified endings script I posted above.

Nice I want to see that smile So I will try it indeed.

Last edited by Prethorian; 01/16/10 06:41 PM.
Page 1 of 52 1 2 3 51 52

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
4 members (Darkstar, farngle, hal3000, 1 invisible), 58 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,331
Posts122,197
Members5,077
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
Powered by UBB.threads™ PHP Forum Software 8.0.0