[Scummvm-cvs-logs] SF.net SVN: scummvm:[41206] scummvm/branches/gsoc2009-16bit

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sat Jun 6 02:10:40 CEST 2009


Revision: 41206
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41206&view=rev
Author:   Kirben
Date:     2009-06-06 00:10:40 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Merged revisions 41154-41156,41160,41163-41181,41185-41186,41188-41189,41196-41202 via svnmerge from 
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

........
  r41154 | thebluegr | 2009-06-04 18:25:48 +1000 (Thu, 04 Jun 2009) | 1 line
  
  Turned debug_weak_validations on by default again, as apparently some games like SQ3 fail in some validations (e.g. when loading). Also, fixed a potential out of bounds access when copying the value of __FILE__ into a buffer (as its value can be quite long in some cases).
........
  r41155 | thebluegr | 2009-06-04 18:28:20 +1000 (Thu, 04 Jun 2009) | 1 line
  
  Reordered the numpad keys so that they make more sense, and simplified the code which returns the values of shifted function keys
........
  r41156 | djwillis | 2009-06-04 18:30:31 +1000 (Thu, 04 Jun 2009) | 1 line
  
  Initial import of the GP2XWiz backend (based on the GP2X and SDL backends). Includes configure changes and one #ifdef to SDL backend. Also updates NEWS.
........
  r41160 | strangerke | 2009-06-04 19:48:56 +1000 (Thu, 04 Jun 2009) | 1 line
  
  gob : _spriteBottom incorrectly saved and restored in Draw_v2::spriteOperation
........
  r41163 | fingolfin | 2009-06-04 21:28:05 +1000 (Thu, 04 Jun 2009) | 1 line
  
  SCI: Renamed various debug related global variables to have a g_ prefix; and moved any 'extern' decls of them into a new header file
........
  r41164 | waltervn | 2009-06-04 21:35:17 +1000 (Thu, 04 Jun 2009) | 2 lines
  
  SCI: Support for 16-bit DPCM.
........
  r41165 | fingolfin | 2009-06-04 21:44:55 +1000 (Thu, 04 Jun 2009) | 1 line
  
  SCI: cleanup
........
  r41166 | fingolfin | 2009-06-04 21:45:17 +1000 (Thu, 04 Jun 2009) | 1 line
  
  SCI: Moved MemObject code into a separate source file
........
  r41167 | fingolfin | 2009-06-04 21:45:34 +1000 (Thu, 04 Jun 2009) | 1 line
  
  Code formatting in the gp2xwiz backend
........
  r41168 | thebluegr | 2009-06-04 22:47:11 +1000 (Thu, 04 Jun 2009) | 1 line
  
  Updated the MSVC project files of the SCI engine
........
  r41169 | waltervn | 2009-06-05 00:29:20 +1000 (Fri, 05 Jun 2009) | 2 lines
  
  SCI: Message: Added support for escape sequences.
........
  r41170 | waltervn | 2009-06-05 01:56:11 +1000 (Fri, 05 Jun 2009) | 2 lines
  
  SCI: Added support for early SCI1.1 audio maps.
........
  r41171 | waltervn | 2009-06-05 02:18:35 +1000 (Fri, 05 Jun 2009) | 2 lines
  
  SCI: Audio: Fixed bug in reading of SOL header.
........
  r41172 | fingolfin | 2009-06-05 06:50:51 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Added FIXME comment to not_register()
........
  r41173 | fingolfin | 2009-06-05 06:51:09 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: cleanup
........
  r41174 | fingolfin | 2009-06-05 06:51:24 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Slightly modified kAddAfter so that it does not modify its arguments needlessly
........
  r41175 | fingolfin | 2009-06-05 06:51:40 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Added MemObject::isValidOffset method; use it to simplify determine_reg_type
........
  r41176 | fingolfin | 2009-06-05 07:42:24 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Renamed _kfuncTable -> _kernelFuncs; and simplified/streamlined the kernel func map in kernel.cpp a bit
........
  r41177 | fingolfin | 2009-06-05 07:44:39 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Renamed EngineState::flags and version to _flags and _version (following our conventions); also slightly changed the EngineState constructor to init _version & _flags, and used this to make them constant
........
  r41178 | fingolfin | 2009-06-05 07:53:45 +1000 (Fri, 05 Jun 2009) | 1 line
  
  oops
........
  r41179 | athrxx | 2009-06-05 08:12:13 +1000 (Fri, 05 Jun 2009) | 1 line
  
  LOL: implemented Vaelan's cube
........
  r41180 | fingolfin | 2009-06-05 08:16:31 +1000 (Fri, 05 Jun 2009) | 1 line
  
  SCI: Made some members of class Resource protected; some cleanup
........
  r41181 | waltervn | 2009-06-05 09:55:08 +1000 (Fri, 05 Jun 2009) | 3 lines
  
  SCI: Fixed some endian bugs related to speech handling. READ_UINT* are not LE,
  but use native endianness. Thanks to clone2727 for pointing this out.
........
  r41185 | Kirben | 2009-06-05 10:57:58 +1000 (Fri, 05 Jun 2009) | 1 line
  
  Update sound code in HE80+ games, for sound rate differences.
........
  r41186 | waltervn | 2009-06-05 11:12:52 +1000 (Fri, 05 Jun 2009) | 2 lines
  
  SCI: Audio: Fixed bug in sample length computation.
........
  r41188 | Kirben | 2009-06-05 12:35:38 +1000 (Fri, 05 Jun 2009) | 1 line
  
  Fix issues selecting some items in arttime and football.
........
  r41189 | Kirben | 2009-06-05 14:16:32 +1000 (Fri, 05 Jun 2009) | 1 line
  
  Minor cleanup.
........
  r41196 | dreammaster | 2009-06-05 22:20:42 +1000 (Fri, 05 Jun 2009) | 1 line
  
  Tweaks to the code that pauses for a mouse press when displaying many text messages
........
  r41197 | thebluegr | 2009-06-06 04:05:45 +1000 (Sat, 06 Jun 2009) | 1 line
  
  Removed some unused code and performed some cleanup
........
  r41198 | thebluegr | 2009-06-06 05:04:14 +1000 (Sat, 06 Jun 2009) | 1 line
  
  Moved some more debug commands to ScummVM's coneole and removed some unused code
........
  r41199 | athrxx | 2009-06-06 07:34:18 +1000 (Sat, 06 Jun 2009) | 1 line
  
  LOL: implemented another opcode
........
  r41200 | mthreepwood | 2009-06-06 08:35:13 +1000 (Sat, 06 Jun 2009) | 1 line
  
  Make the PlayStation's abbreviation to all lower-case for consistency and change the description from Playstation to Sony PlayStation
........
  r41201 | athrxx | 2009-06-06 08:53:36 +1000 (Sat, 06 Jun 2009) | 1 line
  
  LOL: minor bug fix
........
  r41202 | thebluegr | 2009-06-06 09:08:35 +1000 (Sat, 06 Jun 2009) | 1 line
  
  Cleanup
........

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/NEWS
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/main.cpp
    scummvm/branches/gsoc2009-16bit/common/util.cpp
    scummvm/branches/gsoc2009-16bit/configure
    scummvm/branches/gsoc2009-16bit/dists/msvc7/sci.vcproj
    scummvm/branches/gsoc2009-16bit/dists/msvc71/sci.vcproj
    scummvm/branches/gsoc2009-16bit/dists/msvc8/sci.vcproj
    scummvm/branches/gsoc2009-16bit/dists/msvc9/sci.vcproj
    scummvm/branches/gsoc2009-16bit/engines/cruise/cruise_main.cpp
    scummvm/branches/gsoc2009-16bit/engines/cruise/gfxModule.cpp
    scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp
    scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp
    scummvm/branches/gsoc2009-16bit/engines/kyra/lol.h
    scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lol.cpp
    scummvm/branches/gsoc2009-16bit/engines/kyra/screen_lol.cpp
    scummvm/branches/gsoc2009-16bit/engines/kyra/script_lol.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/console.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/console.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/game.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel_types.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kevent.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kfile.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kgraphics.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/klists.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kmisc.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kmovement.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kscripts.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/ksound.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/kstring.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/message.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/message.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/savegame.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/scriptdebug.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/seg_manager.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/seg_manager.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/state.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/state.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/vm.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/vm.h
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_driver.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_driver.h
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_widgets.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_widgets.h
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.h
    scummvm/branches/gsoc2009-16bit/engines/sci/module.mk
    scummvm/branches/gsoc2009-16bit/engines/sci/resource.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/resource.h
    scummvm/branches/gsoc2009-16bit/engines/sci/sci.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/sfx/core.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/uinput.h
    scummvm/branches/gsoc2009-16bit/engines/sci/vocabulary.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/vocabulary.h
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v100he.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v90he.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/sound_he.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/sound_he.h
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/sprite_he.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.h

Added Paths:
-----------
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.png
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk
    scummvm/branches/gsoc2009-16bit/engines/sci/debug.h
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/memobj.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/memobj.h

Removed Paths:
-------------
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.png
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h
    scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk

Property Changed:
----------------
    scummvm/branches/gsoc2009-16bit/


Property changes on: scummvm/branches/gsoc2009-16bit
___________________________________________________________________
Modified: svnmerge-integrated
   - /scummvm/trunk:1-41150 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
   + /scummvm/trunk:1-41203 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703

Modified: scummvm/branches/gsoc2009-16bit/NEWS
===================================================================
--- scummvm/branches/gsoc2009-16bit/NEWS	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/NEWS	2009-06-06 00:10:40 UTC (rev 41206)
@@ -31,6 +31,9 @@
  KYRA:
    - Added support for PC Speaker based music and sound effects.
 
