iMame4All for iOS
The Xcode Project
for non-jailbroken iOS devices

See the original iMame4All Google Code project for jailbroken devices

11.22.2013: See my 10-13-2013 update below for steps to get MAME4iOS on your non-jailbroken iOS device

Want to know how to build the "official" MAME project (up to 0.139) for your non-jailbroken iOS device? click here.

> click here to download the iMame4All Xcode project (0.37b5 romset) <

04-24-2014: Added MFI support
12-01-2013: Current iMame4All base version: 1.11.0
9.28.2011: Current iMame4All base version: 1.10.0

UPDATE 04-24-2014:
I added support for MFI (made for iPhone) controllers. This works very well for games like Robotron 2084 where if you have an extended controller you can use the dual analog sticks to move around. I suggest getting the SteelSeries Stratus Wireless Gaming Controller as it works quite well. Most of the work is in LesObjCInterface.m with a few small changes in input.cpp and minimal.cpp.

UPDATE 12-01-2013:
I updated the original iMame4All project to V1.11.0 and tested it with Xcode 5 and an iPad Air running iOS 7. Follow this link to download it. The updated project has all the latest iMame4All changes by David Valdeita (aka Seleuco) with some modified files by me to get it to work on non-jailbroken devices. I still recommend installing the MAME4iOS app as outlined below (10-13-2013 update) because (1) it includes features not available with the iMame4All app, (2) it has a much cleaner user interface and (3) it runs the newer 0.139 romset. However if you prefer to run the iMame4All app with the 0.37b5 romset then follow the link above.

UPDATE 10-13-2013:

The alternative to using the Xcode project: A pre-built MAME4iOS (V0.139 romset) IPA. How do I get MAME4iOS onto my non-jailbroken iOS device?

Follow these steps

> Go to the iMame4All main site by clicking here.
  > Download one of the MAME4iOS IPA files for non-jailbroken devices (or use this one - 1.6).
  > Sign the IPA with ReSignMe.
  > Install to your device using iFunBox.
  > Copy your ROMs to the file sharing folder for MAME4iOS using iTunes File Sharing.
NOTE: This version of MAME is based on 0.139 so be sure to use the correct romset.

-

Looking for iDOS for non-jailbroken iOS devices? click here.
10.17.2012: Looking for iAmiga for non-jailbroken iOS devices? click here.

-

Did you download iMAME from the App Store? Click here

This project works with Xcode 5 and iOS 7

(see notes at bottom of page for Xcode 3 and iOS 4)

Where do the ROMs go?

click here to see more of my iOS apps

Follow me on Twitter for updates to the iMame4All Xcode project
Follow lesbird65 on Twitter



This is the homepage for the iMame4All Xcode project. The goal is to take the iMame4All source and get it to compile and build using Xcode for non-jailbroken iPads.

A few changes were needed to get iMame4All to work with non-jailbroken iPads.

On a non-jailbroken device you do not have full access to the file system so I had to make sure all files were loaded from the documents directory. This posed a couple of problems.

First, you can't copy folders to the documents directory via iTunes File Sharing so how to handle the audio samples? My solution was to include the audio samples (samples.zip) in the app bundle and access them from the resources folder. The samples.zip file is included in the project.

See LesObjCInterface.m function getBundlePath

Second, all roms are copied to the documents folder using iTunes File Sharing. New folders are created here for saving game states and configuration settings. I check to see if the roms folder is being referenced in code and strip "roms" from the name then forward the request to the documents folder.

See shared.c function get_documents_path

Other changes:

Several hard coded paths had to be changed in order for it to work on a non-jailbroken iPad. This was solved by writing three functions in LesObjCInterface.m:

getBundlePath()
getDocumentsPath()
getRomPath()

These functions in turn called the equivalent Objective-C functions to return the appropriate paths. I then replaced all hard coded paths with these functions as needed.



BTstack and WiiMote controller

Sorry, can't find a good solution for the BTstack and WiiMote controller for non-jailbroken devices. The problem is the BTstack Daemon needs to be low-level installed but on a non-jailbroken device you don't have access to the full file system. Also, you need chip level access to the Bluetooth chipset which can't be done on a non-jailbroken device. The solution here is to use the iCade arcade cabinet or the iControlPad controller in iCade emulation mode.

  The BTstack code is still compiled in but the library is weak-linked which means if the low-level daemon is not installed the functions are ignored (update: actually the app will crash if you try to connect to the WiiMote).



iMame4All project for non-jailbroken iOS devices

The full project based on the latest (as of 12/1/2013 V1.11.0) iMame4All code can be downloaded here:

iMame4All source code for Xcode v1.11.0b

Notes to build for your environment:

I'm using Xcode 5 and building for iOS 7 (device only - no simulator).
(IMPORTANT: see notes below for Xcode 3 and iOS 4)

Check your build target. This project will only work for a device, not a simulator. The BTstack library file is compiled for ARM hardware and therefore will generate linker errors if you try to build the project for the simulator.

Before building be sure to change the bundle identifier in iMAME-info.plist to match your provisioning file. Otherwise you'll get code sign errors when compiling. My bundle identifier is com.lesbird.iMAME so find that and change it to what you created in the iOS Developer Portal.

Files modified for no-jailbreak (search for Les Bird):

Classes/Bootstrapper.m
Classes/OptionsController.m
Classes/LesObjCInterface.m (added)

src/iOS/config.cpp
src/iOS/iOS_frontend.cpp
src/iOS/shared.c

Where do I put the ROMs?
Copy all your zip'd ROMs to the File Sharing folder for iMAME. Do this by connecting your iPad or iPhone to your computer and loading up iTunes. Click on your iPad or iPhone on the left panel then select the Apps tab for your device. Now scroll down to the bottom of the page where it says File Sharing. Click on the iMAME app then click ADD and copy all your ROMs to that folder.

iOS 4 SDK and Xcode 3
(as of 12-01-2013 probably no longer applies)
This archive has been modified to build with the latest Xcode 4.2 and iOS 5 SDK. There are some important changes that were made for this to work. If you are building using Xcode 3.2.6 and iOS 4 then you'll need to replace all references of "presentingViewController" with "parentViewController" in all source files.

With the 1.10.0c build this change should no longer be necessary. It should build and work with both iOS 4 SDK and iOS 5 SDK.

iOS 5 and Xcode 4 CoreVideo Error
(as of 12-01-2013 probably no longer applies)
To fix the CoreVideo compile errors when building the project with Xcode 4 for iOS 5 edit the project settings and remove the Framework Search Paths except for $(inherited). The paths are setup for my development environment but most likely will not match what you have on your Mac.



iMAME on the App Store

If you downloaded iMAME from the App Store in December of 2011 here are the main differences:

First, you can't copy your ROMs to iMAME using iTunes File Sharing. That feature had to be disabled in order to comply with App Store guidelines. Instead you should use iExplorer and copy the ROMs to the Documents folder for the iMAME application.

Second, the readme help file talks about using WiiMotes with iMAME. This is not possible. WiiMotes require low level access to the Bluetooth chipset which can only be done on a jailbroken device. However, as an alternative you can use the iControlPad which is a good handheld controller.

Make sure you are using the correct ROM set. You need ROMs for iMame4All for GP32X which are based on the 0.37b5 version of MAME. Somewhere out there in internet land is a complete set of iMame4All ROMs so just do some research to find it.

iMAME on the App Store is based on the iMame4All for Xcode project with a few changes by Jim VanDeventer to make it App Store compliant.




April 24, 2014

back to The Game Projects page

email


Real Time Web Analytics