benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

MAME Distro

Mon Jul 23, 2012 1:19 am

All,

After reading most of the forums regarding MAME projects for the RPI, I got excited enough to start my own. I currently have 4 RPIs en route that should be at my doorstep any day now and LOTS of time to play. I've dabbled around with various MAME projects in the past, mainly on linux distros, and always have been in love with the idea of being able to help provide an 'all-in-one' solution for the masses to game on. Until recently, it wasn't really possible for a single distro image to be made that would be compatible with ALL hardware, but now there are Raspberry Pis! With the hardware being universal, there's nothing stopping us (as a community) from making this distro possible.

My idea: Make a distro that is easily maintained, lightweight in size, fully customizable, and easy for beginners to install and mod.

Where to begin:
1. Obtain the hardware (soon)
2. Get the community's thoughts on the best distro of MAME to use.
3. Streamline a linux distro for our needs that not only supports the RPI hardware, but any additional hardware needed for external controls.
4. Test, test, test
5. Document and make available for all to enjoy for free

I've developed and contributed with various linux distros over the years enough to be knowledgable for taking on this project solely, but all good ideas need collaberation. So, I'd like to extend this opportunity to all, and look forward to any and all ideas!

Let's make a $35 game system that EVERYONE can enjoy!

Let MAMEPi begin!

(Okay, first thing we should do is come up with a better distro name)

john.mills
Posts: 81
Joined: Mon Apr 09, 2012 5:23 am

Re: MAME Distro

Mon Jul 23, 2012 11:43 am

Hi Benjamin,

That sounds like a brilliant idea! As the foundation have moved to Raspbian (Debian Hardfloat) for their official release it would make sense to base your release on this.

A good foundation would probably be this:

http://www.linuxsystems.it/2012/06/rasp ... mal-image/

I think it wouldn't be a bad idea to have your release auto login and have the screen be slightly over scanned to get rid of the black borders.

I think Romeo is a nice front end to Mame on Linux:

http://stefanobolli.sourceforge.net/

It sounds like you have enough experience with MAME to get going with. Please keep us all informed.

Best regards,

John

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Mon Jul 23, 2012 12:34 pm

Exactly my thoughts John.

A slimmed down (if possible) version of Raspian with an auto login that immediately boots to the game chooser.

I've always liked MALA (http://malafe.net/) as a front end for it's features and ease of installation/use, but again, I'm open to suggestions from everyone.

I've already began scripting an installer for after the image is initally booted that guides the user through initial configuations, but it can't be finished until the hardware gets here obviously. Things that the installer script currently and will ask are:

1. Auto user login (Y/n)
2. Auto load front end (Y/n)
3. Screen orientation (0,90,180,270)
4. Primary video out (HDMI/RCA)
5. Network info (DHCP or ip, subnet,gateway,dns,etc,etc)
6. Do you have any external controllers to load drivers for (Y/n) => list
7. Enter path for ROM dir (default /roms)
8. Audio test
9. Video test
10. Write config, mod boot, del temp, reboot into GUI

What else am I missing group?

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website

Re: MAME Distro

Mon Jul 23, 2012 12:58 pm

Great Idea.

I've been working on building a frontend (so far advanceMenu) to work with my builds of AdvanceMAME, AdvanceMESS, and Gngeo (neogeo). I'd love to help with MamePi :)
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

ratherDashing
Posts: 39
Joined: Tue Jun 05, 2012 3:00 am

Re: MAME Distro

Mon Jul 23, 2012 2:42 pm

This is exactly what I want to do, I have the hardware, but haven't had any time (my job has me working 12 hour days, 6-days a week since July 1st)!

What I wanted to do wasn't MAME specific but was working with ToadKing's RetroArch which has iMAME4All support as well as various other emulators. It might be worth looking into what he did since it seems to play SNES/NES/MAME games at full or close to full speed already. I just don't believe there are any frontends available for RetroArch yet.

