Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Self-Contained MAME Machine

Mon Nov 21, 2011 10:47 pm

Quote from Jessie on November 21, 2011, 05:52
I bet with some optimising you could run some 90s games on it as well. If the Open Pandora can run Neo Geo games at full speed with an older ARM core at 600 Mhz, then I am sure we are in good shape for some quality emulation. I would like to make a dedicated box with Cabrio ( or something like it or Hyperspin) as the front end so that it could all be navigated with the joystick.

Reality check here. There's a 3-5x factor of performance increase between the ARM in the R-Pi SoC and the one on the Pandora handheld. Quite simply, looking at the MHz isn't going to get you anywhere as it's very much like comparing a P4 at 2GHz and a Core i7 at the same clock.

I would bet that it could manage most of MAME and MAYBE the NeoGeo stuff. But that's just an educated guess there.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Self-Contained MAME Machine

Mon Nov 21, 2011 10:49 pm

Quote from toxibunny on November 21, 2011, 15:26
MHz EXISTS! :@

Only for processors of the same basic architecture and cache layout... :D

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Self-Contained MAME Machine

Mon Nov 21, 2011 10:50 pm

Quote from scep on November 21, 2011, 17:09
Excellent idea. Mine's going in this panel I made a few years ago. Instant portable arcade :D:


Loads of room underneath for the Raspi and cables (retractable HDMI?):


Skip the retractable HDMI. Just bring the video/audio ports out the back of the box. By the way, nice build there.

As an aside to everyone...you all DO realize that the R-Pi has 16 GPIO lines, right?

QuantumLeaper
Posts: 9
Joined: Tue Aug 30, 2011 4:52 pm

Re: Self-Contained MAME Machine

Tue Nov 22, 2011 12:13 am

Quote from toxibunny on November 21, 2011, 15:26
Quote from QuantumLeaper on November 21, 2011, 03:53
@toxibunny, are you one those people who still believe in the MHz myth?

MHz EXISTS! :@

I have a question, which is faster, my P4 3GHz or my Core2 3GHz, they both run at 3GHz... Its all down to has they optimize the chip.

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Self-Contained MAME Machine

Tue Nov 22, 2011 7:20 am

I also have a question - what's faster, a P4 2GHZ , or a P4 3GHZ?

Case closed...
</hutz>
note: I may or may not know what I'm talking about...

hamster
Posts: 23
Joined: Fri Sep 23, 2011 10:20 pm

Re: Self-Contained MAME Machine

Tue Nov 22, 2011 9:32 am

Given that MAME/XMAME whatever is largely around emulation of 8 bit CPUs running in the low single digit MHz range, I can't see why it wouldn't work... but personally I like my arcade games from http://fpgaarcade.com - true retro!

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Self-Contained MAME Machine

Tue Nov 22, 2011 7:56 pm

toxibunny: You just proved my remark... From CPU to CPU of the same class and type, yeah, MHz is mostly (emphasis on this...) a direct correlation. Don't forget that there might be more L2 on a slower device and therefore might narrow the difference.

You didn't answer the questions I or QuantumLeaper posited. Trolling like this is...heh...lame.

QuantumLeaper
Posts: 9
Joined: Tue Aug 30, 2011 4:52 pm

Re: Self-Contained MAME Machine

Wed Nov 23, 2011 5:37 am

Quote from toxibunny on November 22, 2011, 07:20
I also have a question - what's faster, a P4 2GHZ , or a P4 3GHZ?

Case closed...
</hutz>

Could have answered my question, so why should I answer your question. My point has always been until you compile and run MAME on Rpi, you won't know what will run at 100%. So I am taking a wait and see attitude with how well it run MAME, at worst we downgrade to XMame, if we can find the source code. Like how some people run an old version of MAME on lower end hardware.

I would love Rpi run the game I worked on in MAME but I hoping it will run at 100%. It is also the oldest game in MAME, since it was first compiled in 1971. I think I had more fun getting the game to compile than I would have if I added to MAME, someone else added it. I really hope I have just as much fun playing around with Raspberry Pie as I did get the game to compile.

singapura
Posts: 21
Joined: Wed Aug 31, 2011 1:25 am

Re: Self-Contained MAME Machine

Wed Nov 23, 2011 8:20 am

I already have a few casings waiting for a RasPi injection. My old SNES and an Atari 2600 will get dedicated RasPi's under the hood with the appropriate emulator. For Mame I plan to use the iCade I bought last month. Instead of the iPad I'll install a cheap 10" LCD screen. Can't wait to get my fingers in the pie!

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

Re: Self-Contained MAME Machine

Mon Mar 19, 2012 10:46 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.

fruitloaf
Posts: 84
Joined: Sun Feb 05, 2012 11:41 am

Re: Self-Contained MAME Machine

Tue Mar 20, 2012 8:55 am

MansfieldMatt said:


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.



Go on tell us when did you start working for them then?

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

Re: Self-Contained MAME Machine

Tue Mar 20, 2012 12:17 pm