+ New Ports:
+   - Added GP2X Wiz port.
+
 0.13.1 (2009-04-27)    
  AGOS:
     - Fixed crash after OmniTV video is played in The Feeble Files

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/README-GP2XWIZ	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,141 +0,0 @@
-ScummVM - GP2X WIZ SPECIFIC README - HEAD SVN
-------------------------------------------------------------------------
-
-Contents:
-
-    * About the backend/port <#About_the_backendport>
-    * Game compatability <#Game_compatibility>
-    * Included engines <#Included_engines>
-    * Supported audio options <#Supported_audio_options>
-    * Supported cut-scene options <#Supported_cut-scene_options>
-    * Recent changes <#Recent_changes>
-    * How to save <#How_to_save>
-    * Controller mappings <#Controller_mappings>
-    * Know issues <#Know_issues>
-    * Major TODO's <#Major_TODOs>
-    * Additional resources/links <#Additional_resourceslinks>
-    * Credits <#Credits>
-
-
-------------------------------------------------------------------------
-About the backend/port
-
-This is the readme for the offficial GP2X WIZ ScummVM backend (also known as
-the GP2X WIZ port).
-
-This is an SVN test release of ScummVM for the GP2X WIZ, it would be
-appreciated if this SVN test distribution was not mirrored and that
-people be directed to http://scummvm.distant-earth.com/ instead for
-updated SVN builds.
-
-Full supported official releases of the GP2X WIZ ScummVM backend are made in
-line with main official releases and are avalalble from the ScummVM
-downloads page <http://www.scummvm.org/downloads.php>.
-
-This build is in an active state of development and as such no
-"expected" behavior can be guaranteed ;).
-
-SVN builds are quickly tested with firmware 1.0.0 for reference.
-
-Please refer to the GP2X/GP2X WIZ ScummVM forum
-<http://forums.scummvm.org/viewforum.php?f=14> and WiKi
-<http://wiki.scummvm.org/index.php/GP2X> for the latest information on
-the port.
-
-------------------------------------------------------------------------
-Game compatibility
-
-For information on the compatability of a specific game please refer to
-the GP2X compatability section of the ScummVM WiKi
-<http://wiki.scummvm.org/index.php/GP2X#Compatibility_List>.
-
-Please note the version and date of the ScummVM build you are running
-when reviewing the above list.
-
-------------------------------------------------------------------------
-Supported audio options
-
-Raw audio.
-MP3 audio.
-OGG Vorbis audio.
-
-FLAC audio is currently unsupported.
-
-For best results use uncompressed audio in games.
-
-------------------------------------------------------------------------
-How to save
-
-NOTE: Everything is saved to the SD card, saves are stored in the saves
-folder under your main ScummVM executable unless you set another save
-location.
-
-The configiration file for ScummVM (.scummvmrc) is stored in the same
-place as the ScummVM executable.
-
-The save process below is for Scumm engine games but the principle is
-the same for all.
-
-In Game.
-
-1. Menu Button
-2. Select SAVE with B
-3. Select a position with B
-4. Right trigger puts 0 in the name box for some text.
-5. Press B to save
-
-Basically the emulated keys you can use are equivelent to the values
-buttons are mapped to,
-
-------------------------------------------------------------------------
-Controller mappings
-
-Touch screen:
-Touch: Move Pointer and Left click
-
-Mouse emulation:
-
-dPad: Move Pointer
-B: Left click
-X: Right click
-
-Keyboard emulation:
-
-Right Trigger: Return
-Select: Escape
-Y: Space Bar (Pause)
-Menu: Game Menu (Save, Load, Quit etc.)
-Volume Buttons: Increase and Decrease volume (5% per press)
-
-Fancy button combos:
-
-NOTE: To use button combos press and hold the Left Trigger then...
-
-Right Trigger: 0 (For skipping the copy protection in Monkey Island 2)
-Menu: Bring up the Global main menu for ScummVM
-Select: Exit ScummVM completely (and gracefully)
-
-------------------------------------------------------------------------
-Know issues
-
-Possible random crash (well SegFault). I have had this happen twice and
-have not tracked down the cause.
-It happens very infrequently, both times it was in the DOTT CD intro.
-
-------------------------------------------------------------------------
-Additional resources/links
-
-    * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X>
-    * ScummVM forums GP2X forum
-      <http://forums.scummvm.org/viewforum.php?f=14>
-    * My own ScummVM page <http://www.distant-earth.com/scummvm> (for
-      SVN/test builds)
-    * Main ScummVM site <http://www.scummvm.org> (for official supported
-      release builds)
-
-------------------------------------------------------------------------
-Credits
-
-Core ScummVM code (c) The ScummVM Team
-GP2X Wiz backend (c) John Willis
-Detailed (c) information can be found within the source code

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/README-GP2XWIZ)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/README-GP2XWIZ	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,141 @@
+ScummVM - GP2X WIZ SPECIFIC README - HEAD SVN
+------------------------------------------------------------------------
+
+Contents:
+
+    * About the backend/port <#About_the_backendport>
+    * Game compatability <#Game_compatibility>
+    * Included engines <#Included_engines>
+    * Supported audio options <#Supported_audio_options>
+    * Supported cut-scene options <#Supported_cut-scene_options>
+    * Recent changes <#Recent_changes>
+    * How to save <#How_to_save>
+    * Controller mappings <#Controller_mappings>
+    * Know issues <#Know_issues>
+    * Major TODO's <#Major_TODOs>
+    * Additional resources/links <#Additional_resourceslinks>
+    * Credits <#Credits>
+
+
+------------------------------------------------------------------------
+About the backend/port
+
+This is the readme for the offficial GP2X WIZ ScummVM backend (also known as
+the GP2X WIZ port).
+
+This is an SVN test release of ScummVM for the GP2X WIZ, it would be
+appreciated if this SVN test distribution was not mirrored and that
+people be directed to http://scummvm.distant-earth.com/ instead for
+updated SVN builds.
+
+Full supported official releases of the GP2X WIZ ScummVM backend are made in
+line with main official releases and are avalalble from the ScummVM
+downloads page <http://www.scummvm.org/downloads.php>.
+
+This build is in an active state of development and as such no
+"expected" behavior can be guaranteed ;).
+
+SVN builds are quickly tested with firmware 1.0.0 for reference.
+
+Please refer to the GP2X/GP2X WIZ ScummVM forum
+<http://forums.scummvm.org/viewforum.php?f=14> and WiKi
+<http://wiki.scummvm.org/index.php/GP2X> for the latest information on
+the port.
+
+------------------------------------------------------------------------
+Game compatibility
+
+For information on the compatability of a specific game please refer to
+the GP2X compatability section of the ScummVM WiKi
+<http://wiki.scummvm.org/index.php/GP2X#Compatibility_List>.
+
+Please note the version and date of the ScummVM build you are running
+when reviewing the above list.
+
+------------------------------------------------------------------------
+Supported audio options
+
+Raw audio.
+MP3 audio.
+OGG Vorbis audio.
+
+FLAC audio is currently unsupported.
+
+For best results use uncompressed audio in games.
+
+------------------------------------------------------------------------
+How to save
+
+NOTE: Everything is saved to the SD card, saves are stored in the saves
+folder under your main ScummVM executable unless you set another save
+location.
+
+The configiration file for ScummVM (.scummvmrc) is stored in the same
+place as the ScummVM executable.
+
+The save process below is for Scumm engine games but the principle is
+the same for all.
+
+In Game.
+
+1. Menu Button
+2. Select SAVE with B
+3. Select a position with B
+4. Right trigger puts 0 in the name box for some text.
+5. Press B to save
+
+Basically the emulated keys you can use are equivelent to the values
+buttons are mapped to,
+
+------------------------------------------------------------------------
+Controller mappings
+
+Touch screen:
+Touch: Move Pointer and Left click
+
+Mouse emulation:
+
+dPad: Move Pointer
+B: Left click
+X: Right click
+
+Keyboard emulation:
+
+Right Trigger: Return
+Select: Escape
+Y: Space Bar (Pause)
+Menu: Game Menu (Save, Load, Quit etc.)
+Volume Buttons: Increase and Decrease volume (5% per press)
+
+Fancy button combos:
+
+NOTE: To use button combos press and hold the Left Trigger then...
+
+Right Trigger: 0 (For skipping the copy protection in Monkey Island 2)
+Menu: Bring up the Global main menu for ScummVM
+Select: Exit ScummVM completely (and gracefully)
+
+------------------------------------------------------------------------
+Know issues
+
+Possible random crash (well SegFault). I have had this happen twice and
+have not tracked down the cause.
+It happens very infrequently, both times it was in the DOTT CD intro.
+
+------------------------------------------------------------------------
+Additional resources/links
+
+    * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X>
+    * ScummVM forums GP2X forum
+      <http://forums.scummvm.org/viewforum.php?f=14>
+    * My own ScummVM page <http://www.distant-earth.com/scummvm> (for
+      SVN/test builds)
+    * Main ScummVM site <http://www.scummvm.org> (for official supported
+      release builds)
+
+------------------------------------------------------------------------
+Credits
+
+Core ScummVM code (c) The ScummVM Team
+GP2X Wiz backend (c) John Willis
+Detailed (c) information can be found within the source code

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/build.sh	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-echo Quick script to make building all the time less painful.
-
-# Set the paths up here to support the build.
-
-export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
-export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
-export CXX=arm-open2x-linux-g++
-export CC=arm-open2x-linux-gcc
-export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
-export ASFLAGS=-mfloat-abi=soft
-
-cd ../../../..
-
-echo Building ScummVM for GP2X.
-make
-
-echo Build for GP2X - SDL - complete - Please check build logs.

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/build.sh)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/build.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+echo Quick script to make building all the time less painful.
+
+# Set the paths up here to support the build.
+
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+export CXX=arm-open2x-linux-g++
+export CC=arm-open2x-linux-gcc
+export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
+export ASFLAGS=-mfloat-abi=soft
+
+cd ../../../..
+
+echo Building ScummVM for GP2X.
+make
+
+echo Build for GP2X - SDL - complete - Please check build logs.

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/bundle.sh	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-echo Quick script to make building a distribution of the GP2X Wiz backend more consistent.
-
-echo Collecting files.
-mkdir "scummvm-wiz-`date '+%Y-%m-%d'`"
-mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm"
-mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves"
-mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins"
-mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data"
-
-echo "Please put your save games in this dir" >> "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
-
-cp ./scummvm.gpe ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ./scummvm.png ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ./README-GP2XWIZ ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ./scummvm.ini ./scummvm-wiz-`date '+%Y-%m-%d'`/
-cp ../../../../scummvm.wiz ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../AUTHORS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../README ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../COPYING ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../COPYRIGHT ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../NEWS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../gui/themes/scummmodern.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
-cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data
-cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins
-
-echo Making Stripped exe.
-arm-open2x-linux-strip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/scummvm.wiz
-
-echo Building ZIP bundle.
-if [ -f /usr/bin/zip ]
-	then
-		rm ./"scummvm-wiz-`date '+%Y-%m-%d'`.zip"
-		cd "scummvm-wiz-`date '+%Y-%m-%d'`"
-		zip -r -9 "../scummvm-wiz-`date '+%Y-%m-%d'`.zip" *
-		echo You should have a "scummvm-wiz-`date '+%Y-%m-%d'`.zip" for the GP2X Wiz backend ready to go.
-		cd ..
-		rm -R ./"scummvm-wiz-`date '+%Y-%m-%d'`"
-	else
-		echo - /usr/bin/zip not found, ZIP bundle not created.
-		echo All included files can also be found in ./"scummvm-wiz-`date '+%Y-%m-%d'`"
-		echo - Please use you preferred archive tool to bundle these files.
-fi

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/bundle.sh)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/bundle.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+echo Quick script to make building a distribution of the GP2X Wiz backend more consistent.
+
+echo Collecting files.
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`"
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm"
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves"
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins"
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data"
+
+echo "Please put your save games in this dir" >> "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
+
+cp ./scummvm.gpe ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ./scummvm.png ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ./README-GP2XWIZ ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ./scummvm.ini ./scummvm-wiz-`date '+%Y-%m-%d'`/
+cp ../../../../scummvm.wiz ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../AUTHORS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../README ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../COPYING ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../COPYRIGHT ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../NEWS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../gui/themes/scummmodern.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data
+cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins
+
+echo Making Stripped exe.
+arm-open2x-linux-strip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/scummvm.wiz
+
+echo Building ZIP bundle.
+if [ -f /usr/bin/zip ]
+	then
+		rm ./"scummvm-wiz-`date '+%Y-%m-%d'`.zip"
+		cd "scummvm-wiz-`date '+%Y-%m-%d'`"
+		zip -r -9 "../scummvm-wiz-`date '+%Y-%m-%d'`.zip" *
+		echo You should have a "scummvm-wiz-`date '+%Y-%m-%d'`.zip" for the GP2X Wiz backend ready to go.
+		cd ..
+		rm -R ./"scummvm-wiz-`date '+%Y-%m-%d'`"
+	else
+		echo - /usr/bin/zip not found, ZIP bundle not created.
+		echo All included files can also be found in ./"scummvm-wiz-`date '+%Y-%m-%d'`"
+		echo - Please use you preferred archive tool to bundle these files.
+fi

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/clean.sh	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-echo Quick script to make building all the time less painful.
-
-cd ../../../..
-
-echo Cleaning ScummVM for the GP2X Wiz.
-make clean

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/clean.sh)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/clean.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+echo Quick script to make building all the time less painful.
+
+cd ../../../..
+
+echo Cleaning ScummVM for the GP2X Wiz.
+make clean

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/config-alleng.sh	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-echo Quick script to make running configure all the time less painful
-echo and let all the build work be done from the backend/build folder.
-
-# Set the paths up here to generate the config.
-
-PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
-PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
-
-# Export the tool names for cross-compiling
-export CXX=arm-open2x-linux-g++
-export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
-export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
-export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
-export DEFINES=-DNDEBUG
-
-# Edit the configure line to suit.
-cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-plugins --default-dynamic
-
-echo Generating config for GP2X Wiz complete. Check for errors.

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/config-alleng.sh)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config-alleng.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+echo Quick script to make running configure all the time less painful
+echo and let all the build work be done from the backend/build folder.
+
+# Set the paths up here to generate the config.
+
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+
+# Export the tool names for cross-compiling
+export CXX=arm-open2x-linux-g++
+export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
+export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
+export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
+export DEFINES=-DNDEBUG
+
+# Edit the configure line to suit.
+cd ../../../..
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-plugins --default-dynamic
+
+echo Generating config for GP2X Wiz complete. Check for errors.

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/config.sh	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-echo Quick script to make running configure all the time less painful
-echo and let all the build work be done from the backend/build folder.
-
-# Set the paths up here to generate the config.
-
-PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
-PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
-
-# Export the tool names for cross-compiling
-export CXX=arm-open2x-linux-g++
-export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
-export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
-export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
-export DEFINES=-DNDEBUG
-
-# Edit the configure line to suit.
-cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-plugins --default-dynamic
-
-echo Generating config for GP2X Wiz complete. Check for errors.

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/config.sh)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/config.sh	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+echo Quick script to make running configure all the time less painful
+echo and let all the build work be done from the backend/build folder.
+
+# Set the paths up here to generate the config.
+
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+
+# Export the tool names for cross-compiling
+export CXX=arm-open2x-linux-g++
+export CXXFLAGS="-mcpu=arm926ej-s -mtune=arm926ej-s"
+export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
+export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
+export DEFINES=-DNDEBUG
+
+# Edit the configure line to suit.
+cd ../../../..
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-plugins --default-dynamic
+
+echo Generating config for GP2X Wiz complete. Check for errors.

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/scummvm.gpe	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# Run ScummVM, important this bit.
-./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
-
-# Sync the SD card to check that everything is written.
-sync
-
-# Return to the GPH menu screen
-cd /usr/gp2x
-exec /usr/gp2x/gp2xmenu

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/scummvm.gpe)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.gpe	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Run ScummVM, important this bit.
+./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
+
+# Sync the SD card to check that everything is written.
+sync
+
+# Return to the GPH menu screen
+cd /usr/gp2x
+exec /usr/gp2x/gp2xmenu

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/build/scummvm.ini	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,4 +0,0 @@
-[info]
-name="ScummVM"
-path="/scummvm/scummvm.gpe"
-icon="/scummvm/scummvm.png"

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/scummvm.ini)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.ini	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,4 @@
+[info]
+name="ScummVM"
+path="/scummvm/scummvm.gpe"
+icon="/scummvm/scummvm.png"

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.png
===================================================================
(Binary files differ)

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/build/scummvm.png (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/build/scummvm.png)
===================================================================
(Binary files differ)

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-events.cpp	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,462 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * GP2X Wiz: Device Specific Event Handling.
- *
- */
-
-#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
-#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#include "backends/keymapper/keymapper.h"
-#include "common/util.h"
-#include "common/events.h"
-
-// FIXME move joystick defines out and replace with confile file options
-// we should really allow users to map any key to a joystick button using the keymapper.
-#define JOY_DEADZONE 2200
-
-#define JOY_XAXIS 0
-#define JOY_YAXIS 1
-
-static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) {
-	if (key >= SDLK_F1 && key <= SDLK_F9) {
-		return key - SDLK_F1 + Common::ASCII_F1;
-	} else if (key >= SDLK_KP0 && key <= SDLK_KP9) {
-		return key - SDLK_KP0 + '0';
-	} else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) {
-		return key;
-	} else if (unicode) {
-		return unicode;
-	} else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) {
-		return key & ~0x20;
-	} else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) {
-		return 0;
-	}
-	return key;
-}
-
-void OSystem_GP2XWIZ::fillMouseEvent(Common::Event &event, int x, int y) {
-	event.mouse.x = x;
-	event.mouse.y = y;
-
-	// Update the "keyboard mouse" coords
-	_km.x = x;
-	_km.y = y;
-
-	// Adjust for the screen scaling
-	if (!_overlayVisible) {
-		event.mouse.x /= _videoMode.scaleFactor;
-		event.mouse.y /= _videoMode.scaleFactor;
-		if (_videoMode.aspectRatioCorrection)
-			event.mouse.y = aspect2Real(event.mouse.y);
-	}
-}
-
-static byte SDLModToOSystemKeyFlags(SDLMod mod) {
-	byte b = 0;
-	if (mod & KMOD_SHIFT)
-		b |= Common::KBD_SHIFT;
-	if (mod & KMOD_ALT)
-		b |= Common::KBD_ALT;
-	if (mod & KMOD_CTRL)
-		b |= Common::KBD_CTRL;
-
-	return b;
-}
-
-void OSystem_GP2XWIZ::moveStick() {
-	bool stickBtn[32];
-
-	memcpy(stickBtn, _stickBtn, sizeof(stickBtn));
-
-	if ((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6]))
-		stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0;
-
-	if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])) {
-		if (_km.x_down_count!=2) {
-			_km.x_vel = -1;
-			_km.x_down_count = 1;
-		} else
-			_km.x_vel = -4;
-	} else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])) {
-		if (_km.x_down_count!=2) {
-			_km.x_vel = 1;
-			_km.x_down_count = 1;
-		} else
-			_km.x_vel = 4;
-	} else {
-		_km.x_vel = 0;
-		_km.x_down_count = 0;
-	}
-
-
-	if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])) {
-		if (_km.y_down_count!=2) {
-			_km.y_vel = -1;
-			_km.y_down_count = 1;
-		} else
-			_km.y_vel = -4;
-	} else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])) {
-		if (_km.y_down_count!=2) {
-			_km.y_vel = 1;
-			_km.y_down_count = 1;
-		} else
-			_km.y_vel = 4;
-	} else {
-		_km.y_vel = 0;
-		_km.y_down_count = 0;
-	}
-}
-
-/* Quick default button states for modifiers. */
-int GP2X_BUTTON_STATE_L					=	false;
-
-/* Override the SDL pollEvent with the Wiz's own event code. */
-bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
-	SDL_Event ev;
-	int axis;
-	byte b = 0;
-
-	handleKbdMouse();
-
-	// If the screen mode changed, send an Common::EVENT_SCREEN_CHANGED
-	if (_modeChanged) {
-		_modeChanged = false;
-		event.type = Common::EVENT_SCREEN_CHANGED;
-		return true;
-	}
-
-	// GP2X Wiz Input mappings.
-
-	/*
-	Single Button
-
-	Movement:
-
-	GP2X_BUTTON_UP              Cursor Up
-	GP2X_BUTTON_DOWN            Cursor Down
-	GP2X_BUTTON_LEFT            Cursor Left
-	GP2X_BUTTON_RIGHT           Cursor Right
-
-	GP2X_BUTTON_UPLEFT          Cursor Up Left
-	GP2X_BUTTON_UPRIGHT         Cursor Up Right
-	GP2X_BUTTON_DOWNLEFT        Cursor Down Left
-	GP2X_BUTTON_DOWNRIGHT       Cursor Down Right
-
-	Button Emulation:
-
-	GP2X_BUTTON_A				. (Period)
-	GP2X_BUTTON_B               Left Mouse Click
-	GP2X_BUTTON_Y               Space Bar
-	GP2X_BUTTON_X               Right Mouse Click
-	GP2X_BUTTON_L				Combo Modifier (Left Trigger)
-	GP2X_BUTTON_R               F5 (Right Trigger)
-	GP2X_BUTTON_MENU			Return
-	GP2X_BUTTON_SELECT          Escape
-	GP2X_BUTTON_VOLUP           /dev/mixer Global Volume Up
-	GP2X_BUTTON_VOLDOWN         /dev/mixer Global Volume Down
-
-	Combos:
-
-	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP)
-	GP2X_BUTTON_L &	GP2X_BUTTON_SELECT			Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
-	GP2X_BUTTON_L &	GP2X_BUTTON_MENU			Common::EVENT_MAINMENU (ScummVM Global Main Menu)
-	GP2X_BUTTON_L &	GP2X_BUTTON_A				Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games)
-	*/
-
-	while (SDL_PollEvent(&ev)) {
-
-		switch(ev.type) {
-		case SDL_KEYDOWN:{
-			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
-
-			const bool event_complete = remapKey(ev,event);
-
-			if (event_complete)
-				return true;
-
-			event.type = Common::EVENT_KEYDOWN;
-			event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
-			event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
-
-			return true;
-			}
-		case SDL_KEYUP:
-			{
-			const bool event_complete = remapKey(ev,event);
-
-			if (event_complete)
-				return true;
-
-			event.type = Common::EVENT_KEYUP;
-			event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
-			event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
-			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
-
-			// Ctrl-Alt-<key> will change the GFX mode
-			if ((b & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) {
-				// Swallow these key up events
-				break;
-			}
-
-			return true;
-			}
-		case SDL_MOUSEMOTION:
-			event.type = Common::EVENT_MOUSEMOVE;
-			fillMouseEvent(event, ev.motion.x, ev.motion.y);
-
-			setMousePos(event.mouse.x, event.mouse.y);
-			return true;
-
-		case SDL_MOUSEBUTTONDOWN:
-			if (ev.button.button == SDL_BUTTON_LEFT)
-				event.type = Common::EVENT_LBUTTONDOWN;
-			else if (ev.button.button == SDL_BUTTON_RIGHT)
-				event.type = Common::EVENT_RBUTTONDOWN;
-#if defined(SDL_BUTTON_WHEELUP) && defined(SDL_BUTTON_WHEELDOWN)
-			else if (ev.button.button == SDL_BUTTON_WHEELUP)
-				event.type = Common::EVENT_WHEELUP;
-			else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
-				event.type = Common::EVENT_WHEELDOWN;
-#endif
-#if defined(SDL_BUTTON_MIDDLE)
-			else if (ev.button.button == SDL_BUTTON_MIDDLE)
-				event.type = Common::EVENT_MBUTTONDOWN;
-#endif
-			else
-				break;
-
-			fillMouseEvent(event, ev.button.x, ev.button.y);
-
-			return true;
-
-		case SDL_MOUSEBUTTONUP:
-			if (ev.button.button == SDL_BUTTON_LEFT)
-				event.type = Common::EVENT_LBUTTONUP;
-			else if (ev.button.button == SDL_BUTTON_RIGHT)
-				event.type = Common::EVENT_RBUTTONUP;
-#if defined(SDL_BUTTON_MIDDLE)
-			else if (ev.button.button == SDL_BUTTON_MIDDLE)
-				event.type = Common::EVENT_MBUTTONUP;
-#endif
-			else
-				break;
-			fillMouseEvent(event, ev.button.x, ev.button.y);
-
-			return true;
-
-		case SDL_JOYBUTTONDOWN:
-			_stickBtn[ev.jbutton.button] = 1;
-			if (ev.jbutton.button == GP2X_BUTTON_B) {
-				event.type = Common::EVENT_LBUTTONDOWN;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else if (ev.jbutton.button == GP2X_BUTTON_X) {
-				event.type = Common::EVENT_RBUTTONDOWN;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else if (_stickBtn[GP2X_BUTTON_L] && (ev.jbutton.button == GP2X_BUTTON_SELECT)) {
-				event.type = Common::EVENT_QUIT;
-			} else if (ev.jbutton.button < 8) {
-				moveStick();
-				event.type = Common::EVENT_MOUSEMOVE;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else {
-				event.type = Common::EVENT_KEYDOWN;
-				event.kbd.flags = 0;
-				switch (ev.jbutton.button) {
-					case GP2X_BUTTON_L:
-						GP2X_BUTTON_STATE_L = true;
-						break;
-					case GP2X_BUTTON_R:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.kbd.keycode = Common::KEYCODE_0;
-							event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
-						} else {
-							event.kbd.keycode = Common::KEYCODE_RETURN;
-							event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_SELECT:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.type = Common::EVENT_QUIT;
-						} else {
-							event.kbd.keycode = Common::KEYCODE_ESCAPE;
-							event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_A:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.type = Common::EVENT_PREDICTIVE_DIALOG;
-						} else {
-						event.kbd.keycode = Common::KEYCODE_PERIOD;
-						event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_Y:
-						event.kbd.keycode = Common::KEYCODE_SPACE;
-						event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
-						break;
-					case GP2X_BUTTON_MENU:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.type = Common::EVENT_MAINMENU;
-						} else {
-							event.kbd.keycode = Common::KEYCODE_F5;
-							event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_VOLUP:
-						WIZ_HW::mixerMoveVolume(2);
-						if (WIZ_HW::volumeLevel == 100) {
-							displayMessageOnOSD("Maximum Volume");
-						} else {
-							displayMessageOnOSD("Increasing Volume");
-						}
-						break;
-
-					case GP2X_BUTTON_VOLDOWN:
-						WIZ_HW::mixerMoveVolume(1);
-						if (WIZ_HW::volumeLevel == 0) {
-							displayMessageOnOSD("Minimal Volume");
-						} else {
-							displayMessageOnOSD("Decreasing Volume");
-						}
-						break;
-				}
-			}
-			return true;
-
-		case SDL_JOYBUTTONUP:
-			_stickBtn[ev.jbutton.button] = 0;
-			if (ev.jbutton.button == GP2X_BUTTON_B) {
-				event.type = Common::EVENT_LBUTTONUP;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else if (ev.jbutton.button == GP2X_BUTTON_X) {
-				event.type = Common::EVENT_RBUTTONUP;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else if (ev.jbutton.button < 8) {
-				moveStick();
-				event.type = Common::EVENT_MOUSEMOVE;
-				fillMouseEvent(event, _km.x, _km.y);
-			} else {
-				event.type = Common::EVENT_KEYUP;
-				event.kbd.flags = 0;
-				switch (ev.jbutton.button) {
-					case GP2X_BUTTON_SELECT:
-						event.kbd.keycode = Common::KEYCODE_ESCAPE;
-						event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
-						break;
-					case GP2X_BUTTON_A:
-						event.kbd.keycode = Common::KEYCODE_PERIOD;
-						event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
-						break;
-					case GP2X_BUTTON_Y:
-						event.kbd.keycode = Common::KEYCODE_SPACE;
-						event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
-						break;
-					case GP2X_BUTTON_MENU:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.type = Common::EVENT_MAINMENU;
-						} else {
-							event.kbd.keycode = Common::KEYCODE_F5;
-							event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_L:
-						GP2X_BUTTON_STATE_L = false;
-						break;
-					case GP2X_BUTTON_R:
-						if (GP2X_BUTTON_STATE_L == true) {
-							event.kbd.keycode = Common::KEYCODE_0;
-							event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
-						} else {
-							event.kbd.keycode = Common::KEYCODE_RETURN;
-							event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
-						}
-						break;
-					case GP2X_BUTTON_VOLUP:
-						break;
-					case GP2X_BUTTON_VOLDOWN:
-						break;
-				}
-			}
-			return true;
-
-		case SDL_JOYAXISMOTION:
-			axis = ev.jaxis.value;
-			if ( axis > JOY_DEADZONE) {
-				axis -= JOY_DEADZONE;
-				event.type = Common::EVENT_MOUSEMOVE;
-			} else if ( axis < -JOY_DEADZONE ) {
-				axis += JOY_DEADZONE;
-				event.type = Common::EVENT_MOUSEMOVE;
-			} else
-				axis = 0;
-
-			if ( ev.jaxis.axis == JOY_XAXIS) {
-				if (axis != 0) {
-					_km.x_vel = (axis > 0) ? 1:-1;
-					_km.x_down_count = 1;
-				} else {
-					_km.x_vel = 0;
-					_km.x_down_count = 0;
-				}
-
-			} else if (ev.jaxis.axis == JOY_YAXIS) {
-#ifndef JOY_INVERT_Y
-				axis = -axis;
-#endif
-#ifdef JOY_ANALOG
-				_km.y_vel = -axis / 2000;
-				_km.y_down_count = 0;
-#else
-				if (axis != 0) {
-					_km.y_vel = (-axis > 0) ? 1: -1;
-					_km.y_down_count = 1;
-				} else {
-					_km.y_vel = 0;
-					_km.y_down_count = 0;
-				}
-#endif
-			}
-
-			fillMouseEvent(event, _km.x, _km.y);
-
-			return true;
-
-		case SDL_VIDEOEXPOSE:
-			_forceFull = true;
-			break;
-
-		case SDL_QUIT:
-			event.type = Common::EVENT_QUIT;
-			return true;
-		}
-	}
-	return false;
-}
-
-bool OSystem_GP2XWIZ::remapKey(SDL_Event &ev,Common::Event &event) {
-	return false;
-}

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-events.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-events.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,462 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+/*
+ * GP2X Wiz: Device Specific Event Handling.
+ *
+ */
+
+#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
+#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
+#include "backends/keymapper/keymapper.h"
+#include "common/util.h"
+#include "common/events.h"
+
+// FIXME move joystick defines out and replace with confile file options
+// we should really allow users to map any key to a joystick button using the keymapper.
+#define JOY_DEADZONE 2200
+
+#define JOY_XAXIS 0
+#define JOY_YAXIS 1
+
+static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) {
+	if (key >= SDLK_F1 && key <= SDLK_F9) {
+		return key - SDLK_F1 + Common::ASCII_F1;
+	} else if (key >= SDLK_KP0 && key <= SDLK_KP9) {
+		return key - SDLK_KP0 + '0';
+	} else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) {
+		return key;
+	} else if (unicode) {
+		return unicode;
+	} else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) {
+		return key & ~0x20;
+	} else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) {
+		return 0;
+	}
+	return key;
+}
+
+void OSystem_GP2XWIZ::fillMouseEvent(Common::Event &event, int x, int y) {
+	event.mouse.x = x;
+	event.mouse.y = y;
+
+	// Update the "keyboard mouse" coords
+	_km.x = x;
+	_km.y = y;
+
+	// Adjust for the screen scaling
+	if (!_overlayVisible) {
+		event.mouse.x /= _videoMode.scaleFactor;
+		event.mouse.y /= _videoMode.scaleFactor;
+		if (_videoMode.aspectRatioCorrection)
+			event.mouse.y = aspect2Real(event.mouse.y);
+	}
+}
+
+static byte SDLModToOSystemKeyFlags(SDLMod mod) {
+	byte b = 0;
+	if (mod & KMOD_SHIFT)
+		b |= Common::KBD_SHIFT;
+	if (mod & KMOD_ALT)
+		b |= Common::KBD_ALT;
+	if (mod & KMOD_CTRL)
+		b |= Common::KBD_CTRL;
+
+	return b;
+}
+
+void OSystem_GP2XWIZ::moveStick() {
+	bool stickBtn[32];
+
+	memcpy(stickBtn, _stickBtn, sizeof(stickBtn));
+
+	if ((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6]))
+		stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0;
+
+	if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])) {
+		if (_km.x_down_count!=2) {
+			_km.x_vel = -1;
+			_km.x_down_count = 1;
+		} else
+			_km.x_vel = -4;
+	} else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])) {
+		if (_km.x_down_count!=2) {
+			_km.x_vel = 1;
+			_km.x_down_count = 1;
+		} else
+			_km.x_vel = 4;
+	} else {
+		_km.x_vel = 0;
+		_km.x_down_count = 0;
+	}
+
+
+	if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])) {
+		if (_km.y_down_count!=2) {
+			_km.y_vel = -1;
+			_km.y_down_count = 1;
+		} else
+			_km.y_vel = -4;
+	} else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])) {
+		if (_km.y_down_count!=2) {
+			_km.y_vel = 1;
+			_km.y_down_count = 1;
+		} else
+			_km.y_vel = 4;
+	} else {
+		_km.y_vel = 0;
+		_km.y_down_count = 0;
+	}
+}
+
+/* Quick default button states for modifiers. */
+int GP2X_BUTTON_STATE_L					=	false;
+
+/* Override the SDL pollEvent with the Wiz's own event code. */
+bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
+	SDL_Event ev;
+	int axis;
+	byte b = 0;
+
+	handleKbdMouse();
+
+	// If the screen mode changed, send an Common::EVENT_SCREEN_CHANGED
+	if (_modeChanged) {
+		_modeChanged = false;
+		event.type = Common::EVENT_SCREEN_CHANGED;
+		return true;
+	}
+
+	// GP2X Wiz Input mappings.
+
+	/*
+	Single Button
+
+	Movement:
+
+	GP2X_BUTTON_UP              Cursor Up
+	GP2X_BUTTON_DOWN            Cursor Down
+	GP2X_BUTTON_LEFT            Cursor Left
+	GP2X_BUTTON_RIGHT           Cursor Right
+
+	GP2X_BUTTON_UPLEFT          Cursor Up Left
+	GP2X_BUTTON_UPRIGHT         Cursor Up Right
+	GP2X_BUTTON_DOWNLEFT        Cursor Down Left
+	GP2X_BUTTON_DOWNRIGHT       Cursor Down Right
+
+	Button Emulation:
+
+	GP2X_BUTTON_A				. (Period)
+	GP2X_BUTTON_B               Left Mouse Click
+	GP2X_BUTTON_Y               Space Bar
+	GP2X_BUTTON_X               Right Mouse Click
+	GP2X_BUTTON_L				Combo Modifier (Left Trigger)
+	GP2X_BUTTON_R               F5 (Right Trigger)
+	GP2X_BUTTON_MENU			Return
+	GP2X_BUTTON_SELECT          Escape
+	GP2X_BUTTON_VOLUP           /dev/mixer Global Volume Up
+	GP2X_BUTTON_VOLDOWN         /dev/mixer Global Volume Down
+
+	Combos:
+
+	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP)
+	GP2X_BUTTON_L &	GP2X_BUTTON_SELECT			Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
+	GP2X_BUTTON_L &	GP2X_BUTTON_MENU			Common::EVENT_MAINMENU (ScummVM Global Main Menu)
+	GP2X_BUTTON_L &	GP2X_BUTTON_A				Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games)
+	*/
+
+	while (SDL_PollEvent(&ev)) {
+
+		switch(ev.type) {
+		case SDL_KEYDOWN:{
+			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
+
+			const bool event_complete = remapKey(ev,event);
+
+			if (event_complete)
+				return true;
+
+			event.type = Common::EVENT_KEYDOWN;
+			event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
+			event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+
+			return true;
+			}
+		case SDL_KEYUP:
+			{
+			const bool event_complete = remapKey(ev,event);
+
+			if (event_complete)
+				return true;
+
+			event.type = Common::EVENT_KEYUP;
+			event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
+			event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
+
+			// Ctrl-Alt-<key> will change the GFX mode
+			if ((b & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) {
+				// Swallow these key up events
+				break;
+			}
+
+			return true;
+			}
+		case SDL_MOUSEMOTION:
+			event.type = Common::EVENT_MOUSEMOVE;
+			fillMouseEvent(event, ev.motion.x, ev.motion.y);
+
+			setMousePos(event.mouse.x, event.mouse.y);
+			return true;
+
+		case SDL_MOUSEBUTTONDOWN:
+			if (ev.button.button == SDL_BUTTON_LEFT)
+				event.type = Common::EVENT_LBUTTONDOWN;
+			else if (ev.button.button == SDL_BUTTON_RIGHT)
+				event.type = Common::EVENT_RBUTTONDOWN;
+#if defined(SDL_BUTTON_WHEELUP) && defined(SDL_BUTTON_WHEELDOWN)
+			else if (ev.button.button == SDL_BUTTON_WHEELUP)
+				event.type = Common::EVENT_WHEELUP;
+			else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
+				event.type = Common::EVENT_WHEELDOWN;
+#endif
+#if defined(SDL_BUTTON_MIDDLE)
+			else if (ev.button.button == SDL_BUTTON_MIDDLE)
+				event.type = Common::EVENT_MBUTTONDOWN;
+#endif
+			else
+				break;
+
+			fillMouseEvent(event, ev.button.x, ev.button.y);
+
+			return true;
+
+		case SDL_MOUSEBUTTONUP:
+			if (ev.button.button == SDL_BUTTON_LEFT)
+				event.type = Common::EVENT_LBUTTONUP;
+			else if (ev.button.button == SDL_BUTTON_RIGHT)
+				event.type = Common::EVENT_RBUTTONUP;
+#if defined(SDL_BUTTON_MIDDLE)
+			else if (ev.button.button == SDL_BUTTON_MIDDLE)
+				event.type = Common::EVENT_MBUTTONUP;
+#endif
+			else
+				break;
+			fillMouseEvent(event, ev.button.x, ev.button.y);
+
+			return true;
+
+		case SDL_JOYBUTTONDOWN:
+			_stickBtn[ev.jbutton.button] = 1;
+			if (ev.jbutton.button == GP2X_BUTTON_B) {
+				event.type = Common::EVENT_LBUTTONDOWN;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else if (ev.jbutton.button == GP2X_BUTTON_X) {
+				event.type = Common::EVENT_RBUTTONDOWN;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else if (_stickBtn[GP2X_BUTTON_L] && (ev.jbutton.button == GP2X_BUTTON_SELECT)) {
+				event.type = Common::EVENT_QUIT;
+			} else if (ev.jbutton.button < 8) {
+				moveStick();
+				event.type = Common::EVENT_MOUSEMOVE;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else {
+				event.type = Common::EVENT_KEYDOWN;
+				event.kbd.flags = 0;
+				switch (ev.jbutton.button) {
+					case GP2X_BUTTON_L:
+						GP2X_BUTTON_STATE_L = true;
+						break;
+					case GP2X_BUTTON_R:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.kbd.keycode = Common::KEYCODE_0;
+							event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+						} else {
+							event.kbd.keycode = Common::KEYCODE_RETURN;
+							event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_SELECT:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.type = Common::EVENT_QUIT;
+						} else {
+							event.kbd.keycode = Common::KEYCODE_ESCAPE;
+							event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_A:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.type = Common::EVENT_PREDICTIVE_DIALOG;
+						} else {
+						event.kbd.keycode = Common::KEYCODE_PERIOD;
+						event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_Y:
+						event.kbd.keycode = Common::KEYCODE_SPACE;
+						event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+						break;
+					case GP2X_BUTTON_MENU:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.type = Common::EVENT_MAINMENU;
+						} else {
+							event.kbd.keycode = Common::KEYCODE_F5;
+							event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_VOLUP:
+						WIZ_HW::mixerMoveVolume(2);
+						if (WIZ_HW::volumeLevel == 100) {
+							displayMessageOnOSD("Maximum Volume");
+						} else {
+							displayMessageOnOSD("Increasing Volume");
+						}
+						break;
+
+					case GP2X_BUTTON_VOLDOWN:
+						WIZ_HW::mixerMoveVolume(1);
+						if (WIZ_HW::volumeLevel == 0) {
+							displayMessageOnOSD("Minimal Volume");
+						} else {
+							displayMessageOnOSD("Decreasing Volume");
+						}
+						break;
+				}
+			}
+			return true;
+
+		case SDL_JOYBUTTONUP:
+			_stickBtn[ev.jbutton.button] = 0;
+			if (ev.jbutton.button == GP2X_BUTTON_B) {
+				event.type = Common::EVENT_LBUTTONUP;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else if (ev.jbutton.button == GP2X_BUTTON_X) {
+				event.type = Common::EVENT_RBUTTONUP;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else if (ev.jbutton.button < 8) {
+				moveStick();
+				event.type = Common::EVENT_MOUSEMOVE;
+				fillMouseEvent(event, _km.x, _km.y);
+			} else {
+				event.type = Common::EVENT_KEYUP;
+				event.kbd.flags = 0;
+				switch (ev.jbutton.button) {
+					case GP2X_BUTTON_SELECT:
+						event.kbd.keycode = Common::KEYCODE_ESCAPE;
+						event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+						break;
+					case GP2X_BUTTON_A:
+						event.kbd.keycode = Common::KEYCODE_PERIOD;
+						event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+						break;
+					case GP2X_BUTTON_Y:
+						event.kbd.keycode = Common::KEYCODE_SPACE;
+						event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+						break;
+					case GP2X_BUTTON_MENU:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.type = Common::EVENT_MAINMENU;
+						} else {
+							event.kbd.keycode = Common::KEYCODE_F5;
+							event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_L:
+						GP2X_BUTTON_STATE_L = false;
+						break;
+					case GP2X_BUTTON_R:
+						if (GP2X_BUTTON_STATE_L == true) {
+							event.kbd.keycode = Common::KEYCODE_0;
+							event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+						} else {
+							event.kbd.keycode = Common::KEYCODE_RETURN;
+							event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
+						}
+						break;
+					case GP2X_BUTTON_VOLUP:
+						break;
+					case GP2X_BUTTON_VOLDOWN:
+						break;
+				}
+			}
+			return true;
+
+		case SDL_JOYAXISMOTION:
+			axis = ev.jaxis.value;
+			if ( axis > JOY_DEADZONE) {
+				axis -= JOY_DEADZONE;
+				event.type = Common::EVENT_MOUSEMOVE;
+			} else if ( axis < -JOY_DEADZONE ) {
+				axis += JOY_DEADZONE;
+				event.type = Common::EVENT_MOUSEMOVE;
+			} else
+				axis = 0;
+
+			if ( ev.jaxis.axis == JOY_XAXIS) {
+				if (axis != 0) {
+					_km.x_vel = (axis > 0) ? 1:-1;
+					_km.x_down_count = 1;
+				} else {
+					_km.x_vel = 0;
+					_km.x_down_count = 0;
+				}
+
+			} else if (ev.jaxis.axis == JOY_YAXIS) {
+#ifndef JOY_INVERT_Y
+				axis = -axis;
+#endif
+#ifdef JOY_ANALOG
+				_km.y_vel = -axis / 2000;
+				_km.y_down_count = 0;
+#else
+				if (axis != 0) {
+					_km.y_vel = (-axis > 0) ? 1: -1;
+					_km.y_down_count = 1;
+				} else {
+					_km.y_vel = 0;
+					_km.y_down_count = 0;
+				}
+#endif
+			}
+
+			fillMouseEvent(event, _km.x, _km.y);
+
+			return true;
+
+		case SDL_VIDEOEXPOSE:
+			_forceFull = true;
+			break;
+
+		case SDL_QUIT:
+			event.type = Common::EVENT_QUIT;
+			return true;
+		}
+	}
+	return false;
+}
+
+bool OSystem_GP2XWIZ::remapKey(SDL_Event &ev,Common::Event &event) {
+	return false;
+}

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,33 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
-
-
-/* TODO: Add code to ensure that overlay is always 320*240 and maybe invoke some custom scale code. */
-
-bool OSystem_GP2XWIZ::loadGFXMode() {
-	OSystem_SDL::loadGFXMode();
-}

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,33 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
+
+
+/* TODO: Add code to ensure that overlay is always 320*240 and maybe invoke some custom scale code. */
+
+bool OSystem_GP2XWIZ::loadGFXMode() {
+	OSystem_SDL::loadGFXMode();
+}

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,74 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * GP2X Wiz: Hardware Stuff.
- *
- */
-
-#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-
-#include <fcntl.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <sys/ioctl.h>
-#include <sys/soundcard.h>
-#include <unistd.h>
-
-namespace WIZ_HW {
-
-int volumeLevel = VOLUME_INITIAL;
-
-void deviceInit() {
-}
-
-void deviceDeinit() {
-}
-
-void mixerMoveVolume(int direction) {
-    if (volumeLevel <= 10) {
-        if (direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE/2;
-        if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2;
-    } else {
-        if(direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE;
-        if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE;
-    }
-
-    if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN;
-    if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX;
-
-    unsigned long soundDev = open("/dev/mixer", O_RDWR);
-
-    if(soundDev) {
-        int vol = ((volumeLevel << 8) | volumeLevel);
-        ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol);
-        close(soundDev);
-    }
-}
-
-} /* namespace WIZ_HW */

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-hw.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+/*
+ * GP2X Wiz: Hardware Stuff.
+ *
+ */
+
+#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
+
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/soundcard.h>
+#include <unistd.h>
+
+namespace WIZ_HW {
+
+int volumeLevel = VOLUME_INITIAL;
+
+void deviceInit() {
+}
+
+void deviceDeinit() {
+}
+
+void mixerMoveVolume(int direction) {
+    if (volumeLevel <= 10) {
+        if (direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE/2;
+        if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2;
+    } else {
+        if(direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE;
+        if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE;
+    }
+
+    if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN;
+    if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX;
+
+    unsigned long soundDev = open("/dev/mixer", O_RDWR);
+
+    if(soundDev) {
+        int vol = ((volumeLevel << 8) | volumeLevel);
+        ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol);
+        close(soundDev);
+    }
+}
+
+} /* namespace WIZ_HW */

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-hw.h	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,73 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * GP2X Wiz: Hardware Stuff.
- *
- */
-
-#ifndef GP2XWIZ_HW_H
-#define GP2XWIZ_HW_H
-
-/* GP2X Wiz: Main Joystick Mappings */
-
-#define GP2X_BUTTON_UP              (0)
-#define GP2X_BUTTON_UPLEFT          (1)
-#define GP2X_BUTTON_LEFT            (2)
-#define GP2X_BUTTON_DOWNLEFT        (3)
-#define GP2X_BUTTON_DOWN            (4)
-#define GP2X_BUTTON_DOWNRIGHT       (5)
-#define GP2X_BUTTON_RIGHT           (6)
-#define GP2X_BUTTON_UPRIGHT         (7)
-#define GP2X_BUTTON_MENU            (8)
-#define GP2X_BUTTON_SELECT          (9)
-#define GP2X_BUTTON_L               (10)
-#define GP2X_BUTTON_R               (11)
-#define GP2X_BUTTON_A               (12)
-#define GP2X_BUTTON_B               (13)
-#define GP2X_BUTTON_X               (14)
-#define GP2X_BUTTON_Y               (15)
-#define GP2X_BUTTON_VOLUP           (16)
-#define GP2X_BUTTON_VOLDOWN         (17)
-
-namespace WIZ_HW {
-
-#define VOLUME_MIN 0
-#define VOLUME_INITIAL 70 /* Default volume if you call mixerMoveVolume(0) without setting the global var. */
-#define VOLUME_MAX 100
-#define VOLUME_CHANGE_RATE 8
-#define VOLUME_NOCHG 0
-#define VOLUME_DOWN 1
-#define VOLUME_UP 2
-
-extern int volumeLevel;
-
-extern void	deviceInit();
-extern void	deviceDeinit();
-extern void	mixerMoveVolume(int);
-
-} /* namespace WIZ_HW */
-
-#endif //GP2XWIZ_HW_H

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-hw.h)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-hw.h	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,73 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+/*
+ * GP2X Wiz: Hardware Stuff.
+ *
+ */
+
+#ifndef GP2XWIZ_HW_H
+#define GP2XWIZ_HW_H
+
+/* GP2X Wiz: Main Joystick Mappings */
+
+#define GP2X_BUTTON_UP              (0)
+#define GP2X_BUTTON_UPLEFT          (1)
+#define GP2X_BUTTON_LEFT            (2)
+#define GP2X_BUTTON_DOWNLEFT        (3)
+#define GP2X_BUTTON_DOWN            (4)
+#define GP2X_BUTTON_DOWNRIGHT       (5)
+#define GP2X_BUTTON_RIGHT           (6)
+#define GP2X_BUTTON_UPRIGHT         (7)
+#define GP2X_BUTTON_MENU            (8)
+#define GP2X_BUTTON_SELECT          (9)
+#define GP2X_BUTTON_L               (10)
+#define GP2X_BUTTON_R               (11)
+#define GP2X_BUTTON_A               (12)
+#define GP2X_BUTTON_B               (13)
+#define GP2X_BUTTON_X               (14)
+#define GP2X_BUTTON_Y               (15)
+#define GP2X_BUTTON_VOLUP           (16)
+#define GP2X_BUTTON_VOLDOWN         (17)
+
+namespace WIZ_HW {
+
+#define VOLUME_MIN 0
+#define VOLUME_INITIAL 70 /* Default volume if you call mixerMoveVolume(0) without setting the global var. */
+#define VOLUME_MAX 100
+#define VOLUME_CHANGE_RATE 8
+#define VOLUME_NOCHG 0
+#define VOLUME_DOWN 1
+#define VOLUME_UP 2
+
+extern int volumeLevel;
+
+extern void	deviceInit();
+extern void	deviceDeinit();
+extern void	mixerMoveVolume(int);
+
+} /* namespace WIZ_HW */
+
+#endif //GP2XWIZ_HW_H

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-main.cpp	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,216 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#include "common/scummsys.h"
-#include <SDL/SDL.h>
-
-#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
-#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#include "backends/plugins/posix/posix-provider.h"
-#include "base/main.h"
-#include "base/internal_version.h"
-
-#include "common/archive.h"
-#include "common/config-manager.h"
-#include "common/debug.h"
-#include "common/events.h"
-#include "common/util.h"
-
-#include "common/file.h"
-#include "base/main.h"
-
-#include "backends/saves/default/default-saves.h"
-
-#include "backends/timer/default/default-timer.h"
-#include "sound/mixer_intern.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <time.h>	// for getTimeAndDate()
-
-/* Dump console info to files. */
-// #define DUMP_STDOUT
-
-int main(int argc, char *argv[]) {
-
-	g_system = new OSystem_GP2XWIZ();
-	assert(g_system);
-
-#ifdef DYNAMIC_MODULES
-	PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
-#endif
-
-	// Invoke the actual ScummVM main entry point:
-	int res = scummvm_main(argc, argv);
-	g_system->quit();
-
-	return res;
-}
-
-void OSystem_GP2XWIZ::initBackend() {
-
-	/* Setup default save path to be workingdir/saves */
-
-	char savePath[PATH_MAX+1];
-	char workDirName[PATH_MAX+1];
-
-	if (getcwd(workDirName, PATH_MAX) == NULL) {
-		error("Could not obtain current working directory.");
-	} else {
-		printf("Current working directory: %s\n", workDirName);
-	}
-
-	strcpy(savePath, workDirName);
-	strcat(savePath, "/saves");
-	printf("Current save directory: %s\n", savePath);
-	struct stat sb;
-	if (stat(savePath, &sb) == -1)
-		if (errno == ENOENT) // Create the dir if it does not exist
-			if (mkdir(savePath, 0755) != 0)
-				warning("mkdir for '%s' failed!", savePath);
-
-	_savefile = new DefaultSaveFileManager(savePath);
-
-	#ifdef DUMP_STDOUT
-		// The GP2X Wiz has a serial console on the breakout board but most users do not use this so we
-		// output all our STDOUT and STDERR to files for debug purposes.
-		char STDOUT_FILE[PATH_MAX+1];
-		char STDERR_FILE[PATH_MAX+1];
-
-		strcpy(STDOUT_FILE, workDirName);
-		strcpy(STDERR_FILE, workDirName);
-		strcat(STDOUT_FILE, "/scummvm.stdout.txt");
-		strcat(STDERR_FILE, "/scummvm.stderr.txt");
-
-		// Flush the output in case anything is queued
-		fclose(stdout);
-		fclose(stderr);
-
-		// Redirect standard input and standard output
-		FILE *newfp = freopen(STDOUT_FILE, "w", stdout);
-		if (newfp == NULL) {
-		#if !defined(stdout)
-			stdout = fopen(STDOUT_FILE, "w");
-		#else
-			newfp = fopen(STDOUT_FILE, "w");
-			if (newfp) {
-				*stdout = *newfp;
-			}
-		#endif
-		}
-
-		newfp = freopen(STDERR_FILE, "w", stderr);
-		if (newfp == NULL) {
-		#if !defined(stderr)
-			stderr = fopen(STDERR_FILE, "w");
-		#else
-			newfp = fopen(STDERR_FILE, "w");
-			if (newfp) {
-				*stderr = *newfp;
-			}
-		#endif
-		}
-
-		setbuf(stderr, NULL);
-		printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
-	#endif /* DUMP_STDOUT */
-
-	/* Initialise any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */
-	WIZ_HW::deviceInit();
-
-	/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
-	WIZ_HW::mixerMoveVolume(0);
-
-	/* Up default volume values as we use a seperate system level volume anyway. */
-	ConfMan.registerDefault("music_volume", 220);
-	ConfMan.registerDefault("sfx_volume", 220);
-	ConfMan.registerDefault("speech_volume", 220);
-
-	/* Trigger autosave every 4 minutes - On low batts 5 mins is about your warning time. */
-	ConfMan.registerDefault("autosave_period", 4 * 60);
-
-	/* Make sure that aspect ratio correction is enabled on the 1st run to stop users asking me what the 'wasted space' is ;-). */
-	ConfMan.registerDefault("aspect_ratio", true);
-
-	/* Make sure SDL knows that we have a joystick we want to use. */
-	ConfMan.setInt("joystick_num", 0);
-
-	printf("%s\n", "Passing to OSystem::SDL initBackend.");
-
-	/* Pass to SDL backend to do the heavy lifting */
-	OSystem_SDL::initBackend();
-}
-
-void OSystem_GP2XWIZ::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
-
-	/* Setup default extra data paths for engine data files and plugins */
-	char workDirName[PATH_MAX+1];
-
-	if (getcwd(workDirName, PATH_MAX) == NULL) {
-		error("Error: Could not obtain current working directory.");
-	}
-
-	Common::FSNode workdirNode(workDirName);
-	if (workdirNode.exists() && workdirNode.isDirectory()) {
-		s.add("__GP2XWIZ_WORKDIR__", new Common::FSDirectory(workDirName), priority);
-	}
-
-	char enginedataPath[PATH_MAX+1];
-
-	strcpy(enginedataPath, workDirName);
-	strcat(enginedataPath, "/engine-data");
-
-	Common::FSNode engineNode(enginedataPath);
-	if (engineNode.exists() && engineNode.isDirectory()) {
-		s.add("__GP2XWIZ_ENGDATA__", new Common::FSDirectory(enginedataPath), priority);
-	}
-
-	char pluginsPath[PATH_MAX+1];
-
-	strcpy(pluginsPath, workDirName);
-	strcat(pluginsPath, "/plugins");
-
-	Common::FSNode pluginsNode(pluginsPath);
-	if (pluginsNode.exists() && pluginsNode.isDirectory()) {
-		s.add("__GP2XWIZ_PLUGINS__", new Common::FSDirectory(pluginsPath), priority);
-	}
-}
-
-void OSystem_GP2XWIZ::quit() {
-
-	WIZ_HW::deviceDeinit();
-
-	#ifdef DUMP_STDOUT
-		printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
-		fclose(stdout);
-		fclose(stderr);
-	#endif /* DUMP_STDOUT */
-
-	OSystem_SDL::quit();
-}

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-main.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-main.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,216 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/scummsys.h"
+#include <SDL/SDL.h>
+
+#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
+#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
+#include "backends/plugins/posix/posix-provider.h"
+#include "base/main.h"
+#include "base/internal_version.h"
+
+#include "common/archive.h"
+#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/events.h"
+#include "common/util.h"
+
+#include "common/file.h"
+#include "base/main.h"
+
+#include "backends/saves/default/default-saves.h"
+
+#include "backends/timer/default/default-timer.h"
+#include "sound/mixer_intern.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <time.h>	// for getTimeAndDate()
+
+/* Dump console info to files. */
+// #define DUMP_STDOUT
+
+int main(int argc, char *argv[]) {
+
+	g_system = new OSystem_GP2XWIZ();
+	assert(g_system);
+
+#ifdef DYNAMIC_MODULES
+	PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+#endif
+
+	// Invoke the actual ScummVM main entry point:
+	int res = scummvm_main(argc, argv);
+	g_system->quit();
+
+	return res;
+}
+
+void OSystem_GP2XWIZ::initBackend() {
+
+	/* Setup default save path to be workingdir/saves */
+
+	char savePath[PATH_MAX+1];
+	char workDirName[PATH_MAX+1];
+
+	if (getcwd(workDirName, PATH_MAX) == NULL) {
+		error("Could not obtain current working directory.");
+	} else {
+		printf("Current working directory: %s\n", workDirName);
+	}
+
+	strcpy(savePath, workDirName);
+	strcat(savePath, "/saves");
+	printf("Current save directory: %s\n", savePath);
+	struct stat sb;
+	if (stat(savePath, &sb) == -1)
+		if (errno == ENOENT) // Create the dir if it does not exist
+			if (mkdir(savePath, 0755) != 0)
+				warning("mkdir for '%s' failed!", savePath);
+
+	_savefile = new DefaultSaveFileManager(savePath);
+
+	#ifdef DUMP_STDOUT
+		// The GP2X Wiz has a serial console on the breakout board but most users do not use this so we
+		// output all our STDOUT and STDERR to files for debug purposes.
+		char STDOUT_FILE[PATH_MAX+1];
+		char STDERR_FILE[PATH_MAX+1];
+
+		strcpy(STDOUT_FILE, workDirName);
+		strcpy(STDERR_FILE, workDirName);
+		strcat(STDOUT_FILE, "/scummvm.stdout.txt");
+		strcat(STDERR_FILE, "/scummvm.stderr.txt");
+
+		// Flush the output in case anything is queued
+		fclose(stdout);
+		fclose(stderr);
+
+		// Redirect standard input and standard output
+		FILE *newfp = freopen(STDOUT_FILE, "w", stdout);
+		if (newfp == NULL) {
+		#if !defined(stdout)
+			stdout = fopen(STDOUT_FILE, "w");
+		#else
+			newfp = fopen(STDOUT_FILE, "w");
+			if (newfp) {
+				*stdout = *newfp;
+			}
+		#endif
+		}
+
+		newfp = freopen(STDERR_FILE, "w", stderr);
+		if (newfp == NULL) {
+		#if !defined(stderr)
+			stderr = fopen(STDERR_FILE, "w");
+		#else
+			newfp = fopen(STDERR_FILE, "w");
+			if (newfp) {
+				*stderr = *newfp;
+			}
+		#endif
+		}
+
+		setbuf(stderr, NULL);
+		printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
+	#endif /* DUMP_STDOUT */
+
+	/* Initialise any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */
+	WIZ_HW::deviceInit();
+
+	/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
+	WIZ_HW::mixerMoveVolume(0);
+
+	/* Up default volume values as we use a seperate system level volume anyway. */
+	ConfMan.registerDefault("music_volume", 220);
+	ConfMan.registerDefault("sfx_volume", 220);
+	ConfMan.registerDefault("speech_volume", 220);
+
+	/* Trigger autosave every 4 minutes - On low batts 5 mins is about your warning time. */
+	ConfMan.registerDefault("autosave_period", 4 * 60);
+
+	/* Make sure that aspect ratio correction is enabled on the 1st run to stop users asking me what the 'wasted space' is ;-). */
+	ConfMan.registerDefault("aspect_ratio", true);
+
+	/* Make sure SDL knows that we have a joystick we want to use. */
+	ConfMan.setInt("joystick_num", 0);
+
+	printf("%s\n", "Passing to OSystem::SDL initBackend.");
+
+	/* Pass to SDL backend to do the heavy lifting */
+	OSystem_SDL::initBackend();
+}
+
+void OSystem_GP2XWIZ::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
+
+	/* Setup default extra data paths for engine data files and plugins */
+	char workDirName[PATH_MAX+1];
+
+	if (getcwd(workDirName, PATH_MAX) == NULL) {
+		error("Error: Could not obtain current working directory.");
+	}
+
+	Common::FSNode workdirNode(workDirName);
+	if (workdirNode.exists() && workdirNode.isDirectory()) {
+		s.add("__GP2XWIZ_WORKDIR__", new Common::FSDirectory(workDirName), priority);
+	}
+
+	char enginedataPath[PATH_MAX+1];
+
+	strcpy(enginedataPath, workDirName);
+	strcat(enginedataPath, "/engine-data");
+
+	Common::FSNode engineNode(enginedataPath);
+	if (engineNode.exists() && engineNode.isDirectory()) {
+		s.add("__GP2XWIZ_ENGDATA__", new Common::FSDirectory(enginedataPath), priority);
+	}
+
+	char pluginsPath[PATH_MAX+1];
+
+	strcpy(pluginsPath, workDirName);
+	strcat(pluginsPath, "/plugins");
+
+	Common::FSNode pluginsNode(pluginsPath);
+	if (pluginsNode.exists() && pluginsNode.isDirectory()) {
+		s.add("__GP2XWIZ_PLUGINS__", new Common::FSDirectory(pluginsPath), priority);
+	}
+}
+
+void OSystem_GP2XWIZ::quit() {
+
+	WIZ_HW::deviceDeinit();
+
+	#ifdef DUMP_STDOUT
+		printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
+		fclose(stdout);
+		fclose(stderr);
+	#endif /* DUMP_STDOUT */
+
+	OSystem_SDL::quit();
+}

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-sdl.h	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,62 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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; either version 2
- * of the License, or (at your option) any later version.
-
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef GP2XWIZ_SDL_H
-#define GP2XWIZ_SDL_H
-
-#include "backends/platform/sdl/sdl.h"
-
-#include <SDL.h>
-
-#define __GP2XWIZ__
-#define MIXER_DOUBLE_BUFFERING 1
-
-#ifndef PATH_MAX
-	#define PATH_MAX 255
-#endif
-
-class OSystem_GP2XWIZ : public OSystem_SDL {
-public:
-	OSystem_GP2XWIZ() {}
-
-	/* Graphics */
-	bool loadGFXMode();
-
-	/* Event Stuff */
-	bool pollEvent(Common::Event &event);
-	void moveStick();
-	void fillMouseEvent(Common::Event&, int, int);
-	bool remapKey(SDL_Event&, Common::Event&);
-
-	/* Platform Setup Stuff */
-	void addSysArchivesToSearchSet(Common::SearchSet &s, int priority);
-	void initBackend();
-	void quit();
-
-protected:
-	bool _stickBtn[32];
-};
-
-#endif

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-sdl.h)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/gp2xwiz-sdl.h	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,62 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef GP2XWIZ_SDL_H
+#define GP2XWIZ_SDL_H
+
+#include "backends/platform/sdl/sdl.h"
+
+#include <SDL.h>
+
+#define __GP2XWIZ__
+#define MIXER_DOUBLE_BUFFERING 1
+
+#ifndef PATH_MAX
+	#define PATH_MAX 255
+#endif
+
+class OSystem_GP2XWIZ : public OSystem_SDL {
+public:
+	OSystem_GP2XWIZ() {}
+
+	/* Graphics */
+	bool loadGFXMode();
+
+	/* Event Stuff */
+	bool pollEvent(Common::Event &event);
+	void moveStick();
+	void fillMouseEvent(Common::Event&, int, int);
+	bool remapKey(SDL_Event&, Common::Event&);
+
+	/* Platform Setup Stuff */
+	void addSysArchivesToSearchSet(Common::SearchSet &s, int priority);
+	void initBackend();
+	void quit();
+
+protected:
+	bool _stickBtn[32];
+};
+
+#endif

Deleted: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk
===================================================================
--- scummvm/trunk/backends/platform/gp2xwiz/module.mk	2009-06-05 23:08:35 UTC (rev 41202)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk	2009-06-06 00:10:40 UTC (rev 41206)
@@ -1,16 +0,0 @@
-MODULE := backends/platform/gp2xwiz
-
-MODULE_OBJS := \
-	gp2xwiz-graphics.o \
-	gp2xwiz-events.o \
-	gp2xwiz-hw.o \
-	gp2xwiz-main.o \
-
-MODULE_DIRS += \
-	backends/platform/gp2xwiz/ 
-
-# We don't use the rules.mk here on purpose
-OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
-
-# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
--include $(srcdir)/backends/platform/sdl/module.mk
\ No newline at end of file

Copied: scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk (from rev 41202, scummvm/trunk/backends/platform/gp2xwiz/module.mk)
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk	                        (rev 0)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2xwiz/module.mk	2009-06-06 00:10:40 UTC (rev 41206)
@@ -0,0 +1,16 @@
+MODULE := backends/platform/gp2xwiz
+
+MODULE_OBJS := \
+	gp2xwiz-graphics.o \
+	gp2xwiz-events.o \
+	gp2xwiz-hw.o \
+	gp2xwiz-main.o \
+
+MODULE_DIRS += \
+	backends/platform/gp2xwiz/ 
+
+# We don't use the rules.mk here on purpose
+OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
+
+# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
+-include $(srcdir)/backends/platform/sdl/module.mk
\ No newline at end of file

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/main.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/main.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/main.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -37,7 +37,7 @@
 #include "SymbianOs.h"
 #endif
 
-#if !defined(__MAEMO__) && !defined(_WIN32_WCE)
+#if !defined(__MAEMO__) && !defined(_WIN32_WCE) && !defined(GP2XWIZ)
 
 #if defined (WIN32)
 int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/,  LPSTR /*lpCmdLine*/, int /*iShowCmd*/) {

Modified: scummvm/branches/gsoc2009-16bit/common/util.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/common/util.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/common/util.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -271,7 +271,7 @@
 	{"nes", "nes", "nes", "NES", kPlatformNES},
 	{"segacd", "segacd", "sega", "SegaCD", kPlatformSegaCD},
 	{"windows", "win", "win", "Windows", kPlatformWindows},
-	{"playstation", "psx", "PSX", "Playstation", kPlatformPSX},
+	{"playstation", "psx", "psx", "Sony PlayStation", kPlatformPSX},
 
 
 	{0, 0, 0, "Default", kPlatformUnknown}

Modified: scummvm/branches/gsoc2009-16bit/configure
===================================================================
--- scummvm/branches/gsoc2009-16bit/configure	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/configure	2009-06-06 00:10:40 UTC (rev 41206)
@@ -272,9 +272,12 @@
 	arm-riscos)
 		_exeext=",ff8"
 		;;
+	gp2xwiz-linux)
+		_exeext=".wiz"
+		;;	
 	gp2x-linux)
 		_exeext=".gp2x"
-		;;
+		;;	
 	dreamcast | wii | gamecube | psp)
 		_exeext=".elf"
 		;;
@@ -549,7 +552,7 @@
 
 Configuration:
   -h, --help             display this help and exit
-  --backend=BACKEND      backend to build (sdl, morphos, dc, gp2x, iphone, wii, psp, null) [sdl]
+  --backend=BACKEND      backend to build (sdl, morphos, dc, gp2x, gp2xwiz, iphone, wii, psp, null) [sdl]
 
 Installation directories:
   --prefix=DIR           use this prefix for installing ScummVM [/usr/local]
@@ -785,6 +788,11 @@
 	_host_os=amigaos
 	_host_cpu=ppc
 	;;
+gp2xwiz)
+	_host_os=gp2xwiz-linux
+	_host_cpu=arm
+	_host_alias=arm-open2x-linux
+	;;	
 gp2x)
 	_host_os=gp2x-linux
 	_host_cpu=arm
@@ -1180,6 +1188,24 @@
 			_ranlib=$_host-ranlib
 			_strip=$_host-strip
 			;;
+		gp2xwiz)
+			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+			DEFINES="$DEFINES -DUNIX -DGP2XWIZ -DNDEBUG -DUSE_ARM_SMUSH_ASM"
+			CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
+			LDFLAGS="$LDFLAGS"
+			_endian=little
+			_need_memalign=yes
+			type_1_byte='char'
+			type_2_byte='short'
+			type_4_byte='int'
+			_ar="$_host_alias-ar cru"
+			_ranlib=$_host_alias-ranlib
+			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
+			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
+			_backend="gp2xwiz"
+			_build_hq_scalers="no"
+			_mt32emu="no"
+			;;	
 		gp2x)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DGP2X -DNDEBUG -DUSE_ARM_SMUSH_ASM"
@@ -1479,6 +1505,24 @@
 POST_OBJS_FLAGS		:= -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a
 '
 		;;
+	gp2xwiz*)
+_def_plugin='
+#define PLUGIN_PREFIX	""
+#define PLUGIN_SUFFIX	".plugin"
+'
+_mak_plugins='
+DYNAMIC_MODULES := 1
+PLUGIN_PREFIX := 
+PLUGIN_SUFFIX := .plugin
+PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
+CXXFLAGS        += -DDYNAMIC_MODULES
+CXXFLAGS        += -fpic
+PLUGIN_LDFLAGS  += -shared
+PRE_OBJS_FLAGS  := -Wl,-export-dynamic -Wl,-whole-archive
+POST_OBJS_FLAGS := -Wl,-no-whole-archive
+LIBS            += -ldl
+'
+		;;	
 	dreamcast)
 _def_plugin='
 #define PLUGIN_PREFIX	""
@@ -1873,6 +1917,13 @@
 		LDFLAGS="$LDFLAGS -static"
 		CXXFLAGS="$CXXFLAGS -march=armv4t"
 		;;
+	gp2xwiz)
+		find_sdlconfig
+		INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`"
+		LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
+		LDFLAGS="$LDFLAGS"
+		CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
+		;;		
 	iphone)
 		OBJCFLAGS="$OBJCFLAGS --std=c99"
 		LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio"

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc7/sci.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc7/sci.vcproj	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc7/sci.vcproj	2009-06-06 00:10:40 UTC (rev 41206)
@@ -169,6 +169,12 @@
 				RelativePath="..\..\engines\sci\engine\kstring.cpp">
 			</File>
 			<File
