How to build a MAME cabinet - A detailed guide and how to
Home - Step by step - Work Drawings and Artwork - Builders WikiFAQ - Specs - Email - Video - Links

Basic Wiring Guide
For MAME cabinets


What is an encoder?
An encoder is a device translating the input from your arcade controls to a language your PC or console would understand. Most translate your control inputs to keyboard commands, but some translates them to gamepad / joystick inputs. Today most encoders is connected to a PC via the USB port. Some still uses the older PS/2 interface.

You basically have three options for connecting your controls to your PC:

1. Hack a keyboard (difficulty: medium to hard)
The cheapest option. Most people have an old keyboard lying around or you could buy a new keyboard for $10. This requires you to open the keyboard and remove the internal encoder. This will require that you are very familiar with modding electronics and soldering. Here is a good guide for hacking a keyboard:

2. Hack a controller for PC or a console (difficulty:medium to very hard)
This is great if you are using a Xbox 360 or a Playstation 3 for your arcade cabinet. Here is a sample on how to hack a Xbox 360 controller:

3. Buy a dedicated encoder (difficulty: Easy to very easy)
This is the easiest way and the most safe option. This is the one I would recommend to everyone not too familiar with modding electronics and soldering. These can often be connected to spinners and trackballs too.

How do I connect the controls to the dedicated encoder then?
This is actually much easier than most people think. You only need to know some basic things. The encoder has a lot of terminals for connecting your wires. Half of them is for Player One and the other half is for Player Two. Now we have already made it half as complicated :)

There's four terminals for a joystick, one for each direction, up, down, left and right. The rest of the terminals is for the push buttons. Sometimes there is separate buttons for Start and Coin, but it doesn't really matter how you hook them up because is depends on what function you configure them to in MAME or other emulators / games anyway.

Here is a sample of an encoder, the I-PAC from Ultimarc:

There is also a terminal called GND or ground. There can be one for both player one and two, or just one for sharing. The GND/ground is very important. This terminal has to be connected to every push button and joystick switches. You can just make what's called a daisy-chain, this is a wire going from on push button to the next like a chain or the lighting on a Christmas tree. I made this illustration for making it easier to understand, because I know this GND / Ground thing is what confuses most people and maybe ending up with abandoning the project or, even worse, buying a X-arcade stick :). Here goes:


This is of course more simple than a two or four player encoder, but there really is no difference. There is one wire for each push button and one for each joystick direction. The GND / Ground is the same wire just going from one button to another. The order doesn't matter as long as everything is connected to a terminal and the GND / Ground. The encoder is of course connected to the PC via USB or PS/2.

You can connect the wires two ways. Solder them to the push buttons or using crimps like on the picture to the right. Just use what you are comfortable with. The crimps requires some tools, but so does soldering. Using crimps makes it very easy to change defective parts in the future.

Here is some words you might encounter while reading about encoders and wiring:

Crimps: A way of connecting wires to joysticks or push buttons without soldering
Daisy Chain:
Often used for connecting your push buttons to the GND / Ground
Ground / GND:
Every push button need to be connected to the ground to work
Ready made wiring or what you call your finished wiring
Micro switch: Commonly used switch used for joystick and push buttons

Sometimes you will encounter micro switches with three legs instead of two. The illustration shows where you need to connect your wiring. It doesn't matter which of the two you use for GND / Ground.


I recommend using different coloured wires for the different joysticks and push buttons and a black wire for the GND / Ground. A 4-player setup will be very confusing of you only use one or two colours.

If you need more information, find it on the different encoder manufactures homepages. I recommend Ultimarc, home of the I-PAC and MiniPAC that I recommend, but most other encoders are fine too and works just the same.







That's it. - I looks confusing, but it really is very simple.



If you decide to make your own MAME cabinet using my drawings, please feel free to make a donation,  as I'm trying to raise enough money to make a new up-right cabinet, that's hard to do as a student.




[ Copyright koenigs 2011 ]