Page 1 of 22 1 2 3 ... 21 22 >
Topic Options
#58111 - 16/01/10 03:05 PM How to build SDLMAME 0.137 and later
R. Belmont Offline
Senior Member

Registered: 17/03/01
Posts: 12492
Loc: USA
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.


Edited by R. Belmont (27/03/10 10:56 PM)

Top
#58118 - 16/01/10 05:34 PM Re: How to build SDLMAME 0.136u1 and later [Re: R. Belmont]
Carbon Offline
Senior Member

Registered: 06/05/99
Posts: 892
Loc: Luxembourg
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...


Edited by Carbon (16/01/10 05:35 PM)

Top
#58119 - 16/01/10 05:48 PM Re: How to build SDLMAME 0.136u1 and later [Re: Carbon]
Prethorian Offline
Member

Registered: 16/01/10
Posts: 18
same here on Snow Leopard

Top
#58120 - 16/01/10 05:50 PM Re: How to build SDLMAME 0.136u1 and later [Re: Prethorian]
MAMEBase Online   content
Senior Member

Registered: 15/09/00
Posts: 848
Loc: Madison, WI, USA
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.

Top
#58121 - 16/01/10 06:03 PM Re: How to build SDLMAME 0.136u1 and later [Re: MAMEBase]
neo_frank Offline
Member

Registered: 22/02/08
Posts: 20
Loc: FL
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

Top
#58124 - 16/01/10 06:12 PM Re: How to build SDLMAME 0.136u1 and later [Re: neo_frank]
Carbon Offline
Senior Member

Registered: 06/05/99
Posts: 892
Loc: Luxembourg
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

Top
#58126 - 16/01/10 06:23 PM Re: How to build SDLMAME 0.136u1 and later [Re: Carbon]
R. Belmont Offline
Senior Member

Registered: 17/03/01
Posts: 12492
Loc: USA
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'


Edited by R. Belmont (16/01/10 07:09 PM)

Top
#58127 - 16/01/10 06:24 PM Re: How to build SDLMAME 0.136u1 and later [Re: neo_frank]
Prethorian Offline
Member

Registered: 16/01/10
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.


Edited by Prethorian (16/01/10 06:27 PM)

Top
#58128 - 16/01/10 06:27 PM Re: How to build SDLMAME 0.136u1 and later [Re: Prethorian]
R. Belmont Offline
Senior Member

Registered: 17/03/01
Posts: 12492
Loc: USA
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.


Edited by R. Belmont (16/01/10 06:27 PM)

Top
#58129 - 16/01/10 06:32 PM Re: How to build SDLMAME 0.136u1 and later [Re: R. Belmont]
Prethorian Offline
Member

Registered: 16/01/10
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.


Edited by Prethorian (16/01/10 06:41 PM)

Top
Page 1 of 22 1 2 3 ... 21 22 >


Moderator:  R. Belmont 
Who's Online
2 registered (MAMEBase, Micko), 15 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Forum Stats
4015 Members
9 Forums
6214 Topics
63592 Posts

Max Online: 162 @ 01/05/07 03:28 AM