+				RelativePath="..\..\engines\sci\engine\memobj.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\sci\engine\memobj.h">
+			</File>
+			<File
 				RelativePath="..\..\engines\sci\engine\message.cpp">
 			</File>
 			<File
@@ -395,6 +401,9 @@
 			RelativePath="..\..\engines\sci\console.h">
 		</File>
 		<File
+			RelativePath="..\..\engines\sci\debug.h">
+		</File>
+		<File
 			RelativePath="..\..\engines\sci\decompressor.cpp">
 		</File>
 		<File

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc71/sci.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc71/sci.vcproj	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc71/sci.vcproj	2009-06-06 00:10:40 UTC (rev 41206)
@@ -183,6 +183,12 @@
 				RelativePath="..\..\engines\sci\engine\kstring.cpp">
 			</File>
 			<File
+				RelativePath="..\..\engines\sci\engine\memobj.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\sci\engine\memobj.h">
+			</File>
+			<File
 				RelativePath="..\..\engines\sci\engine\message.cpp">
 			</File>
 			<File
@@ -409,6 +415,9 @@
 			RelativePath="..\..\engines\sci\console.h">
 		</File>
 		<File
+			RelativePath="..\..\engines\sci\debug.h">
+		</File>
+		<File
 			RelativePath="..\..\engines\sci\decompressor.cpp">
 		</File>
 		<File

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/sci.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/sci.vcproj	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/sci.vcproj	2009-06-06 00:10:40 UTC (rev 41206)
@@ -254,6 +254,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\engines\sci\engine\memobj.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\engines\sci\engine\memobj.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\engines\sci\engine\message.cpp"
 				>
 			</File>
