NES.app NES Emulator for iPhone Version 0.55 SVN: http://svn.natetrue.com/nesapp Core: InfoNES Project (based on pNesX) Code: nervegas, stepwhite Cool: nightwatch (CoreSurfaces), bwhiteman (CoreAudio), dshadow (General) wheat-_ (Icon), lg (Pref Groups) ABOUT NES.app is a Nintendo emulator for Apple's iPhone. NES.app uses a customized InfoNES emulation core to mimic the 6502 processor in a Nintendo Entertainment System, allowing you to play ROM dumps of games designed for the NES console. ROM dumps are files containing the dumped instruction code from a physical cartridge. In many cases, you are legally entitled to posess a ROM dump 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 FRAME SKIP Using the frame skip option, games that otherwise might run slightly slow on your iPhone can be made playable. Most games run fine at FrameSkip 1, however certain games such as Mike Tyson's Punchout and Super Mario 3 run best at FrameSkip 2. FULL SCREEN MODE Using the enlarged screen option, you can zoom in on your favorite game as close to "full screen" as the NES aspect ratio will allow. NOTE: Using the enlarged screen mode slows down the display a bit, so it is recommended that you bump your FrameSkip by one more if using it. SAVE STATE NES.app can save the state of your game when you leave the game. 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 SRAM, so if you are playing games like Zelda, where your game is automatically saved within the game, you will not need to save state unless you want to save an exact snapshot. The SRAM from the game is automatically saved regardless of whether you save state. GAME GENIE Up to three 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 somewhat, as the CPU is constantly having to match read addresses with genie codes. It is advised to increase your frame skip by about two when using the genie, and 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. 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. COMPILING FROM SOURCE 0. You will need to install the arm-apple-darwin toolchain. See: http://iphone.fiveforty.net/wiki/index.php/Toolchain_Project You will also need to apply the patches in toolchain-includes-patch.txt Run the patch in your toolchain's include directory. For example: cd /usr/local/arm-apple-darwin/include patch -p0 < toolchain-includs-patch.txt 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 reboot the iPhone. It should automatically detect the application and add it to the springboard. NOTE: There is a bug in the default arm-cc-specs file that throws out an error when using -O7. Make sure your arm-cc-specs file reads: CFLAGS_COMPILEROPT=-O7 and NOT: CCFLAGS_COMPILEROPT=-O7 You may also have to drop it in ~ 2. Place your ROM files in /var/root/Media/ROMs/NES KNOWN ISSUES SOUND In order to have sound, you must disable mediaserverd, which is the iPhone's sound mixer process, which is locked onto the audio device. A couple of easy aliases can be added to your .profile to disable or re-enable mediaserverd if you are using MobileShell: alias nosound="launchctl unload /System/Library/LaunchDaemons/coreaudiod.plist" alias sound="launchctl load /System/Library/LaunchDaemons/coreaudiod.plist" While you have mediaserverd disabled ('nosound'), no other system sounds will play, so be sure to re-enable it ('sound') when you're finished playing. MULTITOUCH The multitouch reports mouseDown and mouseDragged events separately, and so you can run while holding 'B', for example, but the iPhone appears to get pushed to the limits when you are holding a direction and dragging on another. It thinks your thumb moved off the directional pad to the button, and so it fails to report the necessary mouseUp event for the directional pad. As a result, if you are doing something complex, such as running with B held down, then jump with A, you will also need to slide your thumb back off the directional pad (to zero, or to the other size) to stop running as that mouseUp will not be reported. There is a "Multitouch State" switch in the preferences section. Setting this to "Off" will disconnect the controller state when this happens, meaning you will stop moving and need to push the directional arrow again. Leaving it in its default "on" position will allow the movement to continue, giving you the behavior described above. Depending on the game you're playing, you may wish to have this on/off. VOLUME If you disable mediaserverd with the earbuds connected, no audio will be heard through the speakers. Pull the earbuds out, and then start/stop mediaserverd again. This will correct the problem. If it doesn't, try resetting. It is recommended you always kill mediaserverd with the earbuds DISCONNECTED to have both speaker and earbud support. If, however, you would like much louder ear buds (and no speaker), resetting it with the earbuds in will have this effect. DEBUG Debugging writes debugging output to /tmp/NES.debug Debug also causes the hotspots on the screen to be drawn in vivid colors, for debugging the controls. LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.