===============================================================
iMAME4ALL 1.10 (September 22, 2011) by David Valdeita (Seleuco)
===============================================================


INTRODUCTION
---------------

iMAME4all is a iOS universal app done by David Valdeita (Seleuco), port of MAME 0.37b5 emulator by Nicola Salmoria for all iOS devices (iPad HD, iPhone 4G , iPod touch and older) and it is based on GP2X, WIZ MAME4ALL 2.5 by Franxis. 

It emulates arcade games supported by original MAME 0.37b5 plus some additional games from newer MAME versions.

This version emulates over 2000 different romsets. (see at the end of document for a list of games that could work). 

Please, try to understand that that with that amount of games, some will run better than others and some might not even run with iMAME4all. 
Please, don't email me asking for a specific game to run.

Although the performance is very good with modern devices (all games I tested on the iPad 2 run near perfect), owners of older devices should not expect as good performance. Tips to help performance: use lower quality sound or switch it off, use 8 bit depth, underclock the CPU and Sound CPUs.

Official web page for news, source code && additional information:
http://code.google.com/p/imame4all/

To see MAME license see the end of this document

Features
------------

Full speed on iPad 2. Almost perfect on iPhone 4 and iPad 1.
Game Favorites and Filtering
Autorotate.
Smoothed image.
Scanline & TV Filter.
Full screen, windowed.
Animated touch DPad.
1/4 buttons selectable.
Video Aspect Normal, Rotate, Rotate controls.
Adjustable CPU, Audio clock.
Support for up to 4 WiiMotes/Classic (multiplayer).
iCade & iControlPad support.
Native TV-Out for firmware >= 3.2.

... and more. 

CONTROLS
-----------

The emulator controls are the next ones:
- Virtual pad: Movement in pad, mouse and analog control of the four players. 
- Buttons B,X,A,Y,L,R: Buttons A,B,C,D,E,F.
- Button SELECT (1): Insert credits (UP+SELECT = 2P credits, RIGHT+SELECT = 3P credits, DOWN+SELECT = 4P credits).
- Button START (2): start (UP+START = 2P start, RIGHT+START = 3P start, DOWN+START = 4P start).
- Buttons L2: Exit to selection menu to select another game.
- Buttons START+SELECT simultaneously: Access to the MAME menu.
- Button R2: Open help , global options.


You can remap the MAME controls (except SELECT & START) inside MAME itself. Start a game, press SELECT+START together to bring up the MAME menu and select "Input (general)" to configure the controls for all games or "Input (this game)" to configure the controls just for that game. When you quit the game the settings will be saved. When configuring an input, to clear the selection press the "B" key and then press "Exit".


EMULATION OPTIONS
--------------------

After selecting a game on the list, the following configuration options are available:

- Video Aspect:
The video aspect can be configured with the following combination of options:
Original: Original game driver resolution scaled to window keeping aspect ratio.
Cropping 4/3 or 3/4: Original game driver resolution scaled to window with cropping.
Fixed 320x240,240x320,640x480,480x640: Nominal emulated video resolution scaled to fixed resolution.
NOTE:If "Not Safe Render Path" is active, only fixed 320x240 (4/3) or 240x320 (3/4) are available.

- Video Rotate:
The video Rotate is configured with the following combination of options:
Normal: Nominal emulated video resolution.
Rotate: The window is rotated.
TATE: The window and controls are rotated. (it may help to play some landscape games)

- Video Depth:
The video Rotate is configured with the following combination of options:
8 bit /16 bit /Auto
Try different video depth if you have glitches with current game.
Most games will play fine with the default 16 bit but some, such as "Space Invaders", require setting to 8 bit or Auto.

- Video Sync:
Normal: Single buffer and dirty buffer is used.
DblBuf: Double buffer without dirty buffer.
OFF: No video synchronization, use manual frameskip.

- Frame-Skip:
Auto: The frameskip is adjusted automatically in real time.
0 to 11: The frameskip is manually adjusted. The selected frames each 12 are skipped.

