Porting Mupen64Plus to OUYA
(Nintendo 64 Emulator)
Hey, everyone, I'm Paul Lamb. For the past couple of years, I've been working on a port of the popular open-source Nintendo 64 emulator "Mupen64Plus" to Android. It is a functional, working emulator which works on a large variety of Android devices, and is currently published for free on the Google Play Store as "Mupen64Plus, Android Edition". This Kickstarter campaign is to fund porting this app to the OUYA video game console.
Most of us have fond memories of our childhood that define us. Many of mine are of experiencing the classic Nintendo 64 games like Mario 64 and Zelda Ocarina of Time. The main reason I started this project nearly two years ago, was because I wanted to relive those memories. Most of these games were never made for any other system, and if not for emulators, they would eventually be lost to history.
Playing N64 games on my phone is great of course, but the OUYA provides the irresistible prospect of being able to play those classic games the way they were originally intended - controllers and TV. I am really excited about this!
History and Past Experience
I've been into programming for a very long time .. actually started in the Third Grade. Over the years, I've had experience with a wide variety of applications including interactive web content, databases and interfaces, 2D and 3D graphics in a variety of different languages, video games, and mobile Android development. I currently work as a web/ PHP/ Android developer for Ericsson in Plano, Texas.
The concept of porting a Nintendo 64 emulator to Android began two years ago, back in December 2010. I had been playing around with various N64 emulators on my PC, including Project64 and Mupen64Plus. I was so impressed with the progress that had been made on Mupen64Plus since I'd used it last, that I decided to dig around in the source code. I really fell in love with the API and the modular nature of the code. I decided to see if I could contribute to the emulation effort by attempting to port the code to an Android app. Out of respect for Richard and his team, I decided to call my project Mupen64Plus, Android Edition (AE). In the spirit of open source and the GPL, the compiled app and source code have always been free to download on my website, it's easy to branch, and we have a public repository on github.
The biggest initial challenge was the fact that the core dynamic recompiler for Mupen64Plus was written in x86 assembly language, while most Android devices have ARM CPUs. A talented developer called Ari64 really hooked me up by working with me one-on-one to adapt his ARM dynarec he wrote in his port for the Open Pandora. A couple of other talented developers, Adventus and Kris, provided another important piece: video plug-ins written for GLES2. And Slouken and Pelya provided the necessary SDL components. A lot of other little snippets from several other projects and developers also went into bringing all the big pieces together.
Mupen64Plus AE first became a functioning emulator (core, RSP, input, audio, and video all running) in October 2011, with Mario's happy mug announcing "It's-a me! Mario!" right from the screen of my phone! Alpha Testing began shortly after. There were a lot of initial serious problems, but with the help of a great community of testers and developers, we began squashing them at a break-neck pace! The most serious bugs were resolved and a rudimentary GUI was in place in only a couple short months.
Beta Testing began in December 2011, and I published the app on the Google Play Store, to get the word out to a wider audience. During Beta Testing, Mupen64Plus AE has had nine major and three minor published updates. There is a laundry list of bug-fixes, improvements, and features that I and the other talented developers on our team have implemented. We are currently working on a major overhaul of the GUI, which should be ready to publish before this Christmas. This app is an accomplishment I am very proud to have had such a major role in achieving. According to Google's records, branches of the app previously published on the Play Store have been installed on over a million devices! Mupen64Plus AE itself has had over 250,000 installs.
To see the emulator in action, you just need an Android phone or tablet. Preferably, you'll need at least ARMv7a, 1Ghz, single-core (will also work with some tweaking on a few ARMv5 and ARMv6 devices if they have support for GLES2). Either stop by my forum at http://www.paulscode.com, or look up "Mupen64Plus AE" on the Google Play Store. Keep in mind that the app is written for Android, and the OUYA video game console is built on Android.. so you can expect the OUYA port to have very similar results as other modern dual-core Android devices with similar hardware specs.
Here are some screen-shots of the app, for those of you who do not have a compatible Android device.
Testimonials from Players
"This is truely the greatest app ever made. Nothing else compares. I will and do recomend this to everyone."
"This is THE ONLY legitimate n64 emulator available. It meets the licensing requirements of mupen64plus, and is the real deal, not ad-infested cr**. Also great on tablets, especially with a game controller."
"I NEVER bother to rate apps, and yet I have to give this one the effort. Runs zelda ocarina nearly perfectly, and apparently the app is only in beta!"
"Words do not describe how much I love this app."
Plan for Project Completion
I've spent a great deal of time here talking up my Android app. That may seem a little strange, considering this Kickstarter campaign is to fund a port to the OUYA video game console. But this is all actually very relevant, because the OUYA itself is built on Android. According to the OUYA team, going from Android to OUYA is a seamless process. The port shouldn't be too difficult; most of the components of Mupen64Plus AE will compile and run on the OUYA right out of the box. In many ways, customizing to the OUYA will be easier than supporting vanilla Android, since there is only one set of hardware to target and optimize for.
The main cost of this project is pre-ordering the OUYA dev kit, in order to receive it early (in January) so that I can work on the code and have it ready to deploy when the OUYA is expected to hit the general market in March/ April.
The funding goal is set at $800. If that is all the campaign receives, I will make up the difference (after Kickstarter and Amazon take their cut) of the OUYA dev-kit cost. The emulator itself is free and open-source, licensed under the GPL. The OUYA port will also be free, with an in-app donation option to support future development. If the project is over-funded, I will pre-order additional OUYA dev kits for other devs on the Mupen64Plus AE team.
There are two main pieces that will require change. The first is input, since the OUYA does not use touchscreen input. Mupen64Plus AE is actually designed to be flexible in this regard. The app now has native joystick support built in, and input has always been modular, with the on-screen controls having been removable for some time. For example, see this video blog by Xperia Gamer from back in November 2011, demonstrating the app flawlessly utilizing device-specific input:
The second thing that will require some changes is the menu system. Note that menus in Android can be navigated with most joysticks, so this will also be a relatively minor change.
The focus of this project will mainly be on presentation and customizing the look and feel to the OUYA. The basic time-line for this process:
- Receive OUYA dev-kit
- Ship extra OUYA dev-kits to members of Mupen64Plus AE dev-team (if enough funding)
- Set up the build environment
- Work out initial build problems (missing dependencies, OUYA-specific idiosyncrasies)
- Work project into mupen64plus-ae github repository
- Begin collaboration with dev-team (if enough funding)
- Clean up unnecessary code
- Send initial working builds to Kickstarter backers for testing (who received OUYAs early)
- Extensive tests to identify OUYA-specific issues
- Discuss possible presentation/ interface improvements with OUYA community
- Thorough code commenting and documentation
- Establish game-compatibility wiki
- Establish a bug-list
- Rearrange support forum in preparation for new users and testers
- Go live!
Don't forget: I'm hoping to be able to raise enough with this campaign to fund more OUYA dev kits for other members of the development team. So the higher this project is funded, the better the quality of the initial release at the projected April 2013 publish date!
Risks and challenges
Of course, there's always the potential for snags with any creative project. Things can go wrong, take longer to complete than expected, etc. One such potential snag could be if important pieces of the OUYA SDK have been altered enough from vanilla Android that significant portions of the code need to be re-written. There is no way to anticipate this until I receive the dev kit. I will provide frequent updates to everyone, so everyone is in the loop. In the event that there is a delay, everyone will know well ahead of time.
Another potential risk is the possibility that OUYA decides not to support emulators. There are mixed feelings about emulation depending on who you talk to. Some large names have taken a hostile stance against emulators, while others are supportive. OUYA currently appears to be tolerant of emulators (one called SuperGNES is even supposed to come pre-installed, according to the Wikipedia page), but that could change in the future if there is pressure from outside entities who are less tolerant.Learn about accountability on Kickstarter
- (14 days)