kadams2929
Posts: 31
Joined: Sat Aug 25, 2012 2:32 am

Joystick / Gamepad install for Advance Mame

Tue Sep 25, 2012 4:25 pm

I've read everything I could find by searching the forum about setting up a Joystick or Gamepad for Advance Mame, but it appears there isn't a full cover to cover writeup for users regardless of experience level.

Two excellent examples of getting a Joystick / Gamepad working on a Raspberry Pi can be found here:

Chris Swan's blog:
http://blog.thestateofme.com/2012/08/10 ... -joystick/

Brian Hensley's blog:
http://www.brianhensley.net/2012/08/wii ... ython.html

I think using GPIO or USB is probably the best approach, because running Bluetooth most likely uses more CPU than GPIO or USB. It makes the most sense to leave as many CPU cycles for running the game, right? Chris Swan's implementation is great, but the average user may be put off by connecting a joystick to a breadboard, which connects to the GPIO. Brian Hensley's documentation gets you right in the ball park and his instructions are very clear and concise. There are other implementations out there and I apologize in advance that I haven't mentioned your name.

Here's what I ask: Would it be possible to have AdvMame users who implemented a Joystick or Gamepad fully share their knowledge? Joystick/Gamepad used, hardware mods, install files used, concise instruction sets, AdvMame setting changes, overclocking, etc.

Thanks guys and gals. I hope to hear from you.

mike_bike_kite
Posts: 17
Joined: Wed Sep 19, 2012 2:39 pm

Re: Joystick / Gamepad install for Advance Mame

Fri Oct 05, 2012 12:13 am

You can use a i-pac which reads arcade buttons and joysticks and outputs key presses via the USB as if your control panel were a keyboard. I haven't done this with an RaspPi but I've used them a few times when building standard arcade machines. Unsure about power requirements but it's only a small micro-controller so it shouldn't draw much current. You want to look up mame emulators and front-ends that run under unix as well. Most of the old games should run ok but, again, I haven't tried running them on a Pi as yet. I'm currently trying to build an arcade cabinet around one of my games. A good book on building arcade cabinets is this one.

Mike

User avatar
fdion
Posts: 307
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
Contact: Website

Re: Joystick / Gamepad install for Advance Mame

Fri Oct 12, 2012 9:07 pm

kadams2929 wrote: Here's what I ask: Would it be possible to have AdvMame users who implemented a Joystick or Gamepad fully share their knowledge? Joystick/Gamepad used, hardware mods, install files used, concise instruction sets, AdvMame setting changes, overclocking, etc.

Thanks guys and gals. I hope to hear from you.
Here is mine:

Image

I have a few more pictures on this post:
http://raspberry-python.blogspot.com/20 ... ry-pi.html

That particular post is in portuguese, but there is a google translate drop down on the right side. At any rate, I link it here mostly for the pictures.

As far as advmame, I didn't have to do anything. I built this for a PC based arcade machine back in 2004 or so. I used all components straight from a local arcade repair shop (gone now, replaced by a zumba fitness place). That means Happ joysticks and buttons with Cherry switches. I had also bought a little microcontroller based board with a PS/2 output, simulating a real keyboard.

To make it work with the Raspberry Pi, I bought a PS/2 to usb converter and that is basically it.

If you are doing one from scratch nowadays, you can get something that is based on an atmel u-controler, such as this: http://minimususb.com/

There is one already pre-programmed for this task here:
http://www.gaminggear.com.au/pc-ps3-arc ... coder-pcb/