- Sound:
The sound options are the following ones:
ON: The sound is activated. 11, 22, 33 and 44 KHz sound mixing rates are available in both mono and stereo.
OFF: The sound is disabled.
Fast sound: Some tweaks are done to improve the performance (but with slightly worse sound quality), this also forces mono.

- Stick
limits the joystick's range of motion:
8-way,4-way,2-way
The most common reason to use a gate in an actual arcade setting is the retrofitting of an older machine that is not compatible with a new 8-way stick. A classic example of this is Pac-Man. The game was originally designed for a 4-way stick, and is programmed to respond only when a new input occurs. If the user is holding the stick in the down position, then suddenly makes a motion to move to the right, what often happens is that the stick first moves into the down-right diagonal, which the game does not recognize as new input since down is still being held. However, right is also now considered held, and when the user completes the motion to move right, it is also not a new input, and Pac-Man will still be moving down.

-Landscape 1-4 Buttons.
Show 1-4 Buttons: Hide/show Y/A/X buttons if needed. Select A=B+X to use A button as B and X simultaneus press.

- CPU Clock:
The clock of the CPUs can be adjusted from 50% to 200%. The nominal value is 100% and the CPU is emulated accurately.
The clock can be safely underclocked to about 80% to gain performance in almost all games (be careful because some
games could not run correctly). Use lower values to get more performance but probably several more games would not
run correctly. Also the clock can be overclocked up to 200% to avoid slowdowns in some NeoGeo games.

- Audio Clock:
The clock of the audio CPUs can also be adjusted from 50% to 200%. The nominal value is 100%. It can be underclocked
and overclocked as well.

- Cheats:
ON: The cheats are enabled. To access in game press SELECT+START and enter the "Cheats" menu.
OFF: The cheats are disabled.
Note: The high scores are not saved if cheats are enabled!!!.

- Auto-Fire:
To access the auto-fire configuration, during game press SELECT+START and enter the "Auto-Fire" menu.

- Press B to play the selected game or X to go back to game selection menu.

GLOBAL OPTIONS
----------------

-Smoothed image. Enable to apply a smoothing image filter over the emulator screen.

-CRT Filter. Enable to apply a CRT like filter over the image.

-Sacanline Filter. Enable to apply a scanline filter over the image.

-Keep Aspect. 'Enabled' keeps the aspect ratio; 'Disabled' will use all available screen.

-Safe Render Path (iPhone only). Enable at the expenses of performance for maximun compability. Slow in 3G (not recomended unless you find any problem).

-Full Screen (Landscape); Uses all available screen or shows the emulator windowed.

-Animated. Animates ON/OFF DPad/Stick. Disable to gain performance.

-Touch Type: Set the touch stick to works as analog stick or as digital stick.

-Control Layout: Configures bluetooth control layout for iCade or iControlPad.

-Sound Rate: Set the default rate for games.

-Sound Stereo: Set the default number of channels for sound, you can also select "Fast" for faster performance but lower quality and mono.

-Show FPS: Shows ON/OFF fps.

-Show Info/Warnings: Shows Game Info and any warnings when a game is selected.

-Digital Touch DZ: Enable/Disable a deadzone on DPAD touch center. It could be better for some games. Disable if you don't like it.

-Analog Touch DZ: Analog touch stick deadzone selector.  Lower to gets more sensitivity.

-Skin: Let's you select skin (retina or not). Retina skin looks better but needs more resources.

-Native TV-OUT:  If you like iPad 2 TVOUT mirror or you use and external 3rd party TVOUT app, you can turn off iMame4All native TVOUT.

-Overscan TV-OUT: You can set the amount of TV overscan correction.


FAVORITES & FILTERING
-----------------------

You can mark (or unmark) your ROMS in the iMAME4all game selection window as favorites by pressing the SELECT/COIN button. A favorite ROM appears in blue in the game list.

