Monster iPhone Tutorial (part 3: iPhone Game Emulators)
September 7th, 2008 in iPhone |
iPhone MAME emulator

MAME is strictly a non-profit project. Its main purpose is to be a reference to the inner workings of the emulated arcade machines. This is done both for educational purposes and for preservation purposes, in order to prevent many historical games from disappearing forever once the hardware they run on stops working. Of course, in order to preserve the games and demonstrate that the emulated behavior matches the original, you must also be able to actually play the games. This is considered a nice side effect, and is not MAME’s primary focus.
It is not our intention to infringe on any copyrights or patents on the original games. All of MAME’s source code is either our own or freely available. To operate, the emulator requires images of the original ROMs, CDs, or hard disks from the arcade machines, which must be provided by the user. No portions of the original game code are included in the executable.
Project Address: http://code.google.com/p/iphone-sdl-mame/
Roms: Look for Mame roms on the net.
Zodttd
psx4iphone, gpSPhone, snes4iphone, genesis4iphone, and OpenTTD.app can be found here.

snes4iphone has been released to beta testers at ZodTTD.com. This build is very special as it marks what is soon to be a trend in the following weeks…performance increases! This is largely due to the great strides saurik made while updating the tools I use to develop with. With some fixes made plus the new toolchain, some users have reported a 50% increase in performance of snes4iphone!
Snes4iphone is a Sega Genesis and Sega CD emulator for the Apple iPhone and iPod Touch. It is currently available via Installer.app courtesy of the Community Sources at ModMyiFone.com. It is also available at the official ZodTTD.com repo. Manual downloads are being posted and will be available shortly.
They’ve also been working on getting sound introduced into snes4iphone though it’s been an uphill battle. I can emulate and mix the sound, but for some reason it just outputs silence. More work is needed, but it at least is being worked on.
Project Address: http://www.zodttd.com
Tutorial
How to install Zodttd on your iPhone
Download and install ZodTTD.com projects via Installer.app Repo
1. On the iPhone or iPod Touch’s Safari goto this URL (with trailing / )
http://zodttd.com/repo/
2. If Installer.app doesn’t launch it’s because that feature wont work for people without an Installer.app Safari plugin. Instead, add the repo source to the sources list. You will need to launch Installer.app and goto Sources, then Edit, then Add. Add the URL above.
3. You should now see ZodTTD.com projects listed in All Packages and if it’s a newer release, Recent Packages.
The ePSXe 1.6.0 version of Sony Playstation emulator for the iphgone

ePSXe is a Sony Playstation emulator. It has a good compatibility rate and runs very fast. It is also very flexible as it uses a plugin system for sound and graphics and can also support original playstation controllers (using a special adaptor).
I have only recently started to use ePSXe as I normally use Bleem, however I have found out that ePSXe has alot less glitches and is updated far more regularly so I have switched over completely.
I thought long and hard over this tutorial as I knew it would be difficult to write as there are alot of options in ePSXe. Because of the amount of options I found that it is sometimes difficult to put the technical jargon into plain english but I think I have. I hope you like the results.
Downloading
You can find the latest version of ePSXe on it’s homepage here. If you want a friendly frontend for ePSXe then get Epsxecutor from the ePSXe homepage as well.
IMPORTANT! To get the emulator working you need a copy of the Playstation BIOS which you can get at the following link. There are 2 to look for…
1. SCPH7502.bin
2. SCPH1001.bin
You will also need to download some plugins as well to get ePSXe working. Plugins can be got from links below. The ones I recommend are…
Graphics = Petes GPU 1.64 (gpupete164.zip)
Sound = Petes DSound SPU 1.15 (spupetedsound115.zip)
CDROM = ePSXe’s Internal CD and CDR Mooby 1.6 (cdrmooby16.zip) for ISO images.
Installing
To install ePSXe you will need a copy of Winzip. All you have to do is to open the zipfile, press the extract button and type C:\ePSXe into to the path area of the window that opens. Use the same path if you want to install the ePSXecutor front end as well.
Bios - Where the BIOS image is stored
Cheats - Place cheat files here
Docs - ePSXe documentation
Memcards - Where ePSXe stores your memory cards
Patches - For game patches to help get copied games running
Plugins - For 3rd party audio / video plug-ins
Snap - Where screen shots are put
Sstates - Where ePSXe stores its saved game states.
To install the bios file you must extract the bios images to the C:\ePSXe\bios folder. You will need a copy of Winzip to extract the file.
You will also have to extract the plugins to the C:\eSPXe\plugins folder.
Installing Games
To play games on ePSXe you will need either the original Playstation CD’s or ISO images of them. If you have the original disk (or copy if your naughty) then ePSXe can play them straight from your CDRom.
If you have an ISO image then you will need the cdr mooby plugin selected and will have to select the image from a file window. As ISO images can be up to 700MB I don’t suggest you store too many on your computer as you’ll soon run out of hard disk space.
iPhone NES emulate your retro Nintendo games

