Archive for the ‘arcade machine’ Category

arcade button matrix/control panel

June 22, 2016

I got an arcade machine, but it had a really crappy control panel.  I decided to make a better one (and I did an OK job for a first try).  The first thing was to come up with a template for buttons, joysticks, and my trackball.  I decided how much overhang I wanted on the control panel and how much curve I wanted in the buttons.  I don’t have a process for this, it is a matter of preference.  When laying out the controls think about what games you might want to play.  I hardly ever play fighting games, but I like neo geo very much.  I went with 2×3 buttons because that has a wide usefulness in games and doesn’t look too crowded.  There are still some games that I will only be able to play single player but that’s for reasons like smash tv or robotron 2084.  Once I decided a keep out zone around the edge of the control panel I picked an arbitrary curve for the front.  I could spend forever in CAD making it exactly something, but there isn’t a standard to build to so I just went ahead and laid it out mostly by eye.

Traditional arcade machines use all sorts of materials, but 3/4″ MDF is very common.  It’s eady to get, uniform in consistency, super shitty, flakes like cardstock, soaks water like a sponge, and is heavier than plutonium.  That all being granted, I used it anyway.  After getting some correctly sized hole saws I drilled all the button holes and the holes for the joysticks and trackballs.

oops, those carriage bolts should be under the plexi

The acrylic got a coat of black paint on the underside (so it wouldn’t chip) and so did the MDF (in case it does).  The outside of the control panel has been routed with a 1/16″ slot cutting bit so I could fit it with t-molding.

With all the hardware mounted I installed the buttons and ignored the concept of crimp connectors.  Solder everywhere!  For use with a non-ghosting matrix these buttons heed diodes.  Put simply the matrix can flow current both ways if more than one button is pressed, but these diodes block that so by scanning the matrix I can detect and be sure that every button is pressed at once.

The whole thing is wired together and hooked up to a knock-off arduino micro from ebay.  This is my favorite usb emulating microcontroller, and today it is playing the role of a keyboard thanks to soarer’s firmware as seen in my previous projects.  The matrix config I use is here.

As you can see this was done before I had a laser to cut things exactly.  the right buttons don’t arc like the left, the trackball is off center, and the carriage bolts go through the top sheet.  All in all I’m not a huge fan, but it works.


Arcade Mouse

June 22, 2016

I wanted a trackball on my arcade cabinet, mostly so I could play missile command but I know my mom likes centipede and I’ve always wanted to try marble madness.  Trackballs are common, lots of people put them on arcade machines so it should be cheap and easy to interface with.  Wrong.  Or, somewhat wrong.  This all depends on your level of cheap.  For me I thought the big trackballs were too expensive, and the ones that connect to a computer were even more.  If you think differently just remember this was a few years ago.  If you still think differently pretend it was a long long time ago when my point would be valid even to you.

I came across a trackball on ebay available for purchase.  It was 2.25″ across (boo), about $25 (yay!) and ps/2 (…good enough!).  It had three sets of wires for left right and middle click as well as a ps/2 cable coming out of it.  I have put a picture of it above. If you’ll notice there’s no convenient way to flush-mount this in a wood and acrylic control panel.  My solution involves a 2×4, some brackets, and shims to bring it to the right height.  As imprecise as this method is, I prefer it to a ‘trackball mounting plate’.  Those are ugly.  They also make highball versions that can be mounted like I want to, but they are more expensive.

Over time I came to find that the trackball didn’t work anymore.  I attribute it to me plugging the non-polarized harness in backward and frying the chip on board.  It turns out that all that’s needed these days to make a ps/2 mouse is one monolithic chip, some ir beam break sensors and some buttons.  I reverse engineered it and found that the circuit was as simple as one of these ps/2 mice I got at black friday a long long time ago.  They were $0.50 at abc warehouse so I bought 20 or some stupid number like that, I figured with a fleet of identical ones I could use them in projects… just like this!

Now, I’ve tried before to mod trackballs with a different controller but I wasn’t able to make the new IC like the old sensors so I gave up and stuck an optical mouse sensor under it (and flipped the axes). That led to some skipping because of the mechanical advantage I had over the mouse now that it was a trackball, so I actually prefer this method of modifying it.

I recognize that it’s stupid to hold out for a ps/2 trackball and then replace the controller anyway, but that’s all I had at the time and since it worked I will accept no criticism on it.  I will concede the point that the original PCB is un-needed and I probably could have removed the chip and dead-bugged it, but this was a bit easier and I’m more confident in it.

There you go, no code, no real difficult parts.  If you have an old ball mouse there’s a good chance you can use it as a trackball controller.

NES/SNES controller adapter

June 19, 2016