@@ -555,6 +563,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\engines\sci\debug.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\engines\sci\decompressor.cpp"
 			>
 		</File>

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc9/sci.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc9/sci.vcproj	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc9/sci.vcproj	2009-06-06 00:10:40 UTC (rev 41206)
@@ -255,6 +255,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\engines\sci\engine\memobj.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\engines\sci\engine\memobj.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\engines\sci\engine\message.cpp"
 				>
 			</File>
@@ -556,6 +564,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\engines\sci\debug.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\engines\sci\decompressor.cpp"
 			>
 		</File>

Modified: scummvm/branches/gsoc2009-16bit/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/cruise/cruise_main.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/engines/cruise/cruise_main.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -40,6 +40,8 @@
 
 gfxEntryStruct* linkedMsgList = NULL;
 
+extern bool isBlack;
+
 void drawBlackSolidBoxSmall() {
 //  gfxModuleData.drawSolidBox(64,100,256,117,0);
 	drawSolidBox(64, 100, 256, 117, 0);
@@ -1712,6 +1714,8 @@
 	//int32 t_start,t_left;
 	//uint32 t_end;
 	//int32 q=0;                     /* Dummy */
+	int16 mouseX, mouseY;
+	int16 mouseButton;
 
 	int enableUser = 0;
 
@@ -1793,13 +1797,15 @@
 			enableUser = 0;
 		}
 