I mentioned it before and I'll say it again -

Why not wire the buttons and joysticks straight on to the GPIO pins and simply use 8 pins as a 4x4 key matrix?  That gives you one joystick and twelve buttons, or two joysticks with four buttons each.

You'd need to add a diode for each switch pathway, but then you could add a second 4x4 matrix for another player with reversed diodes.

You'd then need a custom driver that can emulate joysticks or keypresses within the system.  But wouldn't it be cheaper than the USB method?

User avatar
Ibanezjem
Posts: 33
Joined: Tue Mar 20, 2012 7:58 pm
Location: Stafford, UK

Re: Self-Contained MAME Machine

Tue Mar 20, 2012 8:28 pm

The expansion header also gives access to I2C bus and SPI bus if I've understood it correctly.

With an appropriate chip and a little software,many inputs can be added cheaply.

E.g.  16-bit I/O Expander,I2C,MCP23017-E/SP
RS Stock No. 403-806
Brand Microchip
Mfr Part No. MCP23017-E/SP

These can be 3bit addressed to give 128 non-multiplexed inputs and work from 1.8 to 5.5v @ 1mA. Therefore should be able to be powered from the header with no need for additional supply.

Don't look at me for any software though, I started looking into Linux and C a few days ago so I might know how to use my RPi. Looks like I'll have plenty of time to learn before I get my hands on one!

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

Re: Self-Contained MAME Machine

Tue Mar 20, 2012 10:16 pm

IbanezJem said:


Don't look at me for any software though, I started looking into Linux and C a few days ago so I might know how to use my RPi. Looks like I'll have plenty of time to learn before I get my hands on one!



I've gotten some success on the software side using SSNES with a FBA core, which got okay results in QEMU, save for issues with the video drawing being too slow. It has no GUI frontend, but coding up one should be a fairly easy project, since SSNES does all the heavy lifting.

I would be careful of using MAME, because it has the tendency of getting slower and slower with each release (in exchange for more accuracy) so we would have to stick with low (sub 0.100) versions for good speed with some games.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Self-Contained MAME Machine

Tue Mar 20, 2012 11:00 pm

Some thoughts and short responses regarding the controls.

I-Pac (MansfieldMatt)
Cons: Closed source firmware and software (?). Little bit too expensive for my taste (new budget ve-version $35,-).
Pros: Emulators recognize it as USB joystick. Software support from ultimarc. Probably works out of the box (except for programming utility).
Is there a programming utility for ARM linux? I don't know if there's source code for this: http://www.zumbrovalley.net/re.....hp?artid=4

GPIO (Joefish)
Cons: Emulators will not recognize it on their own. Software needed (acknowledged in post).
Pros: Hardwarewise a cheap and easy solution.

I2C / SPI (IbanezJem)
Cons: More software needed (acknowledged in post).
Pros: Lots of I/O. The SPI version is the MCP23S17

Alternative (panik)
The route I've mentioned before in this thread (september, wow!). An ATmega, programmed as a custom joystick with the help of Dean Camera's excellent LUFA: http://www.fourwalledcubicle.c.....m/LUFA.php (can't post that link often enough), if needed in combination with an I2C or SPI GPIO expander.
Cons: Even MORE software needed. Serious SMD soldering needed (except for the Teensy). Bulky. Ugly. Starts out cheap, but when finished turns out very expensive. Error prone. No support.
Pros: Total control. Perfect storm of nerdgasm
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

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

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 5:30 pm

That is the thing though, isn't it?  Purchasing a chip or controller to take switch inputs and convert them into serial or USB signals is all well and good, but at the cost of implementing it in hardware you come awfully close to just buying another Raspberry Pi to be the button interface!

So if this whole Pi thing is supposed to encourage you to learn to program, who's going to be first to get one and cook up a GPIO to Keyboard/Joystick driver?  Or it would it even need to be a driver as such - just a residual application that can monitor the GPIO and inject keystroke events into the OS (is that feasible with Linux)?

nickstuffinc
Posts: 8
Joined: Wed Mar 21, 2012 4:32 am
Contact: Website

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 5:45 pm

Most of the gpio interfacing has been done before with the printer port on a pc. check out http://www.kernel.org/doc/Docu.....arport.txt

someone simply needs to rewright the source to use the gpio instead of a parrallel port. as far as making a button matrix is concerned look at the part about multisystem joysticks. they are wired in a matrix pattern to allow up to 7 on a parallel port. A further explaination can be found here.

http://www2.burg-halle.de/~sch.....rport.html

User avatar
Ibanezjem
Posts: 33
Joined: Tue Mar 20, 2012 7:58 pm
Location: Stafford, UK

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 7:12 pm

Joefish said:

That is the thing though, isn't it?  Purchasing a chip or controller to take switch inputs and convert them into serial or USB signals is all well and good, but at the cost of implementing it in hardware you come awfully close to just buying another Raspberry Pi to be the button interface!

