User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

Re: MAME

Sun Dec 18, 2011 8:18 pm

Someone brought up the Wii MAME port earlier in this thread. Well I'm the guy who ported it with some advice:

* That code crundy found was just a part of the ARM CPU emulator. There is essentially no architecture-specific code in MAME, which makes it super portable. You just need to know how to edit the makefiles mostly for libraries and endianness stuff.
* That said, I have to say porting MAME is not the best choice if you just want to play arcade games. MAME is not built for performance at all, and it is known to sacrifice any and all performance for accuracy. I would recommend porting something like Final Burn Alpha instead, since that usually has better performance.

mugit
Posts: 1
Joined: Sun Jan 08, 2012 8:49 am

Re: MAME

Sun Jan 08, 2012 8:59 am

I was wondering if you would be able to use the GPIO pins to as control inputs, thus reducing some kind of need for a separate encoder board.  However, it looks like there are only 8 GPIOs, so a joystick and 4 buttons.

sorvad
Posts: 46
Joined: Thu Dec 22, 2011 11:04 am

Re: MAME

Sun Jan 08, 2012 12:00 pm

mugit said:


I was wondering if you would be able to use the GPIO pins to as control inputs, thus reducing some kind of need for a separate encoder board.  However, it looks like there are only 8 GPIOs, so a joystick and 4 buttons.


You can get round this apparent limit with a small bit of additional hardware and a tweak to the code reading the pins. Keyboards for example do not have an input for every key. It's handled differently, you could do the same here. Quick clue, have two pins for a simple address select and 6 pins for the inputs. You then (by using an address scan technique) have 4 (total binary combination for two pins) * 6 different inputs = 24 inputs. For slow things like user input this tends to work fine.

This was a method used to increase the user port inputs on the old BBC Micro for certain projects. Have a look for a Mike Cook Body Building article on the subject from "The Micro User" magazine, I seem to remember he did one on multiplexing the user port.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: MAME

Sun Jan 08, 2012 12:25 pm

If the gpios are tri-state, charlieplexing the inputs gets you 8^2 - 8 = 56 inputs, which should be enough for most games. Or use less and have space for a spinner / trackball. For example 6 gpios for 30 binary inputs, and 2 left over for a quadrature encoder on a spinner.

Joefish
Posts: 95
Joined: Wed Jan 25, 2012 10:31 am

Re: MAME

Wed Jan 25, 2012 11:25 pm

The main aim for an amateur (like me) would be to just plug the microswitches straight in  – a wiring loom only – so requiring address decoding seems a little too far.

I suppose a simple 4x4 matrix only gives you 16 inputs though, so two joysticks and 2 buttons each for play. I don't suppose a lot of people would be put off if it only supported one joystick and a load of buttons, but it'd be a shame if that"s all it did.

Charlieplexing the whole lot for the maximum number of inputs sounds suspiciously like wiring spaghetti too, though.

How about something half-way?  A 4x4 matrix but bi-directional?  You'll want diodes anyway in a matrix to cancel out the ghosting effect of multiple simultaneous button presses, so another set of diodes facing the other way allows you to double-up the inputs to 32 (16 per player)… I think?

As for a spinner, are quadrature inputs even supported?  I would have thought they'd have to be high priority and detract from the run-time.  Maybe a spinner, and analogue input, is best left to USB, or to a custom breakout board.

mat80c
Posts: 15
Joined: Wed Aug 17, 2011 2:32 pm

Re: MAME

Wed Feb 08, 2012 10:44 am

Just a quick post has anyone made any progress on this yet. I would love to get mame working as soon as i get my pi!

Monstercrunch
Posts: 1
Joined: Thu Feb 09, 2012 8:09 pm

Re: MAME

Thu Feb 09, 2012 8:52 pm

You could also use a cheap usb gamepad and wire joystick and buttons on it. With a usb-hub, two players are easy to do.

Jock in a Frock
Posts: 72
Joined: Thu Jan 12, 2012 6:39 pm

Re: MAME

Fri Feb 10, 2012 7:45 am

Monstercrunch said:


You could also use a cheap usb gamepad and wire joystick and buttons on it. With a usb-hub, two players are easy to do.


If you hack one USB gamepad (like an Xbox 360 wired gamepad), that has enough inputs for 2 players. Two analogue thumb sticks, 8 buttons, and 2 analogue triggers should be enough for two players on MAME.

Andre_P
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am

Re: MAME

Fri Feb 10, 2012 7:53 am

JamesH said:


That port is for Arm on RiscOS so won"t work on the Raspi Linux. Haven"t looked very hard, but I reckon you will need to recompile the Mame code to arm linux. Or it may already be in the debian archive....

It should work though, although not sure how fast some of the more recent games will run - but why anyone would want anything more than Mr Do! and Bubble Bobble......



As I believe RiscOS is coming to Rpi this might give it a chance. However I might misread some post somewhere so apologies.

MansfieldMatt
Posts: 7
Joined: Mon Jan 09, 2012 3:48 pm

Re: MAME

Mon Mar 19, 2012 10:47 am

I too can't wait have a go with MAME on a Raspi. A few years ago I built a 2 player arcade controller using proper arcade buttons and joysticks, some MDF and a USB keyboard. It worked ok but the USB keyboard interface wasn't geared up for multiple simultaneous key presses and so there were odd quirks. e.g. Player 1 moving up/right could user fire button 1.