-		manageScripts(&relHead);
-		manageScripts(&procHead);
+		if (userWait < 1) {
+			manageScripts(&relHead);
+			manageScripts(&procHead);
 
-		removeFinishedScripts(&relHead);
-		removeFinishedScripts(&procHead);
+			removeFinishedScripts(&relHead);
+			removeFinishedScripts(&procHead);
 
-		processAnimation();
+			processAnimation();
+		}
 
 		if (remdo) {
 			// ASSERT(0);
@@ -1824,17 +1830,13 @@
 				PCFadeFlag = 0;
 
 			/*if (!PCFadeFlag)*/
-			if (userWait != 2) {
+			if (!isUserWait) {
 				mainDraw(0);
 				flipScreen();
 			}
 
 			if (userEnabled && !userWait && !autoTrack) {
 				if (currentActiveMenu == -1) {
-					int16 mouseX;
-					int16 mouseY;
-					int16 mouseButton;
-
 					static int16 oldMouseX = -1;
 					static int16 oldMouseY = -1;
 
@@ -1869,9 +1871,14 @@
 				// User Wait handling
 				if (userWait == 1) {
 					// Initial step
+					do {
+						// Make sure any previous mouse press is released
+						getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
+					} while (mouseButton != 0);
+
 					++userWait;
-					mainDraw(0);
-					flipScreen();
+//					mainDraw(0);
+//					flipScreen();
 				} else {
 					// Standard handling
 
@@ -1881,9 +1888,16 @@
 					removeFinishedScripts(&relHead);
 					removeFinishedScripts(&procHead);
 
-					// Draw the next screen
-					processAnimation();
-					gfxModuleData_flipScreen();
+					if (isBlack) {
+						// This is a bit of a hack to ensure that user waits directly after a palette fade
+						// have time to restore the palette before waiting starts
+						mainDraw(0);
+						flipScreen();
+					} else {
+						// Draw the next screen
+						processAnimation();
+						gfxModuleData_flipScreen();
+					}
 				}
 				continue;
 			}

Modified: scummvm/branches/gsoc2009-16bit/engines/cruise/gfxModule.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/cruise/gfxModule.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/engines/cruise/gfxModule.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -40,6 +40,7 @@
 
 int palDirtyMin = 256;
 int palDirtyMax = -1;
+bool isBlack = false;
 
 gfxModuleDataStruct gfxModuleData = {
 	0,			// use Tandy
@@ -237,6 +238,12 @@
 		g_system->setPalette(paletteRGBA + palDirtyMin*4, palDirtyMin, palDirtyMax - palDirtyMin + 1);
 		palDirtyMin = 256;
 		palDirtyMax = -1;
+
+		isBlack = true;
+		for (i = 0; i < 256; ++i) {
+			isBlack = (lpalette[i].R == 0) && (lpalette[i].G == 0) && (lpalette[i].B == 0);
+			if (!isBlack) break;
+		}
 	}
 
 	g_system->copyRectToScreen(globalScreen, 320, 0, 0, 320, 200);

Modified: scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -649,7 +649,7 @@
 	int16 spriteLeft = _spriteLeft;
 	int16 spriteTop = _spriteTop;
 	int16 spriteRight = _spriteRight;
-	int16 spriteBottom = _spriteLeft;
+	int16 spriteBottom = _spriteBottom;
 	int16 destSpriteX = _destSpriteX;
 	int16 destSpriteY = _destSpriteY;
 	int16 destSurface = _destSurface;
@@ -913,7 +913,7 @@
 	_spriteLeft = spriteLeft;
 	_spriteTop = spriteTop;
 	_spriteRight = spriteRight;
-	_spriteLeft = spriteBottom;
+	_spriteBottom = spriteBottom;
 	_destSpriteX = destSpriteX;
 	_destSpriteY = destSpriteY;
 	_destSurface = destSurface;

Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp	2009-06-06 00:07:18 UTC (rev 41205)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp	2009-06-06 00:10:40 UTC (rev 41206)
@@ -536,7 +536,7 @@
 	_spellProcs.push_back(new SpellProc(this, &LoLEngine::castSwarm));
 	_spellProcs.push_back(new SpellProc(this, 0));
 	_spellProcs.push_back(new SpellProc(this, 0));
-	_spellProcs.push_back(new SpellProc(this, &LoLEngine::castUnk));
+	_spellProcs.push_back(new SpellProc(this, &LoLEngine::castVaelansCube));

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list