Previous Thread
Next Thread
Print Thread
Page 29 of 52 1 2 27 28 29 30 31 51 52
Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71244
06/29/11 12:18 PM
06/29/11 12:18 PM
Joined: Mar 2001
Posts: 16,226
USA
R
R. Belmont Online content OP
Very Senior Member
R. Belmont  Online Content OP
Very Senior Member
R
Joined: Mar 2001
Posts: 16,226
USA
Yes, I pre-verified 0.143 on both PowerPC 10.5 and Intel 10.6 smile

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71258
06/29/11 09:09 PM
06/29/11 09:09 PM
Joined: Jan 2007
Posts: 180
Turin, North Italy
M
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member
M
Joined: Jan 2007
Posts: 180
Turin, North Italy
0.143 builds correctly here under 10.5.8 (dual G4 machine) with Xcode 3.1.4 and SDL 1.2.14 but the resulting executable goes nowhere and not a single game can be launched.
For example the following command:

./mame -listxml

at a certain point stop to output the datas with a "Illegal Instruction" message, just after the line:

[...]
<mame build="0.143 (Jun 29 2011)" debug="no" mameconfig="10">
Illegal instruction

The last version to compile fine and running very good on my system was the 0.142u6

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71259
06/29/11 09:29 PM
06/29/11 09:29 PM
Joined: Mar 2001
Posts: 16,226
USA
R
R. Belmont Online content OP
Very Senior Member
R. Belmont  Online Content OP
Very Senior Member
R
Joined: Mar 2001
Posts: 16,226
USA
Odd. I'll take a look. I wonder if libco requires a G5 or something.

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71260
06/29/11 10:41 PM
06/29/11 10:41 PM
Joined: Mar 2001
Posts: 16,226
USA
R
R. Belmont Online content OP
Very Senior Member
R. Belmont  Online Content OP
Very Senior Member
R
Joined: Mar 2001
Posts: 16,226
USA
Hmm, it's worse than that. cothreads doesn't work on PPC OSX at all, it appears. Vas? smile

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71269
06/30/11 02:06 PM
06/30/11 02:06 PM
Joined: Feb 2004
Posts: 2,050
Sydney, Australia
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,050
Sydney, Australia
OK, I'll have a look at it. It worked at one point. Can you point me at the latest cothreads source so I can see if I can look at it outside MAME?

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71270
06/30/11 02:17 PM
06/30/11 02:17 PM
Joined: Mar 2001
Posts: 16,226
USA
R
R. Belmont Online content OP
Very Senior Member
R. Belmont  Online Content OP
Very Senior Member
R
Joined: Mar 2001
Posts: 16,226
USA
http://byuu.org/programming/

I had to modify the preprocessor usage to appease Apple GCC 4.0.1 though, so you'll probably end up having to look at it in MAME anyway.

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71294
07/02/11 02:24 PM
07/02/11 02:24 PM
Joined: Jun 2008
Posts: 205
B
byuu Offline
Senior Member
byuu  Offline
Senior Member
B
Joined: Jun 2008
Posts: 205
Vas' original code required GNU as. blargg uses a PPC Mac, and he ported Vas Crabb's code to compile as a binary blob using only GCC.

It was tested on PPC32 and PPC64 OS X, the latter via SSH. It was even tested under Linux and BSD. I'm certain the code itself works, but there may be problems somewhere else along the way.

Nonetheless, if you'd like any patches applied upstream, I'd be happy to oblige. Thanks for looking at it smile

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71295
07/02/11 02:45 PM
07/02/11 02:45 PM
Joined: Mar 2001
Posts: 16,226
USA
R
R. Belmont Online content OP
Very Senior Member
R. Belmont  Online Content OP
Very Senior Member
R
Joined: Mar 2001
Posts: 16,226
USA
Well, it crashes inside the assembly the first time co_create is called on my G5, so that's Bad.

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71299
07/03/11 01:40 AM
07/03/11 01:40 AM
Joined: Feb 2004
Posts: 2,050
Sydney, Australia
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,050
Sydney, Australia
PPC Macs have GNU as installed - you can invoke it through the GCC frontend. I'll look at it some time. I suspect it's doing something dodgy - I recall the GCC-only x86 code only worked by chance last I looked at it.

Re: How to build SDLMAME 0.137 and later [Re: R. Belmont] #71303
07/03/11 10:07 AM
07/03/11 10:07 AM
Joined: Jun 2008
Posts: 205
B
byuu Offline
Senior Member
byuu  Offline
Senior Member
B
Joined: Jun 2008
Posts: 205
The old GCC-only code had to use every trick in the book to prevent GCC from generating header and footer code to the co_switch function. Unlike MSVC, GCC absolutely hates the idea of naked functions.

We fixed that by making co_switch invoke co_swap, which is a byte-array that we mprotect to be executable. It's a tiny bit slower as a result, but fully portable so long as the ABI stays the same.

Page 29 of 52 1 2 27 28 29 30 31 51 52

Moderated by  R. Belmont 

Who's Online Now
1 registered members (Pernod), 146 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,659
Posts113,530
Members4,847
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.051s Queries: 15 (0.032s) Memory: 5.7352 MB (Peak: 5.9579 MB) Zlib enabled. Server Time: 2019-06-26 11:50:37 UTC