[mupen64plus-ui-console] 167/172: Imported Upstream version 2.5

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:07:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-ui-console.

commit 616a696b975fa30f9db28ce9bdd11c8b5774ebcf
Author: Sven Eckelmann <sven at narfation.org>
Date:   Tue Apr 28 22:25:58 2015 +0200

    Imported Upstream version 2.5
---
 .gitignore                                         |   2 +-
 LICENSES                                           |   4 +
 README                                             |   2 +-
 RELEASE                                            |   7 +
 data/mupen64plus.desktop                           |   2 +
 doc/mupen64plus.6                                  |  67 +++---
 .../mupen64plus-ui-console.sln                     |  33 ++-
 .../mupen64plus-ui-console.vcxproj                 |  14 +-
 projects/msvc8/mupen64plus-ui-console.sln          |  56 -----
 projects/msvc8/mupen64plus-ui-console.vcproj       | 261 ---------------------
 projects/unix/Makefile                             |  27 +--
 src/cheat.c                                        |   7 +-
 src/compare_core.c                                 |   4 +-
 src/core_interface.c                               |  12 +-
 src/core_interface.h                               |   4 +-
 src/main.c                                         | 119 ++++++----
 src/osal_dynamiclib_unix.c                         |   6 +-
 src/osal_dynamiclib_win32.c                        |   6 +-
 src/osal_files_unix.c                              |   9 +-
 src/osal_files_win32.c                             |   6 +-
 src/osal_preproc.h                                 |   4 +
 src/plugin.c                                       |   9 +-
 src/plugin.h                                       |   2 +
 src/version.h                                      |   2 +-
 24 files changed, 203 insertions(+), 462 deletions(-)

diff --git a/.gitignore b/.gitignore
index 25edcb4..0708857 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
 /projects/unix/_obj*/
-/projects/unix/mupen64plus-ui-console*.so
+/projects/unix/mupen64plus
diff --git a/LICENSES b/LICENSES
index 346a181..0f11b7b 100644
--- a/LICENSES
+++ b/LICENSES
@@ -5,6 +5,10 @@ Mupen64Plus-ui-console is licensed under the GNU General Public License version
 
 The authors of Mupen64Plus-ui-console are:
   * Richard Goedeken (Richard42)
+  * Anthony Bentley (bentley)
+  * Dorian Fevrier (Narann)
+  * littleguy77
+  * and others.
 
 Mupen64Plus is based on GPL-licensed source code from Mupen64 v0.5, originally written by:
   * Hacktarux
diff --git a/README b/README
index 5c0caca..e7fff35 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ===============================================================================
 -------------------------------------------------------------------------------
-Mupen64plus-ui-console README                                              v2.0
+Mupen64plus-ui-console README                                              v2.5
 -------------------------------------------------------------------------------
 ===============================================================================
 
diff --git a/RELEASE b/RELEASE
index e2b6666..2665487 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,13 @@
 Mupen64Plus-UI-Console RELEASE
 ------------------------------
 
+Mupen64Plus-UI-Console Front-End v2.5 - April 26, 2015
+------------------------------------------------------
+ - Update man page document
+ - Add application desktop file and icons
+ - Add support for loading savestate immediately on emulator startup
+ - Compile-time flag to support building ui-console as a library (used by Android frontend)
+
 Mupen64Plus-UI-Console Front-End v2.0 - July 4, 2013
 ----------------------------------------------------
  - Project files for Visual Studio 2012
diff --git a/data/mupen64plus.desktop b/data/mupen64plus.desktop
index d7af539..4df3c3a 100644
--- a/data/mupen64plus.desktop
+++ b/data/mupen64plus.desktop
@@ -8,3 +8,5 @@ Exec=mupen64plus %f
 Icon=mupen64plus
 MimeType=application/x-n64-rom;
 Categories=Game;Emulator;
+Keywords=Emulator;Nintendo64;Mupen64plus;
+NoDisplay=true
diff --git a/doc/mupen64plus.6 b/doc/mupen64plus.6
index 3df021c..564b4b4 100644
--- a/doc/mupen64plus.6
+++ b/doc/mupen64plus.6
@@ -28,67 +28,67 @@ Glide64Mk2, included with the distribution
 (must be used with the rsp-z64 plugin)
 .El
 .Pp
