MAME using an encoder

Wireless keyboard used for mame.  Only internals shown.

Ripping out the wireless encoder

After a marginally successful attempt at building a “wireless MAME” device using an old keyboard, I decided it was time to bite the bullet and simply buy an encoder.  Although the original setup did work as a wireless controller for very simple games like Pacman and Galaga, any more than 6 buttons (including four for the joystick) seemed to be beyond the capabilities of my controller (at least how I had it set up).

my MAME setup playing SFII

Finally finished and usable with an encoder

A quick search for MAME encoder reveals quite a few sources of encoders to substitute for your hacked-up keyboard.  I finally settled on “Groovy Game Gear’s” GP-Wiz40 encoder because you could buy it prewired for your buttons with spade connectors (no solder required).  Also, it has rotary encoder support which may be useful at some point in the future.  I bought wiring for up to 30 switches because each controller consisted of four switches on the joystick and six switches for each button.  Add in a second controller and the 1 and 2 player start and you’ve got 22 switches.

unboxing MAME encoder from "Groovy Game Gear"

The GP-40 encoder out of the box

Once you have what you want in mind, i.e what buttons do what, hooking it up is really easy.  Just run the ground chain to each of the grounds then run one wire’s spade connector to the “N.O” or normally open (pushed is “on” in other words) terminal.  Connect the other end to the screw terminal on the encoder that corresponds to your button or joystick position and you’re done.  Plug the USB cable in, and with a little tweaking of MAME you’re ready to go.

The GP-40 encoder by itself

The GP-40 encoder by itself

One thing to note is that the different letters and numbers on the encoder don’t correspond to a key on the keyboard.  This probably wouldn’t be a problem for most people, but if you had just hacked a keyboard to try this, you might get confused.  Just follow the connections in the included instructions. It may help if you think of it as a joystick encoder.

A few things to note while hooking your controller up:

The wire ends that go to the encoder are stripped back enough to fit in the screw connector on the encoder.  They are not, however, tinned – soldered together on the end (probably my only very minor complaint about the GP-40, otherwise it worked great).  If you use a soldering iron and coat the end with solder it should help things to go together correctly.  Also, soldering together your ground chains before you insert them into the screw connector will keep them together better than having three or four individual wires there.

no zip ties used

Zip ties will make this a little neater

I’d also recommend using zip-ties where the wire goes from the buttons/joystick to the encoder.  I ties each players set of buttons together and the joystick leads together.  This will make things neater.  Lastly, think about where you are going to have your encoder in the box before you run the ground chain.  Depending on where you decide to end the connections, this can give you more slack if the encoder is far away and you need as much wire as possible.

When you’ve got everything how you want it wires-wise, hook up the USB port to the computer.  If you want to test anything, go into control panel and open game controllers.  It will show up as a controller here and you can test everything.

Once you’re sure it works correctly, you’ll need to go into the game you’ll be playing and assign the inputs.  Some buttons work by default in MAME, but, at least in my setup, some buttons did not.  It’s pretty easy to set it up correctly though, just go into “configure inputs” then select the input with the up and down keys on your keyboard and press “enter”.  Press the button you want assigned to this action and it’s set as this.

Finished MAME setup playing SFII

Finished MAME setup playing SFII

If you’re trying to decide between using an encoder and hacking apart your keyboard, I would definitely recommend an encoder.  If you order prewired connectors as I did, you should be able to do the electrical hookup in an hour or so.  I’m sure it took me twice that long, but it seriously saved me a lot of time.  I would estimate the keyboard route will take 10 times as long as using an encoder and by the time you buy perf-boards, IDE connectors, and the other bits you don’t really save a lot of money.  I did learn a lot doing it the hard way, but don’t do it yourself, just read my post about it.

All this used the mechanical design of my “wireless MAME” setup which never got completely finished.  After using this encoder, I did finish it (not that something like this is ever really finished).  I plan to post on the “finishing touches” on my machine next.

  1. Finishing your MAME project | - pingback on January 19, 2011 at 8:05 pm
  2. Finishing your MAME project | - pingback on February 18, 2011 at 8:04 pm
  3. The ATHF “Err” Mosaic | JCOPRO.NET - pingback on June 22, 2011 at 10:04 pm
  4. Old School Update: January 2011 Project Summary - pingback on July 28, 2012 at 1:36 pm

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackbacks and Pingbacks: