One of the “perks” of being an iPhone application developer has always been an excellent excuse to upgrade to the latest and greatest iPhone. As I write this on Friday I am actually waiting for my iPhone 5 to be delivered. Getting every device is useful and almost a requirement in order to test your applications on it.
But what you do with these devices as time goes on and they become increasingly obsolete? Some people sell them, others hand them down to family, but I typically keep them around for testing as well as nostalgia. They have come in handy over the years for various different things as well, like when I used them for time lapse cameras for the big Chicago snow storm of 2011. But they start to pile up and collect now after five years.
Yes… I may have a problem
Early this year I bought a new CRT monitor for my dedicated Mortal Kombat 2 arcade machine. It needed to be done because of bad burn in, and arcade CRTs are becoming increasingly rarer by the day. The monitor I bought is a Tri-mode monitor that not only supports the standard arcade resolutions (CGA and EGA) but it also supports VGA and comes with a standard VGA connector and adapter for JAMMA pins as well. This got me thinking, maybe I’ll build a MAME machine instead of running all the hardware required to run the five games switchable that I run in it today.
So, when starting to plan the MAME machine my initial plans were to use an older Mac Mini. But when I was putting together what turned out to be a pretty extensive parts list, I got to thinking: “Why can’t I just repurpose an old iOS device for this?”
It turns out, I can and I did…
How did I do it, you may ask? Here’s a breakdown of what I did if you too want to try to do the same with your arcade cabinet.
WHAT YOU’LL NEED
Here is a list of parts you’ll need and some price estimates.
- Arcade Cabinet
- Arcade monitor that can run VGA+ resolutions - Varies (I went with the 24.5” version of this monitor which is no longer available.)
- An original iCade - Can be found as low as $50+
- iPad VGA Connector - $30
- iOS Device (with an A4 chip or greater) - $200+
- Audio wiring of your choice/need - ~$10
- Security Torx bits - ~$10
Basically if you have an arcade cabinet with a monitor that’ll display VGA+ signals and an old iPhone like I did, then you can likely do this project for as little as $100.
PART 1: VIDEO
I decided the optimal way to connect the video is to use the Apple iPad VGA adapter which works with any device with an A4 or higher processor. So that means I can use an iPhone 4, iPhone 4S, any iPad and the newest iPod Touch models. You can also use the Apple HDMI cable if your monitor has an HDMI input.
Choose Your Destiny
The video is the most important part, because without it you can’t do the rest of it. So before I did anything I built a simple app to test video modes on my arcade monitor. I found it returns that it supports more resolutions beyond VGA, but in fact it doesn’t. But it successfully works at 640x480 as I found in my testing.
It’s Resolution Baby
For my purposes this solution is more than adequate. A proper MAME setup can also get to the lower CGA or EGA resolutions, but for my monitor being analog it’s best to keep it on one resolution so this is not ideal and still looks great to me.
PART 2: CONTROLS
As far as controls go, this was the one I thought about the most. There are a few options, but even less for non jailbroken iOS devices. So I settled on going with the iCade method of making the iOS software think it’s a Bluetooth keyboard. I did this by… using an iCade.
iCade - The key to this project
I owned an iCade from the first day they were available, it makes for a great iPad stand and also a fun way to play some classic games which are making their way to the platform more and more. But I didn’t want to open it up and ruin it. So I searched online to see what the wiring system looked like, and I was pleasantly surprised to see it uses standard arcade control cherry switches. Which meant, transplanting it’s guts into my arcade machine would be fairly easy.
I opted to buy a second iCade to use for this, because I’d like to make it a permanent fixture in my home. I found one used on eBay for $40 shipped and jumped on it. I’ve also seen others go for as low as $20 at times as well.
So once I got it home I began to pull it apart to take what I needed to transplant to make the iCade work with my existing arcade control panel. Below are a few photos, it’s fairly straight forward and took a matter of minutes so I wont waste words explaining how to take it apart. Keep in mind I did find you’d need a security torx bit to get it open, but these are fairly commonly found at hardware stores now.
iCade Inside Out
Standard Quick Disconnects
No Quick Disconnects, Easily Resolved
PCB plus wiring ready to go
One downfall with using an iCade is that it’s a one player only device. So my two player capable arcade machine is not being used optimally, no going head to head in Mortal Kombat and no teaming up together in The Simpsons Arcade Game. I am going to look into building a custom Bluetooth controller using an Arduino, or similar, that would work similarly to the iCade but also support two or more players.
PART 3: AUDIO
At first I wasn’t going to do anything for audio. My iPad 3 which I was initially using in the process was quite loud enough that it was as loud as the arcade machine. But when I moved back to the iPhone 4 which will likely be the sole device I use for this, I found it’s speaker quite limiting.
The arcade cabinet is only mono so only had two connections for one speaker to hook up to the iPhone. So I grabbed a few spare headphone and RCA cables I had around, did some cutting and then hooked on two alligator clips which I use to connect to the speaker. Here’s the finished cable.
Made cable long to reach the cabinet speaker wire in the back
It’s all rather simple, if you can hook up arcade controls you can also hook up a speaker.
PART 4: POWER
Power is one of the things that is really an unique to this setup. An iPhone device has very little drain compared to a desktop computer or even the five arcade PCBs that took two PC power supplies to run that had in there. Also the iCade runs off of two AA batteries as well, or an optional power brick. The way I set it all up today actually has no direct power draw from the wall at all. I ripped out the iCade’s battery compartment to keep things simple for now.
Couldn’t find my Dremel, so I used a drill.
The only major issue I have right now is that the VGA adapter blocks the power connector of the iPhone. So when I’m not playing, I keep the iPhone plugged into power. In my testing, iMAME can run for about 2.5 hours on my iPhone 4 without interruption so this is adequate for my purposes but not ideal.
Carefully chosen case for matching red trim
In the future I’ll be researching a way to keep the iPhone powered without blocking the VGA port. Apple’s own HDMI output solved this issue, so it’s possible, but I need to build or hack the existing cable to solve this problem.
PART 5: SOFTWARE
As I said earlier, no jailbreaking is required for my solution. But for others this may be difficult without jailbreaking. The MAME project, and by extension the iMAME4All projects by Seleuco, are all open source so any developer can build them with little work and without jailbreaking.
iOS developers are best to start with lesbird’s iMAME for Xcode, much easier to get up and running from there. I have notice some performance problems with my builds, and I’m looking into that and readying the project for iOS 6. I will likely be releasing that update on this Github project sometime soon now that iOS 6 has been released.
Also if you are not a developer and happened to download the iMAME that was availble on the AppStore like I did, then you don’t need to jailbreak your device. Otherwise if you are jailbroken, both iMAME4All and newer iMAME4iOS are available on Cydia.
It’s important to note that the MAME4All that iMAME4All is based off of a source fork of MAME that is around 10 years old now. It’s done like this because it runs things much faster on older hardware, but suffers because of a lack of compatibility and accuracy. But for most games, it works perfectly fine. Seleuco also ported a newer source build of MAME into the iMAME4iOS project. It needs much beefier hardware to run the games, but has a much greater compatibility. I’ll likely be moving to this build in the future.
THE END RESULT
TO THE FUTURE
I’m also not 100% happy with how iMAME works with the arcade cabinet and the iCade, and this is something I am looking forward to improving since it is open source. I haven’t had the time yet but I have a few ideas. One idea I had is to make a whole new interface, here is a mockup below:
Besides some software, power and possible control enhancements I’ve been wanting to do, there was another idea that was sprung from this project. What if you were to take a third party console arcade stick, toss in an iCade and an iPhone dock. Then using AirPlay Mirroring or the HDMI adapter, you could then turn that arcade stick into a portable arcade machine that hooks up to any modern TV. Why settle for playing these games on your iPad with an iCade, when you can hook it up to your 55” HDTV in your living room?
Now to find some spare time to make a proof of concept of this idea. Lucky for me this is another project where I have all the parts required to see it through.
If you have any questions you can contact me via email or Tumblr’s “Ask me a question” via the links on the right side of the page. I’ll try to get to them in a timely manner to get you on your way.