(Note: see updates below for the complete v139 project)
Here’s a link to a zip file that contains the modified makefile, pre-built tools and data files for the application bundle. This will build the MAME project for iOS and create an app bundle but it will not run because there’s no OSD for the iPad yet. Just copy these files to the mame0147s folder then run the make command to build the project.
Here’s the makefile if you want to view it and see what I added: makefile
About the makefile changes: I added rules to build the project using the Xcode command line utilities. I added rules to build an application bundle. I added a rule to build Objective-C source files. I pre-built all the supplemental make tools, such as the 68000 source code generator, by first running the unmodified makefile (except I changed the OSD to osdmini). This built a MacOS version of the MAME executable and it also built all the supplemental tools. I copied the supplemental tools to a separate folder called iOS-data/mameSupport/build and modified the makefile to point to this folder for the pre-built tools.
One more thing, you will need to download this file and copy it to the src/osd/osdmini folder: osinline.h
So after several attempts (to get v147 to work) I’ve discovered that for some reason any version of MAME later than 139 (140?) does not seem to work on the iPad. The issues are not clear yet and due to the difficulties in debugging this I’ve decided to just stick with getting v139 to work on the iPad. The problem occurs somewhere deep inside MAME. After a game is launched it will crash before any display updates and before any of the warning and info screens. The furthest I got was with v142 which would display the warning screen but when dismissed it would crash out. I may revisit this sometime in the future but for now you can use the link below to download a complete v139 project directory with a very minimal OSD – you can pick from the available ROMs that you copy to the documents folder, it will launch the game but is currently not playable due to no virtual buttons existing yet. Tap the screen to return back to the ROM selection screen.
Grab the complete v139 project here: MAME v139 project for iPad
The “makefile” project above will do the following:
- build a complete executable for the iPad
- code sign the executable
- create an app bundle
- sync the app to your connected device using “fruitstrap“
What the app will not do right now:
- Can’t play the games yet but you can watch the attract mode
- No sound yet
Can’t exit the currently launched game (close the app and relaunch)
- Vector games don’t seem to work well right now
What good is this project if you can’t play the games? It’s a good starting point for your own MAME project and a good learning experience if you’re trying to figure out how to (a) create an app bundle, (b) code sign and (c) sync your own apps to your device from the command line. Also, I will continue to improve and update the project as time permits. If you’re looking for a complete MAME solution for your non-jailbroken iOS device I would suggest downloading my iMAME4All Xcode project from this link:
Now supports the original MAME artwork. Download the complete artwork file here (1.3GB) and unzip this file to a folder called artwork. Copy the resulting folder with the included game zip files to the iOS-data/mameData folder (resulting path is iOS-data/mameData/artwork). This complete folder gets copied over to the app bundle before it is sync’d to your iPad.
- Get sound to work
- Improve performance
- Add toggle to turn off artwork (bezels)
- Try to get the latest version of MAME to work
- Add control options (iCade, virtual buttons, etc)
- Maybe get the SDL OSD to work
Stay tuned for more…