************************
*      Fenix GP2X      *
*        Beta 6        *
************************

Port from: http://fenix.divsite.net
By: Israel Lopez Fernandez (Puck2099)
Website: http://www.gp32wip.com
Contact and donations (Paypal): puck2099@gmail.com
Based partially in Chui's port for GP32. Controls managed by Rlyeh's minilib.
Tests by Joanvr.
Shoot game by devlkore.

Please, if you want to include the runtime with your game, include also these files readme.txt
and leeme.txt with it.

What is Fenix?
--------------
It's an interpreter to play games coded using that programming language. You will be able to
play the games coded in Fenix specifically for GP2X as well as the ones coded previously to
being used in GP32 without having to recompile them.


How must I install it?
----------------------
Unzip the files in any place of your SD card. Into the folder called Fenix there are several
tests and a minigame to try that it works. If you want to add new games, just open one of the
.gpe files included and create a new file based in that to launch the new game.

Is the source code available to download?
-----------------------------------------
Yes, as it is said by GPL license, you can download the source code from my own website.
By the way, I warn you that the changes realised to the code are not enough "cleaned" nor
documented.
If you want to make any change, please, I would be very grateful if you contact me first
to avoid working two people in fixing the same bug :)

Commands:
----------
This new runtime incorporates the possibility to use commands through the script used to launch
each game. The usage is as follow:

./fxi juego.dcb [commands]

As commands you can use the following flags:

    * -nosplash -> Skips splash screen containing information about runtime version and speed. If
		   you prefer to change background image, you can copy a bmp, gif, jpg or png file
		   in the same folder an using the same name as the .dcb
    * -sXXX -> Select the speed at which runtime will run (200 Mhz by default). XXX is the speed
	       in Mhz, for example, -s245 will run the game at 245 Mhz.
    * -gp32 -> Uses GP32 mode, what means that volume is controlled by VOL+ and VOL- buttons. This
	       is the default mode.
    * -gp2x -> Uses GP2X mode, so you will be able to use VOL buttons in the same way as the rest
               of the buttons.

Overclocking is limited from 133 to 300 Mhz, you should use one of the following values:
133, 150, 166, 180, 200, 225, 233, 245, 250, 255, 260, 265, 266, 270, 275, 280, 285, 290, 295 y 300.

Controls:
----------
This port admits two game modes: "native" mode and "emulated" mode.

In "native" mode, only useful for GP2X, you have to code the games using the control as it was
a 19 buttons joystick, with the same correspondece as SDL as you can see here:
http://wiki.gp2x.org/wiki/SDL_Joystick_mapping

In "emulated" mode the port recognizes several keys and emulates them using the own GP2X control
as you can see:
Cursors -> pad
ctrl -> A
alt -> B
return -> START
space -> SELECT
backspace -> L
tab -> R
x -> X
z -> Y
a -> VOL-
s -> VOL+
c -> CLICK

Changelog Fenix GP2X:
----------------------
Beta6:
------
- Added support to touch screen (used through variables mouse.x, mouse.y and mouse.left).
  Thanks to Eclipse, Joyrider, Hangman, Lithosphere, Propeller, Paeryn, DJWillis y Joanvr for their work
  interpreting touch screen.
- Modified main volume to a 50% if it detects that it's running in a F200.

Beta5 (private):
----------------
- Added support to MMU Hack.
- Some more new features I can't remember now...

Beta4:
------
- Added posibility to overclock the runtime from 133 to 300 Mhz.
- Added memory handle functions written in assembler to improve speed a little in these operations.
- Added customizable splash screen showing information about the current Fenix version.
- Removed .conf file to select the usage of volume buttons. Now you can select that using commands.
- Added "forced exit" (using L+R+CLICK) to exit games that don't implement an exit to the menu
  (mainly GP32 games).
- Fixed bug that affected to mathematical functions (sin, cos, abs...) returning always 0.
- Fixed bug that showed all text on screen in lowercase.
- Fixed bug that didn't save data to SD when was required.
- Increased compatibility with lots of games, now work games as Maniac Race, Yetti, Xenon,
  Castle of Dr. Malvado...

Beta3:
------
- New speed improvement respect to last version (Beta2). Now it is faster than GP32 port in all
  included tests. I have added a table with a speed comparative in the file tests_fenix.txt.
- Fixed sound compatibily problems with firmware 1.4.
- Automatic lowercase convertion in calls to functions. Now works some games that crashed because
  there were calls in their code to files with uppercase characters (that are not supported by
  GP2X VFAT system) as Pulplife, Yetti, etc.
- Added automatic internal volume control. Now by default VOL+ and VOL- buttons are used to
  modify game volume. If you want to take control of them, you only have to edit the file with the
  same name as the .dcb file but with .conf extension that will be created first time you run the
  game and change "gimme_vol_buttons=0" for a 1.
- Fixed in some way the problem that caused a speed fall when using big size MOD files.

Beta2:
------
- Fixed bug using diagonals, now it is used Rlyeh's minilib to emulate the control.
- Swapped L and R buttons to complain with GP32 layout.
- Reduced delays in sound effects.
- Added several optimizations using floats so it is a bit faster in some cases.

Beta1:
------
- First release.