zup
Posts: 18
Joined: Sun Jun 24, 2012 5:28 pm

Re: MAME Distro

Mon Jul 23, 2012 3:16 pm

I've made a patch to compile mame4all in Raspberry Pi, maybe it could help you --> http://www.raspberrypi.org/phpBB3/viewt ... =66&t=9265

Mame4all is based around MAME 0.37b5, so it support less games than "official" MAMEs (0.106 in Debian). But mame 0.37 code was simpler, so it needs less memory and run faster than modern than 0.106. Keep in mind that there are some bugs to solve, though.

Also, you may want to check iMame4all (a derivative), because it uses GLES in Android and Iphone (it makes it somewhat faster than "normal" mame).

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Mon Jul 23, 2012 6:19 pm

@zup: Good info, I'll start with MAME 0.37b5 and debug. On RPI #2 I'll run with your mame4all build and check it out.

Unfortunately, I only have a few older controllers that I begin testing with, and only one is USB (but a little rewiring can easily be done on that front).

@ssilver2k2: Are you far enough on your advanceMAME build to share results? I could start on RPI #3 with your build, if possible.

@ratherdashing: Yikes! That's quite the work schedule! Although In the future I'd like to entertain the idea of adding SNES/NES support, I'm focused on getting a perfected MAME build down. Don't get me wrong though, I'm all about some Super Mario!

All, I'm looking into ripping out the guts of the Raspbian build and only including a 'lite' X load. No GUI tools will be available except for terminal and perhaps a custom app for beginners to manage ROMs. I'll also add/keep NFS/SMBFS options for aquiring new ROMs from network locations. Perhaps also a lite file manager for transferring ROMs via USB media.

UPS says I'll have my hardware tomorrow. Till then, I'll finish up install scripts for initial load and play with a bootloader option for reconfiguring existing builds. (oh, and find all my DVD backups of all my ROMs for testing)

But first, I'm off to see Batman in iMax! Later!

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website

Re: MAME Distro

Tue Jul 24, 2012 12:52 am

take a look at my site, blog.sheasilverman.com for the binaries and source links. I have advancemame, advancemess, and a neo geo emulator all working.
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Tue Jul 24, 2012 7:55 pm