In the filtering options you can filter your ROMS by favorites, category, manufacturer and year plus you can also filter out ROM clones.


ICADE
-------

The best way to use iCade with iMAME4All is in fullscreen portrait mode, hit the option button and choose options. The onscreen controls will fade out when you start using the iCade buttons. To get on screen controls back, just touch the screen.

If the iCade is off (the fake coin slot light is off) just hit an iCade button or move the joystick.(you must have paired the iCade via bluetooth before) 

When the iCade turns off, the SW keyboard may popup and then backdown, this is normal don't be alarmed

iCade KEY MAPPINGS

TOP:  [RED/COIN]	[BLACK/EXIT]	[BLACK/Y]	[WHITE/B]
BOT:  [RED/START]	[BLACK/OPTION]	[BLACK/A]	[WHITE/X]

Thanks to Todd Laney for sending me patches, and Martijn Bosschaart who has supported me to get the iCade HW.

Due to the limitations of the HW not all games are suited, use WiiClassic instead if you get slowdowns or control lag.


TV-OUT
--------

To connect an iPad ot iPhone to your TV or a projector, you can either use the Apple HDMI, Component AV Cable, Apple Composite AV Cable, Apple Dock Connector to VGA Adapter, or other compatible cable.

Use TV Out settings to set up how iPad or iPhone plays videos on your TV.

When the cable is connected to a TV or projector, iMAME4all will automatically use it when playing a game.

Set the TV signal to NTSC or PAL: Choose Video > TV Signal and select NTSC or PAL. NTSC and PAL are TV broadcast standards, used in different regions. If you are in the Americas, NTSC is probably the correct choice. Elsewhere, try PAL. If you're not sure, check the documentation that came with your TV or projector.

Note: TV-Out needs firmaware >= 3.2

You can set the amount of overscan corrections in options menu.

If you like iPad 2 TVOUT mirror or you use and external 3rd party TVOUT app, you can turn off iMame4All native TVOUT in options menu.


SOUND SAMPLES
----------------

The sound samples are used to get complete sound in some of the oldest games.
They are placed into the 'samples' directory compressed into ZIP files.
The directory and the ZIP files are named using low case!.

The sound samples collection can be downloaded in the following link:
http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,5,2511


ARTWORK
----------

Artwork is used to improve the visualization for some of the oldest games. Download it here:
http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,5,2512


ORIGINAL CREDITS
-------------------

