Yearly Archives: 2011

Do A Barrel Roll – CSS Animation

If you’re here, you’ve probably seen what happens when you search for “do a barrel roll” on Google. This is done by some simple CSS animation.

@-moz-keyframes roll {
    100% {
        -moz-transform: rotate(360deg);
@-o-keyframes roll {
    100% {
        -o-transform: rotate(360deg);
@-webkit-keyframes roll {
    100% {
        -webkit-transform: rotate(360deg);
body {  
    -moz-animation-duration: 4s;  
    -moz-animation-name: roll;  
    -moz-animation-iteration-count: 1;
    -webkit-animation-duration: 4s;  
    -webkit-animation-name: roll;  
    -webkit-animation-iteration-count: 1;
    -o-animation-duration: 4s;  
    -o-animation-name: roll;  
    -o-animation-iteration-count: 1;  

The CSS is simple enough, it sets the duration to last for 4 seconds, then the type of animation is set by “name” which is “roll”, and finally it is set to play only once. The important thing is how you get the animation “roll”. This is set by using the @-prefix-keyframes with the identifier “roll”, this enables you to create sort of animation functions. @keyframes allows for standard CSS properties to change based on the percentage of the duration completed. Within the @keyframes you can use any percentage, and as many as you like, to set properties; or the to and from keywords. In the above code, 100% could easily be replace with the to keyword. The same code is then repeated with the various prefixes for cross-browser compatibility. Currently the only supported browsers are Chrome, Firefox 5.0+, Safari 4.0+, and Opera? (Opera has not been fully tested).
Read on to see this post do a barrel role and learn more about CSS animations

Control Panel Graphic Install

The other day I received my control panel from Game On Grafix, and I got around to installing it which just about completes my MAME cabinet. I also picked up some joystick surrounds.
New Control Panel

First, I had to remove the buttons and joysticks from the panel. This, and replacing them, is probably the worst part. (I really need to get some better cable management) After I got all the buttons off and removed the panel from the rest of the cabinet I sanded it down a bit to smooth out the hole filling I did prior. Then, I cleaned it up a bit so I didn’t have a bunch of dirt and hair stuck under the graphic.
Read about how the graphic was applied

MAME Marquee and Lighting

This is just a quick update. A few days ago I received my marquee from Game on Grafix and installed it. My marquee installation was pretty easy because I already had plexiglass since it is a conversion cabinet. All I had to do was trim the marquee a bit off the sides and I taped it to the back of the plexiglass. Then, it was just a matter of sliding into place and replacing a few screws.
Lightning Marquee from Game On Grafix
Check out the status of the remaining parts

Installing AimTrak into a GunCon Case

I wanted light guns for my MAME cabinet, who doesn’t? Am I right!? So, basically the only choice now-a-days is the AimTrak from Ultimarc. This is a nice, semi-cheap option. I say semi-cheap because you can get the module by itself and put it in your own gun casing which can be pretty cheap off eBay if you don’t have anything laying around. I originally thought of using the NES Zapper, however after receiving the module and trying it out it didn’t fit so well. So, I ordered an old GunCon for the original Playstation off of eBay which I heard was a nice casing for the AimTrak. Here is a small tutorial of how I put it all together.
Blue Painted AimTrak GunCon
Read the full guide

Preparing the Control Panel

Since I am converting an arcade cabinet for MAME use instead of building my own I had the issue of having old button holes. I tried to use the holes for my new buttons, but I only was able to reuse 2 of them. What to do with the other 4 buttons? Fill them with putty of course.

Wood putty is simple enough to work with, just plop some in the hole and smooth out with a putty knife. When working with button holes, a.) it takes a long time to dry, and b.) it’s good to apply putty in 2 rounds. The first round I did not wait long enough for the putty to dry and kinda screwed it up.

Today I decided to get rid of the old Beach Head 2000 graphic and clean up the panel a bit to prepare for my new graphic. It will still be a while before I get the new graphic, but I was tired of the old one. Before I tore the adhesive up, I applied a new layer of putty to clean up the holes a bit.
Cleaned Up Arcade Control Panel
Read more about the clean up process

GZip MySQL Database Backup with PHP and Cron

I know that I need to backup my database every once and a while, but I’m lazy and forgetful. I end up backing up maybe 4 or 5 times a year. Ideally, I want to backup every month at least. The bad news is, my host (1&1) doesn’t have any automatic backup, so I had to make my own. I tried Googling, but didn’t find anything that really fit my need.

I did find a script by David Walsh that almost worked. I used most of the original script, but had to remodel it a bit to fit my needs. View the backup script

Software and Frontend

Basically the most important thing in a MAME cabinet is, well, the MAME software. MAME stands for Multiple Arcade Machine Emulator and can emulate most every arcade game up until about 2005 or so. What is the point in having an arcade cabinet without being able to play any games, MAME solves this problem. MAME is easy enough to download and setup. Just venture over to and download the latest binaries, or source if you want to compile yourself, then extract. The MAME program by itself only runs from the command line, so you need a front-end to manage your games graphically, especially if your using a cabinet (you don’t want to have a keyboard instead of joysticks).

Mamewah Front-End
Read about all the different software I use in my MAME cabinet

Cutting Button Holes

Buttons are a very important part of arcade cabinets. Without buttons you can’t do anything except move around. My control panel plan is to have 2 joysticks with 6 buttons each, 2 player start buttons, 3 mouse/trackball buttons, 2 MAME buttons (escape and coin), and of course the existing trackball. Lucky for me I found a local arcade owner, Tornado Terry, that also sold some parts at a good price. He even had a bundle with the exact buttons I needed! Read on to see the planning and cutting

Arcade Cabinet – MAME Build

I have been wanting to build a MAME system for quite some time now. Until recently my father would not let me get a cabinet to start my build. Now, he suddenly changed his mind…only after I had to pass up on several free cabinets. :P

After searching through several Craigslist listings, I found a nice one. Some one was selling a Beach Head 2000 cabinet with a USB interface installed for only $100! First, I googled what the cabinet looked like and it is a pretty nice, and big build. I also discovered that the cabinet is worth about $800 so, it was a great deal! After contacting the guy on a Friday, he tells me he did some googling as well and he decided to raise the price to $250. I talked him down to $200.

Beach Head 2000
Read the rest of the cabinet story

Back to Top