NES.app lets you play Nintendo games on your iPhone. It is a fully functional, feature-rich Nintendo emulator. NES.app uses an emulator core called NESCore, which was forked from pNESx and InfoNES and re-engineered as a highly-portable and high-performance Nintendo emulator core.
In order to use NES.app, you will need ROM images of Nintendo games. ROM images are files containing the dumped instruction code from a physical cartridge. In many cases, you are legally entitled to posess a ROM image of any game that you presently own. ROM images for NES are widely available online, or with the appropriate hardware, you can dump them yourself directly from the cartridge.
Features
Multitouch: Use the directional pad + A + B, or other combinations
Landscape Mode: Turn the iPhone counter-clockwise to play in landscape mode
Zapper Tap: Tap objects on the screen to shoot them
Full Screen: Enlarge your NES picture to the max possible
Save State: Save an instant snapshot of your game and come back to it later
Game Genie: Use Game Genie cheat codes… and many more
NES.app is not iPhoneNES!
NES.app started as a fork of iPhoneNES v0.01, but has been completely rewritten to run very fast, and with many additional features including sound, multitouch support, full-screen, landscape mode, game genie codes, saved games and much more. It now contains zero code from the original iPhoneNES project.
As of recent, stepwhite re-released a much older version of NES.app as iPhoneNES v0.31. I have no idea why, but please be aware that NES.app is in no way affiliated with the iPhoneNES project (which only ever released v0.01 officially). I recommend using the latest version of NES.app instead, which is available below.
ROMs go in /var/root/Media/ROMs/NES (for those of you who don’t read the README).
Source Code
The source code can be downloaded via svn:
svn checkout http://svn.natetrue.com/nesapp
NES ROMs
NES ROMs are widely available on the Internet, and can be easily found using a serach engine. I do not condone the piracy of Nintendo games, however fair use may legally entitle you to download (or dump) the ROMs for games which you presently own, depending on your country of origin.
Download NES.app here
and here
Download the NES emulator + games from here
Please always read documentation before hacking your iphone, it can be damaged and remember Apple doesn’t honored warranty for hacked devices. Got it?
The NES Emulator in Action
Complete information about the NES Emulator
FEATURES
MULTITOUCH
NES.app uses the iPhone’s multitouch sensor to deliver a controller
environment very similar to the original NES controllers. This allows
you to “Run with B”, and so forth. The multitouch programming also allows
you to drag your finger to a different direction or button.
Note: “rolling” your thumb between A & B will allow you to depress both
buttons, just like on the original controller.
ZAPPER
The iPhone’s touchscreen makes for a great way to implement the zapper
gun. Just tap the screen where you want to shoot. Zap-Tap works on many
games including Duck Hunt, Hogan’s Alley, and others, but does not work
at all on the more nonstandard games, such as Chiller and Freedom Force.
SENSORY PAD
Since there is no tactile feedback on an iPhone, it may be more desirable
to play some games with a controller that measures motion, rather than
presses on specific buttons. Activating the ‘Sensory Pad’ option causes
NES.app’s directional pad to track with the motion of your finger,
regardless of where inside the sensory pad you are touching. When sensory
pad is active, the directional pad is replaced with a yellow track sensor.
SOUND
Sound is played through the iPhone’s native interface, allowing you to
hear email dings or accept phone calls while playing NES.app.
FRAME SKIP
Using the frame skip option, games that otherwise might run slightly slow
on your iPhone can be made playable.
An auto-frameskip option is the default, which continually adjusts the
frame skip and frame wait to make your games play as smooth as possible.
FULL SCREEN MODE
Using the full screen option, you can zoom in on your favorite game as
close to “full screen” as the NES aspect ratio will allow.
NOTE: Using full screen mode slows down the display a bit, so your
frameskip will typically bump up by 1, making the game more choppy.
LANDSCAPE MODE
NES.app takes advantage of the iPhone’s tilt sensor and will
automatically switch to a landscape-based view when you tilt your phone
to either side.
SAVE RAM
Games with battery-backed RAM, like Zelda, are automatically saved
to preserve your character data.
SAVE STATE
NES.app can save the state of any game when you exit. Unlike save ram,
which only for certain games with battery RAM, this option allows you to
take a “snapshot” of your game in progress, and come back to it later
right where you left off.
You can choose to start a fresh game from the “All Games” menu, or tap
“Saved Games” and load your previously saved game.
The game state is stored separate from save ram, so if you are playing
games like Zelda, where your game is usually stored to battery ram,
you will not need to save state unless you want to save an exact
snapshot. The save ram from the game is automatically stored
regardless of whether you save state.
TWO PLAYER CONTROLLERS
Although NES.app does not support netplay, you can toggle between
first and second player controllers by tapping the gray bar at the top
of the controller. The controller will change from red to blue to
identify itself as the 2nd player controller. Tap again to switch back.
This is useful for some 2-player games where the players take turns,
and for ROMs like the 1990 World Championship ROM, which requires the
second controller to start.
GAME GENIE
Game Genie was a popular cheat system for the NES. Many cheat codes are
published on the Internet. Up to four game genie codes can be specified
per game via the preferences menu. Load a ROM, then back out into
preferences to edit the genie codes.
NOTES:
Game genie slows down the game slightly, as the CPU is constantly
having to match read addresses with genie codes. This may increase
your auto-frameskip or require a bump if manually adjusting it.
Leave the genie switch “off” when not using it.
It’s also a good idea to turn off full-screem mode if you’re
using game genie.
TIP: For complex codes to start on a particular level, you can
enable the code, then save your game after beginning, disable
the code, and run at full speed again.
PREFERENCES
The following preferences are available by tapping the ‘Preferences’
navigation button…
Auto-Save Game
When active, every game you play will be automatically saved when you
leave the game. You may re-enter the game where you left off by
tapping ‘Saved Games’ from the top of the menu. If you decide to
start a new game, your old saved game will be overwritten.
Swap A/B
Swaps the A/B buttons around. NOTE: The labels do not change, only the
function.
Allow Suspend
When active, this allows you to push the home button, or accept a
phone call from within a game. When you return to NES.app, the game will
continue where you left off. When this feature is disabled, NES.app will
promptly quit instead.
Full Screen
Stretches the game screen to as large as possible, while maintaining
aspect ratio. NOTE: This impacts performance slightly.
Sensory Pad
Changes the directional pad to a sensory pad, which sets the direction
based on finger movement.
Game Genie
Activates any Game Genie codes you have entered at the bottom of the
preferences screen, for whatever game you happen to be playing.
NOTE: Leave this option off unless you are using it.
Advanced Options:
Frame Skip
Allows for manual adjustment of the frame skip. It is recommended you
leave this on ‘A’ for ‘Auto’.
Color Palette
This option allows you to change the color scheme of NES games to your
liking. The following palettes are available:
A: Standard palette, optimized for iPhone
B: Standard palette, unoptimized (used in older versons of NES.app)
C: Original NTSC palette
D: Original PAL palette
CPU Clock
The CPU clock controls the frequency of the CPU during rendering. As of
present best-practice, 339 provides accurate rendering for most games
and is the default. 341 can be used to tweak any games that you might
have a problem with, or if you find a game that doesn’t run using 339
cycles.
Bass Boost
Boosts the triangle wave output (responsible for most basslines).
Debug Mode
Debug mode draws colored rectangles over the hot spots of your game
controller, and also writes a diagnostic log to /tmp/NES.debug for
development.
NOTE: Leave this option off unless you are using it.
Add -DDEBUG to your CFLAGS to build with this option
HOW DO I…
Q. Upload ROMs to my iPhone?
A. Try iPhuc, iFuntastic, iBrickr, or set up SSH on your iPhone
Q. Reset my game?
A. Tap ‘ROM List’ and then tap your ROM again
Q. Adjust my volume?
A. With the volume buttons on the left.
Q. Use the player 2 controller?
A. Touch the top gray bar to switch between player 1 and player 2. The
controller buttons and text will change from red to blue when 2 player
is active.
Q. Press A & B at the same time?
A. In recent versions, you can now roll your thumb from one button to the
middle of both buttons. Both A and B should show up in the active control
window. Sliding your thumb from one side to the other will gracefully
switch between the two buttons.
COMPILING FROM SOURCE
0. You will need to install arm-apple-darwin toolchain v0.30 or above.
http://iphone.fiveforty.net/wiki/index.php/Toolchain_Project
Set your HEAVENLY environment variable to point to your iPhone environment.
You will also require AudioQueue.h from Leopart’s AudioToolbox framework.
I cannot provide this. If you own Leopard, locate this file and copy it
into your toolchain includes in AudioToolbox/AudioQueue.h if necessary.
1. Compile using ‘make’
This will create a new NES.app package in ./build.
Upload entire NES.app directory into /Applications on the iPhone and either
reboot the iPhone or run “killall SpringBoard”.
The iPhone should automatically detect the application and add it to the
springboard.
2. Place your ROM files in /var/root/Media/ROMs/NES
You will need to use a tool such as iPhoneInterface, iFuntastic, or SSH
KNOWN ISSUES
SOUND
Occasionally, the sound may appear to play severely lagged; at about half
speed. Rebooting the phone appears to resolve this. This appears to be
related to the sample rate of whatever sound was last played on the iPhone
(prior to launching NES.app) and has only been exhibited in 1.0.x firmware.
PAL VS. NTSC
NES.app supports both PAL and NTSC games, however not all PAL games are
appropriately identified as such in their headers. You can force NES.app to
identify a game as a PAL game by adding the text (E) to the filename
(including the parenthesis). For example: Tetris (E).nes. It is recommended
that you title all of your PAL games in this way, to ensure they are
clocked properly.
NESCORE
NESCore is an emulator core we originally forked from InfoNES, which was left
as a defunct and buggy NES emulator. We’ve since heavily modified and
rewritten many pieces of it, and given it a new birth as a portable LGPL
emulator core.
The NESCore project can be found at http://www.zdziarski.com/projects/nescore/
Step by Step Video Guide to NES Emulator on the iPhone