- MAME 0.37b5 original version by Nicola Salmoria and the MAME Team (http://www.mame.net).

- Z80 emulator Copyright (c) 1998 Juergen Buchmueller, all rights reserved.

- M6502 emulator Copyright (c) 1998 Juergen Buchmueller, all rights reserved.

- Hu6280 Copyright (c) 1999 Bryan McPhail, mish@tendril.force9.net

- I86 emulator by David Hedley, modified by Fabrice Frances (frances@ensica.fr)

- M6809 emulator by John Butler, based on L.C. Benschop's 6809 Simulator V09.

- M6808 based on L.C. Benschop's 6809 Simulator V09.

- M68000 emulator Copyright 1999 Karl Stenerud.  All rights reserved.

- 80x86 M68000 emulator Copyright 1998, Mike Coates, Darren Olafson.

- 8039 emulator by Mirko Buffoni, based on 8048 emulator by Dan Boris.

- T-11 emulator Copyright (C) Aaron Giles 1998

- TMS34010 emulator by Alex Pasadyn and Zsolt Vasvari.

- TMS9900 emulator by Andy Jones, based on original code by Ton Brouwer.

- Cinematronics CPU emulator by Jeff Mitchell, Zonn Moore, Neil Bradley.

- Atari AVG/DVG emulation based on VECSIM by Hedley Rainnie, Eric Smith and Al Kossow.

- TMS5220 emulator by Frank Palazzolo.

- AY-3-8910 emulation based on various code snippets by Ville Hallik, Michael Cuddy,
  Tatsuyuki Satoh, Fabrice Frances, Nicola Salmoria.

- YM-2203, YM-2151, YM3812 emulation by Tatsuyuki Satoh.

- POKEY emulator by Ron Fries (rfries@aol.com). Many thanks to Eric Smith, Hedley Rainnie and Sean Trowbridge.

- NES sound hardware info by Jeremy Chadwick and Hedley Rainne.

- YM2610 emulation by Hiromitsu Shioya.


PORT CREDITS
----------------
- Port to iOS by David Valdeita (Seleuco)

- Additional iOS coding by Simon Quinn (Squid)

- Port to GP2X and WIZ by Franxis (fjmar@hotmail.com) based on source code MAME 0.37b5 (dated on july 2000).

- TheGrimReaper (m_acky@hotmail.com) has colaborated with a lot of
  things since GP32 MAME 1.3, i.e. Vector graphics support, high scores,
  general frontend, frontend improvements, bugfixes, etc. Thank you!!!
  
- Pepe_Faruk (joserod@ya.com) has colaborated with new screen centering
  code. Also he has added some new supported games. Thank you!!!

- Reesy (drsms_reesy@yahoo.co.uk) has developed DrZ80 (Z80 ASM ARM core) and has helped
  a lot with core integration into MAME. He has also done several fixes to the Cyclone core.
  You are the best!!!
  
- Flubba (flubba@i-solutions.se) has done some optimizations and improvements to the DrZ80
  core. Thank you!!!

- Dave (dev@finalburn.com) has developed Cyclone (M68000 ASM ARM core). Big thanks to him.

- Notaz (notasas@gmail.com) have fixed some bugs in the Cyclone source code. He has also
  contributed with several useful code to the GP2X scene. Thanks!!!
  http://uosis.mif.vu.lt/~grig2790/Cyclone/
  http://notaz.gp2x.de/

- Chui (sdl_gp32@yahoo.es) has developed MAME4ALL, the MAME GP2X port for Dreamcast, Windows
  and Linux. Also he has done several optimizations aplicable to all targets.
  http://chui.dcemu.co.uk/mame4all.html

- Slaanesh (astaude@hotmail.com) has continued my work on MAME GP32 and he has done several
  improvements aplicable to all targets.
  http://users.bigpond.net.au/mame/gp32/

- GnoStiC (mustafa.tufan@gmail.com) has done the USB Joypad support using the library created
  by Puck2099.
  
- Sean Poyser (seanpoyser@gmail.com) has done interesting improvements in some drivers.
  For example the use of diagonals in Q*Bert or the use of the shoulder buttons in Tron.

- TTYman (ttyman@free.fr) has done the MAME GP2X port for the PSP portable console.
  http://ttyman.free.fr/

- Headoverheels (davega@euskalnet.net) has added some new games to MAME4ALL, and he has also
  done some optimizations to existing games.


DEVELOPMENT
--------------
All changes by David Valdeita (aka Seleuco), unless otherwise stated
Other contributors: Simon Quinn (aka Squid)
                    Bryn Thomson
                    Todd Laney

September 22,2011 v1.10:
* ROM favorites, use SELECT/COIN to select (Squid)
* ROM filtering by category, manufacturer, clones and year (Squid)
* Now displays year and manufacturer in game selection screen (Squid)

September 5,2011 v1.9:  
* Key delay on game selection (Squid)
* Added option to set Sound defaults (Squid)
* Added option to choose iCade or iControlPad layout (Squid)
* Sleep processor between inputs on game select screen (Squid)
* Fixed multiple key presses problems (Squid)
* Sound initialisation fixes (Squid)

August 14,2011 v1.8.1: 
* iCade & iControlpad compatible button mapping
* New A=B+X button option
* Menu fixes and layout changes (Bryn)

August 6,2011 v1.8: 
* Added iOS4 multitasking
* New skin (Bryn)
* Analog touch stick and stick 2/4/8-way restrictors
* Stereo support and selectable kHz rate (Squid)
* Sound iOS engine fixes and sound going out of sync fixed, removed need for low-latency option (Squid)
* Fixed jerky gameplay and more... (Squid)

July 17,2011 v1.7.1: 
* Improved ION's iCade support.
* Bringin iMame4all up to App Standards.

July 10,2011 v1.7: 
* Added ION's iCade support.
* Improved TVOUT.
* Improved touch controls.

November 20,2010 v1.6.1: 
* Added 240x320,640x480,480x640 fixed resolutions. 
* Fixes full portrait view on some vector games, like tempest, 
* Lets 3G users use real full portrait selecting 240x320 resolution.

November 15,2010 v1.6: 
* Added full screen portrait. 
* Added landscape-portrait keep aspect ratio option. 
* Reworked some touch controls.

September 12,2010 v1.5: 
* Added new skin (retina) and touch control layout. 
* Added touch deadzone and Wii classic stick deadzone selector. 
* Added 8/16/auto color depth (fixes ZeroWing like games missing sprites)

September 12,2010 v1.4: 
* Added Native TV-Out for firmware >=3.2. 
* Added Wii classic analog support. 
* Added support for Wii classics clones.

September 5,2010 v1.3: 
* Added Wii Classic Controller support. 
* Added support for up to 4 WiiMotes/Classic (multiplayer).

August 29, 2010 v1.2:
* Added 4 new Video Aspect modes: Original View Aspect (fix cropping bug)+(Ratio Not Kept,With Cropping,fixed 320x240)
* 1-4 Buttons selectable from game launcher
* Improved WiiMote 
* Vector games at 640x480.

August 22, 2010 v1.1:
* Added WiiMote. Fixed cheats, samples, artwork, hiscores.

August 18, 2010 v1.0:
* First version.

KNOWN PROBLEMS
------------------

- Preferences couldn't be saved.
 
- Not perfect sound or incomplete in some games.

- Memory leaks. In case of errors, reset iOS and try again please ;-). Also you can make sure iMAME4all is properly closed and not in the background.

