NES.app
NES Emulator for iPhone
Version 0.20

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

NOTE ON SOUND
Sound required that you disable mediaserverd, and only works through the
headphones. 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"

NOTE ON 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:

Versions >= 0.20
  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.

Versions < 0.20
  Whenever you are holding a direction + button, releasing the button will 
  cause the direction to stop moving as well. I am working on
  finding a way to poll the screen to re-evaluate all the buttons, but 
  until then, this is the only caveat you'll have to live with.

NOTE ON DEBUG

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

CHANGELOG

0.01	[stepwhite] Initial release 
0.02	[nervegas] Implemented frame skip
0.03	[nervegas] Rewrote rendering routines using CoreSurface
0.04	[nervegas] Added multi-touch support to controller
0.05	[nervegas] Further optimizations
0.06	[nervegas] Corrected color palette
0.07	[nervegas] Further controller improvements (dragging, etc)
0.08	[nervegas] Further controller improvements (fixed disconnect, etc)
0.09	[nervegas] Preliminary sound support (see notes) 
0.10	[nervegas] Fixed crashing when returning to file list
0.11	[nervegas] Improved sound quality, both earbuds work now, buffering+
0.12	[nervegas] Enlarged controllers, improved hot spot locations
0.13	[nergegas] Expanded on multitouch control - (see notes) 
0.14 	[nervegas] Added switch for landscape build [OBSOLETE]
0.15	[nervegas] Widened landscape mode - removed navBar 
0.16	[nervegas] added toolchain header patch / better docs
0.17	[nervegas] Set orientation mode during game play, updated header patch
0.18	[nervegas] Fixed minor issue with orientation flip, added wheat to cool
0.19	[nervegas] Improved orientation transitions
0.20	[nervegas] Changes to multitouch (see notes), added DEBUG, old icon

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.