Alright, let’s try for one more today.  My queue is finally emptying a bit, it feels like I’m being productive while I’m not actually accomplishing anything new!  This is another post that centers around my arcade machine.  The control panel I have is only two player, this isn’t much of a problem, but I like to solve the general case of the problem.  I decided that for players three and four I would have an expansion box.  Sure, you could use controllers for the other players, but that take re-mapping of the controls for each game and who wants to play with a ps2 controller against someone with a real arcade stick?  My solution, as always, is to use an arduino to emulate a keyboard and this time I decided to make it modular.

This builds off my NES Max mouse, but I expanded the library to read 2 gamepads simultaneously (I apologize for not changing the comments to reflect what I did, but at least I posted the changed code).  The gamepads I chose are the NES Advantage (famously used in ghostbusters 2) and the SNES Advantage (as featured in sentences like “they made an SNES Advantage?”).  The code I used was almost identical to what I used for the mouse except this time I used more buttons.  These controllers have the advantage of having auto-fire capability so maybe people who get stuck with player three or four won’t complain as much any more.

Laser cut box (blah blah) way too big (blah blah) used a teensy 3 (blah what a waste blah).  I think I have to stop blogging, the quality seems to go down throughout the day.



arcade coin door

February 8, 2015

This isn’t a big hack, but it’s simple and something that can be done by anyone wanting to convert an arcade machine to MAME.  I started out with a 3-player coin door which is admittedly strange, but the cabinet used to be for Battletoads (a 3 player game).  I spent a long time stripping, cleaning, polishing, painting, and in general restoring this coin door.  Then I moved the cabinet 500 miles to college and 500 miles back.  It is ‘real arcade authentic’ now with it’s distressed look (I got really lazy).

coin door exterior

The coin mechanisms were purchased off of the BYOAC forum and have micro-switches that trigger any time a coin is accepted.  The door was originally lit by incandescent bulbs but I have replaced those with LEDs so I could change their power source (I only had 5 volts to work with).

White LED and resistor in original housing

MAME has a standard set of controls that are applied to all games, these controls default to keypresses on a keyboard.  For example: Player 1-4 start buttons are the number keys 1-4 and pressing 5-8 simulates putting coins into the player 1-4 slots on a real machine.  This list is mirrored here:

Main Keys
5,6,7,8 Insert coin
1,2,3,4 Players 1 – 4 start buttons
9,0 Insert service coin (Needed by some games)
F1 Enables raster special effects in certain games.
F2 Test/Service Switch
F3 Game Reset
F4 Show the game graphics. Use cursor keys to change the set or colour.
F7 Load a saved game state from a slot number.
Shift+F7 Save game state to 1 of 10 slots.
F8 Decrease frame skip during a game.
F9 Increase frame skip during a game.
F10 Speed Throttle (Makes game overspeed)
F11 Frames Per Second and Frameskip information
Left Shift + F11 Enables the profiler in debug versions.
F12 Saves image of game screen to snaps directory.
P Pause the game
Shift + P Skip one frame forward if paused.
Esc Exit from game
“~” or “�” (Above Tab) Volume Control
Tab Access Mame’s in-game menu
Control Keys (Default)
Arrow Keys Controller (Player 1)
Left Ctrl Fire 1 (Player 1)
Left Alt Fire 2 (Player 1)
Space Fire 3 (Player 1)
Left Shift Fire 4 (Player 1)
Z Fire 5 (Player 1)
X Fire 6(Player 1)
R,F,G,D Controller (Player 2)
A Fire 1 (Player 2)
S Fire 2 (Player 2)
Q Fire 3 (Player 2)
W Fire 4 (Player 2)
Not Set By Default Fire 5 (Player 2)
Not Set By Default Fire 6 (Player 2)

The actual interface between the coin slots and the MAME computer is a usb keyboard controller ripped out of a Superman Returns keyboard I got for free after rebate back in the day.  Some people may complain about interfacing with the key matrix and that it creates ‘ghosting’ problems, but this keyboard only needs 3 keys and they’re almost never going to be simultaneous.  The switches are normally open (or I connected them to the normally open contacts) so they simulate keys perfectly.

so hacky

The whole thing is glued to a playing card (I think it’s a lego basketball card) as a nonconductive substrate and glued to the coin door.  You can see I had grander plans for the keyboard controller when I originally freed it from the melted keyboard (don’t leave them in a hot car all summer, they curl nicely).  The matrix was reverse engineered the easy way: by tracing out all the conductive paint on the sheets of plastic with different colored sharpies.

This is a really simple part of the project, now go forth and MAME! having an unfinished MAME cabinet is a rite of passage for all nerds.


So, apparently when setting up the software a control key is useful.  I added one switch behind the player 3 coin up, I wired it in parallel with that switch so you can either have a free coin (for player 3) or control the mame backend with it.