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.

Monday, February 22, 2010

Resurrecting With A Funeral

Yup, bringing the blog back to life.
The defibrillator was applied, the EMT yelled "Clear!", and [WHUMP], life has jolted into my little corner of the Blogosphere (go the xkcd reference!).

Unfortunately, this miraculous occasion is occurring to note the death and disposal of a beloved friend, companion, and compatriot: the "Ravenous 4".

The Rav died nearly a year ago now, but tonight is finally the time for it to be sent to the Great Parking Lot in the Sky. Or at least someone else's driveway. I assume that the new owner (who chopped down our palm trees) will bring it back to life just like I've done with this blog, but I won't be around to see it. [sniff]

That said, the Rav was also a bastard. Or a bitch. (Never figured out its gender...)

SOOO many things stopped working, causing SOOO much money to be poured into the damn thing. Plenty of flat tires, accidental and otherwise (anybody remember the slashed tire at the Snooker Lounge?), plus flat batteries, and small fender-benders.

Still, the last clean-out was full of nostalgia: the rust stain in the carpet where the heater core leaked boiling rusty coolant all over Pottsey's foot; the dents from funny and not so funny causes; various wrappings/napkins/stains from the Leach Hwy Maccas; confetti and glitter-like stuff from my [ahem] loving friends during my wedding... The Rav was there for my first real job, the night I got engaged, my wedding day, my first few months as a husband, and some of my very best memories.

Farewell, ya stupid car :) .

Saturday, April 18, 2009

An Interesting Fact

Here's a little snippet of a creature comfort for me.
When I get into the shower:
1) I point the showerhead off to one side
2) Stand on the other side
3) Let the water run at full-melt-your-face-off-blast-hot... into the shower wall.

The comfort: the feeling of hot steam all over. And no Pottsey, it's not the same as you :-P.

**NOTE: If you accidentally get hit by the water at any point, your shower WILL be ruined. Not to mention the part of you that gets melted off.

Monday, October 6, 2008

Scientific Discovery!!

On Saturday I spent most of the day and part of the next morning at the house painting. 'Twas good fun with the legendary Lourie and the epic Pottsey stopping by to keep me company and share some laughs. And in the midst of that I managed to put the second coat on half the walls in the living room - YAY! But I digress.

So the scene is set - 12 hours of honest labor behind me as I wake up on Sunday, late morning-ish. After some monkeying about and a small amount of grocery shopping, I once again journeyed south to the painting cave. While waiting for Pottsey to come down I used the ingredients I had bought - 2 cans of chili (con carne) and 250g of prime cheddar. After simmering the chili on medium heat, I added the better part of 150g of said cheese (cubed) and stirred through till melted. After Pottsey arrived (30 sec after I took the chili-cheese wonderment off the stove) I put a bag of Doritos in a bowl, put the now identified dip in another bowl and served. Pottsey and I then did what we do best and consumed the glorious combination of (sort of) nacho chips and chili-cheese dip.

Now I can almost hear you thinking, "Why is the word 'SCIENCE' in the title???" Well, I'm glad you asked. After Pottsey and I consumed heaven on a plate, we found that we had a total lack of ability to continue painting, and, in fact, were about to fall asleep. So my scientific conclusion is:

"Good food combined with a late night prior leads to a complete lack of caring about anything."

Which is just fine with me!
And just for you, here's a basic recipe for you to enjoy:

Chili-cheese Dip
Ingredients:
Can of Chili con carne (choose flavor based on taste) - Ratio = about 2 cans:3 people
Cheddar cheese, cubed
- Add to suit taste

Put the chili into a saucepan / small pot and simmer
Add cheese gradually
Stir continuously
Eventually raise heat to high, constantly stirring
Done when you can't find any bits of cheese
Put in a bowl and serve with favorite type of chip (fries are good too!)

Wednesday, October 1, 2008

Frankenstein Nostalgia

I'll bet the title has at least SOME people scratching their electronic heads. Which is fine with me - Chaos, Confusion, Disorder, and my work here is done...

But seriously, I'm having a severe wistful moment. Allow me to elaborate:
The first computer I ever built, was constructed completely out of spare parts. I added about $200 of upgrades, but the bare bones that made it run was cobbled together from stuff I got for free. I dubbed it "Frankenstein" which I know isn't literally correct, but too bad. (It's worth mentioning that I sold Frankenstein to a coffee shop for $200 profit. :) ) Now, let's fast forward back to the present: I have 3 computers in the same room as me that I've built in a similar fashion, including Frankenstein II, but all of them pale in comparison to the machine that is currently building itself on the desk. That's right, the Media Server.

Now wait, didn't I already have that running???
Ah yes, I did. I had it working quite nicely actually - however, it's now bigger, badder, and better than ever! While most of the original hardware is the same, there are some major differences:

1) The Case: one of the major drawbacks of the original machine was that the case it was in was a cheap thing I picked up for $10, and with the fans I put into it to keep it from melting on me, it was pretty damn loud. Not anymore - whisper silent, much more room, and just plain good-looking.




2) The Storage: the old machine had about 850GB of storage provided by 4 hard drives in a JBOD configuration. (JBOD = Jumbo Bunch Of Disks. It also = heart break if one of them fails). Now? Five hard drives, with 4 in a RAID 5 configuration (it's cool, trust me) with just about double the storage of the JBOD. That's right, we're talking more than 1.5 TB. Be afraid.



Also noteworthy: Because of the way it works, the 4 drives in RAID 5 need to be "built" into the right configuration. (Remember, I said it's "building itself"...?). I started this building process almost 2 hours ago. Current status = 30%. Must. Be. Patient...!




3) The RAID Controller: OK, I already mentioned the storage, but this little piece of silicone is what makes it work - a PCI SATA RAID controller. And no, I won't expand that alphabet soup of acronyms there. You're not special enough :-P
Anywho, I need to shower much thanks on my buddy Simon: he had this lying around as a spare part, and let me have it :-D.

Current status: 31%

Well, I can't afford to keep watching this thing till it finishes, so it's bedtime for me. Klara's probably going to kill me after reading this, because I said I wasn't going to have a late night... But I think I'll be alright, at least until after the house is painted :-P

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update: 01/10/08, 10:00 AM

The server lives again! And after a bit of downloading for a driver, and some small tweaks, the massive drive is recognized - in fact, before I left for work, I started transferring across my DVD library. Ah, so much joy.