NES.app
NES Emulator for iPhone
Version 0.24
SVN: http://svn.natetrue.com/nesapp

Core: InfoNES Project (based on pNesX) 
Code: nervegas, stepwhite 
Cool: nightwatch (CoreSurfaces), bwhiteman (CoreAudio), dshadow (General)
      wheat-_ (Icon)

BUILDING

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. 

2. Place your ROM files in /var/root/Media/ROMs/NES

KNOWN BUGS

  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 fails to report the necessary mouseUp events to distinguish which
  button(s) let up, and so they must all be reset. 

  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.

  VOLUME

  If you reset your phone with the earbuds connected, no audio will be heard
  through the speakers. Pull the earbuds out then hold Home + Power until
  the handset shuts itself down (don't be tempted to use the slide). Once it
  shuts down, release the buttons, wait 10 seconds, then push and hold power
  to turn the handset back on.

  It is recommended you always reset your iPhone without ear buds connected 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.

  NOTE: In many cases, simply re-enabling / re-disabling mediaserverd with
        the earbuds out will rectify the situation.

DEBUG

Compiling with -DDEBUG (see Makefile) will enable debugging to be sent to
/tmp/NES.debug. At the moment, this is only recording some activity.

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.

