MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Anonymous
Unregistered
Send PM


Mame 146 and Raspberry Pi (Arm)
#292568 - 07/25/12 03:00 AM


I want to see if my Raspi plays well with the latest version of Mame. Before I go to all the trouble of figuring out how to get it to compile and work with Gentoo, has anyone already done this and if so is it worth the time? Should I revert to an older distribution like .84 instead?



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: ]
#292571 - 07/25/12 03:22 AM


> I want to see if my Raspi plays well with the latest version of Mame. Before I go to
> all the trouble of figuring out how to get it to compile and work with Gentoo, has
> anyone already done this and if so is it worth the time? Should I revert to an older
> distribution like .84 instead?

Don't bother if you don't have working OpenGL.

S



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: ]
#292586 - 07/25/12 04:22 PM


> I want to see if my Raspi plays well with the latest version of Mame. Before I go to
> all the trouble of figuring out how to get it to compile and work with Gentoo, has
> anyone already done this and if so is it worth the time? Should I revert to an older
> distribution like .84 instead?

The Pi's ARM11 is roughly equivalent to an x86 at 1/3rd the clock. Strictly a MAME4All (0.36) target.



Anonymous
Unregistered
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: R. Belmont]
#292589 - 07/25/12 06:14 PM


Bummer. Guess I will have to use the Pi for Open Kinect projects. Shame about that.

The Raspi has OpenGL ES 2.0 and can over clock to 1Ghz. If Mr Belmont suggests Mame4All...well there is not much hope.

Thanks for the help.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: ]
#292591 - 07/25/12 06:57 PM


> Bummer. Guess I will have to use the Pi for Open Kinect projects. Shame about that.
>
> The Raspi has OpenGL ES 2.0 and can over clock to 1Ghz. If Mr Belmont suggests
> Mame4All...well there is not much hope.

RasPi is a terrific Arduino killer and it should do very very well for general hardware hacks like Kinect experiments. It's not well suited for running general desktop PC type tasks - if you want to do those on a fanless ARM system, the PandaBoard is a much better choice.



sandheaver
MAME Fan
Reged: 03/13/13
Posts: 14
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: R. Belmont]
#305687 - 03/13/13 04:31 AM


I'm resurrecting an old thread here, but, with the help of a friend, I have successfully compiled MAME on my RPi and run it on the RPi as well, both with X and without. I wanted to post that here, since this seems a relevant topic. Sorry if this is against any rules.

Software rendering makes it very slow, as OpenGL is not supported by the hardware of the RPi. With an OpenGL ES implementation that MAME could use on this hardware, I think dramatic performance increases could be had.

"./mame -bench 60 25pacman" finishes in 59 seconds with no overclock. This is version 0.148 without updates.

A modest overclock (800?) and an OpenGL ES implementation that MAME can use might alone be all that is needed to emulate this game. Other games will simply be too much, I'm quite sure, but since this is the only game I'm interested in for the cabinet in question, it's the only one I've worried about. I've even gone so far as to modify the tiny target to only include this driver and its parent.

Two changes to the makefile (comment out two compiler flags) and three changes to src/emu/emualloc.c allow it to compile and run on ARM6. The rest is "make NOASM=1" and optionally "TARGET=tiny" if you modify that target rather than the main 'mame' target.

Anyone familiar with the code who has a Raspberry Pi in-hand will be able to sort it out quite handily, I imagine. I don't know C, but once my friend showed me what the cause was it looked like a bug in emualloc.c that is actually preventing the binary from running successfully when video rendering is desired. That is probably wrong, though, because of course this code runs unmodified on other platforms just fine.

I'll gladly share the changes if anyone is interested.

I am not interested in using AdvanceMAME or MAME4ALL because the single game I want is not supported on those. A person close to me had a stroke recently and that person loves video games, but now only has the use of one hand. I want to make pac-man and ms pac-man available to her in a cocktail cabinet, without any GUI outside of the game itself (important). The Raspberry Pi is how I was planning to do that, and I am now one step closer. I may not get all the way there on this hardware, but I'm learning things while I try, and that is never a waste, IMHO.

Thank you for your time.

Edited by sandheaver (03/13/13 04:39 AM)



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: sandheaver]
#305712 - 03/13/13 04:38 PM


> Anyone familiar with the code who has a Raspberry Pi in-hand will be able to sort it
> out quite handily, I imagine. I don't know C, but once my friend showed me what the
> cause was it looked like a bug in emualloc.c that is actually preventing the binary
> from running successfully when video rendering is desired. That is probably wrong,
> though, because of course this code runs unmodified on other platforms just fine.

Could you please share those changes? There is a crash on the (also ARM-based) OLPC XO 1.75 that I've had a lot of trouble tracking down due to the limited debugging capability of the unit which may be the same thing.

What game do you need to run? If it's available in Final Burn Alpha, it may run faster there.



sandheaver
MAME Fan
Reged: 03/13/13
Posts: 14
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: R. Belmont]
#305723 - 03/13/13 06:55 PM


I don't have the code with me, so I can't diff, but I'll mention line numbers of the current code via mamedev.org/source/ and what changes I made to make it run on my Raspberry Pi.

R. Belmont: please don't take this as the product of a seasoned developer. I made some of these changes and a C dev who works for my employer made the rest work because I was annoying the crap out of him. So, I can't speak for the quality of this, I can only say that these changes made MAME compile and run emulation for the specific game I want (25pacman.)

http://mamedev.org/source/makefile.html: comment out 499 and 500. The build will die on cast alignment errors, and ... something else, if you don't comment these out. ARM peculiarities.

http://mamedev.org/source/src/emu/emualloc.c.html: comment out 302 and 303.
297: change to: resource_pool_item *entry = resource_pool::find(item.m_ptr);

299: change to: entry = resource_pool::find(reinterpret_cast(item.m_ptrr) - sizeof(size_t));

Build with "make NOASM=1". If you don't restrict the target you'll run out of memory if you compile on the Raspberry Pi itself. I compiled support only for 20pacgal and 25pacman by modifying mame.lst and mame.mak. I don't have those changes on-hand, but I can get them, though that should be pretty easy for someone familiar with that system to replicate.



adm1nx
MAME Fan
Reged: 06/20/13
Posts: 1
Send PM


Re: Mame 146 and Raspberry Pi (Arm) new [Re: sandheaver]
#310608 - 06/20/13 07:00 PM


sandheaver,

Can you share the modified source files? I'm having a really hard time trying to cross-compile MAME for raspi, and I'm trying to accomplish the same end goal as you (raspberry pi that boots straight into 25pacman). I have tried with the 149 and 146 tree but haven't had any success. Are you compiling on the raspberry pi itself?


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 397 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3609