Fortunately there is a proper solution to this in the name of I-PAC from Ultimarc.

http://www.ultimarc.com/ipac1.html

This has been specifically built for use with MAME and other emulators and can cope with everything being pressed at once. Best of all it pretends to be either a PS/2 or USB keyboard and so should just plug into the Raspi without any hacking required.

Ironically it costs about the same as a Raspi but rather than that being a ripoff it only goes to show how damn good a price the Raspi is.

I have my I-PAC ready to go, I just need my Raspi now so I can convert my controller into being something that can plug directly into any TV rather than needing a computer.

lettuce
Posts: 7
Joined: Sun Apr 01, 2012 9:15 am

Re: MAME

Sun Apr 01, 2012 10:45 am

Im one who also wants to get a Raspberry just solely for MAME, but the major, and this is MASSIVE stumbling block is the Raspberry doesnt have a VGA port!!! So will have to be used on a modern day LCD TV and MAME looks gash on modern TV's, it need to be played on an old CRT monitor or CRT TV with a scart socket, this is how i play my current MAME PC via a vga to scart cable and it looks just like a proper Arcade monitor thanks to GroovyMAME aswell. I really hope there is a revision that have VGA support

mole125
Posts: 228
Joined: Tue Jan 10, 2012 2:01 pm

Re: MAME

Sun Apr 01, 2012 2:01 pm

lettuce said:


Im one who also wants to get a Raspberry just solely for MAME, but the major, and this is MASSIVE stumbling block is the Raspberry doesnt have a VGA port!!! So will have to be used on a modern day LCD TV and MAME looks gash on modern TV's, it need to be played on an old CRT monitor or CRT TV with a scart socket, this is how i play my current MAME PC via a vga to scart cable and it looks just like a proper Arcade monitor thanks to GroovyMAME aswell. I really hope there is a revision that have VGA support


You are in luck then. The other output on the RPi is composite output for which there are cheap scart adapators - you may well have one in your box of bits already, particularly if you had any old consoles like a SNES. VGA to scart adaptors would just be adding complexity!

jfedor
Posts: 7
Joined: Tue Apr 17, 2012 5:30 pm
Contact: Website

Re: MAME

Fri Apr 20, 2012 10:53 pm

Hi,

I have successfully compiled and run advmame ( http://advancemame.sourceforge.net/ ) on the Pi. I can provide the binary if anyone"s interested. I"m still trying to figure out the optimal way of outputting video. At the moment I"m getting full speed in Pac-man when running in a 1:1 window under X. I"ll try and see if it"s possible to make it run on the framebuffer and scale it to fullscreen. Sound probably doesn"t work at all.

I also connected a PS3 controller to the Pi and it works fine in MAME!

All in all I see a bright future for arcade emulation on the Raspberry Pi.

EDIT: All right, after some tweaking I got it running in fullscreen on the framebuffer!


lesliew
Posts: 29
Joined: Sun Jan 22, 2012 5:14 pm
Location: Melbourne, Florida

Re: MAME

Sat Apr 21, 2012 2:01 am

Just read this thread for the first time today. Mame isn"t available in debain squeeze but you can install by doing the following, at least it worked for me.

edit your sources.list file

vi /etc/apt/sources.list

change or add your repository source to something like this :-  Only need to change the last bit not the server i.e 'squeeze main' becomes 'sid main non-free'

deb http://ftp.us.debian.org/debian sid main non-free

apt-get update

apt-get install mame

then copy your roms to

/usr/share/games/mame/roms

Mame Arcade Emulator should appear in your lxde programs menu under games

tkp
Posts: 6
Joined: Thu Apr 12, 2012 6:32 pm

Re: MAME

Thu Apr 26, 2012 8:52 pm

@jfedor

If you could help with the binary for advmame that would be great. I tired compiling but kept running out of memory.

@lesliew I managed to get mame installed but can't get it to veryify or find romsin here;

/usr/share/games/mame/roms

lesliew
Posts: 29
Joined: Sun Jan 22, 2012 5:14 pm
Location: Melbourne, Florida

Re: MAME

Fri Apr 27, 2012 2:48 am

tkp said:



@lesliew I managed to get mame installed but can"t get it to veryify or find romsin here;

/usr/share/games/mame/roms


Your mame.ini should be in /etc/mame/mame.ini, double check where the rompath points to. I have something like this in my /etc/mame/mame.ini

rompath                  $HOME/mame/roms;/usr/share/games/mame/roms

Which indicates that you can also put your roms in ~/mame/roms

Need to make sure roms have the correct patch applied for them to work,  I found that a lot of them didn"t.

tkp
Posts: 6
Joined: Thu Apr 12, 2012 6:32 pm

Re: MAME

Fri Apr 27, 2012 5:13 pm

@lesliew  thaks for that. I have all this set up as you have detailed.

How can you tell if a patch has been applied to a rom ?

I've see some mame tutorials (debian wiki) advising that the command

mame -verifyroms

should be used but this isn't recognised when I try it.

Cheers,

tkp

marshcroft
Posts: 23
Joined: Tue Mar 06, 2012 6:37 pm

Re: MAME

Fri Apr 27, 2012 7:25 pm

This is a great project, seeing as someone also put a Pi in an old Gameboy case, there is potential to have a portable arcade machine, or use one in the car with PS3 controllers, very good indeed.

Return to “General discussion”