-The most current documentation can be found at the project's
+The most current documentation can be found at the project\(cqs
 .Lk https://code.google.com/p/mupen64plus/ homepage .
 .Pp
 The options are as follows:
 .Bl -tag -width x
-.It Fl h , Fl -help
+.It Fl h , Fl Fl help
 Print help message.
-.It Fl -noosd
+.It Fl Fl noosd
 Disable onscreen display.
-.It Fl -osd
+.It Fl Fl osd
 Enable onscreen display.
-.It Fl -fullscreen
+.It Fl Fl fullscreen
 Run emulator in fullscreen display mode.
-.It Fl -windowed
+.It Fl Fl windowed
 Run emulator in windowed display mode.
-.It Fl -resolution Ar res
+.It Fl Fl resolution Ar res
 Display resolution (640\(mu480, 800\(mu600, 1024\(mu768, etc)
-.It Fl -nospeedlimit
+.It Fl Fl nospeedlimit
 Disable core speed limiter.
 This should be used with the dummy audio plugin.
-.It Fl -cheats Ar cheat-spec
+.It Fl Fl cheats Ar cheat\(hyspec
 Enable or list cheat codes for the given rom file.
-.It Fl -corelib Ar filepath
+.It Fl Fl corelib Ar filepath
 Specifies a filename (optionally with a preceding directory path) to load a specific
 .Nm
 core library.
-.It Fl -configdir Ar directory
+.It Fl Fl configdir Ar directory
 Specifies a directory to look for the
 .Pa mupen64plus.cfg
 file.
 Default is
 .Pa ~/.config/mupen64plus/ .
-.It Fl -datadir Ar directory
+.It Fl Fl datadir Ar directory
 Specifies a directory to search for shared data files (fonts, cheat codes, .ini files).
 Default is
 .Pa ${PREFIX}/share/mupen64plus/ .
-.It Fl -plugindir Ar directory
+.It Fl Fl plugindir Ar directory
 Specifies a directory to search for plugin files.
 Default is
 .Pa ${PREFIX}/lib/mupen64plus/ .
-.It Fl -sshotdir Ar directory
+.It Fl Fl sshotdir Ar directory
 Specifies a directory to save screenshots captured during gameplay.
 Default is
 .Pa ~/.local/share/mupen64plus/screenshot/ .
-.It Fl -gfx Ar plugin\(hyspec
+.It Fl Fl gfx Ar plugin\(hyspec
 Specifies a
 .Ar plugin\(hyspec
 to select a graphics plugin for use during emulation.
-.It Fl -audio Ar plugin\(hyspec
+.It Fl Fl audio Ar plugin\(hyspec
 Specifies a
 .Ar plugin\(hyspec
 to select an audio plugin for use during emulation.
-.It Fl -input Ar plugin\(hyspec
+.It Fl Fl input Ar plugin\(hyspec
 Specifies a
 .Ar plugin\(hyspec
 to select an input plugin for use during emulation.
-.It Fl -rsp Ar plugin\(hyspec
+.It Fl Fl rsp Ar plugin\(hyspec
 Specifies a
 .Ar plugin\(hyspec
 to select an RSP plugin for use during emulation.
-.It Fl -emumode Ar mode
+.It Fl Fl emumode Ar mode
 Specifies which mode the emulator core should run in.
 .Ar mode
 should be set to one of the following numbers:
@@ -100,17 +100,17 @@ Cached Interpreter
 .It 2
 Dynamic Recompiler (DynaRec)
 .El
-.It Fl -testshots Ar list
+.It Fl Fl testshots Ar list
 Take screenshots at frames given in the comma\(hyseparated
 .Ar list ,
 then quit.
-.It Fl -core-compare-send
+.It Fl Fl core-compare-send
 Use the core comparison debugging feature, in data sending mode.
 If the core was not compiled with support for the Core Comparison feature, then the emulator will exit with an error.
-.It Fl -core-compare-recv
+.It Fl Fl core-compare-recv
 Use the core comparison debugging feature, in data receiving mode.
 If the core was not compiled with support for the Core Comparison feature, then the emulator will exit with an error.
-.It Fl -set Ar param\(hyspec
+.It Fl Fl set Ar param\(hyspec
 Set the value of a
 .Nm
 configuration parameter.
@@ -119,11 +119,11 @@ The format of
 .Ar param\(hyspec
 is
 .Dl Section\(hyName[Param\(hyName]=Value
-.It Fl -nosaveoptions
+.It Fl Fl nosaveoptions
 Do not save the given command\(hyline options into the
 .Nm
 configuration file to use as defaults in the future.
-.It Fl -verbose
+.It Fl Fl verbose
 Print lots of information.
 Useful for debugging but unnecessary for normal use.
 .El
@@ -151,7 +151,7 @@ The following shortcut keys can be used during emulation.
 These are the default key values; nearly all of them may be set to different keys by editing the
 .Nm
 configuration file.
-.Bl -tag -width Alt-Enter
+.Bl -tag -width Alt\(hyEnter
 .It Escape
 Quit the emulator.
 .It 0\(en9
@@ -198,10 +198,21 @@ The default location of the saved screenshots is
 The default location of the save states is
 .Pa ~/.local/share/mupen64plus/save/ .
 .Sh AUTHORS
+.An -nosplit
 .Nm
-was originally started by Richard42 and nmn, and is based on Mupen64 (originally written by Hacktarux).
+was originally started by
+.An Richard42
+and
+.An nmn ,
+and is based on Mupen64 (originally written by
+.An Hacktarux ) .
 .Pp
-This man page was written by ebenblues, and updated by Richard42 and bentley.
+This man page was written by
+.An ebenblues ,
+and updated by
+.An Richard42
+and
+.An Anthony J. Bentley .
 .Sh COPYRIGHT
 Mupen64plus is \(co 2008\(en2013 The Mupen64plus Team
 .Pp
diff --git a/projects/msvc11/mupen64plus-ui-console.sln b/projects/VisualStudio2013/mupen64plus-ui-console.sln
similarity index 57%
rename from projects/msvc11/mupen64plus-ui-console.sln
rename to projects/VisualStudio2013/mupen64plus-ui-console.sln
index b61e7db..523a3e3 100644
--- a/projects/msvc11/mupen64plus-ui-console.sln
+++ b/projects/VisualStudio2013/mupen64plus-ui-console.sln
@@ -1,51 +1,68 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-ui-console", "mupen64plus-ui-console.vcxproj", "{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-core", "..\..\..\mupen64plus-core\projects\msvc11\mupen64plus-core.vcxproj", "{92D3FEB9-2129-41C5-8577-BCD7D961EF41}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-core", "..\..\..\mupen64plus-core\projects\VisualStudio2013\mupen64plus-core.vcxproj", "{92D3FEB9-2129-41C5-8577-BCD7D961EF41}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-input-sdl", "..\..\..\mupen64plus-input-sdl\projects\msvc11\mupen64plus-input-sdl.vcxproj", "{7F3178D0-0E2E-471B-9160-69F0354F9DE9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-input-sdl", "..\..\..\mupen64plus-input-sdl\projects\VisualStudio2013\mupen64plus-input-sdl.vcxproj", "{7F3178D0-0E2E-471B-9160-69F0354F9DE9}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-rsp-hle", "..\..\..\mupen64plus-rsp-hle\projects\msvc11\mupen64plus-rsp-hle.vcxproj", "{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-rsp-hle", "..\..\..\mupen64plus-rsp-hle\projects\VisualStudio2013\mupen64plus-rsp-hle.vcxproj", "{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-rice", "..\..\..\mupen64plus-video-rice\projects\msvc11\mupen64plus-video-rice.vcxproj", "{7D4AFF6A-B7D9-4C25-975A-038B8079098E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-rice", "..\..\..\mupen64plus-video-rice\projects\VisualStudio2013\mupen64plus-video-rice.vcxproj", "{7D4AFF6A-B7D9-4C25-975A-038B8079098E}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-audio-sdl", "..\..\..\mupen64plus-audio-sdl\projects\msvc11\mupen64plus-audio-sdl.vcxproj", "{96969748-EA54-43FC-8103-A346E9AD98E7}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-audio-sdl", "..\..\..\mupen64plus-audio-sdl\projects\VisualStudio2013\mupen64plus-audio-sdl.vcxproj", "{96969748-EA54-43FC-8103-A346E9AD98E7}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64mk2", "..\..\..\mupen64plus-video-glide64mk2\projects\msvc11\mupen64plus-video-glide64mk2.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64mk2", "..\..\..\mupen64plus-video-glide64mk2\projects\VisualStudio2013\mupen64plus-video-glide64mk2.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
+		Release (New Dynarec)|Win32 = Release (New Dynarec)|Win32
 		Release|Win32 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Debug|Win32.ActiveCfg = Debug|Win32
 		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Debug|Win32.Build.0 = Debug|Win32
+		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release|Win32.ActiveCfg = Release|Win32
 		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release|Win32.Build.0 = Release|Win32
 		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|Win32.ActiveCfg = Debug|Win32
 		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|Win32.Build.0 = Debug|Win32
+		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release (New Dynarec)|Win32.ActiveCfg = New_Dynarec_Release|Win32
+		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release (New Dynarec)|Win32.Build.0 = New_Dynarec_Release|Win32
 		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|Win32.ActiveCfg = Release|Win32
 		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|Win32.Build.0 = Release|Win32
 		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Debug|Win32.ActiveCfg = Debug|Win32
 		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Debug|Win32.Build.0 = Debug|Win32
+		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release|Win32.ActiveCfg = Release|Win32
 		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release|Win32.Build.0 = Release|Win32
 		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|Win32.ActiveCfg = Debug|Win32
 		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|Win32.Build.0 = Debug|Win32
+		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|Win32.ActiveCfg = Release|Win32
 		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|Win32.Build.0 = Release|Win32
 		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|Win32.ActiveCfg = Debug|Win32
 		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|Win32.Build.0 = Debug|Win32
+		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|Win32.ActiveCfg = Release|Win32
 		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|Win32.Build.0 = Release|Win32
 		{96969748-EA54-43FC-8103-A346E9AD98E7}.Debug|Win32.ActiveCfg = Debug|Win32
 		{96969748-EA54-43FC-8103-A346E9AD98E7}.Debug|Win32.Build.0 = Debug|Win32
+		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release|Win32.ActiveCfg = Release|Win32
 		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release|Win32.Build.0 = Release|Win32
 		{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|Win32
 		{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|Win32
+		{A4D13408-A794-4199-8FC7-4A9A32505005}.Release (New Dynarec)|Win32.ActiveCfg = Release|Win32
+		{A4D13408-A794-4199-8FC7-4A9A32505005}.Release (New Dynarec)|Win32.Build.0 = Release|Win32
 		{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.ActiveCfg = Release|Win32
 		{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
diff --git a/projects/msvc11/mupen64plus-ui-console.vcxproj b/projects/VisualStudio2013/mupen64plus-ui-console.vcxproj
similarity index 91%
rename from projects/msvc11/mupen64plus-ui-console.vcxproj
rename to projects/VisualStudio2013/mupen64plus-ui-console.vcxproj
index c20ba03..a76eca7 100644
--- a/projects/msvc11/mupen64plus-ui-console.vcxproj
+++ b/projects/VisualStudio2013/mupen64plus-ui-console.vcxproj
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
@@ -20,12 +20,12 @@
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -55,7 +55,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -67,7 +67,7 @@
       <CompileAs>CompileAsCpp</CompileAs>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
       <TargetMachine>MachineX86</TargetMachine>
@@ -87,7 +87,7 @@ copy ..\..\..\mupen64plus-win32-deps\zlib-1.2.3\bin\*.dll "$(OutDir)"
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
@@ -97,7 +97,7 @@ copy ..\..\..\mupen64plus-win32-deps\zlib-1.2.3\bin\*.dll "$(OutDir)"
       <CompileAs>CompileAsCpp</CompileAs>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
diff --git a/projects/msvc8/mupen64plus-ui-console.sln b/projects/msvc8/mupen64plus-ui-console.sln
deleted file mode 100644
index f442c9c..0000000
--- a/projects/msvc8/mupen64plus-ui-console.sln
+++ /dev/null
@@ -1,56 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-ui-console", "mupen64plus-ui-console.vcproj", "{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{96969748-EA54-43FC-8103-A346E9AD98E7} = {96969748-EA54-43FC-8103-A346E9AD98E7}
-		{7D4AFF6A-B7D9-4C25-975A-038B8079098E} = {7D4AFF6A-B7D9-4C25-975A-038B8079098E}
-		{92D3FEB9-2129-41C5-8577-BCD7D961EF41} = {92D3FEB9-2129-41C5-8577-BCD7D961EF41}
-		{7F3178D0-0E2E-471B-9160-69F0354F9DE9} = {7F3178D0-0E2E-471B-9160-69F0354F9DE9}
-		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A} = {2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-core", "..\..\..\mupen64plus-core\projects\msvc8\mupen64plus-core.vcproj", "{92D3FEB9-2129-41C5-8577-BCD7D961EF41}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-rice", "..\..\..\mupen64plus-video-rice\projects\msvc8\mupen64plus-video-rice.vcproj", "{7D4AFF6A-B7D9-4C25-975A-038B8079098E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-rsp-hle", "..\..\..\mupen64plus-rsp-hle\projects\msvc8\mupen64plus-rsp-hle.vcproj", "{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-input-sdl", "..\..\..\mupen64plus-input-sdl\projects\msvc8\mupen64plus-input-sdl.vcproj", "{7F3178D0-0E2E-471B-9160-69F0354F9DE9}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-audio-sdl", "..\..\..\mupen64plus-audio-sdl\projects\msvc8\mupen64plus-audio-sdl.vcproj", "{96969748-EA54-43FC-8103-A346E9AD98E7}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Debug|Win32.Build.0 = Debug|Win32
-		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release|Win32.ActiveCfg = Release|Win32
-		{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}.Release|Win32.Build.0 = Release|Win32
-		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|Win32.ActiveCfg = Debug|Win32
-		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|Win32.Build.0 = Debug|Win32
-		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|Win32.ActiveCfg = Release|Win32
-		{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|Win32.Build.0 = Release|Win32
-		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|Win32.Build.0 = Debug|Win32
-		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|Win32.ActiveCfg = Release|Win32
-		{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|Win32.Build.0 = Release|Win32
-		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|Win32.Build.0 = Debug|Win32
-		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|Win32.ActiveCfg = Release|Win32
-		{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|Win32.Build.0 = Release|Win32
-		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Debug|Win32.Build.0 = Debug|Win32
-		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release|Win32.ActiveCfg = Release|Win32
-		{7F3178D0-0E2E-471B-9160-69F0354F9DE9}.Release|Win32.Build.0 = Release|Win32
-		{96969748-EA54-43FC-8103-A346E9AD98E7}.Debug|Win32.ActiveCfg = Debug|Win32
-		{96969748-EA54-43FC-8103-A346E9AD98E7}.Debug|Win32.Build.0 = Debug|Win32
-		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release|Win32.ActiveCfg = Release|Win32
-		{96969748-EA54-43FC-8103-A346E9AD98E7}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/projects/msvc8/mupen64plus-ui-console.vcproj b/projects/msvc8/mupen64plus-ui-console.vcproj
deleted file mode 100644
index 13d894f..0000000
--- a/projects/msvc8/mupen64plus-ui-console.vcproj
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="mupen64plus-ui-console"
-	ProjectGUID="{0E29D9F8-C675-4D21-AF16-AA80EDDB264E}"
-	RootNamespace="mupen64plusuiconsole"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-				CompileAs="2"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				Description="Copying shared data and libraries to build directory..."
-				CommandLine="copy ..\..\..\mupen64plus-core\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-video-rice\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-input-sdl\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\bin\*.dll "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\bin\*.dll "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\*.dll &q [...]
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="2"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDLmain.lib"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				Description="Copying shared data and libraries to build directory..."
-				CommandLine="copy ..\..\..\mupen64plus-core\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-video-rice\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-input-sdl\data\* "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\bin\*.dll "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\bin\*.dll "$(OutDir)"&#x0D;&#x0A;copy ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\*.dll &q [...]
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\src\cheat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\compare_core.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\core_interface.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\main.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\osal_dynamiclib_win32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\osal_files_win32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\plugin.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\src\cheat.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\compare_core.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\core_interface.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\main.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\osal_dynamiclib.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\osal_files.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\osal_preproc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\plugin.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\version.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
old mode 100644
new mode 100755
index 02e9427..a4a05e3
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -52,10 +52,9 @@ ifeq ("$(OS)","NONE")
   $(error OS type "$(UNAME)" not supported.  Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
 endif
 
-# detect system architecture
+# detect system architecture, only if it matters for build flags
 HOST_CPU ?= $(shell uname -m)
-NO_ASM ?= 1
-CPU := NONE
+CPU := OTHER
 ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
   CPU := X86
   ifeq ("$(BITS)", "32")
@@ -68,28 +67,6 @@ ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
   CPU := X86
   ARCH_DETECTED := 32BITS
 endif
-ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
-  CPU := PPC
-  ARCH_DETECTED := 32BITS
-  BIG_ENDIAN := 1
-  $(warning Architecture "$(HOST_CPU)" not officially supported.')
-endif
-ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
-  CPU := PPC
-  ARCH_DETECTED := 64BITS
-  BIG_ENDIAN := 1
-  $(warning Architecture "$(HOST_CPU)" not officially supported.')
-endif
-ifneq ("$(filter arm%,$(HOST_CPU))","")
-  ifeq ("$(filter arm%b,$(HOST_CPU))","")
-    CPU := ARM
-    ARCH_DETECTED := 32BITS
-    $(warning Architecture "$(HOST_CPU)" not officially supported.')
-  endif
-endif
-ifeq ("$(CPU)","NONE")
-  $(error CPU type "$(HOST_CPU)" not supported.  Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
-endif
 
 # base CFLAGS, LDLIBS, and LDFLAGS
 OPTFLAGS ?= -O3 -flto
diff --git a/src/cheat.c b/src/cheat.c
index d491cbf..e0fd15b 100644
--- a/src/cheat.c
+++ b/src/cheat.c
@@ -20,15 +20,14 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
-
-#include "m64p_types.h"
 
-#include "main.h"
 #include "cheat.h"
 #include "core_interface.h"
+#include "m64p_types.h"
+#include "main.h"
 
 /* local definitions */
 #define CHEAT_FILE	"mupencheat.txt"
diff --git a/src/compare_core.c b/src/compare_core.c
index bdc4f87..5cad864 100644
--- a/src/compare_core.c
+++ b/src/compare_core.c
@@ -24,10 +24,10 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include "m64p_types.h"
-#include "main.h"
 #include "compare_core.h"
 #include "core_interface.h"
+#include "m64p_types.h"
+#include "main.h"
 
 /* local variables */
 
diff --git a/src/core_interface.c b/src/core_interface.c
index 09dd817..e189f9d 100644
--- a/src/core_interface.c
+++ b/src/core_interface.c
@@ -25,18 +25,16 @@
 
 #include <stdio.h>
 
-#include "m64p_types.h"
+#include "core_interface.h"
 #include "m64p_common.h"
-#include "m64p_frontend.h"
 #include "m64p_config.h"
 #include "m64p_debugger.h"
-
-#include "osal_preproc.h"
-#include "osal_dynamiclib.h"
-
+#include "m64p_frontend.h"
+#include "m64p_types.h"
 #include "main.h"
+#include "osal_dynamiclib.h"
+#include "osal_preproc.h"
 #include "version.h"
-#include "core_interface.h"
 
 /* global data definitions */
 int g_CoreCapabilities;
diff --git a/src/core_interface.h b/src/core_interface.h
index 295daae..f28a642 100644
--- a/src/core_interface.h
+++ b/src/core_interface.h
@@ -22,11 +22,11 @@
 #if !defined(CORE_INTERFACE_H)
 #define CORE_INTERFACE_H
 
-#include "m64p_types.h"
 #include "m64p_common.h"
-#include "m64p_frontend.h"
 #include "m64p_config.h"
 #include "m64p_debugger.h"
+#include "m64p_frontend.h"
+#include "m64p_types.h"
 
 /* function declarations */
 extern m64p_error AttachCoreLib(const char *CoreLibFilepath);
diff --git a/src/main.c b/src/main.c
index 347853c..6ddf47d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,20 +25,20 @@
  * for Mupen64Plus v2.0. 
  */
  
+#include <stdarg.h>
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
-#include <stdarg.h>
-
-#include <SDL_main.h>
+#include <string.h>
 
+#include "SDL_main.h"
 #include "cheat.h"
+#include "compare_core.h"
+#include "core_interface.h"
+#include "m64p_types.h"
 #include "main.h"
+#include "osal_preproc.h"
 #include "plugin.h"
 #include "version.h"
-#include "core_interface.h"
-#include "compare_core.h"
-#include "osal_preproc.h"
 
 /* Version number for UI-Console config section parameters */
 #define CONFIG_PARAM_VERSION     1.00
@@ -54,6 +54,7 @@ static m64p_handle l_ConfigUI = NULL;
 static const char *l_CoreLibPath = NULL;
 static const char *l_ConfigDirPath = NULL;
 static const char *l_ROMFilepath = NULL;       // filepath of ROM to load & run at startup
+static const char *l_SaveStatePath = NULL;     // save state to load at startup
 
 #if defined(SHAREDIR)
   static const char *l_DataDirPath = SHAREDIR;
@@ -125,6 +126,15 @@ void DebugCallback(void *Context, int level, const char *message)
 
 static void FrameCallback(unsigned int FrameIndex)
 {
+    // load savestate at first frame if needed
+    if (l_SaveStatePath != NULL && FrameIndex == 0)
+    {
+        if ((*CoreDoCommand)(M64CMD_STATE_LOAD, 0, (void *) l_SaveStatePath) != M64ERR_SUCCESS)
+        {
+            DebugMessage(M64MSG_WARNING, "couldn't load state, rom will run normally.");
+        }
+    }
+
     // take a screenshot if we need to
     if (l_TestShotList != NULL)
     {
@@ -143,6 +153,7 @@ static void FrameCallback(unsigned int FrameIndex)
         }
     }
 }
+
 /*********************************************************************************************************
  *  Configuration handling
  */
@@ -242,39 +253,40 @@ static void printUsage(const char *progname)
     printf("Usage: %s [parameters] [romfile]\n"
            "\n"
            "Parameters:\n"
-           "    --noosd               : disable onscreen display\n"
-           "    --osd                 : enable onscreen display\n"
-           "    --fullscreen          : use fullscreen display mode\n"
-           "    --windowed            : use windowed display mode\n"
-           "    --resolution (res)    : display resolution (640x480, 800x600, 1024x768, etc)\n"
-           "    --nospeedlimit        : disable core speed limiter (should be used with dummy audio plugin)\n"
-           "    --cheats (cheat-spec) : enable or list cheat codes for the given rom file\n"
-           "    --corelib (filepath)  : use core library (filepath) (can be only filename or full path)\n"
-           "    --configdir (dir)     : force configation directory to (dir); should contain mupen64plus.cfg\n"
-           "    --datadir (dir)       : search for shared data files (.ini files, languages, etc) in (dir)\n"
-           "    --plugindir (dir)     : search for plugins in (dir)\n"
-           "    --sshotdir (dir)      : set screenshot directory to (dir)\n"
-           "    --gfx (plugin-spec)   : use gfx plugin given by (plugin-spec)\n"
-           "    --audio (plugin-spec) : use audio plugin given by (plugin-spec)\n"
-           "    --input (plugin-spec) : use input plugin given by (plugin-spec)\n"
-           "    --rsp (plugin-spec)   : use rsp plugin given by (plugin-spec)\n"
-           "    --emumode (mode)      : set emu mode to: 0=Pure Interpreter 1=Interpreter 2=DynaRec\n"
-           "    --testshots (list)    : take screenshots at frames given in comma-separated (list), then quit\n"
-           "    --set (param-spec)    : set a configuration variable, format: ParamSection[ParamName]=Value\n"
-           "    --core-compare-send   : use the Core Comparison debugging feature, in data sending mode\n"
-           "    --core-compare-recv   : use the Core Comparison debugging feature, in data receiving mode\n"
-           "    --nosaveoptions       : do not save the given command-line options in configuration file\n"
-           "    --verbose             : print lots of information\n"
-           "    --help                : see this help message\n\n"
+           "    --noosd                : disable onscreen display\n"
+           "    --osd                  : enable onscreen display\n"
+           "    --fullscreen           : use fullscreen display mode\n"
+           "    --windowed             : use windowed display mode\n"
+           "    --resolution (res)     : display resolution (640x480, 800x600, 1024x768, etc)\n"
+           "    --nospeedlimit         : disable core speed limiter (should be used with dummy audio plugin)\n"
+           "    --cheats (cheat-spec)  : enable or list cheat codes for the given rom file\n"
+           "    --corelib (filepath)   : use core library (filepath) (can be only filename or full path)\n"
+           "    --configdir (dir)      : force configation directory to (dir); should contain mupen64plus.cfg\n"
+           "    --datadir (dir)        : search for shared data files (.ini files, languages, etc) in (dir)\n"
+           "    --plugindir (dir)      : search for plugins in (dir)\n"
+           "    --sshotdir (dir)       : set screenshot directory to (dir)\n"
+           "    --gfx (plugin-spec)    : use gfx plugin given by (plugin-spec)\n"
+           "    --audio (plugin-spec)  : use audio plugin given by (plugin-spec)\n"
+           "    --input (plugin-spec)  : use input plugin given by (plugin-spec)\n"
+           "    --rsp (plugin-spec)    : use rsp plugin given by (plugin-spec)\n"
+           "    --emumode (mode)       : set emu mode to: 0=Pure Interpreter 1=Interpreter 2=DynaRec\n"
+           "    --savestate (filepath) : savestate loaded at startup\n"
+           "    --testshots (list)     : take screenshots at frames given in comma-separated (list), then quit\n"
+           "    --set (param-spec)     : set a configuration variable, format: ParamSection[ParamName]=Value\n"
+           "    --core-compare-send    : use the Core Comparison debugging feature, in data sending mode\n"
+           "    --core-compare-recv    : use the Core Comparison debugging feature, in data receiving mode\n"
+           "    --nosaveoptions        : do not save the given command-line options in configuration file\n"
+           "    --verbose              : print lots of information\n"
+           "    --help                 : see this help message\n\n"
            "(plugin-spec):\n"
-           "    (pluginname)          : filename (without path) of plugin to find in plugin directory\n"
-           "    (pluginpath)          : full path and filename of plugin\n"
-           "    'dummy'               : use dummy plugin\n\n"
+           "    (pluginname)           : filename (without path) of plugin to find in plugin directory\n"
+           "    (pluginpath)           : full path and filename of plugin\n"
+           "    'dummy'                : use dummy plugin\n\n"
            "(cheat-spec):\n"
-           "    'list'                : show all of the available cheat codes\n"
-           "    'all'                 : enable all of the available cheat codes\n"
-           "    (codelist)            : a comma-separated list of cheat code numbers to enable,\n"
-           "                            with dashes to use code variables (ex 1-2 to use cheat 1 option 2)\n"
+           "    'list'                 : show all of the available cheat codes\n"
+           "    'all'                  : enable all of the available cheat codes\n"
+           "    (codelist)             : a comma-separated list of cheat code numbers to enable,\n"
+           "                             with dashes to use code variables (ex 1-2 to use cheat 1 option 2)\n"
            "\n", progname);
 
     return;
@@ -547,6 +559,11 @@ static m64p_error ParseCommandLineFinal(int argc, const char **argv)
             }
             (*ConfigSetParameter)(l_ConfigCore, "R4300Emulator", M64TYPE_INT, &emumode);
         }
+        else if (strcmp(argv[i], "--savestate") == 0 && ArgsLeft >= 1)
+        {
+            l_SaveStatePath = argv[i+1];
+            i++;
+        }
         else if (strcmp(argv[i], "--testshots") == 0 && ArgsLeft >= 1)
         {
             l_TestShotList = ParseNumberList(argv[i+1], NULL);
@@ -595,6 +612,24 @@ static m64p_error ParseCommandLineFinal(int argc, const char **argv)
 /*********************************************************************************************************
 * main function
 */
+
+/* Allow state callback in external module to be specified via build flags (header and function name) */
+#ifdef CALLBACK_HEADER
+#define xstr(s) str(s)
+#define str(s) #s
+#include xstr(CALLBACK_HEADER)
+#endif
+
+#ifndef CALLBACK_FUNC
+#define CALLBACK_FUNC NULL
+#endif
+
+#ifndef WIN32
+/* Allow external modules to call the main function as a library method.  This is useful for user
+ * interfaces that simply layer on top of (rather than re-implement) UI-Console (e.g. mupen64plus-ae).
+ */
+__attribute__ ((visibility("default")))
+#endif
 int main(int argc, char *argv[])
 {
     int i;
@@ -616,7 +651,7 @@ int main(int argc, char *argv[])
         return 2;
 
     /* start the Mupen64Plus core library, load the configuration file */
-    m64p_error rval = (*CoreStartup)(CORE_API_VERSION, l_ConfigDirPath, l_DataDirPath, "Core", DebugCallback, NULL, NULL);
+    m64p_error rval = (*CoreStartup)(CORE_API_VERSION, l_ConfigDirPath, l_DataDirPath, "Core", DebugCallback, NULL, CALLBACK_FUNC);
     if (rval != M64ERR_SUCCESS)
     {
         DebugMessage(M64MSG_ERROR, "couldn't start Mupen64Plus core library.");
@@ -734,12 +769,12 @@ int main(int argc, char *argv[])
         }
     }
 
-    /* set up Frame Callback if --testshots is enabled */
-    if (l_TestShotList != NULL)
+    /* set up Frame Callback if --testshots or --savestate is enabled */
+    if (l_TestShotList != NULL || l_SaveStatePath != NULL)
     {
         if ((*CoreDoCommand)(M64CMD_SET_FRAME_CALLBACK, 0, FrameCallback) != M64ERR_SUCCESS)
         {
-            DebugMessage(M64MSG_WARNING, "couldn't set frame callback, so --testshots won't work.");
+            DebugMessage(M64MSG_WARNING, "couldn't set frame callback, --testshots and/or --savestate will not work.");
         }
     }
 
diff --git a/src/osal_dynamiclib_unix.c b/src/osal_dynamiclib_unix.c
index 870db48..7b12be3 100644
--- a/src/osal_dynamiclib_unix.c
+++ b/src/osal_dynamiclib_unix.c
@@ -19,13 +19,13 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
+#include <dlfcn.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
-#include <dlfcn.h>
 
-#include "main.h"
 #include "m64p_types.h"
+#include "main.h"
 #include "osal_dynamiclib.h"
 
 m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
diff --git a/src/osal_dynamiclib_win32.c b/src/osal_dynamiclib_win32.c
index 36d40c8..809664c 100644
--- a/src/osal_dynamiclib_win32.c
+++ b/src/osal_dynamiclib_win32.c
@@ -19,12 +19,12 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-#include <windows.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
 
-#include "main.h"
 #include "m64p_types.h"
+#include "main.h"
 #include "osal_dynamiclib.h"
 
 m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
diff --git a/src/osal_files_unix.c b/src/osal_files_unix.c
index 2199271..eaccaa5 100644
--- a/src/osal_files_unix.c
+++ b/src/osal_files_unix.c
@@ -23,16 +23,17 @@
  *
  */
 
-#include <stdlib.h>
+#include <dirent.h>  // for opendir(), readdir(), closedir()
+#include <limits.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
-#include <dirent.h>  // for opendir(), readdir(), closedir()
 
-#include "main.h"
 #include "m64p_types.h"
-#include "osal_preproc.h"
+#include "main.h"
 #include "osal_files.h"
+#include "osal_preproc.h"
 
 /* definitions for system directories to search when looking for mupen64plus plugins */
 #if defined(PLUGINDIR)
diff --git a/src/osal_files_win32.c b/src/osal_files_win32.c
index 69c12c6..4ba71b9 100644
--- a/src/osal_files_win32.c
+++ b/src/osal_files_win32.c
@@ -23,15 +23,15 @@
  *
  */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <windows.h>
 
-#include "main.h"
 #include "m64p_types.h"
-#include "osal_preproc.h"
+#include "main.h"
 #include "osal_files.h"
+#include "osal_preproc.h"
 
 /* definitions for system directories to search when looking for mupen64plus plugins */
 const int  osal_libsearchdirs = 1;
diff --git a/src/osal_preproc.h b/src/osal_preproc.h
index 6493962..d5c949e 100644
--- a/src/osal_preproc.h
+++ b/src/osal_preproc.h
@@ -29,6 +29,7 @@
 #if defined(WIN32)
 
   #include <windows.h>
+
   #define PATH_MAX 2048
   #define OSAL_DEFAULT_DYNLIB_FILENAME "mupen64plus.dll"
   #define OSAL_DIR_SEPARATOR           '\\'
@@ -39,6 +40,7 @@
 #elif defined(__APPLE__)
 
   #include <limits.h>  // for PATH_MAX
+
   #define OSAL_DEFAULT_DYNLIB_FILENAME "libmupen64plus.dylib"
   #define OSAL_DIR_SEPARATOR           '/'
   #define OSAL_CURRENT_DIR             "./"
@@ -49,10 +51,12 @@
 
   #if defined(ANDROID)
     #include <android/log.h>
+
     #define printf(...) __android_log_print(ANDROID_LOG_VERBOSE, "UI-Console", __VA_ARGS__)
   #endif
 
   #include <limits.h>  // for PATH_MAX
+
   #define OSAL_DEFAULT_DYNLIB_FILENAME "libmupen64plus.so.2"
   #define OSAL_DIR_SEPARATOR           '/'
   #define OSAL_CURRENT_DIR             "./"
diff --git a/src/plugin.c b/src/plugin.c
index a8edb78..9a0e763 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -19,17 +19,18 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-#include "m64p_types.h"
-#include "m64p_common.h"
 #include "core_interface.h"
+#include "m64p_common.h"
+#include "m64p_types.h"
+#include "main.h"  /* for the debug callback function */
 #include "osal_dynamiclib.h"
 #include "osal_files.h"
+#include "osal_preproc.h"
 #include "plugin.h"
-#include "main.h"  /* for the debug callback function */
 #include "version.h"
 
 /* global variables */
diff --git a/src/plugin.h b/src/plugin.h
index 3d9a1f3..b5ef793 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -22,6 +22,8 @@
 #if !defined(PLUGIN_H)
 #define PLUGIN_H
 
+#include <limits.h>
+
 #include "m64p_types.h"
 #include "osal_preproc.h"
 
diff --git a/src/version.h b/src/version.h
index 7344653..6b4efee 100644
--- a/src/version.h
+++ b/src/version.h
@@ -27,7 +27,7 @@
 #define VERSION_H
 
 #define CONSOLE_UI_NAME    "Mupen64Plus Console User-Interface"
-#define CONSOLE_UI_VERSION 0x020000
+#define CONSOLE_UI_VERSION 0x020500
 #define CORE_API_VERSION   0x020001
 #define CONFIG_API_VERSION 0x020000
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-ui-console.git



More information about the Pkg-games-commits mailing list