Monday, March 15, 2010

Arcade Controller Project [Part 2]

After mapping the keyboard buttons, I pulled out the keyboard control circuit. I de-soldered and removed the connections for the flimsy circuits and then attached 2 bits of IDE ribbon cable that I pulled apart. The result is in the picture shown.

Notice that one ribbon cable is connected to an 18-pin connection, and the other is connected to an 8-pin. These exactly correspond to the 18x8 key map that I've made.

At this point, I tested the keyboard controller - no sense in going too much further if I've melted or otherwise damaged the controller, after all. The easy way to do this is to hook up the USB cable (I've detached it while doing the soldering) and plug it into a computer. Open up Notepad, and pick a letter key from the handy map you've made. I chose Y. Find the corresponding wires, strip a little of the rubber shield off the end, and touch them together. You should now have the letter you've chosen filling up line after line in Notepad. It still works!

**NOTE: It's much easier to use a laptop because you still have access to the built-in keyboard. However, I've seen Windows XP detect and utilize 2 USB keyboards simultaneously.**

At this point, I should explain where I'm going with this ribbon cable. I decided that trying to connect the better part of 100 wires (45-49 inputs x 2 wires each) to only 26 contact points would be less than ideal. So I've picked up some experimenter board (AKA 'matrix board' or 'perf board') from Jaycar. The particular type that I've purchased (see right) features pre-traced channels running the length of the board. This makes it ideal for my uses - remember, the 8 y-coordinate channels have 18 possible x-coordinate connections.

I've cut the board into 2 pieces - one is 18 channels wide with at least 8 holes per channel, and the other is 8 wide with 18 holes per channel.

I then soldered the 18-wire ribbon cable (x values) like so. Looking closely, you'll see that I now have plenty of solder points for wires from each controller. From here I'll attach the similar board for the y values.

At this point, it's getting to the time where I need to start actually building the case that's going to house all of this intricate mumbo-jumbo. The main problem I'm encountering is too many ideas for cool features. I've realized that I should have invested more time an effort into the planning phase, but meh.

Also, if you're interested in the overall cost, at this stage I've spent a whopping $6-$7 on the experimenter board. Everything else I had lying around or got for free. A 25W soldering iron is about $10 and solder is another $8 or so at Jaycar or Bunnings. An IDE ribbon cable to hack apart is something you can probably pick up free at a PC parts store - it's now obsolete technology. Otherwise, I've got about 30 spares :) .

Saturday, March 13, 2010

Arcade Controller Project [Part 1]

I have embarked on a new construction project. The plan is to build a 4-player arcade controller to use with MAME on a PC/laptop. If that didn't make any sense to you, perhaps this photo will :) ->

This is more or less what the finished product will look like (provided I don't screw it up too much...).

One of the things I'd like to focus on in this little write-up is the wiring process - my blueprint only came into focus after a lot of research into the inner-workings of the various pieces of hardware being used. Most of the descriptions I came across for this process were a bit vague on the details, so I'll aim to shed a bit more light on it.

Most of my inspiration was found in examples like the one above from arcadecontrols.com - there are some amazing builds showcased there. Now, on with the project!

In the planning stage, I decided to go with the keyboard hack method described here and apply the best practices I could find in other designs. I picked up 2 identical USB keyboards for free (one extra in case I royally screw up), pulled one apart and then spent a couple hours on the tedious task of mapping the keyboard's buttons.

Sidenote - How a keyboard works:
A keyboard is relatively simple in design. Underneath each button is 2 pieces of flimsy plastic film that have circuits traced on them. These 2 circuits form a matrix with x and y coordinates (dust off the high school math skills!). So, when you press a key, it creates a contact at point (x,y) which a small controller in the keyboard interprets and sends to the computer. This is particularly handy because:
1) Arcade controls work the same way, electrically speaking.
2) MAME (the program I'm using for the arcade games) is set up to use the keyboard as the default controller.

So when I said "mapping the buttons" I was recording the matrix points for each button - I'll need this info for the wiring. Each direction on a joystick and each button will need to have its own key on the keyboard. My particular keyboard has an 18 x 8 matrix - I've labeled them 1-18 and A-H. For example, the coordinates for the letter 'Y' on the keyboard are 7D.

Now I just have to translate it into wires...

**[NOTE: If you've been following this already and think that this post looks different, you're right. I've tried to restructure this into a more logical process so that it can be used as a guide for those that want to try the same thing.]**

Monday, March 1, 2010

Time-Space Continuum Theory

I have a theory - the ending of a long weekend depends on the structure.

I'll explain: If a long weekend starts on a Friday (as in, Friday is the holiday), and finishes on a Sunday, the perception is that nothing has been gained, and the weekend wasn't long enough, because you end up having to drag yourself back to work on the Monday. It doesn't matter that there was an extra day before the normal weekend - the end of the weekend is just as depressing.

However, if the weekend extends to Monday (as in, Monday is the holiday), the perception is altered - the weekend ends on a high note. You get to go to sleep on Sunday (or Monday morning, depending on your lifestyle) knowing that you don't have to drag yourself out of bed to get to work when you wake up. More fulfilling in my opinion anyway.

Or maybe I'm slightly odd. Take your pick.