diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-06-14 10:59:06 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-06-14 10:59:06 +0000 |
| commit | f67660cbfe0cd94a891a7da2801e7f42b03d502f (patch) | |
| tree | cf56fe56a16fdea8443b4f56db2b546ea758e5b6 /Source/Core | |
| parent | 955e446e9196fc21997a0678513589780420b976 (diff) | |
Remove the last use of MappedFile and kill the code. (less code is good!) (we've found that file mapping in the context of Dolphin only causes problems and give no speed gain - Dolphin gobbles address space ferociously on its own without mapping in huge disk images). Add some math util functions.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3441 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Common.vcproj | 1674 | ||||
| -rw-r--r-- | Source/Core/Common/Src/MappedFile.cpp | 233 | ||||
| -rw-r--r-- | Source/Core/Common/Src/MappedFile.h | 49 | ||||
| -rw-r--r-- | Source/Core/Common/Src/MathUtil.h | 73 | ||||
| -rw-r--r-- | Source/Core/Common/Src/SConscript | 1 | ||||
| -rw-r--r-- | Source/Core/Core/Src/Boot/Boot.cpp | 25 |
6 files changed, 908 insertions, 1147 deletions
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index 8a9cbae20d..542fb97b34 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -1,844 +1,834 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="Common"
- ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
- RootNamespace="Common"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0"
- StringPooling="true"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="false"
- FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib winmm.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="2"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableEnhancedInstructionSet="2"
- FloatingPointModel="0"
- RuntimeTypeInfo="false"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableEnhancedInstructionSet="0"
- FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="winmm.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="DebugFast|Win32"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- FavorSizeOrSpeed="1"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="DebugFast|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
-
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- FavorSizeOrSpeed="1"
- AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
- RuntimeLibrary="0"
- FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib"
- OutputFile="$(OutDir)/Common.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Plugins"
- >
- <File
- RelativePath=".\Src\Plugin.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\Plugin.h"
- >
- </File>
- <File
- RelativePath=".\Src\PluginDSP.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\PluginDSP.h"
- >
- </File>
- <File
- RelativePath=".\Src\PluginPAD.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\PluginPAD.h"
- >
- </File>
- <File
- RelativePath=".\Src\PluginVideo.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\PluginVideo.h"
- >
- </File>
- <File
- RelativePath=".\Src\PluginWiimote.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\PluginWiimote.h"
- >
- </File>
- <Filter
- Name="Specs"
- >
- <File
- RelativePath="..\..\PluginSpecs\ExportEpilog.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\ExportProlog.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\PluginSpecs.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\pluginspecs_dsp.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\pluginspecs_pad.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\pluginspecs_video.h"
- >
- </File>
- <File
- RelativePath="..\..\PluginSpecs\pluginspecs_wiimote.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Logging"
- >
- <File
- RelativePath=".\Src\ConsoleListener.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\Log.h"
- >
- </File>
- <File
- RelativePath=".\Src\LogManager.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\LogManager.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\Src\ABI.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\ABI.h"
- >
- </File>
- <File
- RelativePath=".\Src\CDUtils.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\CDUtils.h"
- >
- </File>
- <File
- RelativePath=".\Src\ChunkFile.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\ChunkFile.h"
- >
- </File>
- <File
- RelativePath=".\Src\ColorUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\ColorUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\Common.h"
- >
- </File>
- <File
- RelativePath=".\Src\CommonFuncs.h"
- >
- </File>
- <File
- RelativePath=".\Src\CommonPaths.h"
- >
- </File>
- <File
- RelativePath=".\Src\CommonTypes.h"
- >
- </File>
- <File
- RelativePath=".\Src\CPUDetect.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\CPUDetect.h"
- >
- </File>
- <File
- RelativePath=".\Src\DynamicLibrary.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\DynamicLibrary.h"
- >
- </File>
- <File
- RelativePath=".\Src\ExtendedTrace.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\ExtendedTrace.h"
- >
- </File>
- <File
- RelativePath=".\Src\FileSearch.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\FileSearch.h"
- >
- </File>
- <File
- RelativePath=".\Src\FileUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\FileUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\FixedSizeQueue.h"
- >
- </File>
- <File
- RelativePath=".\Src\Hash.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\Hash.h"
- >
- </File>
- <File
- RelativePath=".\Src\IniFile.cpp"
- >
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Src\IniFile.h"
- >
- </File>
- <File
- RelativePath=".\Src\MappedFile.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MappedFile.h"
- >
- </File>
- <File
- RelativePath=".\Src\MathUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MathUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\MemArena.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MemArena.h"
- >
- </File>
- <File
- RelativePath=".\Src\MemoryUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MemoryUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\Misc.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MsgHandler.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\MsgHandler.h"
- >
- </File>
- <File
- RelativePath=".\Src\SConscript"
- >
- </File>
- <File
- RelativePath=".\Src\SDCardUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\SDCardUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\Setup.h"
- >
- </File>
- <File
- RelativePath=".\Src\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Src\stdafx.h"
- >
- </File>
- <File
- RelativePath=".\Src\StringUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\StringUtil.h"
- >
- </File>
- <File
- RelativePath=".\Src\Thread.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\Thread.h"
- >
- </File>
- <File
- RelativePath=".\Src\Thunk.cpp"
-
- >
- </File>
- <File
- RelativePath=".\Src\Thunk.h"
- >
- </File>
- <File
- RelativePath=".\Src\Timer.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AssemblerOutput="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Src\Timer.h"
- >
- </File>
- <File
- RelativePath=".\Src\x64Analyzer.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\x64Analyzer.h"
- >
- </File>
- <File
- RelativePath=".\Src\x64Emitter.cpp"
- >
- </File>
- <File
- RelativePath=".\Src\x64Emitter.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
\ No newline at end of file + ProjectType="Visual C++"
+ Version="9.00"
+ Name="Common"
+ ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
+ RootNamespace="Common"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="wsock32.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0"
+ StringPooling="true"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="false"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="wsock32.lib winmm.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="2"
+ FloatingPointModel="0"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="wsock32.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="0"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugFast|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="2"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="wsock32.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugFast|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""$(ProjectDir)SubWCRev.exe" "$(SolutionDir)\." "$(ProjectDir)\src\svnrev_template.h" "$(ProjectDir)\src\svnrev.h""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="../../PluginSpecs"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="0"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles="stdafx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalDependencies="wsock32.lib"
+ OutputFile="$(OutDir)/Common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Plugins"
+ >
+ <File
+ RelativePath=".\Src\Plugin.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Plugin.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginDSP.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginDSP.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginPAD.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginPAD.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginVideo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginVideo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginWiimote.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\PluginWiimote.h"
+ >
+ </File>
+ <Filter
+ Name="Specs"
+ >
+ <File
+ RelativePath="..\..\PluginSpecs\ExportEpilog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\ExportProlog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\PluginSpecs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\pluginspecs_dsp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\pluginspecs_pad.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\pluginspecs_video.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\PluginSpecs\pluginspecs_wiimote.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Logging"
+ >
+ <File
+ RelativePath=".\Src\ConsoleListener.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Log.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\LogManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\LogManager.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\Src\ABI.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ABI.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CDUtils.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CDUtils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ChunkFile.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ChunkFile.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ColorUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ColorUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CommonFuncs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CommonPaths.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CommonTypes.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CPUDetect.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\CPUDetect.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\DynamicLibrary.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\DynamicLibrary.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ExtendedTrace.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\ExtendedTrace.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\FileSearch.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\FileSearch.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\FileUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\FileUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\FixedSizeQueue.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Hash.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Hash.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\IniFile.cpp"
+ >
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Src\IniFile.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MathUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MathUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MemArena.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MemArena.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MemoryUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MemoryUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Misc.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MsgHandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\MsgHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\SConscript"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\SDCardUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\SDCardUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Setup.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugFast|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugFast|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Src\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\StringUtil.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\StringUtil.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Thread.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Thread.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Thunk.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Thunk.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\Timer.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AssemblerOutput="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Src\Timer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\x64Analyzer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\x64Analyzer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\x64Emitter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\x64Emitter.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Source/Core/Common/Src/MappedFile.cpp b/Source/Core/Common/Src/MappedFile.cpp deleted file mode 100644 index 6c3e9832b9..0000000000 --- a/Source/Core/Common/Src/MappedFile.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (C) 2003-2009 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// 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 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifdef _WIN32 -#include <windows.h> -#else -#include <unistd.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <fcntl.h> -#endif - -#include "Common.h" -#include "MappedFile.h" - -namespace Common -{ -class CMappedFile - : public IMappedFile -{ - public: - - CMappedFile(void); - ~CMappedFile(void); - bool Open(const char* _szFilename); - bool IsOpen(void); - void Close(void); - u64 GetSize(void); - u8* Lock(u64 _offset, u64 _size); - void Unlock(u8* ptr); - - - private: - - u64 size; - - typedef std::map<u8*, u8*>Lockmap; - Lockmap lockMap; -#ifdef _WIN32 - HANDLE hFile; - HANDLE hFileMapping; -#elif POSIX - int fd; - typedef std::map<u8*, size_t>Sizemap; - Sizemap sizeMap; -#endif - - int granularity; -}; - - -CMappedFile::CMappedFile() -{ -#ifdef _WIN32 - hFile = INVALID_HANDLE_VALUE; - SYSTEM_INFO info; - GetSystemInfo(&info); - granularity = (int)info.dwAllocationGranularity; -#elif POSIX - fd = -1; - granularity = getpagesize(); //sysconf(_SC_PAGE_SIZE); -#endif -} - - -CMappedFile::~CMappedFile() -{ - Close(); -} - - -bool CMappedFile::Open(const char* filename) -{ - Close(); -#ifdef _WIN32 - hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - - if (hFile == INVALID_HANDLE_VALUE) - { - return(false); - } - - hFileMapping = CreateFileMapping(hFile, 0, PAGE_READONLY, 0, 0, NULL); - - if (hFileMapping == NULL) - { - CloseHandle(hFile); - hFile = 0; - return(false); - } - - u32 high = 0; - u32 low = GetFileSize(hFile, (LPDWORD)&high); - size = (u64)low | ((u64)high << 32); -#elif POSIX - fd = open(filename, O_RDONLY); - size = lseek(fd, 0, SEEK_END); - lseek(fd, 0, SEEK_SET); -#endif - - return(true); -} - - -bool CMappedFile::IsOpen() -{ -#ifdef _WIN32 - return(hFile != INVALID_HANDLE_VALUE); - -#elif POSIX - return(fd != -1); -#endif - -} - - -u64 CMappedFile::GetSize() -{ - return(size); -} - - -void CMappedFile::Close() -{ -#ifdef _WIN32 - if (hFile != INVALID_HANDLE_VALUE) - { - CloseHandle(hFileMapping); - CloseHandle(hFile); - lockMap.clear(); - hFile = INVALID_HANDLE_VALUE; - } - -#elif POSIX - if (fd != -1) - { - lockMap.clear(); - sizeMap.clear(); - close(fd); - } - - fd = -1; -#endif -} - - -u8* CMappedFile::Lock(u64 offset, u64 _size) -{ -#ifdef _WIN32 - if (hFile != INVALID_HANDLE_VALUE) -#elif POSIX - if (fd != -1) -#endif - { - u64 realOffset = offset & ~(granularity - 1); - s64 difference = offset - realOffset; - u64 fake_size = (difference + _size + granularity - 1) & ~(granularity - 1); -#ifdef _WIN32 - u8* realPtr = (u8*)MapViewOfFile(hFileMapping, FILE_MAP_READ, (DWORD)(realOffset >> 32), (DWORD)realOffset, (SIZE_T)(_size)); - - if (realPtr == NULL) - { - return(NULL); - } - -#elif POSIX - // TODO - u8* realPtr = (u8*)mmap(0, fake_size, PROT_READ, MAP_PRIVATE, fd, (off_t)realOffset); - - if (!realPtr) - { - PanicAlert("Map Failed"); - exit(0); - } -#endif - - u8* fakePtr = realPtr + difference; - //add to map - lockMap[fakePtr] = realPtr; -#ifndef _WIN32 - sizeMap[fakePtr] = _size + difference; -#endif - return(fakePtr); - } - else - { - return(0); - } -} - - -void CMappedFile::Unlock(u8* ptr) -{ - if (ptr != 0) - { - Lockmap::iterator iter = lockMap.find(ptr); - - if (iter != lockMap.end()) - { -#ifdef _WIN32 - UnmapViewOfFile((*iter).second); -#else - munmap((*iter).second, sizeMap[ptr]); -#endif - lockMap.erase(iter); - } - else - { - PanicAlert("CMappedFile : Unlock failed"); - } - } -} - - -IMappedFile* IMappedFile::CreateMappedFileDEPRECATED(void) -{ - return(new CMappedFile); -} -} // namespace Common diff --git a/Source/Core/Common/Src/MappedFile.h b/Source/Core/Common/Src/MappedFile.h deleted file mode 100644 index fe4ceeeaa5..0000000000 --- a/Source/Core/Common/Src/MappedFile.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2003-2009 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// 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 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -// ------------------------------------------------------ -// Handles giant memory mapped files -// Through some trickery, allows lock on byte boundaries -// instead of allocation granularity boundaries -// for ease of use -// ------------------------------------------------------ - -#ifndef _MAPPED_FILE_H_ -#define _MAPPED_FILE_H_ - -#include <map> - -namespace Common -{ -class IMappedFile -{ -public: - virtual ~IMappedFile() {} - - virtual bool Open(const char* _szFilename) = 0; - virtual bool IsOpen(void) = 0; - virtual void Close(void) = 0; - virtual u64 GetSize(void) = 0; - virtual u8* Lock(u64 _offset, u64 _size) = 0; - virtual void Unlock(u8* ptr) = 0; - - static IMappedFile* CreateMappedFileDEPRECATED(); -}; - -} // namespace - -#endif // _MAPPED_FILE_H_ diff --git a/Source/Core/Common/Src/MathUtil.h b/Source/Core/Common/Src/MathUtil.h index 72c0eca29a..1399ee1f76 100644 --- a/Source/Core/Common/Src/MathUtil.h +++ b/Source/Core/Common/Src/MathUtil.h @@ -20,6 +20,76 @@ #include <xmmintrin.h> +#include "Common.h" + +namespace MathUtil +{ + +static const u64 DOUBLE_SIGN = 0x8000000000000000ULL, + DOUBLE_EXP = 0x7FF0000000000000ULL, + DOUBLE_FRAC = 0x000FFFFFFFFFFFFFULL, + DOUBLE_ZERO = 0x0000000000000000ULL, + + FLOAT_SIGN = 0x80000000, + FLOAT_EXP = 0x7F800000, + FLOAT_FRAC = 0x007FFFFF, + FLOAT_ZERO = 0x00000000ULL; + +union IntDouble { + double d; + u64 i; +}; +union IntFloat { + float f; + u32 i; +}; + +inline bool IsNAN(double d) +{ + IntDouble x; x.d = d; + return ( ((x.i & DOUBLE_EXP) == DOUBLE_EXP) && + ((x.i & DOUBLE_FRAC) != DOUBLE_ZERO) ); +} + +inline bool IsQNAN(double d) +{ + IntDouble x; x.d = d; + return ( ((x.i & DOUBLE_EXP) == DOUBLE_EXP) && + ((x.i & 0x0007fffffffffffULL) == 0x000000000000000ULL) && + ((x.i & 0x000800000000000ULL) == 0x000800000000000ULL) ); +} + +inline bool IsSNAN(double d) +{ + IntDouble x; x.d = d; + return( ((x.i & DOUBLE_EXP) == DOUBLE_EXP) && + ((x.i & DOUBLE_FRAC) != DOUBLE_ZERO) && + ((x.i & 0x0008000000000000ULL) == DOUBLE_ZERO) ); +} + +inline float FlushToZero(float f) +{ + IntFloat x; x.f = f; + if ((x.i & FLOAT_EXP) == 0) + x.i &= FLOAT_SIGN; // turn into signed zero + return x.f; +} + +inline double FlushToZeroAsFloat(double d) +{ + IntDouble x; x.d = d; + if ((x.i & DOUBLE_EXP) < 0x3800000000000000ULL) + x.i &= DOUBLE_SIGN; // turn into signed zero + return x.d; +} + +} // namespace MathUtil + + +inline float pow2f(float x) {return x * x;} +inline double pow2(double x) {return x * x;} + + /* There are two different flavors of float to int conversion: _mm_cvtps_epi32() and _mm_cvttps_epi32(). The first rounds @@ -27,9 +97,6 @@ uses round towards zero. */ -inline float pow2f(float x) {return x * x;} -inline double pow2(double x) {return x * x;} - void SaveSSEState(); void LoadSSEState(); void LoadDefaultSSEState(); diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript index f385d24caf..3b87e2b2d8 100644 --- a/Source/Core/Common/Src/SConscript +++ b/Source/Core/Common/Src/SConscript @@ -17,7 +17,6 @@ files = [ "Hash.cpp", "IniFile.cpp", "LogManager.cpp", - "MappedFile.cpp", "MathUtil.cpp", "MemArena.cpp", "MemoryUtil.cpp", diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 437ca77f74..1ed10d9d42 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -19,7 +19,6 @@ #include "Common.h" // Common #include "StringUtil.h" #include "FileUtil.h" -#include "MappedFile.h" #include "../HLE/HLE.h" // Core #include "../PowerPC/PowerPC.h" @@ -145,25 +144,13 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game bool CBoot::Load_BIOS(const std::string& _rBiosFilename) { bool bResult = false; - Common::IMappedFile* pFile = Common::IMappedFile::CreateMappedFileDEPRECATED(); - if (pFile->Open(_rBiosFilename.c_str())) - { - if (pFile->GetSize() >= 1024*1024*2) - { - // Write it to memory - u32 CopySize = (u32)pFile->GetSize() - 0x820; - u8* pData = pFile->Lock(0x820, CopySize); - Memory::WriteBigEData(pData, 0x81300000, CopySize); - pFile->Unlock(pData); - pFile->Close(); - - PC = 0x81300000; + std::string data; + if (!File::ReadFileToString(false, _rBiosFilename.c_str(), data)) + return false; - bResult = true; - } - } - delete pFile; - return bResult; + Memory::WriteBigEData((const u8*)data.data(), 0x81300000, data.size()); + PC = 0x81300000; + return true; } ///////////////////////////////// |