Considering the incredible value of the RPi, almost any hardware project extras will exceed the cost of it. E.g. Midi foot controller for guitar effects unit I built, 8 foot switches @ £4each, plus Microchip PIC, nevermind 24x2 LCD display and potentiometer foot pedal.

To nickstuffinc, minor point (very!), I noticed only one ground for Amstrad CPC input for the link you posted, (thanks BTW, it may be useful later on.) The original CPC464 had two grounds to allow two joysticks on one 9 pin D port. A JY2 if I recall would allow a second joystick plugged in through it. Not very robust though, Daley Thompsons' Decathlon ruined a few!

I also vaguely remember making a device for my brother, so he could use joystick and mouse on the same port for his Commodore Amiga. Still have it somewhere, but no idea how it works now.

(Sorry if quoted bit not in blue box, not sure how that works yet)

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 9:02 pm

One ground??? I see seven in the 2nd link in nickstuffinc"s post above, for multiplexing upto seven amiga/c64 joysticks.

nickstuffinc
Posts: 8
Joined: Wed Mar 21, 2012 4:32 am
Contact: Website

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 9:42 pm

yes the interface allows for seven joysticks or 5x7 = 35 individual buttons. I used this method to run a 2 player control panel with 6 buttons per player along with coin switches and player start buttons. It worked very nicely on windows.

here is a simple schematic. this would have to be modified slightly to work, but it shows how 16 buttons can be connected to 8 gpio pins. As I understand it other pins can be used for gpio as well?



Also

Ive got xmame .106 running check out my sig.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Self-Contained MAME Machine

Wed Mar 21, 2012 11:26 pm

nickstuffinc said:


yes the interface allows for seven joysticks or 5x7 = 35 individual buttons. I used this method to run a 2 player control panel with 6 buttons per player along with coin switches and player start buttons. It worked very nicely on windows.

here is a simple schematic. this would have to be modified slightly to work, but it shows how 16 buttons can be connected to 8 gpio pins. As I understand it other pins can be used for gpio as well?



Also

Ive got xmame .106 running check out my sig.


Re: "Self-Contained MAME Machine", it can't get better than that, can it?
Thanks for the links, the blog-post, and your other topic about it: http://www.raspberrypi.org/for.....106-how-to

I realized that I still want to build a standalone USB Joystick for flexibility. Use it with other software and systems, add more nifty hardware and some such. I also realize that is off-topic here.

Thanks everyone so far. I'm really looking forward to see where this is all going!

Edit: Quoted because of new page.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

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

Re: Self-Contained MAME Machine

Thu Mar 22, 2012 12:14 pm

nickstuffinc said:

Here is a simple schematic. this would have to be modified slightly to work, but it shows how 16 buttons can be connected to 8 gpio pins.

Well, that's a 4x4 matrix of switches on 8 pins.  What you haven't considered is that you do get a matrix effect from that arrangement, such that when you press any three switches the 'fourth' switch that makes up a square set appears to be pressed because of all the crossed wires.  You get round this by putting a diode going into each switch.

The flip side though is you can wire up an identical matrix with the diodes going the other way and scan that by raising voltages on different pins.

nickstuffinc
Posts: 8
Joined: Wed Mar 21, 2012 4:32 am
Contact: Website

Re: Self-Contained MAME Machine

Thu Mar 22, 2012 7:09 pm

True thats what I meant by this "would have to be modified slightly". Also add in some resistors for safety. I like the idea of the second matrix it makes for enough inputs for a large 2 player cabinet.

Has anyone tried mounting a optical mouse on the bottom side of an arcade trackball? seems like this would get rid of all the interfacing problems people have.

george.endrulat
Posts: 10
Joined: Tue Nov 29, 2011 4:17 pm

Re: Self-Contained MAME Machine

Thu Mar 22, 2012 7:24 pm

Bottom to top xbox 360 to arcade controller tutorial:

Arcade controller will give you button envy

or direct link: http://x2jiggy.com/2012/01/xbo.....-joystick/

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

Re: Self-Contained MAME Machine

Wed Mar 28, 2012 2:39 pm

Joefish said:


Well, that's a 4x4 matrix of switches on 8 pins.  What you haven't considered is that you do get a matrix effect from that arrangement, such that when you press any three switches the 'fourth' switch that makes up a square set appears to be pressed because of all the crossed wires.  You get round this by putting a diode going into each switch.

The flip side though is you can wire up an identical matrix with the diodes going the other way and scan that by raising voltages on different pins.


Its exactly that matrix effect I got when I reverse engineered a USB keyboard. I'm as much of a tinkerer as anyone but when you start going to the effort of adding diodes and resistors and needing to write voltage scanning into a custom driver I'm very much at the point where I'd rather buy I-PAC VE for $35 from Ultimarc and get on with playing on MAME.

panic mentioned the need for a Linux programming utility in his excellent summary. This would only be needed if you wanted to customise the button set. Out the box the I-PAC is already programmed for the default MAME keyboard setup and so theoretically it should be completely plug in and play.

And fruitloaf I don't work for or get anything from Ultimarc.

Return to “Gaming”