Guide to NES Emulator on the iPhone and iPod Touch, complete with video tutorial on how to add roms and where to get them. Please remember to have a backup of your information because if you don’t follow instruction you can make your iphone unusable and must repair it with a restore with itunes…
Installation
Roms Downloading
Geting Roms to your iPhone
Adding More Roms
List of the most visited NES Roms Sites for your iPhone
visit at your own risk, desinformado.com is not affiliated with any of them, nor endorsed, sponsored, it is provided as a reference, you must check the legality of downloading any rom, you have been warned.
List of the most visited NES Roms Sites for your NES.app Emulator for the iPhone, download and install following our installation guide to NES rom on your iphone, happy NES emulation. There are thousand of Nintendo Roms available online this is a list of the the sites that provide the most complete roms catalog
http://www.rom-world.com/
http://www.coolrom.com/roms.php
http://romhustler.net/
http://www.freeroms.com/nes.htm
http://www.electricroms.com/
http://www.allstargaming.net/
http://www.romnation.net/
http://results.about.com/snes_roms/
http://www.romscentral.com/
http://www.romworldonline.com/
http://www.aroms.com/
http://www.doperoms.com/
http://www.gameboy-advance.net/
http://www.snes-roms.net/
http://www.bestromsites.com/
http://www.emulanium.com/
http://www.derok.net/emulation0/snes.html
http://www.top26.net/
http://www.snesorama.us/
http://www.nes-emulators.com/
http://www.romplanet.net/
http://www.psproms.com/emulation/nes_roms_emulator.htm