- Some games listed do not work correctly. This is a restriction of the MAME version used in iMAME4all and cannot be fixed.


INTERESTING WEBPAGES ABOUT MAME
-----------------------------------

- http://www.mame.net/
- http://www.mameworld.net/
- http://www.marcianitos.org/

ART
---------

Retina skin and touch control layout thanks to Bryn Thompson. 

Thanks to: 

Todd Laney for sending me iCade patches, and Martijn Bosschaart for support me with an iCade.

also

Zenzuke, Chipan, Dokesman, Enkonsierto, Quest, Sttraping, Sike, Danibat, Pedator,
Antiriad and Slaanesh. Thanks to everybody !.

iMAME4all LICENSE
------------------

The iMAME4all project is released under the GPL license. In addition you have some extra rights granted by a special license exception which allow you to link the iMAME4all GPL source with the not GPL MAME source.

The exception also gives you the rights to eliminate it if you don't like it or if you want to include the iMAME4all source in another GPL program. So, iMAME4all is 100% GPL.

You can more easily think at it as a sort of double license. A GPL or a GPL + exception. You have all the rights of the GPL, and, if you want, some others.

The only limitation is for iMAME4all. iMAME4all cannot include external GPL source without the explicit permission of the source copyright holder. 

MAME LICENSE
----------------

http://www.mame.net
http://www.mamedev.com

Copyright © 1997-2009, Nicola Salmoria and the MAME team. All rights reserved. 

Redistribution and use of this code or any derivative works are permitted provided
that the following conditions are met: 

* Redistributions may not be sold, nor may they be used in a commercial product or activity. 

* Redistributions that are modified from the original source must include the complete source
code, including the source code for all components used by a binary built from the modified
sources. However, as a special exception, the source code distributed need not include 
anything that is normally distributed (in either source or binary form) with the major 
components (compiler, kernel, and so on) of the operating system on which the executable
runs, unless that component itself accompanies the executable. 

* Redistributions must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 



