mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-18 11:42:36 +00:00
Kill Plugin_DSP_NULL
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@229 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
471bb025b2
commit
72e1a6afc8
@ -66,11 +66,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DebuggerWX", "Core\Debugger
|
|||||||
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_NULL", "Plugins\Plugin_DSP_NULL\Plugin_DSP_NULL.vcproj", "{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}"
|
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoCommon", "Core\VideoCommon\VideoCommon.vcproj", "{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoCommon", "Core\VideoCommon\VideoCommon.vcproj", "{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
|
||||||
@ -256,18 +251,6 @@ Global
|
|||||||
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|Win32.Build.0 = Release|Win32
|
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|Win32.Build.0 = Release|Win32
|
||||||
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|x64.ActiveCfg = Release|x64
|
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|x64.ActiveCfg = Release|x64
|
||||||
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|x64.Build.0 = Release|x64
|
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}.Release|x64.Build.0 = Release|x64
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.DebugFast|Win32.ActiveCfg = DebugFast|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.DebugFast|Win32.Build.0 = DebugFast|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.DebugFast|x64.ActiveCfg = DebugFast|x64
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.DebugFast|x64.Build.0 = DebugFast|x64
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}.Release|x64.Build.0 = Release|x64
|
|
||||||
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|Win32.Build.0 = Debug|Win32
|
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|x64.ActiveCfg = Debug|x64
|
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
@ -1,807 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
Name="Plugin_DSP_NULL"
|
|
||||||
ProjectGUID="{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}"
|
|
||||||
RootNamespace="Plugin_DSP_NULL"
|
|
||||||
Keyword="Win32Proj"
|
|
||||||
>
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"
|
|
||||||
/>
|
|
||||||
<Platform
|
|
||||||
Name="x64"
|
|
||||||
/>
|
|
||||||
</Platforms>
|
|
||||||
<ToolFiles>
|
|
||||||
</ToolFiles>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS"
|
|
||||||
MinimalRebuild="true"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="4"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_NULLD.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|x64"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS"
|
|
||||||
MinimalRebuild="true"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_NULLD.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="2"
|
|
||||||
EnableIntrinsicFunctions="true"
|
|
||||||
FavorSizeOrSpeed="1"
|
|
||||||
OmitFramePointers="true"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
BufferSecurityCheck="false"
|
|
||||||
FloatingPointModel="2"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_NULL.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|x64"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="2"
|
|
||||||
EnableIntrinsicFunctions="true"
|
|
||||||
FavorSizeOrSpeed="1"
|
|
||||||
OmitFramePointers="true"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
BufferSecurityCheck="false"
|
|
||||||
FloatingPointModel="2"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_NULL.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="DebugFast|Win32"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="2"
|
|
||||||
EnableIntrinsicFunctions="true"
|
|
||||||
FavorSizeOrSpeed="1"
|
|
||||||
OmitFramePointers="true"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;DEBUGFAST"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
BufferSecurityCheck="false"
|
|
||||||
FloatingPointModel="2"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_NULLDF.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="DebugFast|x64"
|
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
|
||||||
ConfigurationType="2"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TargetEnvironment="3"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="2"
|
|
||||||
EnableIntrinsicFunctions="true"
|
|
||||||
FavorSizeOrSpeed="1"
|
|
||||||
OmitFramePointers="true"
|
|
||||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../Core/Common/Src;../../PluginSpecs"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;DEBUGFAST"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
BufferSecurityCheck="false"
|
|
||||||
FloatingPointModel="2"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
|
||||||
WarningLevel="3"
|
|
||||||
DebugInformationFormat="3"
|
|
||||||
ForcedIncludeFiles="stdafx.h"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
|
||||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_NULLDF.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
GenerateManifest="false"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(TargetDir)$(TargetName).lib"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\resource.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\resource.rc"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="PCHW"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Pchw\DSoundStream.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Pchw\DSoundStream.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Pchw\Mixer.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Pchw\Mixer.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="UCodes"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_CARD.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_CARD.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_InitAudioSystem.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_InitAudioSystem.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_Jac.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_Jac.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_ROM.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_ROM.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_Zelda.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_Zelda.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCodes.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCodes.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<Filter
|
|
||||||
Name="UCode AX"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_AX.cpp"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AssemblerOutput="4"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|x64"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AssemblerOutput="4"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="DebugFast|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AssemblerOutput="4"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="DebugFast|x64"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AssemblerOutput="4"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_AX.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\UCodes\UCode_AXLib.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="AboutDialog"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\AboutDlg.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\AboutDlg.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="ConfigDialog"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\ConfigDlg.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\ConfigDlg.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Config.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Config.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\DSPHandler.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\DSPHandler.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Globals.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Globals.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\MailHandler.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\MailHandler.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\main.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\SConscript"
|
|
||||||
>
|
|
||||||
</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>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
@ -1,38 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#include "AboutDlg.h"
|
|
||||||
|
|
||||||
|
|
||||||
LRESULT
|
|
||||||
CAboutDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
|
||||||
{
|
|
||||||
CenterWindow(GetParent());
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LRESULT
|
|
||||||
CAboutDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
|
||||||
{
|
|
||||||
EndDialog(wID);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class CAboutDlg
|
|
||||||
: public CDialogImpl<CAboutDlg>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
enum { IDD = IDD_ABOUT };
|
|
||||||
|
|
||||||
BEGIN_MSG_MAP(CAboutDlg)
|
|
||||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
||||||
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
|
||||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
|
||||||
END_MSG_MAP()
|
|
||||||
|
|
||||||
// Handler prototypes (uncomment arguments if needed):
|
|
||||||
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
|
||||||
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
|
||||||
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
|
|
||||||
|
|
||||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
|
||||||
|
|
||||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
|
||||||
};
|
|
@ -1,87 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "IniFile.h"
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
CConfig g_Config;
|
|
||||||
|
|
||||||
|
|
||||||
CConfig::CConfig()
|
|
||||||
{
|
|
||||||
Load();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CConfig::LoadDefaults()
|
|
||||||
{
|
|
||||||
m_EnableHLEAudio = true;
|
|
||||||
m_EnableDTKMusic = true;
|
|
||||||
m_Interpolation = true;
|
|
||||||
m_DumpSampleMinLength = true;
|
|
||||||
m_SampleRate = 48000;
|
|
||||||
m_DumpSamples = false;
|
|
||||||
m_AntiGap = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CConfig::Load()
|
|
||||||
{
|
|
||||||
// first load defaults
|
|
||||||
LoadDefaults();
|
|
||||||
|
|
||||||
IniFile file;
|
|
||||||
file.Load("DSP.ini");
|
|
||||||
file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true);
|
|
||||||
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
|
|
||||||
file.Get("Config", "Interpolation", &m_Interpolation, true);
|
|
||||||
file.Get("Config", "DumpSamples", &m_DumpSamples, false);
|
|
||||||
file.Get("Config", "DumpSampleMinLength", &m_DumpSampleMinLength, true);
|
|
||||||
#ifdef _WIN32
|
|
||||||
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "C:\\");
|
|
||||||
#else
|
|
||||||
file.Get("Config", "DumpSamplePath", &m_szSamplePath, "/dev/null/");
|
|
||||||
#endif
|
|
||||||
file.Get("Config", "SampleRate", &m_SampleRate, 48000);
|
|
||||||
file.Get("Config", "AntiGap", &m_AntiGap, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CConfig::Save()
|
|
||||||
{
|
|
||||||
IniFile file;
|
|
||||||
file.Load("DSP.ini");
|
|
||||||
file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio);
|
|
||||||
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
|
||||||
file.Set("Config", "Interpolation", m_Interpolation);
|
|
||||||
file.Set("Config", "DumpSamples", m_DumpSamples);
|
|
||||||
file.Set("Config", "DumpSampleMinLength", m_DumpSampleMinLength);
|
|
||||||
#ifdef _WIN32
|
|
||||||
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
|
||||||
#else
|
|
||||||
file.Set("Config", "DumpSamplePath", m_szSamplePath);
|
|
||||||
#endif
|
|
||||||
file.Set("Config", "SampleRate", m_SampleRate);
|
|
||||||
file.Set("Config", "AntiGap", m_AntiGap);
|
|
||||||
file.Save("DSP.ini");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _CONFIG_H
|
|
||||||
#define _CONFIG_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
struct CConfig
|
|
||||||
{
|
|
||||||
bool m_AntiGap;
|
|
||||||
bool m_EnableHLEAudio;
|
|
||||||
bool m_EnableDTKMusic;
|
|
||||||
bool m_Interpolation;
|
|
||||||
bool m_DumpSamples;
|
|
||||||
std::string m_szSamplePath;
|
|
||||||
int m_SampleRate;
|
|
||||||
bool m_DumpSampleMinLength;
|
|
||||||
|
|
||||||
CConfig();
|
|
||||||
|
|
||||||
void LoadDefaults();
|
|
||||||
|
|
||||||
void Load();
|
|
||||||
|
|
||||||
void Save();
|
|
||||||
};
|
|
||||||
|
|
||||||
extern CConfig g_Config;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
#include "ConfigDlg.h"
|
|
||||||
|
|
||||||
LRESULT
|
|
||||||
CConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
|
||||||
{
|
|
||||||
g_Config.Load();
|
|
||||||
//CenterWindow(this->GetParent());
|
|
||||||
CenterWindow(GetParent());
|
|
||||||
m_buttonEnableHLEAudio = GetDlgItem(IDC_ENABLE_HLE_AUDIO);
|
|
||||||
m_buttonEnableDTKMusic = GetDlgItem(IDC_ENABLE_DTK_MUSIC);
|
|
||||||
m_buttonAntiGap = GetDlgItem(IDC_ANTIGAP);
|
|
||||||
m_buttonDumpSamples = GetDlgItem(IDC_DUMPSAMPLES);
|
|
||||||
m_editDumpSamplePath = GetDlgItem(IDC_SAMPLEDUMPPATH);
|
|
||||||
m_comboSampleRate = GetDlgItem(IDC_SAMPLERATE);
|
|
||||||
|
|
||||||
m_buttonEnableHLEAudio.SetCheck(g_Config.m_EnableHLEAudio ? BST_CHECKED : BST_UNCHECKED);
|
|
||||||
m_buttonEnableDTKMusic.SetCheck(g_Config.m_EnableDTKMusic ? BST_CHECKED : BST_UNCHECKED);
|
|
||||||
m_buttonAntiGap.SetCheck(g_Config.m_AntiGap ? BST_CHECKED : BST_UNCHECKED);
|
|
||||||
m_buttonDumpSamples.SetCheck(g_Config.m_DumpSamples ? BST_CHECKED : BST_UNCHECKED);
|
|
||||||
m_editDumpSamplePath.SetWindowText(g_Config.m_szSamplePath.c_str());
|
|
||||||
m_comboSampleRate.AddString("44100");
|
|
||||||
m_comboSampleRate.AddString("48000");
|
|
||||||
m_comboSampleRate.SetCurSel(g_Config.m_SampleRate == 44100 ? 0 : 1);
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LRESULT
|
|
||||||
CConfigDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
|
||||||
{
|
|
||||||
if (wID == IDOK)
|
|
||||||
{
|
|
||||||
g_Config.m_EnableHLEAudio = (m_buttonEnableHLEAudio.GetCheck() == BST_CHECKED) ? true : false;
|
|
||||||
g_Config.m_EnableDTKMusic = (m_buttonEnableDTKMusic.GetCheck() == BST_CHECKED) ? true : false;
|
|
||||||
g_Config.m_DumpSamples = (m_buttonDumpSamples.GetCheck() == BST_CHECKED) ? true : false;
|
|
||||||
g_Config.m_AntiGap = (m_buttonAntiGap.GetCheck() == BST_CHECKED) ? true : false;
|
|
||||||
char temp[MAX_PATH];
|
|
||||||
m_editDumpSamplePath.GetWindowText(temp, MAX_PATH);
|
|
||||||
g_Config.m_szSamplePath = temp;
|
|
||||||
g_Config.m_SampleRate = (m_comboSampleRate.GetCurSel() == 0 ? 44100 : 48000);
|
|
||||||
g_Config.Save();
|
|
||||||
}
|
|
||||||
|
|
||||||
EndDialog(wID);
|
|
||||||
g_Config.Save();
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class CConfigDlg
|
|
||||||
: public CDialogImpl<CConfigDlg>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
enum { IDD = IDD_SETTINGS };
|
|
||||||
|
|
||||||
BEGIN_MSG_MAP(CConfigDlg)
|
|
||||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
||||||
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
|
||||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
|
||||||
END_MSG_MAP()
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
CButton m_buttonEnableHLEAudio;
|
|
||||||
CButton m_buttonEnableDTKMusic;
|
|
||||||
CButton m_buttonDumpSamples;
|
|
||||||
CButton m_buttonAntiGap;
|
|
||||||
CEdit m_editDumpSamplePath;
|
|
||||||
CComboBox m_comboSampleRate;
|
|
||||||
|
|
||||||
// Handler prototypes (uncomment arguments if needed):
|
|
||||||
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
|
||||||
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
|
||||||
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
|
|
||||||
|
|
||||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
|
||||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
|
||||||
};
|
|
@ -1,105 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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 "PCHW/DSoundStream.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "DSPHandler.h"
|
|
||||||
|
|
||||||
CDSPHandler* CDSPHandler::m_pInstance = NULL;
|
|
||||||
|
|
||||||
CDSPHandler::CDSPHandler()
|
|
||||||
: m_pUCode(NULL),
|
|
||||||
m_bHalt(false),
|
|
||||||
m_bAssertInt(false)
|
|
||||||
{
|
|
||||||
SetUCode(UCODE_ROM);
|
|
||||||
m_DSPControl.DSPHalt = 1;
|
|
||||||
m_DSPControl.DSPInit = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CDSPHandler::~CDSPHandler()
|
|
||||||
{
|
|
||||||
delete m_pUCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CDSPHandler::Update()
|
|
||||||
{
|
|
||||||
if (m_pUCode != NULL)
|
|
||||||
{
|
|
||||||
m_pUCode->Update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short CDSPHandler::WriteControlRegister(unsigned short _Value)
|
|
||||||
{
|
|
||||||
UDSPControl Temp(_Value);
|
|
||||||
|
|
||||||
if (Temp.DSPReset)
|
|
||||||
{
|
|
||||||
SetUCode(UCODE_ROM);
|
|
||||||
Temp.DSPReset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Temp.DSPInit == 0)
|
|
||||||
{
|
|
||||||
// copy 128 byte from ARAM 0x000000 to IMEM
|
|
||||||
SetUCode(UCODE_INIT_AUDIO_SYSTEM);
|
|
||||||
Temp.DSPInitCode = 0;
|
|
||||||
// MessageBox(NULL, "UCODE_INIT_AUDIO_SYSTEM", "DSP-HLE", MB_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_DSPControl.Hex = Temp.Hex;
|
|
||||||
|
|
||||||
return(m_DSPControl.Hex);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short CDSPHandler::ReadControlRegister()
|
|
||||||
{
|
|
||||||
return(m_DSPControl.Hex);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CDSPHandler::SendMailToDSP(u32 _uMail)
|
|
||||||
{
|
|
||||||
if (m_pUCode != NULL)
|
|
||||||
{
|
|
||||||
m_pUCode->HandleMail(_uMail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IUCode* CDSPHandler::GetUCode()
|
|
||||||
{
|
|
||||||
return m_pUCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CDSPHandler::SetUCode(u32 _crc)
|
|
||||||
{
|
|
||||||
delete m_pUCode;
|
|
||||||
|
|
||||||
m_MailHandler.Clear();
|
|
||||||
m_pUCode = UCodeFactory(_crc, m_MailHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
#ifndef _DSPHANDLER_H
|
|
||||||
#define _DSPHANDLER_H
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "MailHandler.h"
|
|
||||||
#include "UCodes/UCodes.h"
|
|
||||||
|
|
||||||
// CDSPHandler
|
|
||||||
class CDSPHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
void Update();
|
|
||||||
unsigned short WriteControlRegister(unsigned short _Value);
|
|
||||||
unsigned short ReadControlRegister();
|
|
||||||
void SendMailToDSP(u32 _uMail);
|
|
||||||
IUCode* GetUCode();
|
|
||||||
void SetUCode(u32 _crc);
|
|
||||||
|
|
||||||
CMailHandler& AccessMailHandler() {return(m_MailHandler);}
|
|
||||||
|
|
||||||
static CDSPHandler& GetInstance()
|
|
||||||
{
|
|
||||||
return(*m_pInstance);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Destroy()
|
|
||||||
{
|
|
||||||
delete m_pInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
static CDSPHandler& CreateInstance()
|
|
||||||
{
|
|
||||||
if (m_pInstance == NULL)
|
|
||||||
{
|
|
||||||
m_pInstance = new CDSPHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
return(*m_pInstance);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
CDSPHandler();
|
|
||||||
~CDSPHandler();
|
|
||||||
|
|
||||||
// UDSPControl
|
|
||||||
union UDSPControl
|
|
||||||
{
|
|
||||||
u16 Hex;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
unsigned DSPReset : 1; // Write 1 to reset and waits for 0
|
|
||||||
unsigned DSPAssertInt : 1;
|
|
||||||
unsigned DSPHalt : 1;
|
|
||||||
|
|
||||||
unsigned AI : 1;
|
|
||||||
unsigned AI_mask : 1;
|
|
||||||
unsigned ARAM : 1;
|
|
||||||
unsigned ARAM_mask : 1;
|
|
||||||
unsigned DSP : 1;
|
|
||||||
unsigned DSP_mask : 1;
|
|
||||||
|
|
||||||
unsigned ARAM_DMAState : 1; // DSPGetDMAStatus() uses this flag
|
|
||||||
unsigned DSPInitCode : 1;
|
|
||||||
unsigned DSPInit : 1; // DSPInit() writes to this flag
|
|
||||||
unsigned pad : 4;
|
|
||||||
};
|
|
||||||
|
|
||||||
UDSPControl(u16 _Hex = 0)
|
|
||||||
: Hex(_Hex)
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
// singleton instance
|
|
||||||
static CDSPHandler* m_pInstance;
|
|
||||||
|
|
||||||
IUCode* m_pUCode;
|
|
||||||
UDSPControl m_DSPControl;
|
|
||||||
CMailHandler m_MailHandler;
|
|
||||||
|
|
||||||
bool m_bHalt;
|
|
||||||
bool m_bAssertInt;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,55 +0,0 @@
|
|||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "Globals.h"
|
|
||||||
|
|
||||||
|
|
||||||
void DebugLog(const char* _fmt, ...)
|
|
||||||
{
|
|
||||||
#ifdef _DEBUG
|
|
||||||
char Msg[512];
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, _fmt);
|
|
||||||
vsprintf(Msg, _fmt, ap);
|
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
g_dspInitialize.pLog(Msg);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extern u8* g_pMemory;
|
|
||||||
|
|
||||||
// TODO: Wii support?
|
|
||||||
#define RAM_MASK 0x1FFFFFF
|
|
||||||
|
|
||||||
u8 Memory_Read_U8(u32 _uAddress)
|
|
||||||
{
|
|
||||||
_uAddress &= RAM_MASK;
|
|
||||||
return(g_pMemory[_uAddress]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u16 Memory_Read_U16(u32 _uAddress)
|
|
||||||
{
|
|
||||||
_uAddress &= RAM_MASK;
|
|
||||||
return(Common::swap16(*(u16*)&g_pMemory[_uAddress]));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u32 Memory_Read_U32(u32 _uAddress)
|
|
||||||
{
|
|
||||||
_uAddress &= RAM_MASK;
|
|
||||||
return(Common::swap32(*(u32*)&g_pMemory[_uAddress]));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
float Memory_Read_Float(u32 _uAddress)
|
|
||||||
{
|
|
||||||
u32 uTemp = Memory_Read_U32(_uAddress);
|
|
||||||
return(*(float*)&uTemp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
#ifndef _GLOBALS_H
|
|
||||||
#define _GLOBALS_H
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "pluginspecs_dsp.h"
|
|
||||||
|
|
||||||
extern DSPInitialize g_dspInitialize;
|
|
||||||
void DebugLog(const char* _fmt, ...);
|
|
||||||
|
|
||||||
u8 Memory_Read_U8(u32 _uAddress);
|
|
||||||
u16 Memory_Read_U16(u32 _uAddress);
|
|
||||||
u32 Memory_Read_U32(u32 _uAddress);
|
|
||||||
float Memory_Read_Float(u32 _uAddress);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "MailHandler.h"
|
|
||||||
|
|
||||||
|
|
||||||
CMailHandler::CMailHandler()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
CMailHandler::~CMailHandler()
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CMailHandler::PushMail(u32 _Mail)
|
|
||||||
{
|
|
||||||
m_Mails.push(_Mail);
|
|
||||||
|
|
||||||
Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u16
|
|
||||||
CMailHandler::ReadDSPMailboxHigh()
|
|
||||||
{
|
|
||||||
// check if we have a mail for the core
|
|
||||||
if (!m_Mails.empty())
|
|
||||||
{
|
|
||||||
u16 result = (m_Mails.front() >> 16) & 0xFFFF;
|
|
||||||
|
|
||||||
Update();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(0x00);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u16
|
|
||||||
CMailHandler::ReadDSPMailboxLow()
|
|
||||||
{
|
|
||||||
// check if we have a mail for the core
|
|
||||||
if (!m_Mails.empty())
|
|
||||||
{
|
|
||||||
u16 result = m_Mails.front() & 0xFFFF;
|
|
||||||
m_Mails.pop();
|
|
||||||
|
|
||||||
Update();
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(0x00);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CMailHandler::Clear()
|
|
||||||
{
|
|
||||||
while (!m_Mails.empty())
|
|
||||||
{
|
|
||||||
m_Mails.pop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
CMailHandler::IsEmpty()
|
|
||||||
{
|
|
||||||
return(m_Mails.empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CMailHandler::Halt(bool _Halt)
|
|
||||||
{
|
|
||||||
if (_Halt)
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
m_Mails.push(0x80544348);
|
|
||||||
}
|
|
||||||
|
|
||||||
Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CMailHandler::Update()
|
|
||||||
{
|
|
||||||
if (!IsEmpty())
|
|
||||||
{
|
|
||||||
// g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _MAILHANDLER_H
|
|
||||||
#define _MAILHANDLER_H
|
|
||||||
|
|
||||||
#include <queue>
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
|
|
||||||
class CMailHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
CMailHandler();
|
|
||||||
|
|
||||||
~CMailHandler();
|
|
||||||
|
|
||||||
void PushMail(u32 _Mail);
|
|
||||||
|
|
||||||
void Clear();
|
|
||||||
|
|
||||||
void Halt(bool _Halt);
|
|
||||||
|
|
||||||
bool IsEmpty();
|
|
||||||
|
|
||||||
u16 ReadDSPMailboxHigh();
|
|
||||||
|
|
||||||
u16 ReadDSPMailboxLow();
|
|
||||||
|
|
||||||
void Update();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// mail handler
|
|
||||||
std::queue<u32>m_Mails;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
|||||||
#include <ao/ao.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include "AOSoundStream.h"
|
|
||||||
|
|
||||||
namespace AOSound
|
|
||||||
{
|
|
||||||
pthread_t thread;
|
|
||||||
StreamCallback callback;
|
|
||||||
|
|
||||||
char *buffer;
|
|
||||||
int buf_size;
|
|
||||||
|
|
||||||
ao_device *device;
|
|
||||||
ao_sample_format format;
|
|
||||||
int default_driver;
|
|
||||||
|
|
||||||
int bufferSize;
|
|
||||||
int totalRenderedBytes;
|
|
||||||
int sampleRate;
|
|
||||||
volatile int threadData;
|
|
||||||
int currentPos;
|
|
||||||
int lastPos;
|
|
||||||
short realtimeBuffer[1024 * 1024];
|
|
||||||
int AOSound_GetSampleRate()
|
|
||||||
{
|
|
||||||
return sampleRate;
|
|
||||||
}
|
|
||||||
bool WriteDataToBuffer(int dwOffset,char* soundData, int dwSoundBytes)
|
|
||||||
{
|
|
||||||
//void* ptr1, * ptr2;
|
|
||||||
//DWORD numBytes1, numBytes2;
|
|
||||||
// Obtain memory address of write block. This will be in two parts if the block wraps around.
|
|
||||||
//HRESULT hr = dsBuffer->Lock(dwOffset, dwSoundBytes, &ptr1, &numBytes1, &ptr2, &numBytes2, 0);
|
|
||||||
|
|
||||||
// If the buffer was lost, restore and retry lock.
|
|
||||||
/*if (DSERR_BUFFERLOST == hr)
|
|
||||||
{
|
|
||||||
dsBuffer->Restore();
|
|
||||||
hr = dsBuffer->Lock(dwOffset, dwSoundBytes, &ptr1, &numBytes1, &ptr2, &numBytes2, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
{
|
|
||||||
memcpy(ptr1, soundData, numBytes1);
|
|
||||||
|
|
||||||
if (ptr2 != 0)
|
|
||||||
{
|
|
||||||
memcpy(ptr2, soundData + numBytes1, numBytes2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the data back to DirectSound.
|
|
||||||
dsBuffer->Unlock(ptr1, numBytes1, ptr2, numBytes2);
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(false);*/
|
|
||||||
if(soundData[0] != 0)
|
|
||||||
ao_play(device, soundData, dwSoundBytes);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void* soundThread(void*)
|
|
||||||
{
|
|
||||||
currentPos = 0;
|
|
||||||
lastPos = 0;
|
|
||||||
|
|
||||||
// Prefill buffer?
|
|
||||||
//writeDataToBuffer(0,realtimeBuffer,bufferSize);
|
|
||||||
// dsBuffer->Lock(0, bufferSize, (void **)&p1, &num1, (void **)&p2, &num2, 0);
|
|
||||||
//dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
|
|
||||||
|
|
||||||
while (!threadData)
|
|
||||||
{
|
|
||||||
// No blocking inside the csection
|
|
||||||
//dsBuffer->GetCurrentPosition((DWORD*)¤tPos, 0);
|
|
||||||
int numBytesToRender = 256;
|
|
||||||
|
|
||||||
if (numBytesToRender >= 256)
|
|
||||||
{
|
|
||||||
(*callback)(realtimeBuffer, numBytesToRender >> 2, 16, 44100, 2);
|
|
||||||
|
|
||||||
WriteDataToBuffer(0, (char*)realtimeBuffer, numBytesToRender);
|
|
||||||
//currentPos = ModBufferSize(lastPos + numBytesToRender);
|
|
||||||
//totalRenderedBytes += numBytesToRender;
|
|
||||||
|
|
||||||
//lastPos = currentPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
//WaitForSingleObject(soundSyncEvent, MAXWAIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
//dsBuffer->Stop();
|
|
||||||
return(0); //hurra!
|
|
||||||
}
|
|
||||||
bool AOSound_StartSound(int _sampleRate, StreamCallback _callback)
|
|
||||||
{
|
|
||||||
callback = _callback;
|
|
||||||
threadData = 0;
|
|
||||||
sampleRate = _sampleRate;
|
|
||||||
|
|
||||||
//no security attributes, automatic resetting, init state nonset, untitled
|
|
||||||
//soundSyncEvent = CreateEvent(0, false, false, 0);
|
|
||||||
ao_initialize();
|
|
||||||
default_driver = ao_default_driver_id();
|
|
||||||
format.bits = 16;
|
|
||||||
format.channels = 2;
|
|
||||||
format.rate = sampleRate;
|
|
||||||
format.byte_format = AO_FMT_LITTLE;
|
|
||||||
|
|
||||||
//vi vill ha access till DSOUND så...
|
|
||||||
device = ao_open_live(default_driver, &format, NULL /* no options */);
|
|
||||||
if (device == NULL) {
|
|
||||||
fprintf(stderr, "Error opening device.\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
buf_size = format.bits/8 * format.channels * format.rate;
|
|
||||||
buffer = (char*)calloc(buf_size, sizeof(char));
|
|
||||||
pthread_create(&thread, NULL, soundThread, (void *)NULL);
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
void AOSound_StopSound()
|
|
||||||
{
|
|
||||||
ao_close(device);
|
|
||||||
ao_shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef __AOSOUNDSTREAM_H__
|
|
||||||
#define __AOSOUNDSTREAM_H__
|
|
||||||
|
|
||||||
namespace AOSound
|
|
||||||
{
|
|
||||||
typedef void (*StreamCallback)(short* buffer, int numSamples, int bits, int rate, int channels);
|
|
||||||
|
|
||||||
bool AOSound_StartSound(int sampleRate, StreamCallback _callback);
|
|
||||||
void AOSound_UpdateSound();
|
|
||||||
void AOSound_StopSound();
|
|
||||||
|
|
||||||
float AOSound_GetTimer();
|
|
||||||
int AOSound_GetCurSample();
|
|
||||||
int AOSound_GetSampleRate();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif //__AOSOUNDSTREAM_H__
|
|
@ -1,254 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
||||||
#include <mmsystem.h>
|
|
||||||
#include <dsound.h>
|
|
||||||
|
|
||||||
#include "dsoundstream.h"
|
|
||||||
|
|
||||||
namespace DSound
|
|
||||||
{
|
|
||||||
#define BUFSIZE 32768
|
|
||||||
#define MAXWAIT 70 //ms
|
|
||||||
|
|
||||||
CRITICAL_SECTION soundCriticalSection;
|
|
||||||
HANDLE soundSyncEvent;
|
|
||||||
HANDLE hThread;
|
|
||||||
|
|
||||||
StreamCallback callback;
|
|
||||||
|
|
||||||
//lite mojs
|
|
||||||
IDirectSound8* ds;
|
|
||||||
IDirectSoundBuffer* dsBuffer;
|
|
||||||
|
|
||||||
//tja.. behövs
|
|
||||||
int bufferSize; //i bytes
|
|
||||||
int totalRenderedBytes;
|
|
||||||
int sampleRate;
|
|
||||||
|
|
||||||
//med den här synkar vi stängning..
|
|
||||||
//0=vi spelar oväsen, 1=stäng tråden NU!
|
|
||||||
volatile int threadData;
|
|
||||||
|
|
||||||
inline int FIX128(int x)
|
|
||||||
{
|
|
||||||
return(x & (~127));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int DSound_GetSampleRate()
|
|
||||||
{
|
|
||||||
return(sampleRate);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CreateBuffer()
|
|
||||||
{
|
|
||||||
PCMWAVEFORMAT pcmwf;
|
|
||||||
DSBUFFERDESC dsbdesc;
|
|
||||||
|
|
||||||
memset(&pcmwf, 0, sizeof(PCMWAVEFORMAT));
|
|
||||||
memset(&dsbdesc, 0, sizeof(DSBUFFERDESC));
|
|
||||||
|
|
||||||
pcmwf.wf.wFormatTag = WAVE_FORMAT_PCM;
|
|
||||||
pcmwf.wf.nChannels = 2;
|
|
||||||
pcmwf.wf.nSamplesPerSec = sampleRate;
|
|
||||||
pcmwf.wf.nBlockAlign = 4;
|
|
||||||
pcmwf.wf.nAvgBytesPerSec = pcmwf.wf.nSamplesPerSec * pcmwf.wf.nBlockAlign;
|
|
||||||
pcmwf.wBitsPerSample = 16;
|
|
||||||
|
|
||||||
//buffer description
|
|
||||||
dsbdesc.dwSize = sizeof(DSBUFFERDESC);
|
|
||||||
dsbdesc.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_STICKYFOCUS; //VIKTIGT //DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY;
|
|
||||||
dsbdesc.dwBufferBytes = bufferSize = BUFSIZE;
|
|
||||||
dsbdesc.lpwfxFormat = (WAVEFORMATEX*)&pcmwf;
|
|
||||||
|
|
||||||
if (SUCCEEDED(ds->CreateSoundBuffer(&dsbdesc, &dsBuffer, NULL)))
|
|
||||||
{
|
|
||||||
dsBuffer->SetCurrentPosition(0);
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Failed.
|
|
||||||
dsBuffer = NULL;
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool WriteDataToBuffer(DWORD dwOffset, // Our own write cursor.
|
|
||||||
char* soundData, // Start of our data.
|
|
||||||
DWORD dwSoundBytes) // Size of block to copy.
|
|
||||||
{
|
|
||||||
void* ptr1, * ptr2;
|
|
||||||
DWORD numBytes1, numBytes2;
|
|
||||||
// Obtain memory address of write block. This will be in two parts if the block wraps around.
|
|
||||||
HRESULT hr = dsBuffer->Lock(dwOffset, dwSoundBytes, &ptr1, &numBytes1, &ptr2, &numBytes2, 0);
|
|
||||||
|
|
||||||
// If the buffer was lost, restore and retry lock.
|
|
||||||
if (DSERR_BUFFERLOST == hr)
|
|
||||||
{
|
|
||||||
dsBuffer->Restore();
|
|
||||||
hr = dsBuffer->Lock(dwOffset, dwSoundBytes, &ptr1, &numBytes1, &ptr2, &numBytes2, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
{
|
|
||||||
memcpy(ptr1, soundData, numBytes1);
|
|
||||||
|
|
||||||
if (ptr2 != 0)
|
|
||||||
{
|
|
||||||
memcpy(ptr2, soundData + numBytes1, numBytes2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the data back to DirectSound.
|
|
||||||
dsBuffer->Unlock(ptr1, numBytes1, ptr2, numBytes2);
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline int ModBufferSize(int x)
|
|
||||||
{
|
|
||||||
return((x + bufferSize) % bufferSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int currentPos;
|
|
||||||
int lastPos;
|
|
||||||
short realtimeBuffer[1024 * 1024];
|
|
||||||
|
|
||||||
//Själva tråden
|
|
||||||
DWORD WINAPI soundThread(void*)
|
|
||||||
{
|
|
||||||
currentPos = 0;
|
|
||||||
lastPos = 0;
|
|
||||||
|
|
||||||
// Prefill buffer?
|
|
||||||
//writeDataToBuffer(0,realtimeBuffer,bufferSize);
|
|
||||||
// dsBuffer->Lock(0, bufferSize, (void **)&p1, &num1, (void **)&p2, &num2, 0);
|
|
||||||
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
|
|
||||||
|
|
||||||
while (!threadData)
|
|
||||||
{
|
|
||||||
// No blocking inside the csection
|
|
||||||
EnterCriticalSection(&soundCriticalSection);
|
|
||||||
dsBuffer->GetCurrentPosition((DWORD*)¤tPos, 0);
|
|
||||||
int numBytesToRender = FIX128(ModBufferSize(currentPos - lastPos));
|
|
||||||
|
|
||||||
if (numBytesToRender >= 256)
|
|
||||||
{
|
|
||||||
(*callback)(realtimeBuffer, numBytesToRender >> 2, 16, 44100, 2);
|
|
||||||
|
|
||||||
WriteDataToBuffer(lastPos, (char*)realtimeBuffer, numBytesToRender);
|
|
||||||
currentPos = ModBufferSize(lastPos + numBytesToRender);
|
|
||||||
totalRenderedBytes += numBytesToRender;
|
|
||||||
|
|
||||||
lastPos = currentPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveCriticalSection(&soundCriticalSection);
|
|
||||||
WaitForSingleObject(soundSyncEvent, MAXWAIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
dsBuffer->Stop();
|
|
||||||
return(0); //hurra!
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DSound_StartSound(HWND window, int _sampleRate, StreamCallback _callback)
|
|
||||||
{
|
|
||||||
callback = _callback;
|
|
||||||
threadData = 0;
|
|
||||||
sampleRate = _sampleRate;
|
|
||||||
|
|
||||||
//no security attributes, automatic resetting, init state nonset, untitled
|
|
||||||
soundSyncEvent = CreateEvent(0, false, false, 0);
|
|
||||||
|
|
||||||
//vi initierar den...........
|
|
||||||
InitializeCriticalSection(&soundCriticalSection);
|
|
||||||
|
|
||||||
//vi vill ha access till DSOUND så...
|
|
||||||
if (FAILED(DirectSoundCreate8(0, &ds, 0)))
|
|
||||||
{
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ds->SetCooperativeLevel(window, DSSCL_NORMAL);
|
|
||||||
|
|
||||||
if (!CreateBuffer())
|
|
||||||
{
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD num1;
|
|
||||||
short* p1;
|
|
||||||
dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, 0);
|
|
||||||
memset(p1, 0, num1);
|
|
||||||
dsBuffer->Unlock(p1, num1, 0, 0);
|
|
||||||
totalRenderedBytes = -bufferSize;
|
|
||||||
DWORD h;
|
|
||||||
hThread = CreateThread(0, 0, soundThread, 0, 0, &h);
|
|
||||||
SetThreadPriority(hThread, THREAD_PRIORITY_ABOVE_NORMAL);
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSound_UpdateSound()
|
|
||||||
{
|
|
||||||
SetEvent(soundSyncEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSound_StopSound()
|
|
||||||
{
|
|
||||||
EnterCriticalSection(&soundCriticalSection);
|
|
||||||
threadData = 1;
|
|
||||||
//kick the thread if it's waiting
|
|
||||||
SetEvent(soundSyncEvent);
|
|
||||||
LeaveCriticalSection(&soundCriticalSection);
|
|
||||||
WaitForSingleObject(hThread, INFINITE);
|
|
||||||
CloseHandle(hThread);
|
|
||||||
|
|
||||||
dsBuffer->Release();
|
|
||||||
ds->Release();
|
|
||||||
|
|
||||||
CloseHandle(soundSyncEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int DSound_GetCurSample()
|
|
||||||
{
|
|
||||||
EnterCriticalSection(&soundCriticalSection);
|
|
||||||
int playCursor;
|
|
||||||
dsBuffer->GetCurrentPosition((DWORD*)&playCursor, 0);
|
|
||||||
playCursor = ModBufferSize(playCursor - lastPos) + totalRenderedBytes;
|
|
||||||
LeaveCriticalSection(&soundCriticalSection);
|
|
||||||
return(playCursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
float DSound_GetTimer()
|
|
||||||
{
|
|
||||||
return((float)DSound_GetCurSample() * (1.0f / (4.0f * 44100.0f)));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef __SOUNDSTREAM_H__
|
|
||||||
#define __SOUNDSTREAM_H__
|
|
||||||
|
|
||||||
namespace DSound
|
|
||||||
{
|
|
||||||
typedef void (*StreamCallback)(short* buffer, int numSamples, int bits, int rate, int channels);
|
|
||||||
|
|
||||||
bool DSound_StartSound(HWND window, int sampleRate, StreamCallback _callback);
|
|
||||||
void DSound_UpdateSound();
|
|
||||||
void DSound_StopSound();
|
|
||||||
|
|
||||||
float DSound_GetTimer();
|
|
||||||
int DSound_GetCurSample();
|
|
||||||
int DSound_GetSampleRate();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif //__SOUNDSTREAM_H__
|
|
@ -1,48 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "../Config.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "../DSPHandler.h"
|
|
||||||
#include "Mixer.h"
|
|
||||||
|
|
||||||
volatile bool mixer_HLEready = false;
|
|
||||||
|
|
||||||
void Mixer(short* buffer, int numSamples, int bits, int rate, int channels)
|
|
||||||
{
|
|
||||||
// silence
|
|
||||||
memset(buffer, 0, numSamples * 2 * sizeof(short));
|
|
||||||
|
|
||||||
// first get th DTK Music
|
|
||||||
if (g_Config.m_EnableDTKMusic)
|
|
||||||
{
|
|
||||||
g_dspInitialize.pGetAudioStreaming(buffer, numSamples);
|
|
||||||
}
|
|
||||||
|
|
||||||
//if this was called directly from the HLE, and not by timeout
|
|
||||||
if (g_Config.m_EnableHLEAudio && (mixer_HLEready || g_Config.m_AntiGap))
|
|
||||||
{
|
|
||||||
IUCode* pUCode = CDSPHandler::GetInstance().GetUCode();
|
|
||||||
|
|
||||||
if (pUCode != NULL)
|
|
||||||
{
|
|
||||||
pUCode->MixAdd(buffer, numSamples);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _MIXER_H
|
|
||||||
#define _MIXER_H
|
|
||||||
|
|
||||||
extern volatile bool mixer_HLEready;
|
|
||||||
void Mixer(short* buffer, int numSamples, int bits, int rate, int channels);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
Import('env')
|
|
||||||
import sys
|
|
||||||
|
|
||||||
files = ["DSPHandler.cpp",
|
|
||||||
"MailHandler.cpp",
|
|
||||||
"main.cpp",
|
|
||||||
"Config.cpp",
|
|
||||||
"Globals.cpp",
|
|
||||||
"PCHW/AOSoundStream.cpp",
|
|
||||||
"PCHW/Mixer.cpp",
|
|
||||||
"UCodes/UCode_AX.cpp",
|
|
||||||
"UCodes/UCode_CARD.cpp",
|
|
||||||
"UCodes/UCode_InitAudioSystem.cpp",
|
|
||||||
"UCodes/UCode_Jac.cpp",
|
|
||||||
"UCodes/UCode_ROM.cpp",
|
|
||||||
"UCodes/UCodes.cpp",
|
|
||||||
"UCodes/UCode_Zelda.cpp",
|
|
||||||
]
|
|
||||||
dspenv=env.Copy(LINKFLAGS = "`pkg-config --libs ao` ")
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
dspenv.SharedLibrary("../../../../Binary/mac/Plugins/dsphle.so", files, LIBS = ["common"])
|
|
||||||
else:
|
|
||||||
dspenv.SharedLibrary("../../../../Binary/linux/Plugins/dsphle.so", files, LIBS = ["common"])
|
|
@ -1,244 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "../PCHW/DSoundStream.h"
|
|
||||||
#endif
|
|
||||||
#include "../PCHW/Mixer.h"
|
|
||||||
#include "../MailHandler.h"
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_AX.h"
|
|
||||||
|
|
||||||
CUCode_AX::CUCode_AX(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
{
|
|
||||||
// we got loaded
|
|
||||||
m_rMailHandler.PushMail(0xDCD10000);
|
|
||||||
m_rMailHandler.PushMail(0x80000000); // handshake ??? only (crc == 0xe2136399) needs it ...
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_AX::~CUCode_AX()
|
|
||||||
{
|
|
||||||
m_rMailHandler.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_AX::HandleMail(u32 _uMail)
|
|
||||||
{
|
|
||||||
if ((_uMail & 0xFFFF0000) == 0xBABE0000)
|
|
||||||
{
|
|
||||||
// a new List
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AXTask(_uMail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_AX::Update()
|
|
||||||
{
|
|
||||||
// check if we have to sent something
|
|
||||||
if (!m_rMailHandler.IsEmpty())
|
|
||||||
{
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CUCode_AX::AXTask(u32& _uMail)
|
|
||||||
{
|
|
||||||
u32 uAddress = _uMail;
|
|
||||||
|
|
||||||
DebugLog("AXTask - AXCommandList-Addr: 0x%08x", uAddress);
|
|
||||||
|
|
||||||
u32 Addr__AXStudio;
|
|
||||||
u32 Addr__AXOutSBuffer;
|
|
||||||
u32 Addr__AXOutSBuffer_1;
|
|
||||||
u32 Addr__AXOutSBuffer_2;
|
|
||||||
|
|
||||||
u32 Addr__A;
|
|
||||||
u32 Addr__12;
|
|
||||||
u32 Addr__4_1;
|
|
||||||
u32 Addr__4_2;
|
|
||||||
u32 Addr__5_1;
|
|
||||||
u32 Addr__5_2;
|
|
||||||
u32 Addr__6;
|
|
||||||
u32 Addr__9;
|
|
||||||
|
|
||||||
bool bExecuteList = true;
|
|
||||||
|
|
||||||
while (bExecuteList)
|
|
||||||
{
|
|
||||||
u16 iCommand = Memory_Read_U16(uAddress);
|
|
||||||
uAddress += 2;
|
|
||||||
|
|
||||||
switch (iCommand)
|
|
||||||
{
|
|
||||||
case 0x00: //00
|
|
||||||
Addr__AXStudio = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST studio address: %08x", Addr__AXStudio);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x001:
|
|
||||||
{
|
|
||||||
u32 address = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
u16 param1 = Memory_Read_U16(uAddress);
|
|
||||||
uAddress += 2;
|
|
||||||
u16 param2 = Memory_Read_U16(uAddress);
|
|
||||||
uAddress += 2;
|
|
||||||
u16 param3 = Memory_Read_U16(uAddress);
|
|
||||||
uAddress += 2;
|
|
||||||
DebugLog("AXLIST 1: %08x, %04x, %04x, %04x", address, param1, param2, param3);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x02: //02
|
|
||||||
{
|
|
||||||
uAddress += 4;
|
|
||||||
#ifdef _WIN32
|
|
||||||
DebugLog("Update the SoundThread to be in sync");
|
|
||||||
DSound::DSound_UpdateSound(); //do it in this thread to avoid sync problems
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0003: // ????
|
|
||||||
DebugLog("AXLIST command 0x0003 ????");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0004:
|
|
||||||
Addr__4_1 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
Addr__4_2 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST 4_1 4_2 addresses: %08x %08x", Addr__4_1, Addr__4_2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0005:
|
|
||||||
Addr__5_1 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
Addr__5_2 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST 5_1 5_2 addresses: %08x %08x", Addr__5_1, Addr__5_2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0006:
|
|
||||||
Addr__6 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST 6 address: %08x", Addr__6);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x07:
|
|
||||||
Addr__AXOutSBuffer = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST OutSBuffer address: %08x", Addr__AXOutSBuffer);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0009:
|
|
||||||
Addr__9 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST 6 address: %08x", Addr__9);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0a:
|
|
||||||
Addr__A = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST CompressorTable address: %08x", Addr__A);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x000e:
|
|
||||||
Addr__AXOutSBuffer_1 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
Addr__AXOutSBuffer_2 = Memory_Read_U32(uAddress);
|
|
||||||
uAddress += 4;
|
|
||||||
DebugLog("AXLIST sbuf2 addresses: %08x %08x", Addr__AXOutSBuffer_1, Addr__AXOutSBuffer_2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0f:
|
|
||||||
bExecuteList = false;
|
|
||||||
DebugLog("AXLIST end");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0010: //monkey ball2
|
|
||||||
DebugLog("AXLIST unknown");
|
|
||||||
//should probably read/skip stuff here
|
|
||||||
uAddress += 8;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0011:
|
|
||||||
uAddress += 4;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0012:
|
|
||||||
Addr__12 = Memory_Read_U16(uAddress);
|
|
||||||
uAddress += 2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x0013:
|
|
||||||
uAddress += 6 * 4; // 6 Addresses
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
static bool bFirst = true;
|
|
||||||
|
|
||||||
if (bFirst == true)
|
|
||||||
{
|
|
||||||
char szTemp[2048];
|
|
||||||
sprintf(szTemp, "Unknown AX-Command 0x%x (address: 0x%08x)\n", iCommand, uAddress - 2);
|
|
||||||
int num = 0;
|
|
||||||
|
|
||||||
while (num < 64)
|
|
||||||
{
|
|
||||||
char szTemp2[128] = "";
|
|
||||||
sprintf(szTemp2, "0x%04x\n", Memory_Read_U16(uAddress + num));
|
|
||||||
strcat(szTemp, szTemp2);
|
|
||||||
num += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
PanicAlert(szTemp);
|
|
||||||
|
|
||||||
bFirst = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// unknown command so stop the execution of this TaskList
|
|
||||||
bExecuteList = false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DebugLog("AXTask - done, send resume");
|
|
||||||
|
|
||||||
// i hope resume is okay AX
|
|
||||||
m_rMailHandler.PushMail(0xDCD10001);
|
|
||||||
|
|
||||||
return(true);
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class CUCode_AX
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
// constructor
|
|
||||||
CUCode_AX(CMailHandler& _rMailHandler);
|
|
||||||
|
|
||||||
// destructor
|
|
||||||
virtual ~CUCode_AX();
|
|
||||||
|
|
||||||
// HandleMail
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
|
|
||||||
// Mix Add
|
|
||||||
void MixAdd(short* _pBuffer, int _iSize);
|
|
||||||
|
|
||||||
// Update
|
|
||||||
void Update();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// ax task message handler
|
|
||||||
bool AXTask(u32& _uMail);
|
|
||||||
|
|
||||||
// SendMail
|
|
||||||
void SendMail(u32 _uMail);
|
|
||||||
};
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "../DSPHandler.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_CARD.h"
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_CARD::CUCode_CARD(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
{
|
|
||||||
DebugLog("CUCode_CARD - initialized");
|
|
||||||
m_rMailHandler.PushMail(DSP_INIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_CARD::~CUCode_CARD()
|
|
||||||
{
|
|
||||||
m_rMailHandler.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_CARD::Update()
|
|
||||||
{
|
|
||||||
// check if we have to sent something
|
|
||||||
if (!m_rMailHandler.IsEmpty())
|
|
||||||
{
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ==================================================================================================
|
|
||||||
// Mail handler
|
|
||||||
// ==================================================================================================
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_CARD::HandleMail(u32 _uMail)
|
|
||||||
{
|
|
||||||
if (_uMail == 0xFF000000) // unlock card
|
|
||||||
{
|
|
||||||
// m_Mails.push(0x00000001); // ACK (actualy anything != 0)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DebugLog("CUCode_CARD - unknown cmd: %x (size %i)", _uMail);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rMailHandler.PushMail(DSP_DONE);
|
|
||||||
CDSPHandler::GetInstance().SetUCode(UCODE_ROM);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODE_CARD_H
|
|
||||||
#define _UCODE_CARD_H
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
class CUCode_CARD
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
enum EDSP_Codes
|
|
||||||
{
|
|
||||||
DSP_INIT = 0xDCD10000,
|
|
||||||
DSP_RESUME = 0xDCD10001,
|
|
||||||
DSP_YIELD = 0xDCD10002,
|
|
||||||
DSP_DONE = 0xDCD10003,
|
|
||||||
DSP_SYNC = 0xDCD10004,
|
|
||||||
DSP_UNKN = 0xDCD10005,
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// constructor
|
|
||||||
CUCode_CARD(CMailHandler& _rMailHandler);
|
|
||||||
|
|
||||||
// destructor
|
|
||||||
virtual ~CUCode_CARD();
|
|
||||||
|
|
||||||
// handle mail
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
|
|
||||||
|
|
||||||
// update
|
|
||||||
void Update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "../DSPHandler.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_InitAudioSystem.h"
|
|
||||||
|
|
||||||
CUCode_InitAudioSystem::CUCode_InitAudioSystem(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
, m_BootTask_numSteps(0)
|
|
||||||
, m_NextParameter(0)
|
|
||||||
, IsInitialized(false)
|
|
||||||
{
|
|
||||||
DebugLog("CUCode_InitAudioSystem - initialized");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_InitAudioSystem::~CUCode_InitAudioSystem()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_InitAudioSystem::Init()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_InitAudioSystem::Update()
|
|
||||||
{
|
|
||||||
if (m_rMailHandler.IsEmpty())
|
|
||||||
{
|
|
||||||
m_rMailHandler.PushMail(0x80544348);
|
|
||||||
// HALT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_InitAudioSystem::HandleMail(u32 _uMail)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODE_INITAUDIOSYSTEM
|
|
||||||
#define _UCODE_INITAUDIOSYSTEM
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
class CUCode_InitAudioSystem
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
CUCode_InitAudioSystem(CMailHandler& _rMailHandler);
|
|
||||||
virtual ~CUCode_InitAudioSystem();
|
|
||||||
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
void Update();
|
|
||||||
void Init();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
struct SUCode
|
|
||||||
{
|
|
||||||
u32 m_RAMAddress;
|
|
||||||
u32 m_Length;
|
|
||||||
u32 m_IMEMAddress;
|
|
||||||
u32 m_Unk;
|
|
||||||
u32 m_StartPC;
|
|
||||||
};
|
|
||||||
|
|
||||||
SUCode m_CurrentUCode;
|
|
||||||
int m_BootTask_numSteps;
|
|
||||||
|
|
||||||
u32 m_NextParameter;
|
|
||||||
|
|
||||||
bool IsInitialized;
|
|
||||||
|
|
||||||
void BootUCode();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,162 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_Jac.h"
|
|
||||||
#include "../MailHandler.h"
|
|
||||||
|
|
||||||
CUCode_Jac::CUCode_Jac(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
, m_bListInProgress(false)
|
|
||||||
{
|
|
||||||
DebugLog("CUCode_Jac: init");
|
|
||||||
m_rMailHandler.PushMail(0xDCD10000);
|
|
||||||
m_rMailHandler.PushMail(0x80000000);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_Jac::~CUCode_Jac()
|
|
||||||
{
|
|
||||||
m_rMailHandler.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Jac::HandleMail(u32 _uMail)
|
|
||||||
{
|
|
||||||
// this is prolly totally bullshit and should work like the zelda one...
|
|
||||||
// but i am to lazy to change it atm
|
|
||||||
|
|
||||||
if (m_bListInProgress == false)
|
|
||||||
{
|
|
||||||
// get the command to find out how much steps it has
|
|
||||||
switch (_uMail & 0xFFFF)
|
|
||||||
{
|
|
||||||
// release halt
|
|
||||||
case 0x00:
|
|
||||||
// m_Mails.push(0x80000000);
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x40:
|
|
||||||
m_step = 0;
|
|
||||||
((u32*)m_Buffer)[m_step++] = _uMail;
|
|
||||||
m_bListInProgress = true;
|
|
||||||
m_numSteps = 5;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x2000:
|
|
||||||
case 0x4000:
|
|
||||||
m_step = 0;
|
|
||||||
((u32*)m_Buffer)[m_step++] = _uMail;
|
|
||||||
m_bListInProgress = true;
|
|
||||||
m_numSteps = 3;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
PanicAlert("UCode Jac");
|
|
||||||
DebugLog("UCode Jac - unknown cmd: %x", _uMail & 0xFFFF);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
((u32*)m_Buffer)[m_step] = _uMail;
|
|
||||||
m_step++;
|
|
||||||
|
|
||||||
if (m_step == m_numSteps)
|
|
||||||
{
|
|
||||||
ExecuteList();
|
|
||||||
m_bListInProgress = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Jac::Update()
|
|
||||||
{
|
|
||||||
// check if we have to sent something
|
|
||||||
/* if (!g_MailHandler.empty())
|
|
||||||
{
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Jac::ExecuteList()
|
|
||||||
{
|
|
||||||
// begin with the list
|
|
||||||
m_readOffset = 0;
|
|
||||||
|
|
||||||
u16 cmd = Read16();
|
|
||||||
u16 sync = Read16();
|
|
||||||
|
|
||||||
DebugLog("==============================================================================");
|
|
||||||
DebugLog("UCode Jac - execute dlist (cmd: 0x%04x : sync: 0x%04x)", cmd, sync);
|
|
||||||
|
|
||||||
switch (cmd)
|
|
||||||
{
|
|
||||||
// ==============================================================================
|
|
||||||
// DsetupTable
|
|
||||||
// ==============================================================================
|
|
||||||
case 0x40:
|
|
||||||
{
|
|
||||||
u32 tmp[4];
|
|
||||||
tmp[0] = Read32();
|
|
||||||
tmp[1] = Read32();
|
|
||||||
tmp[2] = Read32();
|
|
||||||
tmp[3] = Read32();
|
|
||||||
|
|
||||||
DebugLog("DsetupTable");
|
|
||||||
DebugLog("???: 0x%08x", tmp[0]);
|
|
||||||
DebugLog("DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
|
||||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
|
||||||
DebugLog("???: 0x%08x", tmp[3]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// ==============================================================================
|
|
||||||
// UpdateDSPChannel
|
|
||||||
// ==============================================================================
|
|
||||||
case 0x2000:
|
|
||||||
case 0x4000: // animal crossing
|
|
||||||
{
|
|
||||||
u32 tmp[3];
|
|
||||||
tmp[0] = Read32();
|
|
||||||
tmp[1] = Read32();
|
|
||||||
tmp[2] = Read32();
|
|
||||||
|
|
||||||
DebugLog("UpdateDSPChannel");
|
|
||||||
DebugLog("audiomemory: 0x%08x", tmp[0]);
|
|
||||||
DebugLog("audiomemory: 0x%08x", tmp[1]);
|
|
||||||
DebugLog("DSPADPCM_FILTER (size: 0x40): 0x%08x", tmp[2]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
PanicAlert("UCode Jac unknown cmd: %s (size %)", cmd, m_numSteps);
|
|
||||||
DebugLog("Jac UCode - unknown cmd: %x (size %i)", cmd, m_numSteps);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// sync, we are rdy
|
|
||||||
m_rMailHandler.PushMail(DSP_SYNC);
|
|
||||||
m_rMailHandler.PushMail(0xF3550000 | sync);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODE_JAC
|
|
||||||
#define _UCODE_JAC
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
class CUCode_Jac
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
enum EDSP_Codes
|
|
||||||
{
|
|
||||||
DSP_INIT = 0xDCD10000,
|
|
||||||
DSP_RESUME = 0xDCD10001,
|
|
||||||
DSP_YIELD = 0xDCD10002,
|
|
||||||
DSP_DONE = 0xDCD10003,
|
|
||||||
DSP_SYNC = 0xDCD10004,
|
|
||||||
DSP_UNKN = 0xDCD10005,
|
|
||||||
};
|
|
||||||
|
|
||||||
// List in progre
|
|
||||||
bool m_bListInProgress;
|
|
||||||
int m_numSteps;
|
|
||||||
int m_step;
|
|
||||||
u8 m_Buffer[1024];
|
|
||||||
void ExecuteList();
|
|
||||||
|
|
||||||
|
|
||||||
u32 m_readOffset;
|
|
||||||
|
|
||||||
u8 Read8()
|
|
||||||
{
|
|
||||||
return(m_Buffer[m_readOffset++]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u16 Read16()
|
|
||||||
{
|
|
||||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
|
||||||
m_readOffset += 2;
|
|
||||||
return(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u32 Read32()
|
|
||||||
{
|
|
||||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
|
||||||
m_readOffset += 4;
|
|
||||||
return(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// constructor
|
|
||||||
CUCode_Jac(CMailHandler& _rMailHandler);
|
|
||||||
|
|
||||||
// destructor
|
|
||||||
virtual ~CUCode_Jac();
|
|
||||||
|
|
||||||
// handleMail
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
|
|
||||||
void Update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "../DSPHandler.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_ROM.h"
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_Rom::CUCode_Rom(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
, m_BootTask_numSteps(0)
|
|
||||||
, m_NextParameter(0)
|
|
||||||
{
|
|
||||||
DebugLog("UCode_Rom - initialized");
|
|
||||||
m_rMailHandler.Clear();
|
|
||||||
m_rMailHandler.PushMail(0x8071FEED);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_Rom::~CUCode_Rom()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Rom::Update()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void CUCode_Rom::HandleMail(u32 _uMail)
|
|
||||||
{
|
|
||||||
if (m_NextParameter == 0)
|
|
||||||
{
|
|
||||||
// wait for beginning of UCode
|
|
||||||
if ((_uMail & 0xFFFF0000) != 0x80F30000)
|
|
||||||
{
|
|
||||||
u32 Message = 0xFEEE0000 | (_uMail & 0xFFFF);
|
|
||||||
m_rMailHandler.PushMail(Message);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_NextParameter = _uMail;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (m_NextParameter)
|
|
||||||
{
|
|
||||||
case 0x80F3A001:
|
|
||||||
m_CurrentUCode.m_RAMAddress = _uMail;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x80F3A002:
|
|
||||||
m_CurrentUCode.m_Length = _uMail;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x80F3C002:
|
|
||||||
m_CurrentUCode.m_IMEMAddress = _uMail;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x80F3B002:
|
|
||||||
m_CurrentUCode.m_Unk = _uMail;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x80F3D001:
|
|
||||||
{
|
|
||||||
m_CurrentUCode.m_StartPC = _uMail;
|
|
||||||
BootUCode();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_NextParameter = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_Rom::BootUCode()
|
|
||||||
{
|
|
||||||
// simple non-scientific crc invented by ector :P
|
|
||||||
// too annoying to change now, and probably good enough anyway
|
|
||||||
u32 crc = 0;
|
|
||||||
|
|
||||||
for (u32 i = 0; i < m_CurrentUCode.m_Length; i++)
|
|
||||||
{
|
|
||||||
crc ^= Memory_Read_U8(m_CurrentUCode.m_RAMAddress + i);
|
|
||||||
//let's rol
|
|
||||||
crc = (crc << 3) | (crc >> 29);
|
|
||||||
}
|
|
||||||
|
|
||||||
DebugLog("CurrentUCode SOURCE Addr: 0x%08x", m_CurrentUCode.m_RAMAddress);
|
|
||||||
DebugLog("CurrentUCode Length: 0x%08x", m_CurrentUCode.m_Length);
|
|
||||||
DebugLog("CurrentUCode DEST Addr: 0x%08x", m_CurrentUCode.m_IMEMAddress);
|
|
||||||
DebugLog("CurrentUCode ???: 0x%08x", m_CurrentUCode.m_Unk);
|
|
||||||
DebugLog("CurrentUCode init_vector: 0x%08x", m_CurrentUCode.m_StartPC);
|
|
||||||
DebugLog("CurrentUCode CRC: 0x%08x", crc);
|
|
||||||
DebugLog("BootTask - done");
|
|
||||||
|
|
||||||
CDSPHandler::GetInstance().SetUCode(crc);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODE_ROM
|
|
||||||
#define _UCODE_ROM
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
class CUCode_Rom
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
CUCode_Rom(CMailHandler& _rMailHandler);
|
|
||||||
virtual ~CUCode_Rom();
|
|
||||||
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
void Update();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
struct SUCode
|
|
||||||
{
|
|
||||||
u32 m_RAMAddress;
|
|
||||||
u32 m_Length;
|
|
||||||
u32 m_IMEMAddress;
|
|
||||||
u32 m_Unk;
|
|
||||||
u32 m_StartPC;
|
|
||||||
};
|
|
||||||
|
|
||||||
SUCode m_CurrentUCode;
|
|
||||||
int m_BootTask_numSteps;
|
|
||||||
|
|
||||||
u32 m_NextParameter;
|
|
||||||
|
|
||||||
void BootUCode();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,171 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
// Games that uses this UCode:
|
|
||||||
// Zelda: The Windwalker, Mario Sunshine, Mario Kart
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
#include "UCode_Zelda.h"
|
|
||||||
#include "../MailHandler.h"
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler)
|
|
||||||
: IUCode(_rMailHandler)
|
|
||||||
, m_numSteps(0)
|
|
||||||
, m_bListInProgress(false)
|
|
||||||
{
|
|
||||||
DebugLog("UCode_Zelda - add boot mails for handshake");
|
|
||||||
m_rMailHandler.PushMail(DSP_INIT);
|
|
||||||
m_rMailHandler.PushMail(0x80000000); // handshake
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CUCode_Zelda::~CUCode_Zelda()
|
|
||||||
{
|
|
||||||
m_rMailHandler.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_Zelda::Update()
|
|
||||||
{
|
|
||||||
// check if we have to sent something
|
|
||||||
if (!m_rMailHandler.IsEmpty())
|
|
||||||
{
|
|
||||||
g_dspInitialize.pGenerateDSPInterrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ==================================================================================================
|
|
||||||
// Mail handler
|
|
||||||
// ==================================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_Zelda::HandleMail(u32 _uMail)
|
|
||||||
{
|
|
||||||
if (m_bListInProgress == false)
|
|
||||||
{
|
|
||||||
m_bListInProgress = true;
|
|
||||||
m_numSteps = _uMail;
|
|
||||||
m_step = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
((u32*)m_Buffer)[m_step] = _uMail;
|
|
||||||
m_step++;
|
|
||||||
|
|
||||||
if (m_step == m_numSteps)
|
|
||||||
{
|
|
||||||
ExecuteList();
|
|
||||||
m_bListInProgress = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
CUCode_Zelda::ExecuteList()
|
|
||||||
{
|
|
||||||
// begin with the list
|
|
||||||
m_readOffset = 0;
|
|
||||||
|
|
||||||
u32 Temp = Read32();
|
|
||||||
u32 Command = (Temp >> 24) & 0x7f;
|
|
||||||
u32 Sync = Temp >> 16;
|
|
||||||
|
|
||||||
DebugLog("==============================================================================");
|
|
||||||
DebugLog("Zelda UCode - execute dlist (cmd: 0x%04x : sync: 0x%04x)", Command, Sync);
|
|
||||||
|
|
||||||
switch (Command)
|
|
||||||
{
|
|
||||||
// DsetupTable ... zelda ww jumps to 0x0095
|
|
||||||
case 0x01:
|
|
||||||
{
|
|
||||||
u32 tmp[4];
|
|
||||||
tmp[0] = Read32();
|
|
||||||
tmp[1] = Read32();
|
|
||||||
tmp[2] = Read32();
|
|
||||||
tmp[3] = Read32();
|
|
||||||
|
|
||||||
DebugLog("DsetupTable");
|
|
||||||
DebugLog("???: 0x%08x", tmp[0]);
|
|
||||||
DebugLog("DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
|
||||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
|
||||||
DebugLog("???: 0x%08x", tmp[3]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// SyncFrame ... zelda ww jumps to 0x0243
|
|
||||||
case 0x02:
|
|
||||||
{
|
|
||||||
u32 tmp[3];
|
|
||||||
tmp[0] = Read32();
|
|
||||||
tmp[1] = Read32();
|
|
||||||
tmp[2] = Read32();
|
|
||||||
|
|
||||||
DebugLog("DsyncFrame");
|
|
||||||
DebugLog("???: 0x%08x", tmp[0]);
|
|
||||||
DebugLog("???: 0x%08x", tmp[1]);
|
|
||||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
/*
|
|
||||||
case 0x03: break; // dunno ... zelda ww jmps to 0x0073
|
|
||||||
case 0x04: break; // dunno ... zelda ww jmps to 0x0580
|
|
||||||
case 0x05: break; // dunno ... zelda ww jmps to 0x0592
|
|
||||||
case 0x06: break; // dunno ... zelda ww jmps to 0x0469
|
|
||||||
|
|
||||||
case 0x07: break; // dunno ... zelda ww jmps to 0x044d
|
|
||||||
case 0x08: break; // Mixer ... zelda ww jmps to 0x0485
|
|
||||||
case 0x09: break; // dunno ... zelda ww jmps to 0x044d
|
|
||||||
*/
|
|
||||||
|
|
||||||
// DsetDolbyDelay ... zelda ww jumps to 0x00b2
|
|
||||||
case 0x0d:
|
|
||||||
{
|
|
||||||
u32 tmp[2];
|
|
||||||
tmp[0] = Read32();
|
|
||||||
tmp[1] = Read32();
|
|
||||||
|
|
||||||
DebugLog("DSetDolbyDelay");
|
|
||||||
DebugLog("DOLBY2_DELAY_BUF (size 0x960): 0x%08x", tmp[0]);
|
|
||||||
DebugLog("DSPRES_FILTER (size 0x500): 0x%08x", tmp[1]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Set VARAM
|
|
||||||
case 0x0e:
|
|
||||||
// MessageBox(NULL, "Zelda VARAM", "cmd", MB_OK);
|
|
||||||
break;
|
|
||||||
|
|
||||||
// default ... zelda ww jumps to 0x0043
|
|
||||||
default:
|
|
||||||
PanicAlert("Zelda UCode - unknown cmd: %x (size %i)", Command, m_numSteps);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// sync, we are rdy
|
|
||||||
m_rMailHandler.PushMail(DSP_SYNC);
|
|
||||||
m_rMailHandler.PushMail(0xF3550000 | Sync);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODE_ZELDA_H
|
|
||||||
#define _UCODE_ZELDA_H
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
class CUCode_Zelda
|
|
||||||
: public IUCode
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
enum EDSP_Codes
|
|
||||||
{
|
|
||||||
DSP_INIT = 0xDCD10000,
|
|
||||||
DSP_RESUME = 0xDCD10001,
|
|
||||||
DSP_YIELD = 0xDCD10002,
|
|
||||||
DSP_DONE = 0xDCD10003,
|
|
||||||
DSP_SYNC = 0xDCD10004,
|
|
||||||
DSP_UNKN = 0xDCD10005,
|
|
||||||
};
|
|
||||||
|
|
||||||
// List in progress
|
|
||||||
int m_numSteps;
|
|
||||||
bool m_bListInProgress;
|
|
||||||
int m_step;
|
|
||||||
u8 m_Buffer[1024];
|
|
||||||
void ExecuteList();
|
|
||||||
|
|
||||||
|
|
||||||
u32 m_readOffset;
|
|
||||||
|
|
||||||
u8 Read8()
|
|
||||||
{
|
|
||||||
return(m_Buffer[m_readOffset++]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u16 Read16()
|
|
||||||
{
|
|
||||||
u16 res = *(u16*)&m_Buffer[m_readOffset];
|
|
||||||
m_readOffset += 2;
|
|
||||||
return(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
u32 Read32()
|
|
||||||
{
|
|
||||||
u32 res = *(u32*)&m_Buffer[m_readOffset];
|
|
||||||
m_readOffset += 4;
|
|
||||||
return(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
CUCode_Zelda(CMailHandler& _rMailHandler);
|
|
||||||
virtual ~CUCode_Zelda();
|
|
||||||
|
|
||||||
void HandleMail(u32 _uMail);
|
|
||||||
void Update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Globals.h"
|
|
||||||
|
|
||||||
#include "UCodes.h"
|
|
||||||
|
|
||||||
#include "UCode_AX.h"
|
|
||||||
#include "UCode_Zelda.h"
|
|
||||||
#include "UCode_Jac.h"
|
|
||||||
#include "UCode_ROM.h"
|
|
||||||
#include "UCode_CARD.h"
|
|
||||||
#include "UCode_InitAudioSystem.h"
|
|
||||||
|
|
||||||
IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
|
||||||
{
|
|
||||||
switch (_CRC)
|
|
||||||
{
|
|
||||||
case UCODE_ROM:
|
|
||||||
return(new CUCode_Rom(_rMailHandler));
|
|
||||||
|
|
||||||
case UCODE_INIT_AUDIO_SYSTEM:
|
|
||||||
return(new CUCode_InitAudioSystem(_rMailHandler));
|
|
||||||
|
|
||||||
case 0x65d6cc6f: // CARD
|
|
||||||
return(new CUCode_CARD(_rMailHandler));
|
|
||||||
|
|
||||||
case 0x088e38a5: // IPL - JAP
|
|
||||||
case 0xd73338cf: // IPL
|
|
||||||
case 0x42f64ac4: // Luigi (after fix)
|
|
||||||
case 0x4be6a5cb: // AC, Pikmin (after fix)
|
|
||||||
DebugLog("JAC ucode chosen");
|
|
||||||
return(new CUCode_Jac(_rMailHandler));
|
|
||||||
|
|
||||||
case 0x3ad3b7ac: // Naruto3
|
|
||||||
case 0x3daf59b9: // Alien Hominid
|
|
||||||
case 0x4e8a8b21: // spdemo, ctaxi, 18 wheeler, disney, monkeyball2,cubivore,puzzlecollection,wario,
|
|
||||||
// capcom vs snk, naruto2, lost kingdoms, star fox, mario party 4, mortal kombat,
|
|
||||||
// smugglers run warzone, smash brothers, sonic mega collection, ZooCube
|
|
||||||
// nddemo, starfox
|
|
||||||
case 0x07f88145: // bustamove, ikaruga, fzero, robotech battle cry, star soldier, soul calibur2,
|
|
||||||
// Zelda:OOT, Tony hawk, viewtiful joe
|
|
||||||
case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080
|
|
||||||
DebugLog("AX ucode chosen, yay!");
|
|
||||||
return(new CUCode_AX(_rMailHandler));
|
|
||||||
|
|
||||||
case 0x6CA33A6D: // DK Jungle Beat
|
|
||||||
case 0x86840740: // zelda
|
|
||||||
case 0x56d36052: // mario
|
|
||||||
case 0x2fcdf1ec: // mariokart, zelda 4 swords
|
|
||||||
DebugLog("Zelda ucode chosen");
|
|
||||||
return(new CUCode_Zelda(_rMailHandler));
|
|
||||||
|
|
||||||
// WII CRCs
|
|
||||||
case 0x6c3f6f94: // zelda - PAL
|
|
||||||
case 0xd643001f: // mario galaxy - PAL
|
|
||||||
DebugLog("Zelda Wii ucode chosen");
|
|
||||||
return(new CUCode_Zelda(_rMailHandler));
|
|
||||||
|
|
||||||
case 0x347112ba: // raving rabbits
|
|
||||||
DebugLog("Wii - AX chosen");
|
|
||||||
return(new CUCode_AX(_rMailHandler));
|
|
||||||
|
|
||||||
default:
|
|
||||||
PanicAlert("Unknown ucode (CRC = %08x) - forcing AX", _CRC);
|
|
||||||
return(new CUCode_AX(_rMailHandler));
|
|
||||||
}
|
|
||||||
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#ifndef _UCODES_H
|
|
||||||
#define _UCODES_H
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
|
|
||||||
#define UCODE_ROM 0x0000000
|
|
||||||
#define UCODE_INIT_AUDIO_SYSTEM 0x0000001
|
|
||||||
|
|
||||||
class CMailHandler;
|
|
||||||
class IUCode
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
IUCode(CMailHandler& _rMailHandler)
|
|
||||||
: m_rMailHandler(_rMailHandler)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
virtual ~IUCode()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
virtual void HandleMail(u32 _uMail) = 0;
|
|
||||||
virtual void Update(void) = 0;
|
|
||||||
|
|
||||||
|
|
||||||
virtual void MixAdd(short* buffer, int size) {}
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
CMailHandler& m_rMailHandler;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,245 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "Globals.h"
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "PCHW/DSoundStream.h"
|
|
||||||
#include "AboutDlg.h"
|
|
||||||
#include "ConfigDlg.h"
|
|
||||||
#else
|
|
||||||
#include "PCHW/AOSoundStream.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "PCHW/Mixer.h"
|
|
||||||
|
|
||||||
#include "DSPHandler.h"
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
DSPInitialize g_dspInitialize;
|
|
||||||
u8* g_pMemory;
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
HINSTANCE g_hInstance = NULL;
|
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|
||||||
DWORD dwReason, // reason called
|
|
||||||
LPVOID lpvReserved) // reserved
|
|
||||||
{
|
|
||||||
switch (dwReason)
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|
||||||
{
|
|
||||||
_PluginInfo->Version = 0x0100;
|
|
||||||
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
|
||||||
|
|
||||||
#ifdef DEBUGFAST
|
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-NULL Plugin (DebugFast)");
|
|
||||||
#else
|
|
||||||
#ifndef _DEBUG
|
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-NULL Plugin");
|
|
||||||
#else
|
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-NULL Plugin (Debug)");
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DllAbout(HWND _hParent)
|
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
CAboutDlg aboutDlg;
|
|
||||||
aboutDlg.DoModal(_hParent);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DllConfig(HWND _hParent)
|
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
CConfigDlg configDlg;
|
|
||||||
configDlg.DoModal(_hParent);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_Initialize(DSPInitialize _dspInitialize)
|
|
||||||
{
|
|
||||||
g_Config.LoadDefaults();
|
|
||||||
g_Config.Load();
|
|
||||||
|
|
||||||
g_dspInitialize = _dspInitialize;
|
|
||||||
|
|
||||||
g_pMemory = g_dspInitialize.pGetMemoryPointer(0);
|
|
||||||
|
|
||||||
CDSPHandler::CreateInstance();
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
DSound::DSound_StartSound((HWND)g_dspInitialize.hWnd, g_Config.m_SampleRate, Mixer);
|
|
||||||
#else
|
|
||||||
AOSound::AOSound_StartSound(g_Config.m_SampleRate, Mixer);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_Shutdown()
|
|
||||||
{
|
|
||||||
// delete the UCodes
|
|
||||||
#ifdef _WIN32
|
|
||||||
DSound::DSound_StopSound();
|
|
||||||
#else
|
|
||||||
AOSound::AOSound_StopSound();
|
|
||||||
#endif
|
|
||||||
CDSPHandler::Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct DSPState
|
|
||||||
{
|
|
||||||
u32 CPUMailbox;
|
|
||||||
bool CPUMailbox_Written[2];
|
|
||||||
|
|
||||||
u32 DSPMailbox;
|
|
||||||
bool DSPMailbox_Read[2];
|
|
||||||
|
|
||||||
DSPState()
|
|
||||||
{
|
|
||||||
CPUMailbox = 0x00000000;
|
|
||||||
CPUMailbox_Written[0] = false;
|
|
||||||
CPUMailbox_Written[1] = false;
|
|
||||||
|
|
||||||
DSPMailbox = 0x00000000;
|
|
||||||
DSPMailbox_Read[0] = true;
|
|
||||||
DSPMailbox_Read[1] = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
DSPState g_dspState;
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short DSP_ReadMailboxHigh(bool _CPUMailbox)
|
|
||||||
{
|
|
||||||
if (_CPUMailbox)
|
|
||||||
{
|
|
||||||
return((g_dspState.CPUMailbox >> 16) & 0xFFFF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return(CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxHigh());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short DSP_ReadMailboxLow(bool _CPUMailbox)
|
|
||||||
{
|
|
||||||
if (_CPUMailbox)
|
|
||||||
{
|
|
||||||
return(g_dspState.CPUMailbox & 0xFFFF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return(CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxLow());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Update_DSP_WriteRegister()
|
|
||||||
{
|
|
||||||
// check if the whole message is complete and if we can send it
|
|
||||||
if (g_dspState.CPUMailbox_Written[0] && g_dspState.CPUMailbox_Written[1])
|
|
||||||
{
|
|
||||||
CDSPHandler::GetInstance().SendMailToDSP(g_dspState.CPUMailbox);
|
|
||||||
g_dspState.CPUMailbox_Written[0] = g_dspState.CPUMailbox_Written[1] = false;
|
|
||||||
g_dspState.CPUMailbox = 0; // Mail sent so clear it to show that it is progressed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_WriteMailboxHigh(bool _CPUMailbox, unsigned short _Value)
|
|
||||||
{
|
|
||||||
if (_CPUMailbox)
|
|
||||||
{
|
|
||||||
g_dspState.CPUMailbox = (g_dspState.CPUMailbox & 0xFFFF) | (_Value << 16);
|
|
||||||
g_dspState.CPUMailbox_Written[0] = true;
|
|
||||||
|
|
||||||
Update_DSP_WriteRegister();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PanicAlert("CPU can't write %08x to DSP mailbox", _Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_WriteMailboxLow(bool _CPUMailbox, unsigned short _Value)
|
|
||||||
{
|
|
||||||
if (_CPUMailbox)
|
|
||||||
{
|
|
||||||
g_dspState.CPUMailbox = (g_dspState.CPUMailbox & 0xFFFF0000) | _Value;
|
|
||||||
g_dspState.CPUMailbox_Written[1] = true;
|
|
||||||
|
|
||||||
Update_DSP_WriteRegister();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PanicAlert("CPU cant write %08x to DSP mailbox", _Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short DSP_WriteControlRegister(unsigned short _Value)
|
|
||||||
{
|
|
||||||
return(CDSPHandler::GetInstance().WriteControlRegister(_Value));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned short DSP_ReadControlRegister()
|
|
||||||
{
|
|
||||||
return(CDSPHandler::GetInstance().ReadControlRegister());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_Update()
|
|
||||||
{
|
|
||||||
CDSPHandler::GetInstance().Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DSP_SendAIBuffer(unsigned int _Address, unsigned int _Size)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void DllDebugger(HWND _hParent)
|
|
||||||
{}
|
|
@ -1,32 +0,0 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
|
||||||
// Microsoft Visual C++ generated include file.
|
|
||||||
// Used by resource.rc
|
|
||||||
//
|
|
||||||
#define IDD_SETTINGS 101
|
|
||||||
#define IDD_DIALOG2 102
|
|
||||||
#define IDD_ABOUT 102
|
|
||||||
#define IDC_COMBO1 1001
|
|
||||||
#define IDC_SAMPLERATE 1001
|
|
||||||
#define IDC_EDIT1 1002
|
|
||||||
#define IDC_SAMPLEDUMPPATH 1002
|
|
||||||
#define IDC_CHECK1 1003
|
|
||||||
#define IDC_ENABLE_AUDIO 1003
|
|
||||||
#define IDC_ENABLE_HLE_AUDIO 1003
|
|
||||||
#define IDC_CHECK2 1004
|
|
||||||
#define IDC_ENABLE_DTK_MUSIC 1004
|
|
||||||
#define IDC_DUMPSAMPLES 1005
|
|
||||||
#define IDC_SAMPLEMINLENGTH 1006
|
|
||||||
#define IDC_BROWSE 1007
|
|
||||||
#define IDC_ANTIGAP 1009
|
|
||||||
#define IDC_CHECK3 1010
|
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@ -1,125 +0,0 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
|
||||||
//
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include "afxres.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.S.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"#include ""afxres.h""\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_SETTINGS DIALOGEX 0, 0, 241, 135
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Dolphin DSP-NULL settings"
|
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,129,114,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,184,114,50,14
|
|
||||||
GROUPBOX "&Sound settings",IDC_STATIC,7,7,227,26
|
|
||||||
CONTROL "Enab&le DTK Music",IDC_ENABLE_DTK_MUSIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,102,8
|
|
||||||
GROUPBOX "&Audio quality",IDC_STATIC,7,36,227,70
|
|
||||||
LTEXT "Sample &rate:",IDC_STATIC,13,52,67,9
|
|
||||||
COMBOBOX IDC_SAMPLERATE,81,50,65,13,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
LTEXT "48000hz recommended, if it doesn't work use 44100, it will slow down some music. Changing this during a game will have no effect.",IDC_STATIC,81,65,146,32
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_ABOUT DIALOGEX 0, 0, 184, 65
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "About Dolphin DSP-NULL plugin"
|
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,127,44,50,14
|
|
||||||
LTEXT "Coded by ector and F|RES",IDC_STATIC,51,21,104,14
|
|
||||||
LTEXT "Dolphin DSP-NULL plugin",IDC_STATIC,51,7,104,14
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO
|
|
||||||
BEGIN
|
|
||||||
IDD_SETTINGS, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 234
|
|
||||||
VERTGUIDE, 13
|
|
||||||
VERTGUIDE, 122
|
|
||||||
VERTGUIDE, 168
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 128
|
|
||||||
HORZGUIDE, 31
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_ABOUT, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 177
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 58
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 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/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
|
||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
|
||||||
|
|
||||||
// Windows Header Files:
|
|
||||||
#include <windows.h>
|
|
||||||
#include <tchar.h>
|
|
||||||
|
|
||||||
// WTL
|
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlapp.h>
|
|
||||||
#include <atldlgs.h>
|
|
||||||
#include <atlctrls.h>
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
x
Reference in New Issue
Block a user