AU$25, even a roll your own will cost you that (not counting all the time you'll spend debugging it). Still, I'd go for one that has wire terminals with screws. These seem to go for US$40-US$60.

François
Francois
http://raspberry-python.blogspot.com - http://www.3dFutureTech.info - @f_dion

User avatar
fdion
Posts: 307
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
Contact: Website

Re: Joystick / Gamepad install for Advance Mame

Sat Oct 13, 2012 3:16 am

Nevermind on that unit for AU$25, it doesn't emulate a keyboard, so probably not a good idea for the Pi.

François
Francois
http://raspberry-python.blogspot.com - http://www.3dFutureTech.info - @f_dion

User avatar
crookedmouth
Posts: 66
Joined: Tue Sep 18, 2012 1:13 am

Re: Joystick / Gamepad install for Advance Mame

Sat Oct 13, 2012 4:42 am

I use a cheap usb snes controller copy by a company called Tomee.

I just installed joystick

Code: Select all

sudo apt-get install joystick
Calibrated and tested it

Code: Select all

jscal /dev/input/js0
jstest /dev/input/js0
For advmame I had to change a setting in the advmame.rc to help mame recognize the y-axis

Code: Select all

device_joystick raw
Once set up the gamepad has worked with almost everything I have installed.

bhensley
Posts: 7
Joined: Tue Jun 26, 2012 7:18 pm

Re: Joystick / Gamepad install for Advance Mame

Wed Feb 20, 2013 12:13 am

Glad you enjoyed my blog post on the Wii controller! I'm working on my next phase of a remote control car.... so stay tuned ;)

Cheers,
Brian Hensley
www.brianhensley.net

BBUK
Posts: 141
Joined: Tue Dec 18, 2012 10:34 am

Re: Joystick / Gamepad install for Advance Mame

Wed Feb 20, 2013 10:58 am

Hi all.

I am currently using a Nintendo Wavebird wireless joystick/gamepad (I hacked the reciever unit to include an Arduino Leonardo that presents itself to the Pi as a USB joystick/keyboard).

The code for the Leonardo is a mash-up between a sketch prepared by a chap that wanted the Leonardo to appear as a joystick (involves editing the USB core for the Leonardo) and a sketch from someone that wanted to connect a Wavebird to a Nintendo 64.

Works well in Advmame (but device_joystick and device_keyboard have to be set to raw).

Although a full write-up would take some time (and I don't have a lot of it). I am happy to share the sketch and some basic instructions if anyone is interested.

BBUK

mpolaczykpl
Posts: 3
Joined: Tue May 21, 2013 9:53 pm
Location: Poland
Contact: Website

Re: Joystick / Gamepad install for Advance Mame

Tue May 21, 2013 10:00 pm

Hi all.
If someone is interested in connecting other usb joysticks, like: Logitech Extreme 3D PRO. This could be halpful: http://mpolaczyk.wordpress.com/2013/05/ ... -protocol/
BR,
Marcin
http://mpolaczyk.pl
software, robotics, engineering & geeky stuff…

sangabriel
Posts: 2
Joined: Thu Jul 24, 2014 4:46 am

Re: Joystick / Gamepad install for Advance Mame

Thu Jul 24, 2014 4:53 am

BBUK wrote:Hi all.

I am currently using a Nintendo Wavebird wireless joystick/gamepad (I hacked the reciever unit to include an Arduino Leonardo that presents itself to the Pi as a USB joystick/keyboard).

The code for the Leonardo is a mash-up between a sketch prepared by a chap that wanted the Leonardo to appear as a joystick (involves editing the USB core for the Leonardo) and a sketch from someone that wanted to connect a Wavebird to a Nintendo 64.

Works well in Advmame (but device_joystick and device_keyboard have to be set to raw).

Although a full write-up would take some time (and I don't have a lot of it). I am happy to share the sketch and some basic instructions if anyone is interested.

BBUK
hi!!!

actually i'm trying to use my wavebird like a RC controller but after some differents methods, not work i tried to modify in the code but my leonardo dont read anything, can you send me your code, please????

BBUK
Posts: 141
Joined: Tue Dec 18, 2012 10:34 am

Re: Joystick / Gamepad install for Advance Mame

Thu Jul 24, 2014 8:28 pm

Hi sangabriel.

Here is a zip containing the files I used and a picture of my resulting controller (that's the micro USB of an Arduino Micro facing the picture):http://www.mediafire.com/download/q14r2 ... ystick.zip.

The files HID.cpp and USBAPI.h are modified forms of the originals from an Arduino 1.0.3 installation (they should go into hardware/arduino/cores/arduino - back up the originals first). They are accordingly issued under whatever licence the Arduino files are issued under.

I had (a lot of) inspiration from https://github.com/brownan/Gamecube-N64-Controller and http://www.imaginaryindustries.com/blog/?p=80 and http://www.totalgamerz.com/2005/06/tgz- ... d-mod.html.

Note that my version used the small shoulder button as a shift key for additional functions and to switch the key mappings to suit different games. See the Arduino sketch for details.

EDIT: forgot to say. I powered the wavebird receiver from the 3.3V out of the Arduino, the current draw (about 140mA from memory) was way out of spec for the Arduino (50mA) but within spec for regulator I had on my board (considering that it was only dropping from 5V from the USB). I just increased the heatsinking to the regulator and bolstered the relevant pcb trace. It worked fine for me but if you want to try this then be aware of the risks (i.e. at your own risk) and check the specs of the devices on your own board to ensure that you are safe. Also, for some reason I was not able to fathom, you need to press a button on the wavebird handset before the Arduino will properly sync as a HID keyboard/mouse. Before the button is pressed, the Arduino appears to be in a continual reset loop.

Have fun

BBUK

sangabriel
Posts: 2
Joined: Thu Jul 24, 2014 4:46 am

Re: Joystick / Gamepad install for Advance Mame

Sat Sep 20, 2014 11:01 am

thanks a lot, i will continue with my project, thank you

Leumas
Posts: 27
Joined: Tue Dec 29, 2015 10:01 pm

Re: Joystick / Gamepad install for Advance Mame

Wed May 10, 2017 6:33 pm

Is there a way that I can get some help getting Zero Delay LED USB Encoder connected to raspbian and not retropie I'm using the official touchscreen for display and the hardware only works with raspbian. So I need a way that the joystick to usb encoder to connect and control raspbian and use the joystick as a mouse so I can open an emulator without a keyboard or mouse.

Return to “Gaming”