There is a new hack in town that let you emulate games for the playstation 1 in your shiny new iphone. It has a good compatibility rate and features save states and a dynarec for added performance.
Here is the download address: http://zodttd.com/forum/index.php?topic=154.0
Video
compatibility list (the list is bigger at the )
Some of the games that are working just fine in the iphone:
Buster Bros Collection
Buster Bros Collection
Driver
Final Fantasy Tactics
Gran Turismo
Need For Speed 3
Wipeout 2
Wipeout XL
Wipeout XL
Xenogears
command and conquer
gran turismo 2
grand theft auto 2
metal gear solid vr missions
final fantasy origins
game:kings field 2
command and conquer red alert
gran turismo
Crash Team Racing
Tekken 3
Idiot guide to PSX4iPhone:
Step 1: Getting the Program
Click this link to download psx4all v0.1.0.
http://zodttd.com/forum/index.php?topic=154.0
Extract it, by right clicking on the archive and clicking “Extract to psx4iphone_0_1_0″. Step 1 complete. Congratulations.
Step 2:Putting the Program on your iPod touch
Now that you have the program, you need it on your iPoT. Just put it onto your iPoT like you would any other program. In WinSCP or TotalCommander, first connect to your iPod. Then, in the right column, locate to the folder called Applications. Drag the folder “psx4iphone.app” into the left column. Let it do it’s thing. Yay, you put it onto your iPoT.
Since this is an idiot-proof guide, I’m putting a tutorial for WinSCP and TotalCommander in here, just in case you don’t know how to use them.
WinSCP
1.) Download WinSCP from this link: http://sourceforge.net/project/downl…irror=internap
2.) Install it and reboot your computer.
3.) Open up WinSCP. For the Host Name, put your iPoT’s IP Address. To find this, go to Settings on your iPoT, click on Wi-Fi, then click the blue arrow next to your network’s name. The IP address is the first thing you’ll see. Put that into the Host Name box. For User Name, put root. The password is alpine. Those are the only ones that work, no matter what. Make sure the port number is 22. The click Save so you don’t have to enter that crap every time you need to connect. Click OK then click Login. That should work, then put it onto your iPoT.
TotalCommander
1.) Download it from this link: http://www.ghisler.com/download.htm
Then download this too: http://t-pot.googlecode.com/files/T-PoT.0.2.zip
2.) Install TotalCommander.
3.) Extract the T-PoT archive.
4.) Open up TotalCommander. Click on Configuration near the top of the window, then click on Options. Click on Plugins from the left column. Click Configure under File System Plugins (.WFX) in the middle. Click Add then find the T-PoT.0.2 folder and the T-PoT.wfx file in that folder and click Open. Then press Ok, and close TotalCommander. Open it up again and find the drop-down menu over the right column that says “[-c-]“. Drop it down and click on the last option, [-/-]. That should bring you to all the files on your iPoT. I highly recommend using this since it transfers large files very quickly.
Anyways, back to the guide.
Step 3: Setting the Permissions to 755
For this, you can use either Squid or Finder. I use Squid. Download it from Installer, then open it up. Touch Applications, then find psx4all.app. Touch that, then find psx4all at the bottom. Touch that, and you’ll see nine green boxes. Make sure that all of the boxes with Read next to them are checked, same with the ones with Exec next to them. There are also three boxes with Write next to them. Only touch the left-most box, then press Apply. That will set the permissions to 755 and make psx4all work.It should look like this:

Step 4: Putting Games onto your iPoT
Open up WinSCP or TotalCommander and get into your iPoT’s files. This time, go down and click on “var”. Then click “root”, then “Media”, then “ROMs”, then “PSX”. Find the ROM you downloaded on the left column and drag it into the right column. This might take a while, so I highly recommend TotalCommander because it’s the fastest way to transfer games. Let it finish, close TotalCommander or WinSCP, then that’s all there is to it. Congratulations, you’ve gotten PSX games on your iPod touch!
Step 5: Getting the BIOS file
You’re going to want the BIOs file for psx4all. I cannot post it in this thread for legal reasons, so I recommend going to www.google.com and typing something like “scph1001.bin download” and clicking on the first result. Something like that One you’ve got that, extract it and put it onto your iPoT in the psx4all directory. Remember, it’s Applications/psx4all.app. Then, go into Squid and and change the permissions of the scph1001.bin file to 755. There you go!