I got my first one via UPS a few minutes ago (I'm posting using it now). Apparently, Newark decided to sent them all separately, so the others should follow.

I've began stripping the OS and building the startup scripts.

I'll be compiling soon.

john.mills
Posts: 81
Joined: Mon Apr 09, 2012 5:23 am

Re: MAME Distro

Tue Jul 24, 2012 8:16 pm

Good luck Benjamin,

I think focusing solely on MAME for now is not a bad idea. The addition of console emulation can come about a little later. Please let us know how we can support your project. I would think that once the system is configured after first boot then ideally the menu system should be completely navigable by joypad, joystick etc. I would like the Pi to sit under my TV and act as a device not a computer. Plug and forget if you will. Also I'm sure we can sort out some hosting for you if you need it. If you can get GLES acceleration going then that would be ideal.

Best regards,

John

tech_monkey
Posts: 130
Joined: Fri Mar 09, 2012 6:12 pm

Re: MAME Distro

Tue Jul 24, 2012 8:21 pm

You've got my vote for Mala as the front end. I also used Arcade OS on an old PC that was running DOS at a place I used to work at. http://www.mameworld.info/pc2jamma/frontend.html the source code is available for it too.
As for usb controls you may want to look at Ultimarc http://www.ultimarc.com/
http://www.casatech.eu

mynameisollie
Posts: 2
Joined: Tue Jul 24, 2012 9:40 pm

Re: MAME Distro

Tue Jul 24, 2012 9:51 pm

I have been building a bartop machine with hope of using a pi for the insides, so I hope this project works out. I bought a keyboard encoder on ebay for about 12 quid to enable the buttons and joystick to be registered as keyboard presses. Here's the link, but I don't think he is making them any more http://www.ebay.co.uk/itm/ws/eBayISAPI. ... 1221wt_881. It's pretty much the same as the I-PAC

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Fri Jul 27, 2012 11:58 am

Well, for those of you that thought I'd dropped off the planet, here's an update:

I have received all four RPis now and have them all compiling different builds.

Advancemame, xmame, sdlmame, and fastmame all take about the same time to compile (~7 and a half hours @ 900MHz) and when you forget to install necessary packages and supply correct paths for compile, sometimes you have to do it twice (ARRRGH)!

Advancemame (0.106.1) is done and working correctly, along with Advancemenu (2.5.0) to go along with it. Sound in advancemenu is cracky right this second, but I already know what to do to fix that. Roms I've tried run fine, but I haven't tried anything really taxing yet (~Post 1990's games)

-Thanks to SSilver2k2 for pointing me in the right direction. (Your binary build of Advancemame wouldn't start on my stripped copy of Raspbian, so I had to recompile)

xmame, sdlmame and fastmame are all compiling on the other pis right now and I haven't checked on their status yet.

I'll be imaging my advancemame build shortly and throwing it up somewhere for playing with others. As of right now, the system autologs in, and advancemenu starts, bypassing X startup. The build is static HDMI setup, with sound configured to HDMI stream. There are MULTIPLE packages that have been added for compiling that will not be on the final build. It will be an image for an 8GB partition load (as of right now), but I'll be reducing that back down to the default 2GB with user options to increase partition size at boot.

Splash screen for the OS will be compiled soon (Love me some purty pictures to looky at durin' a boot)

(BTW, note to beginners (and some old timers), if you decide to recompile any of these packages; MAKE SURE you check your spelling before submitting a LONG list of arguments! Oh, and I'm a moron 'cause I've screwed it up twice now (and wasted 16 hours of compile time)).

recliq
Posts: 38
Joined: Wed Jun 13, 2012 4:56 pm

Re: MAME Distro

Fri Jul 27, 2012 2:48 pm

Just my two cents here:

I think you should try to get around any X if possible. Since X isn't hardware accelerated in any way so far on Pi it only eats up resources.

I gained this knowledge during the several hours I spend to get VICE running in fullscreen at accaptable speed. I ended up compiling VICE with only SDLUI and ALSA for sound enabled.
This way I got a fullscreen VICE in 800x600 resolution which is then scaled by SDL in hardware to actual screen resolution (here it's 1920x1200).
Hardware scaling also seems to apply a bilinear filter which makes the screen look a bit washed out (just like it looked on my TV back in the days with an original C64), so I think of this as a feature ;p
I was able to run any game I tried in fullspeed, just some demos I tried got slow/stuttering sometimes but these demos use a lot of tricks the emulator has to chew on.

Back on topic, since this is about MAME not VICE.. ;)
I think you should try to get MAME running with SDL (or even better GLES) for Frontend and Emulator, at least until there is some driver with hardware acceleration available for X.

lukeren
Posts: 18
Joined: Fri Jul 27, 2012 10:06 am

Re: MAME Distro

Sat Jul 28, 2012 1:04 pm

@benjaminkeith:

Do you by chance have the bublbobl or invaders rom, and do they work?
I've got a few roms working, but others just give me a black screen and I'm curious if it's something to do with my build or it's simply advancemame that just can't handle it on the RPi.

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website

Re: MAME Distro

Sun Jul 29, 2012 2:41 am

If you get jsut a black screen, press left and right a couple of times. I've noticed the warning screen will sometimes register the first ok/left-right but needs a second one to actually get to the CPU info screen. Then the game will start.

Bubble Bobble does work. And it plays great.
lukeren wrote:@benjaminkeith:

Do you by chance have the bublbobl or invaders rom, and do they work?
I've got a few roms working, but others just give me a black screen and I'm curious if it's something to do with my build or it's simply advancemame that just can't handle it on the RPi.
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website

Re: MAME Distro

Sun Jul 29, 2012 2:43 am

benjaminkeith wrote: stripped for space
I've recompiled AdvanceMESS, AdvanceMENU, and AdvanceMAME for Raspbian and they individually work fine.

Regarding AdvanceMENU, I have it working and it's a decent frontend, but it has trouble with AdvanceMESS for some reason.
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Sun Jul 29, 2012 4:16 am

@SSilver:

Yeah, The AdvanceMAME group works fine for the older games. After my THIRD 7 hour compile (because of a missing dependancy or two for sound), everything works fine on that front.

Stipped the OS as far as I thing I can without bringing on crashes on boot. Still stuck with X though.

I have Pi#4 compiling Advance with SDL right now, so far, so good.

As of right now, the OS boots (sans boot splash for debugging purposes), auto logs in with root credentials and starts menu (advancemenu). If the user exits menu, it automatically restarts menu (I call it a kid OS lockout, so if my nephew exits too far, it puts him back into the menu). All login prompts, banners, motd, and command line messages are suppressed so the user sees nothing but splash on boot, then menu.

@lukeren: Both of your roms work for me (advancemame 0.106.1), but the screen does go black after the typical warning message. Just left-right it again during the blackness to continue.

I've tested multiple pre 90s ROMs with no issues (other than Donkey Kong, it's got sound issues but I think its the fileset that I have). Most of the newer roms run SLOW still. I start tuning the other mame distros I've compiled tomorrow to see if we can squeeze a little more juice out.

BTW, the wife has comendeered pi1 to play Tetris and QBert, so I'm down to 3 for testing/compiling for the time being... :-P

tickett
Posts: 15
Joined: Sun Feb 12, 2012 6:09 pm
Contact: Website

Re: MAME Distro

Sun Jul 29, 2012 8:57 am

Watching this thread closely. I've got some hardware (old, gutted arcade machines, controllers etc) on the way, already got a few pis and can't wait to get started with the project.

It's a real shame:
A) compilation is so painful and time consuming (i know, i've been doing some too)
B) imaging sd, compressing, uploading (aka sharing) is real pain/time consuming

Keep us posted and, let us know if we can assist in anyway. Until then- I may have to settle with finding an OSX port I can start playing with to get me nostalgic.

Lee

lukeren
Posts: 18
Joined: Fri Jul 27, 2012 10:06 am

Re: MAME Distro

Sun Jul 29, 2012 9:36 am

benjaminkeith wrote: @lukeren: Both of your roms work for me (advancemame 0.106.1), but the screen does go black after the typical warning message. Just left-right it again during the blackness to continue.
I read somewhere that I should use the 0.106.0 release, I'll try and build the .1 release instead, see ya in 7 hours ;)

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website

Re: MAME Distro

Sun Jul 29, 2012 12:18 pm

I don't know if you're overclocking your PIs at all, but I've got mine stable at 900mhz, and it brings the compile time down to about 4-5 hours.
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

lukeren
Posts: 18
Joined: Fri Jul 27, 2012 10:06 am

Re: MAME Distro

Sun Jul 29, 2012 12:32 pm

I've set mine to 800MHz for this compile, didn't want to over do it, as I'm not sure my powersupply can deliver the required ampage.

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Sun Jul 29, 2012 4:58 pm

So, a couple of people have PM'd me for an instruction set. I'll give you what I have so far for Pi1 (non-SDL compile, non bootsplash). I know you can apt-get multiple packages at once, but I like to verify each to watch for auto-installed dependancies, so do it as you like. I haven't removed any unnecessary packages in these instructions, so you can still use X like the original Raspbian build. (Except python games, I killed them because they suck) Also, those keen eyes may see that there are a couple of extra packages installed that have been needed for various other compiles, so, sorry for the mess.

su root
cd ~
/usr/bin/raspi-config (if needed)
vi /boot/config.txt
**ADD AT BOTTOM**: arm-freq=900
**ADD AT BOTTOM**: sdram_freq=500
rm -rf ~/python_games
apt-get -y install gcc-4.7
apt-get -y install g++-4.7
apt-get -y install build-essential
apt-get -y install libgtk2.0-dev
apt-get -y install libgnome2-dev
apt-get -y install libxv-dev
apt-get -y install libxv1
apt-get -y install libtool
###NOT DONE FOR THIS BUILD apt-get -y install libsdl1-image1.2-dev:armhf
apt-get -y install libsdl1.2-dev
apt-get -y install libsdl-mixer1.2-dev
apt-get -y install libavcodec-dev
apt-get -y install libavformat-dev
apt-get -y install libswscale-dev
apt-get -y install libdsl-console
apt-get -y install libdsl-console-dev
apt-get -y install libsdl-gfx1.2
apt-get -y install libsdl-net1.2
apt-get -y install libsdl-net1.2-dev
apt-get -y install libsdl-pango-dev
apt-get -y install libsdl-sge
apt-get -y install libsdl-sge-dev
apt-get -y install libsdl-sound1.2-dev
apt-get -y install libsdl-stretch-dev
apt-get -y install libsdl-ttf2.0
apt-get -y install libsdl-ttf2.0-dev
export CC=gcc-4.7
export CXX=g++-4.7
wget "http://prdownloads.sourceforge.net/adva ... z?download" -o advancemame-0.106.1.tar.gz
wget "http://prdownloads.sourceforge.net/adva ... z?download" -o advancemenu-2.5.0.tar.gz
wget "http://downloads.sourceforge.net/advanc ... z?download" -o advancescan-1.14.tar.gz
decompress and extract advancemame (tar xvfz advancemame-0.106.1.tar.gz)
cd advancemame-0.106.1
time ./configure --prefix=/root/mame ===> 2m4s
time make -d ===> 454m12s
time make install ===> 43s
vi /root/.advance/advmame.rc
*add for HDMI* device_video_clock 5-50 / 15.62 / 50; 5-50 / 15.73 / 60
*add for NTSC* device_video_clock 5-50 / 15.73 / 60
cd ~
decompress and extract advancemenu (tar xvfz advancescan-1.14.tar.gz)
time ./configure --prefix=/root/menu ===> 45s
time make -d ===> 25m4s
time make install ===> 1.5s
vi /root/.advance/advmenu.rc
ADD IN: emulator "AdvanceMAME" advmame "/root/mame/bin/advmame"
vi /etc/inittab
REM OUT: 1:2345: respawn :/sbin/getty tty1 115 200
ADD IN: 1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1
vi /etc/ssh/sshd_config
Change: PrintLastLog yes ==> PrintLastLog no
/etc/pam.d/login:
REM OUT: session optional pam_lastlog.so
mv /etc/motd /etc/motd.bak
mv /etc/issue /etc/issue.bak
reboot

Instruction set for complete SDL soon. I'm still working GLES...

lukeren
Posts: 18
Joined: Fri Jul 27, 2012 10:06 am

Re: MAME Distro

Sun Jul 29, 2012 5:29 pm

It's working now!
The bublbobl rom does require an extra left-right to get going, I'm not sure I actually caught that the first time around...
It's not the smoothest of experiences when there's a lot of bubbles floating around though, even at 900/500MHz.

benjaminkeith
Posts: 9
Joined: Tue Jul 17, 2012 3:14 am

Re: MAME Distro

Mon Jul 30, 2012 3:06 am

Oops,

I found my speed issue in compiling. I can't edit my last post for some reason, but the line:

**ADD AT BOTTOM**: arm-freq=900

Should read:

**ADD AT BOTTOM**: arm_freq=900

Sorry

Return to “Gaming”