Previous Thread
Next Thread
Print Thread
Page 8 of 9 1 2 3 4 5 6 7 8 9
Re: Arm Akimbo SDLMAME [Re: R. Belmont] #63515 07/21/10 12:21 AM
Joined: Dec 2009
Posts: 24
F
Flandry Offline OP
Member
OP Offline
Member
F
Joined: Dec 2009
Posts: 24
Originally Posted By R. Belmont
There is no dynarec for rtype. Probably just that the startup code of the game incurs more reschedules due to testing timers and such.


Would that kind of MAME activity cause a lot of time to be spent in libgcc?

Quote:
I gather from ym2151 being expensive that the N900 doesn't have hardware floating point?


It does, and has both neon and vfp modes, but it seems that gcc doesn't support them well. I've just discovered this post on FP optimizations on the Pandora hardware (~N900) and am trying out some of them. Previously i was just specifying -mcpu=cortex-a8 and -mfpu=neon.

After reading that page i am thinking it may be worthwhile trying to add arm ASM helper functions after all, but it's daunting with no ARM ASM experience.

Last edited by Flandry; 07/21/10 12:22 AM.
Re: Arm Akimbo SDLMAME [Re: Flandry] #63516 07/21/10 12:27 AM
Joined: Mar 2001
Posts: 16,305
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,305
Sorry, I misread your post, I thought you had fingered some reschedule-related function and you didn't. I don't know what's spending time in libgcc without seeing better data, but on most platforms that means either 64-bit integer or floating point being emulated in software. MAME does make extensive use of both, which generally is only an issue on ARM targets nowadays. You may be better off sticking with MAME4ALL on that target.

Re: Arm Akimbo SDLMAME [Re: R. Belmont] #63517 07/21/10 03:23 AM
Joined: Dec 2009
Posts: 24
F
Flandry Offline OP
Member
OP Offline
Member
F
Joined: Dec 2009
Posts: 24
Thanks.

It's true that MAME4All performs great. My (possibly perverse) goal is to get modern MAME running well on ARM and i think it can do a lot better with some optimizations.

To move forward, i need a bit of guidance if you please. You mention software emulation of FP. I'm still using osd/miniwork.c (NOASM) and am trying to see where optimizations might be made. Assuming a minimal core work function is the starting point, where should i be looking?

Re: Arm Akimbo SDLMAME [Re: Flandry] #63518 07/21/10 03:39 AM
Joined: Mar 2001
Posts: 16,305
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,305
I'd love to get modern MAME running well, I agree it can, but I don't have anything near the data I need. Valgrind's sample profiler can give you a complete call trace for hotspots - it's pretty much necessary to know that to understand why libgcc is eating all the CPU time.

Re: Arm Akimbo SDLMAME [Re: R. Belmont] #63521 07/21/10 02:41 PM
Joined: Feb 2003
Posts: 168
mangamuscle Offline
Senior Member
Offline
Senior Member
Joined: Feb 2003
Posts: 168
Just my 2, but wouldn't a machine like the new toshiba ac100 be a more adequate hardware to try to port mame to ARM? I hear it is going to be priced around $500 USD so it is not too expensive.

Re: Arm Akimbo SDLMAME [Re: mangamuscle] #63522 07/21/10 03:20 PM
Joined: Mar 2001
Posts: 16,305
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,305
Sure, but it should be possible to get at least the classics to work well on N900/BeagleBoard/Pandora level hardware. It may simply require waiting for a stable version of Clang 2.0. Apple's slides from WWDC indicate that Clang's generated code averages 2 to 5 times faster for ARM targets (it's much less flashy for x86/x64, proving once again that GCC for non-x86 targets can get pretty dire).

Last edited by R. Belmont; 07/21/10 03:22 PM.
Re: Arm Akimbo SDLMAME [Re: R. Belmont] #63584 07/25/10 10:54 AM
Joined: Jul 2006
Posts: 87
L
ldesnogu Offline
Member
Offline
Member
L
Joined: Jul 2006
Posts: 87
2 to 5 times faster?!? Your bullshit detector should have warned you smile

I've tested recent versions of gcc for ARM and they are pretty good. I'd be surprised to see Clang beat them. Except for one thing: IIRC Clang can use NEON floating-point instructions instead of standard FP ones; that would give a boost for Cortex-A8 (but not for Cortex-A9 such as Tegra2), but then you lose IEEE-754 compliance; so twice faster for carefully chosen small FP loops, yes; for real programs even 10% would be nice. Even armcc isn't 10% faster than gcc...

Back to Flandry issue, I don't think Nokia SDK would rely on FP emulation. We'd need a real profiling of MAME to see what's happening...

Re: Arm Akimbo SDLMAME [Re: ldesnogu] #63585 07/25/10 11:46 AM
Joined: Feb 2004
Posts: 2,063
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,063
I'd believe it - SunPRO gets 2 to 3 times the performance of GCC on SPARC because GCC's codegen is atrocious.

Re: Arm Akimbo SDLMAME [Re: R. Belmont] #63587 07/25/10 01:04 PM
Joined: Feb 2007
Posts: 473
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 473
Originally Posted By R. Belmont
Sure, but it should be possible to get at least the classics to work well on N900/BeagleBoard/Pandora level hardware.

Some of the classics have discrete sound emulation. This is 100% floating point. It does however not rely on IEEE compliance.

Re: Arm Akimbo SDLMAME [Re: Vas Crabb] #63588 07/25/10 02:40 PM
Joined: Jul 2006
Posts: 87
L
ldesnogu Offline
Member
Offline
Member
L
Joined: Jul 2006
Posts: 87
Originally Posted By Vas Crabb
I'd believe it - SunPRO gets 2 to 3 times the performance of GCC on SPARC because GCC's codegen is atrocious.

I'm sorry but I've never found armcc (ARM Ltd own compiler) that much faster than gcc except for some *very* specific things (e.g., detecting widening multiplications). So I won't believe it... until proven wrong smile

Page 8 of 9 1 2 3 4 5 6 7 8 9

Moderated by  R. Belmont 

Who's Online Now
2 registered members (Reznor007, nerd4gw), 32 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,684
Posts114,040
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3