diff --git a/Source/Core/AudioCommon/AudioCommon.vcproj b/Source/Core/AudioCommon/AudioCommon.vcproj
index 42615ae6b5..c5f5c90abc 100644
--- a/Source/Core/AudioCommon/AudioCommon.vcproj
+++ b/Source/Core/AudioCommon/AudioCommon.vcproj
@@ -1,7 +1,7 @@
GetSoundBackends()
diff --git a/Source/Core/AudioCommon/Src/AudioCommon.h b/Source/Core/AudioCommon/Src/AudioCommon.h
index f908300e10..d9fe1ab88a 100644
--- a/Source/Core/AudioCommon/Src/AudioCommon.h
+++ b/Source/Core/AudioCommon/Src/AudioCommon.h
@@ -20,13 +20,11 @@
#include "Common.h"
#include "AudioCommonConfig.h"
-#include "../../../PluginSpecs/pluginspecs_dsp.h"
#include "SoundStream.h"
class CMixer;
-extern DSPInitialize g_dspInitialize;
extern SoundStream *soundStream;
extern AudioCommonConfig ac_Config;
@@ -57,7 +55,7 @@ union UDSPControl
namespace AudioCommon
{
- SoundStream *InitSoundStream(CMixer *mixer = NULL);
+ SoundStream *InitSoundStream(CMixer *mixer, void *hWnd);
void ShutdownSoundStream();
std::vector GetSoundBackends();
bool UseJIT();
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
index 20369858ee..c3e35d05ed 100644
--- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
+++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp
@@ -16,8 +16,12 @@
// http://code.google.com/p/dolphin-emu/
#include "AudioCommon.h"
+
AudioCommonConfig ac_Config;
+// This shouldn't be a global, at least not here.
+SoundStream *soundStream;
+
// Load from given file
void AudioCommonConfig::Load(IniFile &file) {
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
diff --git a/Source/Core/AudioCommon/Src/DSoundStream.cpp b/Source/Core/AudioCommon/Src/DSoundStream.cpp
index 7b17431cbc..4823c46732 100644
--- a/Source/Core/AudioCommon/Src/DSoundStream.cpp
+++ b/Source/Core/AudioCommon/Src/DSoundStream.cpp
@@ -125,9 +125,9 @@ bool DSound::Start()
if (FAILED(DirectSoundCreate8(0, &ds, 0)))
return false;
- if (g_dspInitialize.hWnd)
+ if (hWnd)
{
- HRESULT hr = ds->SetCooperativeLevel((HWND)g_dspInitialize.hWnd, DSSCL_PRIORITY);
+ HRESULT hr = ds->SetCooperativeLevel((HWND)hWnd, DSSCL_PRIORITY);
}
if (!CreateBuffer())
return false;
diff --git a/Source/Core/AudioCommon/Src/DSoundStream.h b/Source/Core/AudioCommon/Src/DSoundStream.h
index 73d6fcbae3..ab3ab1996a 100644
--- a/Source/Core/AudioCommon/Src/DSoundStream.h
+++ b/Source/Core/AudioCommon/Src/DSoundStream.h
@@ -60,13 +60,14 @@ class DSound : public SoundStream
bool WriteDataToBuffer(DWORD dwOffset, char* soundData, DWORD dwSoundBytes);
public:
- DSound(CMixer *mixer, void *hWnd = NULL)
+ DSound(CMixer *mixer, void *_hWnd = NULL)
: SoundStream(mixer)
, bufferSize(0)
, currentPos(0)
, lastPos(0)
, dsBuffer(0)
, ds(0)
+ , hWnd(_hWnd)
{}
virtual ~DSound() {}
diff --git a/Source/Core/AudioCommon/Src/Mixer.cpp b/Source/Core/AudioCommon/Src/Mixer.cpp
index d50cf34fb5..dd08ed57af 100644
--- a/Source/Core/AudioCommon/Src/Mixer.cpp
+++ b/Source/Core/AudioCommon/Src/Mixer.cpp
@@ -21,6 +21,11 @@
#include "AudioCommon.h"
#include "CPUDetect.h"
+#include "../../Core/Src/HW/AudioInterface.h"
+
+// UGLINESS
+#include "../../Core/Src/PowerPC/PowerPC.h"
+
#if _M_SSE >= 0x301 && !(defined __GNUC__ && !defined __SSSE3__)
#include
#endif
@@ -33,14 +38,11 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
if (!samples)
return 0;
- if (g_dspInitialize.pEmulatorState)
+ if (PowerPC::GetState() != 0)
{
- if (*g_dspInitialize.pEmulatorState != 0)
- {
- // Silence
- memset(samples, 0, numSamples * 4);
- return numSamples;
- }
+ // Silence
+ memset(samples, 0, numSamples * 4);
+ return numSamples;
}
unsigned int numLeft = Common::AtomicLoad(m_numSamples);
@@ -127,7 +129,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
if (m_EnableDTKMusic)
{
// Re-sampling is done inside
- g_dspInitialize.pGetAudioStreaming(samples, numSamples, m_sampleRate);
+ AudioInterface::Callback_GetStreaming(samples, numSamples, m_sampleRate);
}
Common::AtomicAdd(m_numSamples, -(s32)numLeft);
@@ -136,18 +138,15 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
}
-void CMixer::PushSamples(short *samples, unsigned int num_samples)
+void CMixer::PushSamples(const short *samples, unsigned int num_samples)
{
if (m_throttle)
{
// The auto throttle function. This loop will put a ceiling on the CPU MHz.
while (num_samples + Common::AtomicLoad(m_numSamples) > MAX_SAMPLES)
{
- if (g_dspInitialize.pEmulatorState)
- {
- if (*g_dspInitialize.pEmulatorState != 0)
- break;
- }
+ if (*PowerPC::GetStatePtr() != 0)
+ break;
// Shortcut key for Throttle Skipping
#ifdef _WIN32
if (GetAsyncKeyState(VK_TAB)) break;;
diff --git a/Source/Core/AudioCommon/Src/Mixer.h b/Source/Core/AudioCommon/Src/Mixer.h
index 984ec1c211..0ce68ed259 100644
--- a/Source/Core/AudioCommon/Src/Mixer.h
+++ b/Source/Core/AudioCommon/Src/Mixer.h
@@ -48,11 +48,11 @@ public:
// Called from audio threads
virtual unsigned int Mix(short* samples, unsigned int numSamples);
- virtual void Premix(short *samples, unsigned int numSamples) {}
+ virtual void Premix(short * /*samples*/, unsigned int /*numSamples*/) {}
unsigned int GetNumSamples();
// Called from main thread
- virtual void PushSamples(short* samples, unsigned int num_samples);
+ virtual void PushSamples(const short* samples, unsigned int num_samples);
unsigned int GetSampleRate() {return m_sampleRate;}
void SetThrottle(bool use) { m_throttle = use;}
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj
index 1667d5711f..934ac966c0 100644
--- a/Source/Core/Common/Common.vcproj
+++ b/Source/Core/Common/Common.vcproj
@@ -1,7 +1,7 @@
-
-
-
-
diff --git a/Source/Core/Common/Src/PluginDSP.cpp b/Source/Core/Common/Src/PluginDSP.cpp
deleted file mode 100644
index 965d7c8792..0000000000
--- a/Source/Core/Common/Src/PluginDSP.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (C) 2003 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 "PluginDSP.h"
-
-namespace Common {
-
-PluginDSP::PluginDSP(const char *_Filename)
-: CPlugin(_Filename), validDSP(false)
-{
- DSP_ReadMailboxHigh = reinterpret_cast
- (LoadSymbol("DSP_ReadMailboxHigh"));
- DSP_ReadMailboxLow = reinterpret_cast
- (LoadSymbol("DSP_ReadMailboxLow"));
- DSP_WriteMailboxHigh = reinterpret_cast
- (LoadSymbol("DSP_WriteMailboxHigh"));
- DSP_WriteMailboxLow = reinterpret_cast
- (LoadSymbol("DSP_WriteMailboxLow"));
- DSP_ReadControlRegister = reinterpret_cast
- (LoadSymbol("DSP_ReadControlRegister"));
- DSP_WriteControlRegister = reinterpret_cast
- (LoadSymbol("DSP_WriteControlRegister"));
- DSP_Update = reinterpret_cast
- (LoadSymbol("DSP_Update"));
- DSP_SendAIBuffer = reinterpret_cast
- (LoadSymbol("DSP_SendAIBuffer"));
- DSP_StopSoundStream = reinterpret_cast
- (LoadSymbol("DSP_StopSoundStream"));
- DSP_ClearAudioBuffer = reinterpret_cast
- (LoadSymbol("DSP_ClearAudioBuffer"));
-
- if ((DSP_ReadMailboxHigh != 0) &&
- (DSP_ReadMailboxLow != 0) &&
- (DSP_WriteMailboxHigh != 0) &&
- (DSP_WriteMailboxLow != 0) &&
- (DSP_ReadControlRegister != 0) &&
- (DSP_WriteControlRegister != 0) &&
- (DSP_SendAIBuffer != 0) &&
- (DSP_Update != 0) &&
- (DSP_StopSoundStream != 0) &&
- (DSP_ClearAudioBuffer != 0))
- validDSP = true;
-}
-
-PluginDSP::~PluginDSP() {
-}
-
-} // namespace
diff --git a/Source/Core/Common/Src/PluginDSP.h b/Source/Core/Common/Src/PluginDSP.h
deleted file mode 100644
index 4fb658d0a1..0000000000
--- a/Source/Core/Common/Src/PluginDSP.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (C) 2003 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 _PLUGINDSP_H_
-#define _PLUGINDSP_H_
-
-#include "pluginspecs_dsp.h"
-#include "Plugin.h"
-
-namespace Common {
-
-typedef void (__cdecl* TDSP_WriteMailBox)(bool _CPUMailbox, unsigned short);
-typedef unsigned short (__cdecl* TDSP_ReadMailBox)(bool _CPUMailbox);
-typedef unsigned short (__cdecl* TDSP_ReadControlRegister)();
-typedef unsigned short (__cdecl* TDSP_WriteControlRegister)(unsigned short);
-typedef void (__cdecl *TDSP_SendAIBuffer)(unsigned int address, unsigned int num_samples);
-typedef void (__cdecl *TDSP_Update)(int cycles);
-typedef void (__cdecl *TDSP_StopSoundStream)();
-typedef void (__cdecl *TDSP_ClearAudioBuffer)();
-
-class PluginDSP : public CPlugin
-{
-public:
- PluginDSP(const char *_Filename);
- virtual ~PluginDSP();
- virtual bool IsValid() {return validDSP;};
-
- TDSP_ReadMailBox DSP_ReadMailboxHigh;
- TDSP_ReadMailBox DSP_ReadMailboxLow;
- TDSP_WriteMailBox DSP_WriteMailboxHigh;
- TDSP_WriteMailBox DSP_WriteMailboxLow;
- TDSP_ReadControlRegister DSP_ReadControlRegister;
- TDSP_WriteControlRegister DSP_WriteControlRegister;
- TDSP_SendAIBuffer DSP_SendAIBuffer;
- TDSP_Update DSP_Update;
- TDSP_StopSoundStream DSP_StopSoundStream;
- TDSP_ClearAudioBuffer DSP_ClearAudioBuffer;
-
-private:
- bool validDSP;
-
-};
-
-} // namespace
-
-#endif // _PLUGINDSP_H_
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index efce26727d..779e48ff25 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -13,6 +13,7 @@ set(SRCS Src/ActionReplay.cpp
Src/OnFrame.cpp
Src/PatchEngine.cpp
Src/PluginManager.cpp
+ Src/PluginDSP.cpp
Src/State.cpp
Src/stdafx.cpp
Src/Tracer.cpp
@@ -32,6 +33,32 @@ set(SRCS Src/ActionReplay.cpp
Src/HW/AudioInterface.cpp
Src/HW/CPU.cpp
Src/HW/DSP.cpp
+ Src/DSPHandler.cpp
+ Src/MailHandler.cpp
+ Src/HLEMixer.cpp
+ Src/main.cpp
+ Src/Config.cpp
+ Src/HW/DSPHLE/UCodes/UCode_AX.cpp
+ Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
+ Src/HW/DSPHLE/UCodes/UCode_CARD.cpp
+ Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp
+ Src/HW/DSPHLE/UCodes/UCode_ROM.cpp
+ Src/HW/DSPHLE/UCodes/UCodes.cpp
+ Src/HW/DSPHLE/UCodes/UCode_GBA.cpp
+ Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
+ Src/HW/DSPHLE/UCodes/UCode_Zelda_ADPCM.cpp
+ Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
+ Src/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp)
+ Src/HW/DSPHLE/DSPHandler.cpp
+ Src/HW/DSPHLE/HLEMixer.cpp
+ Src/HW/DSPHLE/MailHandler.cpp
+ Src/HW/DSPHLE/DSPHLE.cpp
+ Src/HW/DSPLLE/DSPDebugInterface.cpp
+ Src/HW/DSPLLE/DSPHost.cpp
+ Src/HW/DSPLLE/DSPSymbols.cpp
+ Src/HW/DSPLLE/DSPLLEGlobals.cpp
+ Src/HW/DSPLLE/DSPLLE.cpp
+ Src/HW/DSPLLE/DSPLLETools.cpp
Src/HW/DVDInterface.cpp
Src/HW/EXI_Channel.cpp
Src/HW/EXI.cpp
diff --git a/Source/Core/Core/Core.vcproj b/Source/Core/Core/Core.vcproj
index f83c42385d..14062d9312 100644
--- a/Source/Core/Core/Core.vcproj
+++ b/Source/Core/Core/Core.vcproj
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1585,6 +1773,14 @@
RelativePath=".\Src\PatchEngine.h"
>
+
+
+
+
diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp
index c24370b8e2..a1a0e2c3bb 100644
--- a/Source/Core/Core/Src/ConfigManager.cpp
+++ b/Source/Core/Core/Src/ConfigManager.cpp
@@ -155,6 +155,7 @@ void SConfig::SaveSettings()
ini.Set("Core", "CPUCore", m_LocalCoreStartupParameter.iCPUCore);
ini.Set("Core", "CPUThread", m_LocalCoreStartupParameter.bCPUThread);
ini.Set("Core", "DSPThread", m_LocalCoreStartupParameter.bDSPThread);
+ ini.Set("Core", "DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
ini.Set("Core", "SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
ini.Set("Core", "LockThreads", m_LocalCoreStartupParameter.bLockThreads);
ini.Set("Core", "DefaultGCM", m_LocalCoreStartupParameter.m_strDefaultGCM);
@@ -184,7 +185,6 @@ void SConfig::SaveSettings()
// Plugins
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
- ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
m_SYSCONF->Save();
@@ -280,6 +280,7 @@ void SConfig::LoadSettings()
ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
ini.Get("Core", "CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 1);
ini.Get("Core", "DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false);
+ ini.Get("Core", "DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
ini.Get("Core", "CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
ini.Get("Core", "SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, false);
@@ -318,7 +319,6 @@ void SConfig::LoadSettings()
// Plugins
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
- ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
}
m_SYSCONF = new SysConf();
diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp
index f375e65c19..f5b2be9c0b 100644
--- a/Source/Core/Core/Src/Core.cpp
+++ b/Source/Core/Core/Src/Core.cpp
@@ -59,6 +59,7 @@
#include "PowerPC/JitCommon/JitBase.h"
#include "PluginManager.h"
+#include "PluginDSP.h"
#include "ConfigManager.h"
#include "VolumeHandler.h"
@@ -369,24 +370,7 @@ void EmuThread()
Callback_PeekMessages = VideoInitialize.pPeekMessages;
g_pUpdateFPSDisplay = VideoInitialize.pUpdateFPSDisplay;
- // Load and init DSPPlugin
- DSPInitialize dspInit;
- dspInit.hWnd = g_pWindowHandle;
- dspInit.pARAM_Read_U8 = (u8 (__cdecl *)(const u32))DSP::ReadARAM;
- dspInit.pARAM_Write_U8 = (void (__cdecl *)(const u8, const u32))DSP::WriteARAM;
- dspInit.pGetARAMPointer = DSP::GetARAMPtr;
- dspInit.pGetMemoryPointer = Memory::GetPointer;
- dspInit.pLog = Callback_DSPLog;
- dspInit.pName = Callback_ISOName;
- dspInit.pDebuggerBreak = Callback_DebuggerBreak;
- dspInit.pGenerateDSPInterrupt = Callback_DSPInterrupt;
- dspInit.pGetAudioStreaming = AudioInterface::Callback_GetStreaming;
- dspInit.pGetSampleRate = AudioInterface::Callback_GetSampleRate;
- dspInit.pEmulatorState = (int *)PowerPC::GetStatePtr();
- dspInit.bWii = _CoreParameter.bWii;
- dspInit.bOnThread = _CoreParameter.bDSPThread;
-
- Plugins.GetDSP()->Initialize((void *)&dspInit);
+ DSP::GetPlugin()->Initialize(g_pWindowHandle, _CoreParameter.bWii, _CoreParameter.bDSPThread);
Pad::Initialize(g_pWindowHandle);
@@ -484,7 +468,7 @@ void EmuThread()
// Stop audio thread - Actually this does nothing on HLE plugin.
// But stops the DSP Interpreter on LLE plugin.
- Plugins.GetDSP()->DSP_StopSoundStream();
+ DSP::GetPlugin()->DSP_StopSoundStream();
// We must set up this flag before executing HW::Shutdown()
g_bHwInit = false;
@@ -499,7 +483,6 @@ void EmuThread()
Pad::Shutdown();
Wiimote::Shutdown();
- Plugins.ShutdownPlugins();
NOTICE_LOG(CONSOLE, "%s", StopMessage(false, "Plugins shutdown").c_str());
diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp
index 23e82231ac..ec32a13ac0 100644
--- a/Source/Core/Core/Src/CoreParameter.cpp
+++ b/Source/Core/Core/Src/CoreParameter.cpp
@@ -42,7 +42,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bJITBranchOff(false), bJITProfiledReJIT(false),
bJITILTimeProfiling(false), bJITILOutputIR(false),
bEnableFPRF(false),
- bCPUThread(true), bDSPThread(false),
+ bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bNTSC(false), bNTSCJ(false),
bHLE_BS2(true), bUseFastMem(false),
bLockThreads(false),
@@ -72,6 +72,7 @@ void SCoreStartupParameter::LoadDefaults()
bCPUThread = false;
bSkipIdle = false;
bRunCompareServer = false;
+ bDSPHLE = true;
bDSPThread = true;
bLockThreads = true;
bEnableFPRF = false;
diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h
index c5b796d4da..b915836cf3 100644
--- a/Source/Core/Core/Src/CoreParameter.h
+++ b/Source/Core/Core/Src/CoreParameter.h
@@ -69,6 +69,7 @@ struct SCoreStartupParameter
bool bCPUThread;
bool bDSPThread;
+ bool bDSPHLE;
bool bSkipIdle;
bool bNTSC;
bool bNTSCJ;
@@ -129,7 +130,6 @@ struct SCoreStartupParameter
// files
std::string m_strVideoPlugin;
- std::string m_strDSPPlugin;
std::string m_strFilename;
std::string m_strBootROM;
diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp
index 025f383276..9b16464d62 100644
--- a/Source/Core/Core/Src/HW/DSP.cpp
+++ b/Source/Core/Core/Src/HW/DSP.cpp
@@ -47,6 +47,7 @@
#include "../PowerPC/PowerPC.h"
#include "../PluginManager.h"
#include "../ConfigManager.h"
+#include "../PluginDSP.h"
namespace DSP
{
@@ -60,8 +61,8 @@ enum
DSP_MAIL_FROM_DSP_LO = 0x5006,
DSP_CONTROL = 0x500A,
DSP_INTERRUPT_CONTROL = 0x5010,
- AR_INFO = 0x5012, // These names are a good guess at best
- AR_MODE = 0x5016, //
+ AR_INFO = 0x5012, // These names are a good guess at best
+ AR_MODE = 0x5016, //
AR_REFRESH = 0x501a,
AR_DMA_MMADDR_H = 0x5020,
AR_DMA_MMADDR_L = 0x5022,
@@ -71,7 +72,7 @@ enum
AR_DMA_CNT_L = 0x502A,
AUDIO_DMA_START_HI = 0x5030,
AUDIO_DMA_START_LO = 0x5032,
- AUDIO_DMA_BLOCKS_LENGTH = 0x5034, // Ever used?
+ AUDIO_DMA_BLOCKS_LENGTH = 0x5034, // Ever used?
AUDIO_DMA_CONTROL_LEN = 0x5036,
AUDIO_DMA_BLOCKS_LEFT = 0x503A,
};
@@ -211,7 +212,7 @@ static ARAM_Info g_ARAM_Info;
static u16 g_AR_MODE;
static u16 g_AR_REFRESH;
-Common::PluginDSP *dsp_plugin;
+PluginDSP *dsp_plugin;
static int dsp_slice = 0;
static bool dsp_is_lle = false;
@@ -229,6 +230,8 @@ void DoState(PointerWrap &p)
p.Do(g_ARAM_Info);
p.Do(g_AR_MODE);
p.Do(g_AR_REFRESH);
+
+ dsp_plugin->DoState(p);
}
@@ -245,13 +248,15 @@ void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
GenerateDSPInterrupt((DSPInterruptType)(userdata&0xFFFF), (bool)((userdata>>16) & 1));
}
-void Init()
+PluginDSP *GetPlugin()
{
- dsp_plugin = CPluginManager::GetInstance().GetDSP();
- PLUGIN_INFO DSPType;
- dsp_plugin->GetInfo(DSPType);
- std::string DSPName(DSPType.Name);
- dsp_is_lle = (DSPName.find("LLE") != std::string::npos) || (DSPName.find("lle") != std::string::npos);
+ return dsp_plugin;
+}
+
+void Init(bool hle)
+{
+ dsp_plugin = CreateDSPPlugin(hle);
+ dsp_is_lle = dsp_plugin->IsLLE();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{
@@ -263,7 +268,7 @@ void Init()
}
else
{
- // On the GC, ARAM is accessible only through this interface (unless you're doing mmu tricks?...)
+ // On the GC, ARAM is accessible only through this interface.
g_ARAM.wii_mode = false;
g_ARAM.size = ARAM_SIZE;
g_ARAM.mask = ARAM_MASK;
@@ -288,6 +293,8 @@ void Shutdown()
FreeMemoryPages(g_ARAM.ptr, g_ARAM.size);
g_ARAM.ptr = NULL;
+ dsp_plugin->Shutdown();
+ delete dsp_plugin;
dsp_plugin = NULL;
}
@@ -301,11 +308,11 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
dsp_plugin->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE;
}
- _uReturnValue = dsp_plugin->DSP_ReadMailboxHigh(true);
+ _uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(true);
break;
case DSP_MAIL_TO_DSP_LO:
- _uReturnValue = dsp_plugin->DSP_ReadMailboxLow(true);
+ _uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(true);
break;
case DSP_MAIL_FROM_DSP_HI:
@@ -313,11 +320,11 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
dsp_plugin->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE;
}
- _uReturnValue = dsp_plugin->DSP_ReadMailboxHigh(false);
+ _uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(false);
break;
case DSP_MAIL_FROM_DSP_LO:
- _uReturnValue = dsp_plugin->DSP_ReadMailboxLow(false);
+ _uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(false);
break;
case DSP_CONTROL:
@@ -382,11 +389,11 @@ void Write16(const u16 _Value, const u32 _Address)
{
// DSP
case DSP_MAIL_TO_DSP_HI:
- dsp_plugin->DSP_WriteMailboxHigh(true, _Value);
+ dsp_plugin->DSP_WriteMailBoxHigh(true, _Value);
break;
case DSP_MAIL_TO_DSP_LO:
- dsp_plugin->DSP_WriteMailboxLow(true, _Value);
+ dsp_plugin->DSP_WriteMailBoxLow(true, _Value);
break;
case DSP_MAIL_FROM_DSP_HI:
@@ -527,7 +534,7 @@ void Read32(u32& _uReturnValue, const u32 _iAddress)
{
// DSP
case DSP_MAIL_TO_DSP_HI:
- _uReturnValue = (dsp_plugin->DSP_ReadMailboxHigh(true) << 16) | dsp_plugin->DSP_ReadMailboxLow(true);
+ _uReturnValue = (dsp_plugin->DSP_ReadMailBoxHigh(true) << 16) | dsp_plugin->DSP_ReadMailBoxLow(true);
break;
// AI
@@ -563,8 +570,8 @@ void Write32(const u32 _iValue, const u32 _iAddress)
{
// DSP
case DSP_MAIL_TO_DSP_HI:
- dsp_plugin->DSP_WriteMailboxHigh(true, _iValue >> 16);
- dsp_plugin->DSP_WriteMailboxLow(true, (u16)_iValue);
+ dsp_plugin->DSP_WriteMailBoxHigh(true, _iValue >> 16);
+ dsp_plugin->DSP_WriteMailBoxLow(true, (u16)_iValue);
break;
// AI
diff --git a/Source/Core/Core/Src/HW/DSP.h b/Source/Core/Core/Src/HW/DSP.h
index 0e501d6445..843c2b16d9 100644
--- a/Source/Core/Core/Src/HW/DSP.h
+++ b/Source/Core/Core/Src/HW/DSP.h
@@ -20,6 +20,7 @@
#include "Common.h"
class PointerWrap;
+class PluginDSP;
namespace DSP
{
@@ -38,8 +39,11 @@ enum
ARAM_MASK = 0x00FFFFFF,
};
-void Init();
+void Init(bool hle);
void Shutdown();
+
+PluginDSP *GetPlugin();
+
void DoState(PointerWrap &p);
void GenerateDSPInterrupt(DSPInterruptType _DSPInterruptType, bool _bSet = true);
diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp
new file mode 100644
index 0000000000..a10d84aefc
--- /dev/null
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp
@@ -0,0 +1,229 @@
+// Copyright (C) 2003 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
+
+#include "DSPHLEGlobals.h" // Local
+
+#include "ChunkFile.h"
+#include "IniFile.h"
+#include "HLEMixer.h"
+#include "DSPHandler.h"
+#include "Config.h"
+#include "Setup.h"
+#include "StringUtil.h"
+#include "LogManager.h"
+#include "IniFile.h"
+#include "DSPHLE.h"
+#include "../AudioInterface.h"
+
+DSPHLE::DSPHLE() {
+ g_InitMixer = false;
+ soundStream = NULL;
+}
+
+// Mailbox utility
+struct DSPState
+{
+ u32 CPUMailbox;
+ u32 DSPMailbox;
+
+ void Reset() {
+ CPUMailbox = 0x00000000;
+ DSPMailbox = 0x00000000;
+ }
+
+ DSPState()
+ {
+ Reset();
+ }
+};
+DSPState g_dspState;
+
+void DSPHLE::Initialize(void *hWnd, bool bWii, bool bDSPThread)
+{
+ this->hWnd = hWnd;
+ this->bWii = bWii;
+
+ g_InitMixer = false;
+ g_dspState.Reset();
+
+ CDSPHandler::CreateInstance(bWii);
+}
+
+void DSPHLE::DSP_StopSoundStream()
+{
+}
+
+void DSPHLE::Shutdown()
+{
+ AudioCommon::ShutdownSoundStream();
+
+ // Delete the UCodes
+ CDSPHandler::Destroy();
+}
+
+void DSPHLE::DoState(PointerWrap &p)
+{
+ p.Do(g_InitMixer);
+ CDSPHandler::GetInstance().GetUCode()->DoState(p);
+}
+
+void DSPHLE::EmuStateChange(PLUGIN_EMUSTATE newState)
+{
+ DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
+}
+
+// Mailbox fuctions
+unsigned short DSPHLE::DSP_ReadMailBoxHigh(bool _CPUMailbox)
+{
+ if (_CPUMailbox)
+ {
+ return (g_dspState.CPUMailbox >> 16) & 0xFFFF;
+ }
+ else
+ {
+ return CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxHigh();
+ }
+}
+
+unsigned short DSPHLE::DSP_ReadMailBoxLow(bool _CPUMailbox)
+{
+ if (_CPUMailbox)
+ {
+ return g_dspState.CPUMailbox & 0xFFFF;
+ }
+ else
+ {
+ return CDSPHandler::GetInstance().AccessMailHandler().ReadDSPMailboxLow();
+ }
+}
+
+void DSPHLE::DSP_WriteMailBoxHigh(bool _CPUMailbox, unsigned short _Value)
+{
+ if (_CPUMailbox)
+ {
+ g_dspState.CPUMailbox = (g_dspState.CPUMailbox & 0xFFFF) | (_Value << 16);
+ }
+ else
+ {
+ PanicAlert("CPU can't write %08x to DSP mailbox", _Value);
+ }
+}
+
+void DSPHLE::DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short _Value)
+{
+ if (_CPUMailbox)
+ {
+ g_dspState.CPUMailbox = (g_dspState.CPUMailbox & 0xFFFF0000) | _Value;
+ CDSPHandler::GetInstance().SendMailToDSP(g_dspState.CPUMailbox);
+ // Mail sent so clear MSB to show that it is progressed
+ g_dspState.CPUMailbox &= 0x7FFFFFFF;
+ }
+ else
+ {
+ PanicAlert("CPU can't write %08x to DSP mailbox", _Value);
+ }
+}
+
+
+// Other DSP fuctions
+unsigned short DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
+{
+ UDSPControl Temp(_Value);
+ if (!g_InitMixer)
+ {
+ if (!Temp.DSPHalt && Temp.DSPInit)
+ {
+ unsigned int AISampleRate, DACSampleRate, BackendSampleRate;
+ AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
+ std::string frequency = ac_Config.sFrequency;
+ if (frequency == "48,000 Hz")
+ BackendSampleRate = 48000;
+ else
+ BackendSampleRate = 32000;
+
+ soundStream = AudioCommon::InitSoundStream(
+ new HLEMixer(AISampleRate, DACSampleRate, BackendSampleRate), hWnd);
+ if(!soundStream) PanicAlert("Error starting up sound stream");
+ // Mixer is initialized
+ g_InitMixer = true;
+ }
+ }
+ return CDSPHandler::GetInstance().WriteControlRegister(_Value);
+}
+
+unsigned short DSPHLE::DSP_ReadControlRegister()
+{
+ return CDSPHandler::GetInstance().ReadControlRegister();
+}
+
+void DSPHLE::DSP_Update(int cycles)
+{
+ // This is called OFTEN - better not do anything expensive!
+ // ~1/6th as many cycles as the period PPC-side.
+ CDSPHandler::GetInstance().Update(cycles / 6);
+}
+
+// The reason that we don't disable this entire
+// function when Other Audio is disabled is that then we can't turn it back on
+// again once the game has started.
+void DSPHLE::DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
+{
+ if (!soundStream)
+ return;
+
+ CMixer* pMixer = soundStream->GetMixer();
+
+ if (pMixer && address)
+ {
+ short* samples = (short*)HLEMemory_Get_Pointer(address);
+ // Internal sample rate is always 32khz
+ pMixer->PushSamples(samples, num_samples);
+
+ // FIXME: Write the audio to a file
+ //if (log_ai)
+ // g_wave_writer.AddStereoSamples(samples, 8);
+ }
+
+ soundStream->Update();
+}
+
+void DSPHLE::DSP_ClearAudioBuffer(bool mute)
+{
+ if (soundStream)
+ soundStream->Clear(mute);
+}
+
+
+#define HLE_CONFIG_FILE "DSP.ini"
+
+void DSPHLE_LoadConfig()
+{
+ // first load defaults
+ IniFile file;
+ file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + HLE_CONFIG_FILE).c_str());
+ ac_Config.Load(file);
+}
+
+void DSPHLE_SaveConfig()
+{
+ IniFile file;
+ file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + HLE_CONFIG_FILE).c_str());
+ ac_Config.Set(file);
+ file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + HLE_CONFIG_FILE).c_str());
+}
diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h
new file mode 100644
index 0000000000..27167fe1c0
--- /dev/null
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h
@@ -0,0 +1,86 @@
+// Copyright (C) 2003 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 _DSPHLE_H
+#define _DSPHLE_H
+
+#include "SoundStream.h"
+#include "DSPHLEGlobals.h" // Local
+#include "../../PluginDSP.h"
+
+class DSPHLE : public PluginDSP {
+public:
+ DSPHLE();
+ ~DSPHLE();
+
+ virtual void Initialize(void *hWnd, bool bWii, bool bDSPThread);
+ virtual void Shutdown();
+ virtual bool IsLLE() { return false; }
+
+ /*
+ GUI
+ virtual void Config(void *_hwnd);
+ virtual void About(void *_hwnd);
+ virtual void *Debug(void *Parent, bool Show);
+ */
+
+ virtual void DoState(PointerWrap &p);
+ virtual void EmuStateChange(PLUGIN_EMUSTATE newState);
+
+ virtual void DSP_WriteMailBoxHigh(bool _CPUMailbox, unsigned short);
+ virtual void DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short);
+ virtual unsigned short DSP_ReadMailBoxHigh(bool _CPUMailbox);
+ virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox);
+ virtual unsigned short DSP_ReadControlRegister();
+ virtual unsigned short DSP_WriteControlRegister(unsigned short);
+ virtual void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples);
+ virtual void DSP_Update(int cycles);
+ virtual void DSP_StopSoundStream();
+ virtual void DSP_ClearAudioBuffer(bool mute);
+
+private:
+ // Declarations and definitions
+ void *hWnd;
+ bool bWii;
+
+ bool g_InitMixer;
+ SoundStream *soundStream;
+
+ // Mailbox utility
+ struct DSPState
+ {
+ u32 CPUMailbox;
+ u32 DSPMailbox;
+
+ void Reset() {
+ CPUMailbox = 0x00000000;
+ DSPMailbox = 0x00000000;
+ }
+
+ DSPState()
+ {
+ Reset();
+ }
+ };
+ DSPState g_dspState;
+};
+
+// Hack to be deleted.
+void DSPHLE_LoadConfig();
+void DSPHLE_SaveConfig();
+
+#endif // _DSPHLE_H
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp b/Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h
similarity index 53%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h
index 9cf01e53c3..b92001856d 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h
@@ -15,29 +15,37 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
+// TODO: Get rid of this file.
+
+#ifndef _GLOBALS_H
+#define _GLOBALS_H
+
#include "Common.h"
-#include "IniFile.h"
-#include "Config.h"
-#include "AudioCommon.h"
-#include "FileUtil.h"
+#include "StringUtil.h"
+#include "../Memmap.h"
-#define LLE_CONFIG_FILE "DSPLLE.ini"
-
-CConfig g_Config;
-
-void CConfig::Load()
+inline u8 HLEMemory_Read_U8(u32 _uAddress)
{
- // first load defaults
- IniFile file;
- file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
- ac_Config.Load(file);
+ _uAddress &= Memory::RAM_MASK;
+ return Memory::m_pRAM[_uAddress];
}
-void CConfig::Save()
+inline u16 HLEMemory_Read_U16(u32 _uAddress)
{
- IniFile file;
- file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
- ac_Config.Set(file);
-
- file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
+ _uAddress &= Memory::RAM_MASK;
+ return Common::swap16(*(u16*)&Memory::m_pRAM[_uAddress]);
}
+
+inline u32 HLEMemory_Read_U32(u32 _uAddress)
+{
+ _uAddress &= Memory::RAM_MASK;
+ return Common::swap32(*(u32*)&Memory::m_pRAM[_uAddress]);
+}
+
+inline void* HLEMemory_Get_Pointer(u32 _uAddress)
+{
+ _uAddress &= Memory::RAM_MASK;
+ return &Memory::m_pRAM[_uAddress];
+}
+
+#endif
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp b/Source/Core/Core/Src/HW/DSPHLE/DSPHandler.cpp
similarity index 92%
rename from Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/DSPHandler.cpp
index 897c687c0a..2f170f9421 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHandler.cpp
@@ -19,11 +19,12 @@
CDSPHandler* CDSPHandler::m_pInstance = NULL;
-CDSPHandler::CDSPHandler()
+CDSPHandler::CDSPHandler(bool bWii)
: m_pUCode(NULL),
m_lastUCode(NULL),
m_bHalt(false),
- m_bAssertInt(false)
+ m_bAssertInt(false),
+ m_bWii(bWii)
{
SetUCode(UCODE_ROM);
m_DSPControl.DSPHalt = 1;
@@ -85,7 +86,7 @@ void CDSPHandler::SetUCode(u32 _crc)
m_pUCode = NULL;
m_MailHandler.Clear();
- m_pUCode = UCodeFactory(_crc, m_MailHandler);
+ m_pUCode = UCodeFactory(_crc, m_MailHandler, m_bWii);
}
// TODO do it better?
@@ -98,7 +99,7 @@ void CDSPHandler::SwapUCode(u32 _crc)
if (m_lastUCode == NULL)
{
m_lastUCode = m_pUCode;
- m_pUCode = UCodeFactory(_crc, m_MailHandler);
+ m_pUCode = UCodeFactory(_crc, m_MailHandler, m_bWii);
}
else
{
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.h b/Source/Core/Core/Src/HW/DSPHLE/DSPHandler.h
similarity index 92%
rename from Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.h
rename to Source/Core/Core/Src/HW/DSPHLE/DSPHandler.h
index e3d28cebce..81e59ae3db 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHandler.h
@@ -47,16 +47,16 @@ public:
m_pInstance = NULL;
}
- static CDSPHandler& CreateInstance()
+ static CDSPHandler& CreateInstance(bool bWii)
{
if (!m_pInstance)
- m_pInstance = new CDSPHandler();
+ m_pInstance = new CDSPHandler(bWii);
return *m_pInstance;
}
private:
- CDSPHandler();
+ CDSPHandler(bool bWii);
~CDSPHandler();
// singleton instance
@@ -70,6 +70,7 @@ private:
bool m_bHalt;
bool m_bAssertInt;
+ bool m_bWii;
};
#endif
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/HLEMixer.cpp b/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp
similarity index 93%
rename from Source/Plugins/Plugin_DSP_HLE/Src/HLEMixer.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp
index 4f3566322d..3bbd403a4a 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/HLEMixer.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp
@@ -16,14 +16,14 @@
// http://code.google.com/p/dolphin-emu/
#include "Config.h" // Local
-#include "Globals.h"
+#include "DSPHLEGlobals.h"
#include "DSPHandler.h"
#include "HLEMixer.h"
void HLEMixer::Premix(short *samples, unsigned int numSamples)
{
// if this was called directly from the HLE
- if (g_Config.m_EnableHLEAudio && IsHLEReady())
+ if (IsHLEReady())
{
IUCode *pUCode = CDSPHandler::GetInstance().GetUCode();
if (pUCode && samples)
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/HLEMixer.h b/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/HLEMixer.h
rename to Source/Core/Core/Src/HW/DSPHLE/HLEMixer.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp b/Source/Core/Core/Src/HW/DSPHLE/MailHandler.cpp
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/MailHandler.cpp
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.h b/Source/Core/Core/Src/HW/DSPHLE/MailHandler.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.h
rename to Source/Core/Core/Src/HW/DSPHLE/MailHandler.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
similarity index 89%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
index 50df0108b9..4382ccea50 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
@@ -18,13 +18,12 @@
#include "FileUtil.h" // For IsDirectory()
#include "StringUtil.h" // For StringFromFormat()
#include
-#include "../Config.h"
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "Mixer.h"
#include "../MailHandler.h"
#include "../DSPHandler.h"
-
+#include "../../DSP.h"
#include "UCodes.h"
#include "UCode_AXStructs.h"
#include "UCode_AX.h"
@@ -66,8 +65,8 @@ static void ProcessUpdates(AXPB &PB)
int on = 0, off = 0;
for (int j = 0; j < numupd; j++)
{
- const u16 updpar = Memory_Read_U16(updaddr + j*4);
- const u16 upddata = Memory_Read_U16(updaddr + j*4 + 2);
+ const u16 updpar = HLEMemory_Read_U16(updaddr + j*4);
+ const u16 upddata = HLEMemory_Read_U16(updaddr + j*4 + 2);
// some safety checks, I hope it's enough
if (updaddr > 0x80000000 && updaddr < 0x817fffff
&& updpar < 63 && updpar > 3 // updpar > 3 because we don't want to change
@@ -91,8 +90,8 @@ static void VoiceHacks(AXPB &pb)
const u32 sampleEnd = (pb.audio_addr.end_addr_hi << 16) | pb.audio_addr.end_addr_lo;
const u32 loopPos = (pb.audio_addr.loop_addr_hi << 16) | pb.audio_addr.loop_addr_lo;
// const u32 updaddr = (u32)(pb.updates.data_hi << 16) | pb.updates.data_lo;
- // const u16 updpar = Memory_Read_U16(updaddr);
- // const u16 upddata = Memory_Read_U16(updaddr + 2);
+ // const u16 updpar = HLEMemory_Read_U16(updaddr);
+ // const u16 upddata = HLEMemory_Read_U16(updaddr + 2);
// =======================================================================================
/* Fix problems introduced with the SSBM fix. Sometimes when a music stream ended sampleEnd
@@ -258,12 +257,12 @@ void CUCode_AX::Update(int cycles)
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
// check if we have to send something
else if (!m_rMailHandler.IsEmpty())
{
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
}
@@ -300,26 +299,26 @@ bool CUCode_AX::AXTask(u32& _uMail)
while (bExecuteList)
{
static int last_valid_command = 0;
- u16 iCommand = Memory_Read_U16(uAddress);
+ u16 iCommand = HLEMemory_Read_U16(uAddress);
uAddress += 2;
switch (iCommand)
{
case AXLIST_STUDIOADDR: //00
- Addr__AXStudio = Memory_Read_U32(uAddress);
+ Addr__AXStudio = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST studio address: %08x", uAddress, Addr__AXStudio);
break;
case 0x001: // 2byte x 10
{
- u32 address = Memory_Read_U32(uAddress);
+ u32 address = HLEMemory_Read_U32(uAddress);
uAddress += 4;
- u16 param1 = Memory_Read_U16(uAddress);
+ u16 param1 = HLEMemory_Read_U16(uAddress);
uAddress += 2;
- u16 param2 = Memory_Read_U16(uAddress);
+ u16 param2 = HLEMemory_Read_U16(uAddress);
uAddress += 2;
- u16 param3 = Memory_Read_U16(uAddress);
+ u16 param3 = HLEMemory_Read_U16(uAddress);
uAddress += 2;
DEBUG_LOG(DSPHLE, "%08x : AXLIST 1: %08x, %04x, %04x, %04x", uAddress, address, param1, param2, param3);
}
@@ -332,10 +331,10 @@ bool CUCode_AX::AXTask(u32& _uMail)
//
case AXLIST_PBADDR: //02
{
- PBaddr[numPBaddr] = Memory_Read_U32(uAddress);
+ PBaddr[numPBaddr] = HLEMemory_Read_U32(uAddress);
numPBaddr++;
- m_addressPBs = Memory_Read_U32(uAddress); // left in for now
+ m_addressPBs = HLEMemory_Read_U32(uAddress); // left in for now
uAddress += 4;
soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "%08x : AXLIST PB address: %08x", uAddress, m_addressPBs);
@@ -347,52 +346,52 @@ bool CUCode_AX::AXTask(u32& _uMail)
break;
case 0x0004: // AUX?
- Addr__4_1 = Memory_Read_U32(uAddress);
+ Addr__4_1 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
- Addr__4_2 = Memory_Read_U32(uAddress);
+ Addr__4_2 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST 4_1 4_2 addresses: %08x %08x", uAddress, Addr__4_1, Addr__4_2);
break;
case 0x0005:
- Addr__5_1 = Memory_Read_U32(uAddress);
+ Addr__5_1 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
- Addr__5_2 = Memory_Read_U32(uAddress);
+ Addr__5_2 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST 5_1 5_2 addresses: %08x %08x", uAddress, Addr__5_1, Addr__5_2);
break;
case 0x0006:
- Addr__6 = Memory_Read_U32(uAddress);
+ Addr__6 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", uAddress, Addr__6);
break;
case AXLIST_SBUFFER:
- Addr__AXOutSBuffer = Memory_Read_U32(uAddress);
+ Addr__AXOutSBuffer = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST OutSBuffer address: %08x", uAddress, Addr__AXOutSBuffer);
break;
case 0x0009:
- Addr__9 = Memory_Read_U32(uAddress);
+ Addr__9 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", uAddress, Addr__9);
break;
case AXLIST_COMPRESSORTABLE: // 0xa
- Addr__A = Memory_Read_U32(uAddress);
+ Addr__A = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST CompressorTable address: %08x", uAddress, Addr__A);
break;
case 0x000e:
- Addr__AXOutSBuffer_1 = Memory_Read_U32(uAddress);
+ Addr__AXOutSBuffer_1 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
// Addr__AXOutSBuffer_2 is the address in RAM that we are supposed to mix to.
// Although we don't, currently.
- Addr__AXOutSBuffer_2 = Memory_Read_U32(uAddress);
+ Addr__AXOutSBuffer_2 = HLEMemory_Read_U32(uAddress);
uAddress += 4;
DEBUG_LOG(DSPHLE, "%08x : AXLIST sbuf2 addresses: %08x %08x", uAddress, Addr__AXOutSBuffer_1, Addr__AXOutSBuffer_2);
break;
@@ -413,7 +412,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
break;
case 0x0012:
- Addr__12 = Memory_Read_U16(uAddress);
+ Addr__12 = HLEMemory_Read_U16(uAddress);
uAddress += 2;
break;
@@ -433,7 +432,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
while (num < 64+32)
{
char szTemp2[128] = "";
- sprintf(szTemp2, "%s0x%04x\n", num == 0 ? ">>" : " ", Memory_Read_U16(uAddress + num));
+ sprintf(szTemp2, "%s0x%04x\n", num == 0 ? ">>" : " ", HLEMemory_Read_U16(uAddress + num));
strcat(szTemp, szTemp2);
num += 2;
}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h
similarity index 98%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h
index 078f7903a7..aa79fcbfda 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.h
@@ -19,7 +19,6 @@
#define _UCODE_AX
#include
-#include "pluginspecs_dsp.h"
#include "UCode_AXStructs.h"
enum
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXStructs.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXStructs.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
similarity index 93%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
index e74459c825..0f0ee07fac 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
@@ -146,12 +146,12 @@ void CUCode_AXWii::Update(int cycles)
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
// check if we have to send something
else if (!m_rMailHandler.IsEmpty())
{
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
}
@@ -167,20 +167,20 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
/*
for (int i=0;i<64;i++) {
- NOTICE_LOG(DSPHLE,"%x - %08x",uAddress+(i*4),Memory_Read_U32(uAddress+(i*4)));
+ NOTICE_LOG(DSPHLE,"%x - %08x",uAddress+(i*4),HLEMemory_Read_U32(uAddress+(i*4)));
}
*/
while (bExecuteList)
{
- u16 iCommand = Memory_Read_U16(uAddress);
+ u16 iCommand = HLEMemory_Read_U16(uAddress);
uAddress += 2;
//NOTICE_LOG(DSPHLE,"AXWII - AXLIST CMD %X",iCommand);
switch (iCommand)
{
case 0x0000:
- Addr__AXStudio = Memory_Read_U32(uAddress);
+ Addr__AXStudio = HLEMemory_Read_U32(uAddress);
uAddress += 4;
break;
@@ -194,7 +194,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
case 0x0004:
// PBs are here now
- m_addressPBs = Memory_Read_U32(uAddress);
+ m_addressPBs = HLEMemory_Read_U32(uAddress);
soundStream->GetMixer()->SetHLEReady(true);
// soundStream->Update();
uAddress += 4;
@@ -210,7 +210,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
break;
case 0x0007: // AXLIST_SBUFFER
- Addr__AXOutSBuffer = Memory_Read_U32(uAddress);
+ Addr__AXOutSBuffer = HLEMemory_Read_U32(uAddress);
uAddress += 10;
break;
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_ADPCM.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h
similarity index 91%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_ADPCM.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h
index b05bbdc11f..1bb05c7c23 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_ADPCM.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h
@@ -17,7 +17,9 @@
#ifndef _UCODE_AX_ADPCM_H
#define _UCODE_AX_ADPCM_H
-#include "../Globals.h"
+
+#include "../DSPHLEGlobals.h"
+#include "../../DSP.h"
inline s16 ADPCM_Step(PBADPCMInfo &adpcm, u32& samplePos, u32 newSamplePos, u16 frac)
{
@@ -25,7 +27,7 @@ inline s16 ADPCM_Step(PBADPCMInfo &adpcm, u32& samplePos, u32 newSamplePos, u16
{
if ((samplePos & 15) == 0)
{
- adpcm.pred_scale = g_dspInitialize.pARAM_Read_U8((samplePos & ~15) >> 1);
+ adpcm.pred_scale = DSP::ReadARAM((samplePos & ~15) >> 1);
samplePos += 2;
newSamplePos += 2;
}
@@ -37,8 +39,8 @@ inline s16 ADPCM_Step(PBADPCMInfo &adpcm, u32& samplePos, u32 newSamplePos, u16
s32 coef2 = adpcm.coefs[coef_idx * 2 + 1];
int temp = (samplePos & 1) ?
- (g_dspInitialize.pARAM_Read_U8(samplePos >> 1) & 0xF) :
- (g_dspInitialize.pARAM_Read_U8(samplePos >> 1) >> 4);
+ (DSP::ReadARAM(samplePos >> 1) & 0xF) :
+ (DSP::ReadARAM(samplePos >> 1) >> 4);
if (temp >= 8)
temp -= 16;
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
similarity index 90%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
index 23d26da868..8bdc7ff7e4 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
@@ -22,13 +22,11 @@
#include "UCode_AX_ADPCM.h"
#include "UCode_AX.h"
#include "Mixer.h"
-#include "../main.h"
-#include "../Config.h"
// MRAM -> ARAM for GC
inline bool ReadPB(u32 addr, AXPB &PB)
{
- const u16* PB_in_mram = (const u16*)g_dspInitialize.pGetMemoryPointer(addr);
+ const u16* PB_in_mram = (const u16*)Memory::GetPointer(addr);
if (PB_in_mram == NULL)
return false;
u16* PB_in_aram = (u16*)&PB;
@@ -44,7 +42,7 @@ inline bool ReadPB(u32 addr, AXPB &PB)
// MRAM -> ARAM for Wii
inline bool ReadPB(u32 addr, AXPBWii &PB)
{
- const u16* PB_in_mram = (const u16*)g_dspInitialize.pGetMemoryPointer(addr);
+ const u16* PB_in_mram = (const u16*)Memory::GetPointer(addr);
if (PB_in_mram == NULL)
return false;
u16* PB_in_aram = (u16*)&PB;
@@ -64,7 +62,7 @@ inline bool ReadPB(u32 addr, AXPBWii &PB)
inline bool WritePB(u32 addr, AXPB &PB)
{
const u16* PB_in_aram = (const u16*)&PB;
- u16* PB_in_mram = (u16*)g_dspInitialize.pGetMemoryPointer(addr);
+ u16* PB_in_mram = (u16*)Memory::GetPointer(addr);
if (PB_in_mram == NULL)
return false;
@@ -80,7 +78,7 @@ inline bool WritePB(u32 addr, AXPB &PB)
inline bool WritePB(u32 addr, AXPBWii &PB)
{
const u16* PB_in_aram = (const u16*)&PB;
- u16* PB_in_mram = (u16*)g_dspInitialize.pGetMemoryPointer(addr);
+ u16* PB_in_mram = (u16*)Memory::GetPointer(addr);
if (PB_in_mram == NULL)
return false;
@@ -167,8 +165,8 @@ inline void MixAddVoice(ParamBlockType &pb,
switch (pb.audio_addr.sample_format)
{
case AUDIOFORMAT_PCM8:
- pb.adpcm.yn2 = ((s8)g_dspInitialize.pARAM_Read_U8(samplePos)) << 8; //current sample
- pb.adpcm.yn1 = ((s8)g_dspInitialize.pARAM_Read_U8(samplePos + 1)) << 8; //next sample
+ pb.adpcm.yn2 = ((s8)DSP::ReadARAM(samplePos)) << 8; //current sample
+ pb.adpcm.yn1 = ((s8)DSP::ReadARAM(samplePos + 1)) << 8; //next sample
if (pb.src_type == SRCTYPE_NEAREST)
sample = pb.adpcm.yn2;
@@ -179,8 +177,8 @@ inline void MixAddVoice(ParamBlockType &pb,
break;
case AUDIOFORMAT_PCM16:
- pb.adpcm.yn2 = (s16)(u16)((g_dspInitialize.pARAM_Read_U8(samplePos * 2) << 8) | (g_dspInitialize.pARAM_Read_U8((samplePos * 2 + 1)))); //current sample
- pb.adpcm.yn1 = (s16)(u16)((g_dspInitialize.pARAM_Read_U8((samplePos + 1) * 2) << 8) | (g_dspInitialize.pARAM_Read_U8(((samplePos + 1) * 2 + 1)))); //next sample
+ pb.adpcm.yn2 = (s16)(u16)((DSP::ReadARAM(samplePos * 2) << 8) | (DSP::ReadARAM((samplePos * 2 + 1)))); //current sample
+ pb.adpcm.yn1 = (s16)(u16)((DSP::ReadARAM((samplePos + 1) * 2) << 8) | (DSP::ReadARAM(((samplePos + 1) * 2 + 1)))); //next sample
if (pb.src_type == SRCTYPE_NEAREST)
sample = pb.adpcm.yn2;
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp
similarity index 93%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp
index 057a9f074a..998e884b1f 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp
@@ -15,10 +15,11 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "../DSPHandler.h"
#include "UCodes.h"
#include "UCode_CARD.h"
+#include "../../DSP.h"
CUCode_CARD::CUCode_CARD(CMailHandler& _rMailHandler)
@@ -40,7 +41,7 @@ void CUCode_CARD::Update(int cycles)
// check if we have to sent something
if (!m_rMailHandler.IsEmpty())
{
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_GBA.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp
similarity index 91%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_GBA.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp
index 919754940b..c29dd56cb6 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_GBA.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp
@@ -15,11 +15,13 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "../DSPHandler.h"
#include "UCodes.h"
#include "UCode_GBA.h"
+#include "../../DSP.h"
+
CUCode_GBA::CUCode_GBA(CMailHandler& _rMailHandler)
: IUCode(_rMailHandler)
{
@@ -36,7 +38,7 @@ void CUCode_GBA::Update(int cycles)
// check if we have to send something
if (!m_rMailHandler.IsEmpty())
{
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
}
@@ -69,7 +71,7 @@ void CUCode_GBA::HandleMail(u32 _uMail)
// 32 bytes from mram addr to dram @ 0
for (int i = 0; i < 8; i++, mramaddr += 4)
- ((u32*)&sec_params)[i] = Memory_Read_U32(mramaddr);
+ ((u32*)&sec_params)[i] = HLEMemory_Read_U32(mramaddr);
// This is the main decrypt routine
u16 x11 = 0, x12 = 0,
@@ -118,8 +120,8 @@ void CUCode_GBA::HandleMail(u32 _uMail)
}
// Send the result back to mram
- *(u32*)Memory_Get_Pointer(sec_params.dest_addr) = Common::swap32((x20 << 16) | x21);
- *(u32*)Memory_Get_Pointer(sec_params.dest_addr+4) = Common::swap32((x22 << 16) | x23);
+ *(u32*)HLEMemory_Get_Pointer(sec_params.dest_addr) = Common::swap32((x20 << 16) | x21);
+ *(u32*)HLEMemory_Get_Pointer(sec_params.dest_addr+4) = Common::swap32((x22 << 16) | x23);
// Done!
DEBUG_LOG(DSPHLE, "\n%08x -> key %08x len %08x dest_addr %08x unk1 %08x unk2 %08x"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_GBA.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_GBA.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp
similarity index 97%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp
index 23af66dd8f..eae0197b99 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp
@@ -15,7 +15,7 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "../DSPHandler.h"
#include "UCodes.h"
#include "UCode_InitAudioSystem.h"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp
similarity index 94%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp
index 443baf867a..2b09ddb57f 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp
@@ -15,11 +15,12 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "../DSPHandler.h"
#include "UCodes.h"
#include "UCode_ROM.h"
#include "Hash.h"
+#include "../../Memmap.h"
CUCode_Rom::CUCode_Rom(CMailHandler& _rMailHandler)
: IUCode(_rMailHandler)
@@ -96,7 +97,7 @@ void CUCode_Rom::HandleMail(u32 _uMail)
void CUCode_Rom::BootUCode()
{
u32 ector_crc = HashEctor(
- (u8*)Memory_Get_Pointer(m_CurrentUCode.m_RAMAddress),
+ (u8*)HLEMemory_Get_Pointer(m_CurrentUCode.m_RAMAddress),
m_CurrentUCode.m_Length);
#if defined(_DEBUG) || defined(DEBUGFAST)
@@ -106,7 +107,7 @@ void CUCode_Rom::BootUCode()
FILE* pFile = fopen(binFile, "wb");
if (pFile)
{
- fwrite((u8*)Memory_Get_Pointer(m_CurrentUCode.m_RAMAddress), m_CurrentUCode.m_Length, 1, pFile);
+ fwrite((u8*)Memory::GetPointer(m_CurrentUCode.m_RAMAddress), m_CurrentUCode.m_Length, 1, pFile);
fclose(pFile);
}
#endif
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
similarity index 95%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
index 065ebbe23b..b942821216 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
@@ -19,16 +19,16 @@
// Zelda: The Windwaker, Mario Sunshine, Mario Kart, Twilight Princess,
// Super Mario Galaxy
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "UCodes.h"
#include "UCode_Zelda.h"
#include "../MailHandler.h"
-#include "../main.h"
#include "Mixer.h"
#include "WaveFile.h"
#include "../DSPHandler.h"
+#include "../../DSP.h"
CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler, u32 _CRC)
@@ -80,7 +80,7 @@ CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler, u32 _CRC)
else
{
m_rMailHandler.PushMail(DSP_INIT);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3551111); // handshake
}
@@ -108,9 +108,9 @@ CUCode_Zelda::~CUCode_Zelda()
u8 *CUCode_Zelda::GetARAMPointer(u32 address)
{
if (IsDMAVersion())
- return (u8 *)(g_dspInitialize.pGetMemoryPointer(m_DMABaseAddr)) + address;
+ return (u8 *)(Memory::GetPointer(m_DMABaseAddr)) + address;
else
- return (u8 *)(g_dspInitialize.pGetARAMPointer()) + address;
+ return (u8 *)(DSP::GetARAMPtr()) + address;
}
void CUCode_Zelda::Update(int cycles)
@@ -118,13 +118,13 @@ void CUCode_Zelda::Update(int cycles)
if (!IsLightVersion())
{
if (m_rMailHandler.GetNextMail() == DSP_FRAME_END)
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
}
@@ -145,7 +145,7 @@ void CUCode_Zelda::HandleMail_LightVersion(u32 _uMail)
if (m_bSyncCmdPending)
{
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
m_CurBuffer++;
if (m_CurBuffer == m_NumBuffers)
@@ -208,13 +208,13 @@ void CUCode_Zelda::HandleMail_SMSVersion(u32 _uMail)
m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
if (m_CurBuffer == m_NumBuffers)
{
m_rMailHandler.PushMail(DSP_FRAME_END);
- //g_dspInitialize.pGenerateDSPInterrupt();
+ // DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
@@ -335,7 +335,7 @@ void CUCode_Zelda::HandleMail_NormalVersion(u32 _uMail)
m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
m_CurVoice = 0;
@@ -465,12 +465,12 @@ void CUCode_Zelda::ExecuteList()
m_ReverbPBsAddr = Read32() & 0x7FFFFFFF; // WARNING: reverb PBs are very different from voice PBs!
// Read the other table
- u16 *TempPtr = (u16*) g_dspInitialize.pGetMemoryPointer(m_UnkTableAddr);
+ u16 *TempPtr = (u16*)Memory::GetPointer(m_UnkTableAddr);
for (int i = 0; i < 0x280; i++)
m_MiscTable[i] = (s16)Common::swap16(TempPtr[i]);
// Read AFC coef table
- TempPtr = (u16*) g_dspInitialize.pGetMemoryPointer(m_AFCCoefTableAddr);
+ TempPtr = (u16*)Memory::GetPointer(m_AFCCoefTableAddr);
for (int i = 0; i < 32; i++)
m_AFCCoefTable[i] = (s16)Common::swap16(TempPtr[i]);
@@ -563,7 +563,7 @@ void CUCode_Zelda::ExecuteList()
else
{
m_rMailHandler.PushMail(DSP_SYNC);
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3550000 | Sync);
}
}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_ADPCM.cpp
similarity index 100%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_ADPCM.cpp
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Obsolete.txt b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Obsolete.txt
similarity index 95%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Obsolete.txt
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Obsolete.txt
index 25e11771c2..441789a550 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Obsolete.txt
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Obsolete.txt
@@ -74,7 +74,7 @@ void CUCode_Zelda::UpdatePB(ZPB& _rPB, int *templbuffer, int *temprbuffer, u32 _
{
for (int i = 0; i < 9; i++)
{
- inBuffer[i] = g_dspInitialize.pARAM_Read_U8(ARAMAddr);
+ inBuffer[i] = DSP::ReadARAM(ARAMAddr);
ARAMAddr++;
}
@@ -97,7 +97,7 @@ void CUCode_Zelda::UpdatePB(ZPB& _rPB, int *templbuffer, int *temprbuffer, u32 _
{
for (int i = 0; i < 9; i++)
{
- inBuffer[i] = g_dspInitialize.pARAM_Read_U8(ARAMAddr);
+ inBuffer[i] = DSP::ReadARAM(ARAMAddr);
ARAMAddr++;
}
@@ -144,7 +144,7 @@ void CUCode_Zelda::UpdatePB(ZPB& _rPB, int *templbuffer, int *temprbuffer, u32 _
static u8 Buffer[500000];
for (int i =0; i
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "UCodes.h"
#include "UCode_Zelda.h"
+#include "AudioCommon.h"
-#include "../main.h"
#include "Mixer.h"
void CUCode_Zelda::RenderSynth_RectWave(ZeldaVoicePB &PB, s32* _Buffer, int _Size)
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
similarity index 97%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
index 2b31507ee4..2f47aec983 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
@@ -15,18 +15,21 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include
+
+#include "../DSPHLEGlobals.h"
#include "UCodes.h"
#include "UCode_Zelda.h"
-#include "../main.h"
+// #include "../main.h"
+#include "AudioCommon.h"
#include "Mixer.h"
-
-#include
+#include "../../Memmap.h"
+#include "../../DSP.h"
void CUCode_Zelda::ReadVoicePB(u32 _Addr, ZeldaVoicePB& PB)
{
- u16 *memory = (u16*)g_dspInitialize.pGetMemoryPointer(_Addr);
+ u16 *memory = (u16*)Memory::GetPointer(_Addr);
// Perform byteswap
for (int i = 0; i < (0x180 / 2); i++)
@@ -45,7 +48,7 @@ void CUCode_Zelda::ReadVoicePB(u32 _Addr, ZeldaVoicePB& PB)
void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB)
{
- u16 *memory = (u16*)g_dspInitialize.pGetMemoryPointer(_Addr);
+ u16 *memory = (u16*)Memory::GetPointer(_Addr);
// Word swap all 32-bit variables.
PB.RestartPos = (PB.RestartPos << 16) | (PB.RestartPos >> 16);
@@ -284,11 +287,11 @@ void CUCode_Zelda::RenderVoice_AFC(ZeldaVoicePB &PB, s16 *_Buffer, int _Size)
const u8 *source;
u32 ram_mask = 1024 * 1024 * 16 - 1;
if (IsDMAVersion()) {
- source = g_dspInitialize.pGetMemoryPointer(m_DMABaseAddr);
+ source = Memory::GetPointer(m_DMABaseAddr);
ram_mask = 1024 * 1024 * 64 - 1;
}
else
- source = g_dspInitialize.pGetARAMPointer();
+ source = DSP::GetARAMPtr();
int sampleCount = 0; // must be above restart.
@@ -417,7 +420,7 @@ void CUCode_Zelda::RenderVoice_Raw(ZeldaVoicePB &PB, s16 *_Buffer, int _Size)
ACC0 -= ACC1;
- PB.Unk36[0] = ACC0 >> 16;
+ PB.Unk36[0] = (u16)(ACC0 >> 16);
// This subtract does really not make much sense at all.
ACC0 -= AX0 << 16;
@@ -436,7 +439,7 @@ void CUCode_Zelda::RenderVoice_Raw(ZeldaVoicePB &PB, s16 *_Buffer, int _Size)
PB.StartAddr = PB.LoopStartPos;
- Decoder21_ReadAudio(PB, ACC0 >> 16, _Buffer);
+ Decoder21_ReadAudio(PB, (int)(ACC0 >> 16), _Buffer);
return;
}
@@ -467,7 +470,7 @@ void Decoder21_ReadAudio(ZeldaVoicePB &PB, int size, s16 *_Buffer)
// ACC1 is the read size
const u32 ram_mask = 0x1FFFFFF;
- const u8 *source = g_dspInitialize.pGetMemoryPointer(0x80000000);
+ const u8 *source = Memory::GetPointer(0x80000000);
const u16 *src = (u16 *)(source + (ACC0 & ram_mask));
for (u32 i = 0; i < (ACC1 >> 16); i++) {
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp
similarity index 96%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp
index 5efa77afa1..370978b53a 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp
@@ -15,7 +15,7 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "../Globals.h"
+#include "../DSPHLEGlobals.h"
#include "UCodes.h"
@@ -29,7 +29,7 @@
#include "Hash.h"
#include "../DSPHandler.h"
-IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
+IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler, bool bWii)
{
switch (_CRC)
{
@@ -95,7 +95,7 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
return new CUCode_AXWii(_rMailHandler, _CRC);
default:
- if (g_dspInitialize.bWii)
+ if (bWii)
{
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AXWii.\n\nTry LLE plugin if this is homebrew.", _CRC);
return new CUCode_AXWii(_rMailHandler, _CRC);
@@ -144,7 +144,7 @@ void IUCode::PrepareBootUCode(u32 mail)
m_UploadSetupInProgress = false;
u32 ector_crc = HashEctor(
- (u8*)Memory_Get_Pointer(m_NextUCode.iram_mram_addr),
+ (u8*)HLEMemory_Get_Pointer(m_NextUCode.iram_mram_addr),
m_NextUCode.iram_size);
#if defined(_DEBUG) || defined(DEBUGFAST)
@@ -154,7 +154,7 @@ void IUCode::PrepareBootUCode(u32 mail)
FILE* pFile = fopen(binFile, "wb");
if (pFile)
{
- fwrite((u8*)Memory_Get_Pointer(m_NextUCode.iram_mram_addr), m_NextUCode.iram_size, 1, pFile);
+ fwrite((u8*)Memory::GetPointer(m_NextUCode.iram_mram_addr), m_NextUCode.iram_size, 1, pFile);
fclose(pFile);
}
#endif
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h
similarity index 99%
rename from Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.h
rename to Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h
index 8512aaafd4..0282f4a934 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h
@@ -94,6 +94,6 @@ private:
bool m_NeedsResumeMail;
};
-extern IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler);
+extern IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler, bool bWii);
#endif
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.h b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.h
rename to Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPHost.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPHost.cpp
similarity index 87%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPHost.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPHost.cpp
index 5adb1cd39e..94c7082b1f 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPHost.cpp
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPHost.cpp
@@ -19,18 +19,20 @@
#include "Hash.h"
#include "DSPHost.h"
#include "DSPSymbols.h"
-#include "Tools.h"
-#include "pluginspecs_dsp.h"
-
-extern DSPInitialize g_dspInitialize;
+#include "DSPLLETools.h"
+#include "../DSP.h"
+#include "../../ConfigManager.h"
+#include "../../PowerPC/PowerPC.h"
+/*
+ECTORTODO
#if defined(HAVE_WX) && HAVE_WX
-#include "DSPConfigDlgLLE.h"
#include "Debugger/DSPDebugWindow.h" // For the DSPDebuggerLLE class
extern DSPDebuggerLLE* m_DebuggerFrame;
#endif
+*/
// The user of the DSPCore library must supply a few functions so that the
// emulation core can access the environment it runs in. If the emulation
@@ -39,28 +41,29 @@ extern DSPDebuggerLLE* m_DebuggerFrame;
u8 DSPHost_ReadHostMemory(u32 addr)
{
- return g_dspInitialize.pARAM_Read_U8(addr);
+ return DSP::ReadARAM(addr);
}
void DSPHost_WriteHostMemory(u8 value, u32 addr)
{
- g_dspInitialize.pARAM_Write_U8(value, addr);
+ DSP::WriteARAM(value, addr);
}
bool DSPHost_OnThread()
{
- return g_dspInitialize.bOnThread;
+ const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
+ return _CoreParameter.bDSPThread;
}
bool DSPHost_Running()
{
- return !(*g_dspInitialize.pEmulatorState);
+ return !(*PowerPC::GetStatePtr());
}
void DSPHost_InterruptRequest()
{
// Fire an interrupt on the PPC ASAP.
- g_dspInitialize.pGenerateDSPInterrupt();
+ DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
}
u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
@@ -100,17 +103,20 @@ u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
// Always add the ROM.
DSPSymbols::AutoDisassembly(0x8000, 0x9000);
+ /* ECTORTODO
#if defined(HAVE_WX) && HAVE_WX
if (m_DebuggerFrame)
m_DebuggerFrame->Refresh();
#endif
+ */
return ector_crc;
}
void DSPHost_UpdateDebugger()
{
+ /* ECTORTODO
#if defined(HAVE_WX) && HAVE_WX
if (m_DebuggerFrame)
m_DebuggerFrame->Refresh();
-#endif
+#endif */
}
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp
similarity index 60%
rename from Source/Plugins/Plugin_DSP_LLE/Src/main.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp
index 1f11eb484c..e83aeccfd7 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp
@@ -25,7 +25,7 @@
#include "ChunkFile.h"
#include "IniFile.h"
-#include "Globals.h" // Local
+#include "DSPLLEGlobals.h" // Local
#include "DSPInterpreter.h"
#include "DSPHWInterface.h"
#include "disassemble.h"
@@ -37,136 +37,23 @@
#include "DSPTables.h"
#include "DSPCore.h"
+#include "DSPLLE.h"
+#include "../Memmap.h"
+#include "../AudioInterface.h"
-#if defined(HAVE_WX) && HAVE_WX
-#include "DSPConfigDlgLLE.h"
-DSPConfigDialogLLE* m_ConfigFrame = NULL;
-#include "Debugger/DSPDebugWindow.h"
-#endif
-PLUGIN_GLOBALS* globals = NULL;
-DSPInitialize g_dspInitialize;
-std::thread g_hDSPThread;
-SoundStream *soundStream = NULL;
-bool g_InitMixer = false;
-
-bool bIsRunning = false;
-volatile u32 cycle_count = 0;
-
-// Standard crap to make wxWidgets happy
-#ifdef _WIN32
-HINSTANCE g_hInstance;
-
-wxLocale *InitLanguageSupport()
-{
- wxLocale *m_locale;
- unsigned int language = 0;
-
- IniFile ini;
- ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
- ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
-
- // Load language if possible, fall back to system default otherwise
- if(wxLocale::IsAvailable(language))
- {
- m_locale = new wxLocale(language);
-
- m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
-
- m_locale->AddCatalog(wxT("dolphin-emu"));
-
- if(!m_locale->IsOk())
- {
- PanicAlertT("Error loading selected language. Falling back to system default.");
- delete m_locale;
- m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
- }
- }
- else
- {
- PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
- m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
- }
- return m_locale;
+DSPLLE::DSPLLE() {
+ soundStream = NULL;
+ g_InitMixer = false;
+ bIsRunning = false;
+ cycle_count = 0;
}
-class wxDLLApp : public wxApp
-{
- bool OnInit()
- {
- return true;
- }
-};
-IMPLEMENT_APP_NO_MAIN(wxDLLApp)
-WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
-
-BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
-{
- static wxLocale *m_locale;
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- wxSetInstance((HINSTANCE)hinstDLL);
- wxInitialize();
- m_locale = InitLanguageSupport();
- }
- break;
-
- case DLL_PROCESS_DETACH:
- wxUninitialize();
- delete m_locale;
- 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-LLE Plugin (DebugFast)");
-#elif defined _DEBUG
- sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
-#else
- sprintf(_PluginInfo->Name, _trans("Dolphin DSP-LLE Plugin"));
-#endif
+DSPLLE::~DSPLLE() {
}
-void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
+void DSPLLE::DoState(PointerWrap &p)
{
- globals = _pPluginGlobals;
- LogManager::SetInstance((LogManager *)globals->logManager);
-}
-
-void DllConfig(void *_hParent)
-{
-#if defined(HAVE_WX) && HAVE_WX
- m_ConfigFrame = new DSPConfigDialogLLE((wxWindow *)_hParent);
-
- // add backends
- std::vector backends = AudioCommon::GetSoundBackends();
-
- for (std::vector::const_iterator iter = backends.begin();
- iter != backends.end(); ++iter)
- {
- m_ConfigFrame->AddBackend((*iter).c_str());
- }
-
- m_ConfigFrame->ShowModal();
-
- m_ConfigFrame->Destroy();
-#endif
-}
-
-void DoState(unsigned char **ptr, int mode)
-{
- PointerWrap p(ptr, mode);
p.Do(g_InitMixer);
p.Do(g_dsp.r);
@@ -194,11 +81,12 @@ void DoState(unsigned char **ptr, int mode)
p.Do(cycle_count);
}
-void EmuStateChange(PLUGIN_EMUSTATE newState)
+void DSPLLE::EmuStateChange(PLUGIN_EMUSTATE newState)
{
DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
}
+ /* ECTORTODO
void *DllDebugger(void *_hParent, bool Show)
{
#if defined(HAVE_WX) && HAVE_WX
@@ -208,43 +96,47 @@ void *DllDebugger(void *_hParent, bool Show)
return NULL;
#endif
}
+ */
// Regular thread
-void dsp_thread()
+void DSPLLE::dsp_thread(DSPLLE *lpParameter)
{
- while (bIsRunning)
+ DSPLLE *dsp_lle = (DSPLLE *)lpParameter;
+ while (dsp_lle->bIsRunning)
{
- int cycles = (int)cycle_count;
+ int cycles = (int)dsp_lle->cycle_count;
if (cycles > 0) {
if (dspjit)
DSPCore_RunCycles(cycles);
else
DSPInterpreter::RunCycles(cycles);
- Common::AtomicAdd(cycle_count, -cycles);
+ Common::AtomicAdd(dsp_lle->cycle_count, -cycles);
}
// yield?
}
}
-void DSP_DebugBreak()
+/* ECTORTODO
+void DSPLLE::DSP_DebugBreak()
{
#if defined(HAVE_WX) && HAVE_WX
// if (m_DebuggerFrame)
// m_DebuggerFrame->DebugBreak();
#endif
}
+*/
-void Initialize(void *init)
+void DSPLLE::Initialize(void *hWnd, bool bWii, bool bDSPThread)
{
+ this->hWnd = hWnd;
+ this->bWii = bWii;
+ this->bDSPThread = bDSPThread;
g_InitMixer = false;
bool bCanWork = true;
char irom_file[MAX_PATH];
char coef_file[MAX_PATH];
- g_dspInitialize = *(DSPInitialize*)init;
-
- g_Config.Load();
snprintf(irom_file, MAX_PATH, "%s%s",
File::GetSysDirectory().c_str(), GC_SYS_DIR DIR_SEP DSP_IROM);
@@ -258,7 +150,7 @@ void Initialize(void *init)
File::GetUserPath(D_GCUSER_IDX), DIR_SEP DSP_COEF);
bCanWork = DSPCore_Init(irom_file, coef_file, AudioCommon::UseJIT());
- g_dsp.cpu_ram = g_dspInitialize.pGetMemoryPointer(0);
+ g_dsp.cpu_ram = Memory::GetPointer(0);
DSPCore_Reset();
if (!bCanWork)
@@ -273,34 +165,37 @@ void Initialize(void *init)
InitInstructionTable();
- if (g_dspInitialize.bOnThread)
+ if (bDSPThread)
{
- g_hDSPThread = std::thread(dsp_thread);
+// g_hDSPThread = new Common::Thread(dsp_thread, (void *)this);
+ g_hDSPThread = std::thread(dsp_thread, this);
}
-
+/*
+ECTORTODO
#if defined(HAVE_WX) && HAVE_WX
if (m_DebuggerFrame)
m_DebuggerFrame->Refresh();
#endif
+ */
}
-void DSP_StopSoundStream()
+void DSPLLE::DSP_StopSoundStream()
{
DSPInterpreter::Stop();
bIsRunning = false;
- if (g_dspInitialize.bOnThread)
+ if (bDSPThread)
{
g_hDSPThread.join();
}
}
-void Shutdown()
+void DSPLLE::Shutdown()
{
AudioCommon::ShutdownSoundStream();
DSPCore_Shutdown();
}
-u16 DSP_WriteControlRegister(u16 _uFlag)
+u16 DSPLLE::DSP_WriteControlRegister(u16 _uFlag)
{
UDSPControl Temp(_uFlag);
if (!g_InitMixer)
@@ -308,8 +203,8 @@ u16 DSP_WriteControlRegister(u16 _uFlag)
if (!Temp.DSPHalt && Temp.DSPInit)
{
unsigned int AISampleRate, DACSampleRate;
- g_dspInitialize.pGetSampleRate(AISampleRate, DACSampleRate);
- soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate));
+ AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
+ soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate), hWnd);
if(!soundStream) PanicAlert("Error starting up sound stream");
// Mixer is initialized
g_InitMixer = true;
@@ -321,7 +216,7 @@ u16 DSP_WriteControlRegister(u16 _uFlag)
// and immediately process it, if it has.
if (_uFlag & 2)
{
- if (!g_dspInitialize.bOnThread)
+ if (!bDSPThread)
{
DSPCore_CheckExternalInterrupt();
DSPCore_CheckExceptions();
@@ -336,12 +231,12 @@ u16 DSP_WriteControlRegister(u16 _uFlag)
return DSPInterpreter::ReadCR();
}
-u16 DSP_ReadControlRegister()
+u16 DSPLLE::DSP_ReadControlRegister()
{
return DSPInterpreter::ReadCR();
}
-u16 DSP_ReadMailboxHigh(bool _CPUMailbox)
+u16 DSPLLE::DSP_ReadMailBoxHigh(bool _CPUMailbox)
{
if (_CPUMailbox)
return gdsp_mbox_read_h(GDSP_MBOX_CPU);
@@ -349,7 +244,7 @@ u16 DSP_ReadMailboxHigh(bool _CPUMailbox)
return gdsp_mbox_read_h(GDSP_MBOX_DSP);
}
-u16 DSP_ReadMailboxLow(bool _CPUMailbox)
+u16 DSPLLE::DSP_ReadMailBoxLow(bool _CPUMailbox)
{
if (_CPUMailbox)
return gdsp_mbox_read_l(GDSP_MBOX_CPU);
@@ -357,7 +252,7 @@ u16 DSP_ReadMailboxLow(bool _CPUMailbox)
return gdsp_mbox_read_l(GDSP_MBOX_DSP);
}
-void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
+void DSPLLE::DSP_WriteMailBoxHigh(bool _CPUMailbox, u16 _uHighMail)
{
if (_CPUMailbox)
{
@@ -381,7 +276,7 @@ void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
}
}
-void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
+void DSPLLE::DSP_WriteMailBoxLow(bool _CPUMailbox, u16 _uLowMail)
{
if (_CPUMailbox)
{
@@ -393,7 +288,7 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
}
}
-void DSP_Update(int cycles)
+void DSPLLE::DSP_Update(int cycles)
{
unsigned int dsp_cycles = cycles / 6; //(jit?20:6);
@@ -416,7 +311,7 @@ void DSP_Update(int cycles)
}
*/
// If we're not on a thread, run cycles here.
- if (!g_dspInitialize.bOnThread)
+ if (!bDSPThread)
{
// ~1/6th as many cycles as the period PPC-side.
DSPCore_RunCycles(dsp_cycles);
@@ -430,7 +325,7 @@ void DSP_Update(int cycles)
}
}
-void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
+void DSPLLE::DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
{
if (!soundStream)
return;
@@ -439,16 +334,33 @@ void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
if (pMixer != 0 && address != 0)
{
- short *samples = (short *)Memory_Get_Pointer(address);
+ const short *samples = (const short *)LLEMemory_Get_Pointer(address);
pMixer->PushSamples(samples, num_samples);
}
soundStream->Update();
}
-void DSP_ClearAudioBuffer(bool mute)
+void DSPLLE::DSP_ClearAudioBuffer(bool mute)
{
if (soundStream)
soundStream->Clear(mute);
}
+#define LLE_CONFIG_FILE "DSPLLE.ini"
+
+void DSPLLE_LoadConfig()
+{
+ // first load defaults
+ IniFile file;
+ file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
+ ac_Config.Load(file);
+}
+
+void DSPLLE_SaveConfig()
+{
+ IniFile file;
+ file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
+ ac_Config.Set(file);
+ file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + LLE_CONFIG_FILE).c_str());
+}
diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.h b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.h
new file mode 100644
index 0000000000..9ef81fed5a
--- /dev/null
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.h
@@ -0,0 +1,76 @@
+// Copyright (C) 2003 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 _DSPLLE_H
+#define _DSPLLE_H
+
+#include "Thread.h"
+#include "SoundStream.h"
+#include "DSPLLEGlobals.h" // Local
+#include "../../PluginDSP.h"
+
+class DSPLLE : public PluginDSP {
+public:
+ DSPLLE();
+ ~DSPLLE();
+
+ virtual void Initialize(void *hWnd, bool bWii, bool bDSPThread);
+ virtual void Shutdown();
+
+ virtual bool IsLLE() { return true; }
+
+ void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
+
+ /*
+ GUI
+ virtual void Config(void *_hwnd);
+ virtual void About(void *_hwnd);
+ virtual void *Debug(void *Parent, bool Show);
+ */
+
+ virtual void DoState(PointerWrap &p);
+ virtual void EmuStateChange(PLUGIN_EMUSTATE newState);
+
+ virtual void DSP_WriteMailBoxHigh(bool _CPUMailbox, unsigned short);
+ virtual void DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short);
+ virtual unsigned short DSP_ReadMailBoxHigh(bool _CPUMailbox);
+ virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox);
+ virtual unsigned short DSP_ReadControlRegister();
+ virtual unsigned short DSP_WriteControlRegister(unsigned short);
+ virtual void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples);
+ virtual void DSP_Update(int cycles);
+ virtual void DSP_StopSoundStream();
+ virtual void DSP_ClearAudioBuffer(bool mute);
+
+private:
+ static void dsp_thread(DSPLLE* lpParameter);
+
+ std::thread g_hDSPThread;
+ SoundStream *soundStream;
+ bool g_InitMixer;
+ void *hWnd;
+ bool bWii;
+ bool bDSPThread;
+ bool bIsRunning;
+ volatile u32 cycle_count;
+};
+
+// Hack to be deleted.
+void DSPLLE_LoadConfig();
+void DSPLLE_SaveConfig();
+
+#endif // _DSPLLE_H
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp
similarity index 91%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp
index d58c052cb7..8afa14d2bc 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.cpp
@@ -21,7 +21,9 @@
#include "Common.h" // for Common::swap
#include "DSPCore.h"
-#include "Globals.h"
+#include "DSPLLEGlobals.h"
+
+// TODO: Get rid of this file.
// =======================================================================================
// For PB address detection
@@ -30,17 +32,17 @@
// This will only work on GC, not Wii.
u32 RAM_MASK = 0x1FFFFFF;
-u16 Memory_Read_U16(u32 _uAddress)
+u16 LLEMemory_Read_U16(u32 _uAddress)
{
return Common::swap16(*(u16*)&g_dsp.cpu_ram[_uAddress & RAM_MASK]);
}
-u32 Memory_Read_U32(u32 _uAddress)
+u32 LLEMemory_Read_U32(u32 _uAddress)
{
return Common::swap32(*(u32*)&g_dsp.cpu_ram[_uAddress & RAM_MASK]);
}
-void* Memory_Get_Pointer(u32 _uAddress)
+void* LLEMemory_Get_Pointer(u32 _uAddress)
{
return &g_dsp.cpu_ram[_uAddress & RAM_MASK];
}
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.h
similarity index 84%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Globals.h
rename to Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.h
index 5e88747ca9..0fef8f7654 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLEGlobals.h
@@ -22,11 +22,13 @@
#include "AudioCommon.h"
#include
+// TODO: Get rid of this file.
+
#define PROFILE 0
-u16 Memory_Read_U16(u32 _uAddress); // For PB address detection
-u32 Memory_Read_U32(u32 _uAddress);
-void* Memory_Get_Pointer(u32 _uAddress);
+u16 LLEMemory_Read_U16(u32 _uAddress); // For PB address detection
+u32 LLEMemory_Read_U32(u32 _uAddress);
+void* LLEMemory_Get_Pointer(u32 _uAddress);
#if PROFILE
void ProfilerDump(u64 _count);
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Tools.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLETools.cpp
similarity index 97%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Tools.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPLLETools.cpp
index b2a7c31fe1..18c8628932 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Tools.cpp
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLETools.cpp
@@ -19,12 +19,12 @@
#include
#include "Common.h"
-#include "Globals.h"
+#include "DSPLLEGlobals.h"
#include "FileUtil.h"
#include "DSPCore.h"
#include "DSPCodeUtil.h"
-#include "Tools.h"
+#include "DSPLLETools.h"
#include "disassemble.h"
#include "DSPInterpreter.h"
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Tools.h b/Source/Core/Core/Src/HW/DSPLLE/DSPLLETools.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Tools.h
rename to Source/Core/Core/Src/HW/DSPLLE/DSPLLETools.h
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPSymbols.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.cpp
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPSymbols.cpp
rename to Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.cpp
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPSymbols.h b/Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.h
similarity index 98%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPSymbols.h
rename to Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.h
index 0bd1937753..126bf36386 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPSymbols.h
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.h
@@ -20,7 +20,6 @@
#include "Common.h"
#include "SymbolDB.h"
-#include "AudioCommon.h"
#include
diff --git a/Source/Core/Core/Src/HW/HW.cpp b/Source/Core/Core/Src/HW/HW.cpp
index 70f6ae21fd..40006d3f3b 100644
--- a/Source/Core/Core/Src/HW/HW.cpp
+++ b/Source/Core/Core/Src/HW/HW.cpp
@@ -53,7 +53,7 @@ namespace HW
SerialInterface::Init();
ProcessorInterface::Init();
Memory::Init();
- DSP::Init();
+ DSP::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE);
DVDInterface::Init();
GPFifo::Init();
ExpansionInterface::Init();
diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp
index 8d820cf8e4..52cdc5078c 100644
--- a/Source/Core/Core/Src/HW/SystemTimers.cpp
+++ b/Source/Core/Core/Src/HW/SystemTimers.cpp
@@ -71,6 +71,7 @@ IPC_HLE_PERIOD: For the Wiimote this is the call schedule:
#include "../CoreTiming.h"
#include "../ConfigManager.h"
#include "../IPC_HLE/WII_IPC_HLE.h"
+#include "../PluginDSP.h"
#include "Thread.h"
#include "Timer.h"
@@ -241,16 +242,11 @@ void PatchEngineCallback(u64 userdata, int cyclesLate)
void Init()
{
- PLUGIN_INFO DSPType;
- (*CPluginManager::GetInstance().GetDSP()).GetInfo(DSPType);
- std::string DSPName(DSPType.Name);
- bool UsingDSPLLE = (DSPName.find("LLE") != std::string::npos) || (DSPName.find("lle") != std::string::npos);
-
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{
CPU_CORE_CLOCK = 729000000u;
- if (!UsingDSPLLE)
+ if (!DSP::GetPlugin()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
// AyuanX: TO BE TWEAKED
@@ -266,11 +262,11 @@ void Init()
{
CPU_CORE_CLOCK = 486000000u;
- if (!UsingDSPLLE)
+ if (!DSP::GetPlugin()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.005f);
}
- if (UsingDSPLLE)
+ if (DSP::GetPlugin()->IsLLE())
DSP_PERIOD = 12000; // TO BE TWEAKED
// This is the biggest question mark.
diff --git a/Source/Core/Core/Src/LuaInterface.cpp b/Source/Core/Core/Src/LuaInterface.cpp
index ef3aa960d7..48aafd6089 100644
--- a/Source/Core/Core/Src/LuaInterface.cpp
+++ b/Source/Core/Core/Src/LuaInterface.cpp
@@ -28,10 +28,12 @@
#include "State.h"
#include "ConfigManager.h"
#include "PluginManager.h"
+#include "HW/DSP.h"
#include "HW/Memmap.h"
#include "Host.h"
#include "PowerPC/PowerPC.h"
#include "CoreTiming.h"
+#include "PluginDSP.h"
extern "C" {
#include "lua.h"
@@ -2956,8 +2958,7 @@ DEFINE_LUA_FUNCTION(movie_close, "")
DEFINE_LUA_FUNCTION(sound_clear, "")
{
- if(CPluginManager::GetInstance().GetDSP())
- CPluginManager::GetInstance().GetDSP()->DSP_ClearAudioBuffer();
+ DSP::GetPlugin()->DSP_ClearAudioBuffer(false);
return 0;
}
diff --git a/Source/Core/Core/Src/OnFrame.cpp b/Source/Core/Core/Src/OnFrame.cpp
index 7185500099..1576fb61da 100644
--- a/Source/Core/Core/Src/OnFrame.cpp
+++ b/Source/Core/Core/Src/OnFrame.cpp
@@ -130,13 +130,13 @@ bool IsUsingPad(int controller)
switch (controller)
{
case 0:
- return g_numPads & 0x01;
+ return (g_numPads & 0x01) != 0;
case 1:
- return g_numPads & 0x02;
+ return (g_numPads & 0x02) != 0;
case 2:
- return g_numPads & 0x04;
+ return (g_numPads & 0x04) != 0;
case 3:
- return g_numPads & 0x08;
+ return (g_numPads & 0x08) != 0;
default:
return false;
}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.h b/Source/Core/Core/Src/PluginDSP.cpp
similarity index 70%
rename from Source/Plugins/Plugin_DSP_HLE/Src/Config.h
rename to Source/Core/Core/Src/PluginDSP.cpp
index 23a0abc672..87f479516a 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.h
+++ b/Source/Core/Core/Src/PluginDSP.cpp
@@ -15,20 +15,24 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _PLUGIN_DSP_HLE_CONFIG_H
-#define _PLUGIN_DSP_HLE_CONFIG_H
+#include "PluginDSP.h"
-#include
+#include "HW/DSPLLE/DSPLLE.h"
+#include "HW/DSPHLE/DSPHLE.h"
-struct CConfig
+PluginDSP *CreateDSPPlugin(bool HLE)
{
- bool m_EnableHLEAudio;
-
- void Load();
- void Save();
-};
-
-extern CConfig g_Config;
-
-#endif // _PLUGIN_DSP_HLE_CONFIG_H
+ if (HLE)
+ {
+ DSPHLE_LoadConfig();
+ return new DSPHLE();
+ }
+ else
+ {
+ DSPLLE_LoadConfig();
+ return new DSPLLE();
+ }
+}
+PluginDSP::PluginDSP() {}
+PluginDSP::~PluginDSP() {}
diff --git a/Source/Core/Core/Src/PluginDSP.h b/Source/Core/Core/Src/PluginDSP.h
new file mode 100644
index 0000000000..bf68dcffee
--- /dev/null
+++ b/Source/Core/Core/Src/PluginDSP.h
@@ -0,0 +1,60 @@
+// Copyright (C) 2003 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 _PLUGINDSP_H_
+#define _PLUGINDSP_H_
+
+
+#include "Plugin.h" // TODO: Only here for EmuStateChange
+#include "ChunkFile.h"
+
+class PluginDSP
+{
+public:
+ PluginDSP();
+ ~PluginDSP();
+
+ virtual bool IsLLE() = 0;
+
+ virtual void Initialize(void *hWnd, bool bWii, bool bDSPThread) = 0;
+ virtual void Shutdown() = 0;
+
+ /*
+ GUI
+ virtual void Config(void *_hwnd) = 0;
+ virtual void About(void *_hwnd) = 0;
+ virtual void *Debug(void *Parent, bool Show) = 0;
+ */
+
+ virtual void DoState(PointerWrap &p) = 0;
+ virtual void EmuStateChange(PLUGIN_EMUSTATE newState) = 0;
+
+ virtual void DSP_WriteMailBoxHigh(bool _CPUMailbox, unsigned short) = 0;
+ virtual void DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short) = 0;
+ virtual unsigned short DSP_ReadMailBoxHigh(bool _CPUMailbox) = 0;
+ virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox) = 0;
+ virtual unsigned short DSP_ReadControlRegister() = 0;
+ virtual unsigned short DSP_WriteControlRegister(unsigned short) = 0;
+ virtual void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples) = 0;
+ virtual void DSP_Update(int cycles) = 0;
+ virtual void DSP_StopSoundStream() = 0;
+ virtual void DSP_ClearAudioBuffer(bool mute) = 0;
+};
+
+PluginDSP *CreateDSPPlugin(bool LLE);
+
+#endif // _PLUGINDSP_H_
diff --git a/Source/Core/Core/Src/PluginManager.cpp b/Source/Core/Core/Src/PluginManager.cpp
index a7537e284d..7fb771038d 100644
--- a/Source/Core/Core/Src/PluginManager.cpp
+++ b/Source/Core/Core/Src/PluginManager.cpp
@@ -70,7 +70,6 @@ CPluginManager::CPluginManager()
// Set initial values to NULL.
m_video = NULL;
- m_dsp = NULL;
}
// This will call FreeLibrary() for all plugins
@@ -79,7 +78,6 @@ CPluginManager::~CPluginManager()
INFO_LOG(CONSOLE, "Delete CPluginManager\n");
delete m_PluginGlobals;
- delete m_dsp;
delete m_video;
}
@@ -104,27 +102,9 @@ bool CPluginManager::InitPlugins()
}
INFO_LOG(CONSOLE, "After GetVideo\n");
- if (!GetDSP()) {
- PanicAlertT("Can't init DSP Plugin");
- return false;
- }
-
return true;
}
-
-// FreeLibrary() after ShutDown() is disabled for some plugins. See the comment in the file description
-// for an explanation about the current LoadLibrary() and FreeLibrary() behavior.
-void CPluginManager::ShutdownPlugins()
-{
- if (m_dsp)
- {
- m_dsp->Shutdown();
- FreeDSP();
- NOTICE_LOG(CONSOLE, "%s", Core::StopMessage(false, "Audio shutdown").c_str());
- }
-}
-
void CPluginManager::ShutdownVideoPlugin()
{
if (m_video)
@@ -216,10 +196,6 @@ void *CPluginManager::LoadPlugin(const char *_rFilename)
plugin = new Common::PluginVideo(_rFilename);
break;
- case PLUGIN_TYPE_DSP:
- plugin = new Common::PluginDSP(_rFilename);
- break;
-
default:
PanicAlertT("Trying to load unsupported type %d", type);
return NULL;
@@ -286,28 +262,6 @@ void CPluginManager::ScanForPlugins()
}
}
-
-/* Create or return the already created plugin pointers. This will be called
- often for the DSP from the DSP files.
-
- We don't need to check if [Plugin]->IsValid() here because it will not be set by LoadPlugin()
- if it's not valid.
- */
-
-Common::PluginDSP *CPluginManager::GetDSP()
-{
- if (m_dsp != NULL)
- {
- if (m_dsp->GetFilename() == m_params->m_strDSPPlugin)
- return m_dsp;
- else
- FreeDSP();
- }
- // Else load a new plugin
- m_dsp = (Common::PluginDSP*)LoadPlugin(m_params->m_strDSPPlugin.c_str());
- return m_dsp;
-}
-
Common::PluginVideo *CPluginManager::GetVideo()
{
/* We don't need to check if m_video->IsValid() here, because m_video will not be set by LoadPlugin()
@@ -331,21 +285,11 @@ void CPluginManager::FreeVideo()
m_video = NULL;
}
-void CPluginManager::FreeDSP()
-{
- WARN_LOG(CONSOLE, "%s", Core::StopMessage(false, "Will unload audio DLL").c_str());
- delete m_dsp;
- m_dsp = NULL;
-}
-
void CPluginManager::EmuStateChange(PLUGIN_EMUSTATE newState)
{
GetVideo()->EmuStateChange(newState);
- GetDSP()->EmuStateChange(newState);
}
-
-
// Call DLL functions
// ------------
@@ -365,11 +309,6 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TY
GetVideo()->Config(_Parent);
break;
- case PLUGIN_TYPE_DSP:
- if (GetDSP() != NULL)
- GetDSP()->Config(_Parent);
- break;
-
default:
PanicAlertT("Type %d config not supported in plugin %s", Type, _rFilename);
break;
@@ -379,7 +318,7 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TY
// Open debugging window. Type = Video or DSP. Show = Show or hide window.
void *CPluginManager::OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show)
{
- if (! File::Exists((File::GetPluginsDirectory() + _rFilename).c_str()))
+ if (!File::Exists((File::GetPluginsDirectory() + _rFilename).c_str()))
{
PanicAlert("Can't find plugin %s", _rFilename);
return NULL;
@@ -391,10 +330,6 @@ void *CPluginManager::OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TY
return GetVideo()->Debug(_Parent, Show);
break;
- case PLUGIN_TYPE_DSP:
- return GetDSP()->Debug(_Parent, Show);
- break;
-
default:
PanicAlert("Type %d debug not supported in plugin %s", Type, _rFilename);
return NULL;
diff --git a/Source/Core/Core/Src/PluginManager.h b/Source/Core/Core/Src/PluginManager.h
index b300f85075..3aab27fe70 100644
--- a/Source/Core/Core/Src/PluginManager.h
+++ b/Source/Core/Core/Src/PluginManager.h
@@ -19,7 +19,6 @@
#define __PLUGIN_MANAGER_H_
#include "Plugin.h"
-#include "PluginDSP.h"
#include "PluginVideo.h"
#include "CoreParameter.h"
@@ -49,15 +48,12 @@ public:
static void Shutdown();
Common::PluginVideo *GetVideo();
- Common::PluginDSP *GetDSP();
void FreeVideo();
- void FreeDSP();
void EmuStateChange(PLUGIN_EMUSTATE newState);
bool InitPlugins();
- void ShutdownPlugins();
void ShutdownVideoPlugin();
void ScanForPlugins();
void OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type);
@@ -71,7 +67,6 @@ private:
CPluginInfos m_PluginInfos;
PLUGIN_GLOBALS *m_PluginGlobals;
Common::PluginVideo *m_video;
- Common::PluginDSP *m_dsp;
SCoreStartupParameter * m_params;
CPluginManager();
diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript
index 8bb8e5496a..a749390f00 100644
--- a/Source/Core/Core/Src/SConscript
+++ b/Source/Core/Core/Src/SConscript
@@ -18,6 +18,7 @@ files = [
"MemTools.cpp",
"PatchEngine.cpp",
"PluginManager.cpp",
+ "PluginDSP.cpp",
"LuaInterface.cpp",
"State.cpp",
"Tracer.cpp",
@@ -37,6 +38,27 @@ files = [
"HW/AudioInterface.cpp",
"HW/CPU.cpp",
"HW/DSP.cpp",
+ "HW/DSPHLE/UCodes/UCode_AX.cpp",
+ "HW/DSPHLE/UCodes/UCode_AXWii.cpp",
+ "HW/DSPHLE/UCodes/UCode_CARD.cpp",
+ "HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp",
+ "HW/DSPHLE/UCodes/UCode_ROM.cpp",
+ "HW/DSPHLE/UCodes/UCodes.cpp",
+ "HW/DSPHLE/UCodes/UCode_GBA.cpp",
+ "HW/DSPHLE/UCodes/UCode_Zelda.cpp",
+ "HW/DSPHLE/UCodes/UCode_Zelda_ADPCM.cpp",
+ "HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp",
+ "HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp",)
+ "HW/DSPHLE/DSPHandler.cpp",
+ "HW/DSPHLE/HLEMixer.cpp",
+ "HW/DSPHLE/MailHandler.cpp",
+ "HW/DSPHLE/DSPHLE.cpp",
+ "HW/DSPLLE/DSPDebugInterface.cpp",
+ "HW/DSPLLE/DSPHost.cpp",
+ "HW/DSPLLE/DSPSymbols.cpp",
+ "HW/DSPLLE/DSPLLEGlobals.cpp",
+ "HW/DSPLLE/DSPLLE.cpp",
+ "HW/DSPLLE/DSPLLETools.cpp",
"HW/DVDInterface.cpp",
"HW/EXI.cpp",
"HW/EXI_Channel.cpp",
diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp
index 85f27e19cf..b622a19dc1 100644
--- a/Source/Core/Core/Src/State.cpp
+++ b/Source/Core/Core/Src/State.cpp
@@ -25,6 +25,7 @@
#include "CoreTiming.h"
#include "OnFrame.h"
#include "HW/Wiimote.h"
+#include "HW/DSP.h"
#include "HW/HW.h"
#include "PowerPC/PowerPC.h"
#include "PowerPC/JitCommon/JitBase.h"
@@ -89,7 +90,7 @@ void DoState(PointerWrap &p)
// Begin with video plugin, so that it gets a chance to clear it's caches and writeback modified things to RAM
CPluginManager &pm = CPluginManager::GetInstance();
pm.GetVideo()->DoState(p.GetPPtr(), p.GetMode());
- pm.GetDSP()->DoState(p.GetPPtr(), p.GetMode());
+
if (Core::g_CoreStartupParameter.bWii)
Wiimote::DoState(p.GetPPtr(), p.GetMode());
PowerPC::DoState(p);
diff --git a/Source/Core/DebuggerWX/CMakeLists.txt b/Source/Core/DebuggerWX/CMakeLists.txt
index 990c97f57a..df7f064249 100644
--- a/Source/Core/DebuggerWX/CMakeLists.txt
+++ b/Source/Core/DebuggerWX/CMakeLists.txt
@@ -3,6 +3,10 @@ set(SRCS Src/BreakpointDlg.cpp
Src/BreakpointWindow.cpp
Src/CodeWindow.cpp
Src/CodeWindowFunctions.cpp
+ Src/DSPDebugWindow.cpp
+ Src/DSPDebugWindow.h
+ Src/DSPRegisterView.cpp
+ Src/DSPRegisterView.h
Src/JitWindow.cpp
Src/MemoryCheckDlg.cpp
Src/MemoryWindow.cpp
diff --git a/Source/Core/DebuggerWX/DebuggerWX.vcproj b/Source/Core/DebuggerWX/DebuggerWX.vcproj
index c4c594c7c2..40ec7fe6e6 100644
--- a/Source/Core/DebuggerWX/DebuggerWX.vcproj
+++ b/Source/Core/DebuggerWX/DebuggerWX.vcproj
@@ -1,7 +1,7 @@
+
+
@@ -784,6 +788,22 @@
RelativePath=".\Src\CodeWindowFunctions.cpp"
>
+
+
+
+
+
+
+
+
diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.h b/Source/Core/DebuggerWX/Src/CodeWindow.h
index 4180131b16..d0a1284e2b 100644
--- a/Source/Core/DebuggerWX/Src/CodeWindow.h
+++ b/Source/Core/DebuggerWX/Src/CodeWindow.h
@@ -90,6 +90,7 @@ class CCodeWindow
void ToggleBreakPointWindow(bool bShow);
void ToggleMemoryWindow(bool bShow);
void ToggleJitWindow(bool bShow);
+ void ToggleSoundWindow(bool bShow);
void ToggleDLLWindow(int Id, bool bShow);
void OnChangeFont(wxCommandEvent& event);
diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp
index 7c54859bdc..80d326d753 100644
--- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp
+++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp
@@ -512,6 +512,27 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
}
}
+
+void CCodeWindow::ToggleSoundWindow(bool bShow)
+{
+ GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(bShow);
+ if (bShow)
+ {
+ /* TODO: Resurrect DSP debugger window.
+ if (!m_JitWindow)
+ m_JitWindow = new CJitWindow(Parent, IDM_SOUNDWINDOW);
+ Parent->DoAddPage(m_JitWindow,
+ iNbAffiliation[IDM_SOUNDWINDOW - IDM_LOGWINDOW],
+ Parent->bFloatWindow[IDM_SOUNDWINDOW - IDM_LOGWINDOW]);
+ */
+ }
+ else // Close
+ {
+ //Parent->DoRemovePage(m_JitWindow, false);
+ // m_JitWindow = NULL;
+ }
+}
+
// Notice: This windows docking will produce several wx debugging messages for plugin
// windows when ::GetWindowRect and ::DestroyWindow fails in wxApp::CleanUp() for the
// plugin.
@@ -525,10 +546,6 @@ void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
switch(Id)
{
- case IDM_SOUNDWINDOW:
- DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
- PluginType = PLUGIN_TYPE_DSP;
- break;
case IDM_VIDEOWINDOW:
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
PluginType = PLUGIN_TYPE_VIDEO;
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp b/Source/Core/DebuggerWX/Src/DSPDebugWindow.cpp
similarity index 99%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp
rename to Source/Core/DebuggerWX/Src/DSPDebugWindow.cpp
index a3958cb02c..b3385cd418 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/DSPDebugWindow.cpp
@@ -22,11 +22,12 @@
#include
+#include "StringUtil.h"
#include "DSPDebugWindow.h"
#include "DSPRegisterView.h"
#include "CodeView.h"
#include "MemoryView.h"
-#include "../DSPSymbols.h"
+#include "HW\DSPLLE\DSPSymbols.h"
// Define these here to avoid undefined symbols while still saving functionality
void Host_NotifyMapLoaded() {}
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.h b/Source/Core/DebuggerWX/Src/DSPDebugWindow.h
similarity index 98%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.h
rename to Source/Core/DebuggerWX/Src/DSPDebugWindow.h
index 7eaf5a226f..5ab8c0eb1c 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.h
+++ b/Source/Core/DebuggerWX/Src/DSPDebugWindow.h
@@ -38,7 +38,7 @@
#include "disassemble.h"
#include "DSPInterpreter.h"
#include "DSPMemoryMap.h"
-#include "../DSPDebugInterface.h"
+#include "HW/DSPLLE/DSPDebugInterface.h"
class DSPRegisterView;
class CCodeView;
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPRegisterView.cpp b/Source/Core/DebuggerWX/Src/DSPRegisterView.cpp
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPRegisterView.cpp
rename to Source/Core/DebuggerWX/Src/DSPRegisterView.cpp
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPRegisterView.h b/Source/Core/DebuggerWX/Src/DSPRegisterView.h
similarity index 100%
rename from Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPRegisterView.h
rename to Source/Core/DebuggerWX/Src/DSPRegisterView.h
diff --git a/Source/Core/DebuggerWX/Src/SConscript b/Source/Core/DebuggerWX/Src/SConscript
index b40fab52ba..e1419aac81 100644
--- a/Source/Core/DebuggerWX/Src/SConscript
+++ b/Source/Core/DebuggerWX/Src/SConscript
@@ -11,6 +11,10 @@ files = [
"BreakpointWindow.cpp",
"CodeWindow.cpp",
"CodeWindowFunctions.cpp",
+ "Src/DSPDebugWindow.cpp",
+ "Src/DSPDebugWindow.h",
+ "Src/DSPRegisterView.cpp",
+ "Src/DSPRegisterView.h",
"MemoryCheckDlg.cpp",
"MemoryWindow.cpp",
"RegisterWindow.cpp",
diff --git a/Source/Core/DolphinWX/DolphinWX.vcproj b/Source/Core/DolphinWX/DolphinWX.vcproj
index 7c418eeae6..2f1448a357 100644
--- a/Source/Core/DolphinWX/DolphinWX.vcproj
+++ b/Source/Core/DolphinWX/DolphinWX.vcproj
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp
index 9997188472..4b1e85a698 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.cpp
+++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp
@@ -17,6 +17,7 @@
#include // System
#include
+#include
#include "Common.h"
#include "CommonPaths.h"
@@ -24,11 +25,15 @@
#include "Core.h" // Core
#include "HW/EXI.h"
#include "HW/SI.h"
+#include "HW/DSPHLE/DSPHLE.h"
+#include "HW/DSPLLE/DSPLLE.h"
#include "Globals.h" // Local
#include "ConfigMain.h"
#include "PluginManager.h"
#include "ConfigManager.h"
+#include "DSPHLEConfigDlg.h"
+#include "DSPLLEConfigDlg.h"
#include "SysConf.h"
#include "Frame.h"
#include "HotkeyDlg.h"
@@ -118,6 +123,9 @@ EVT_CHECKBOX(ID_DISPLAY_RENDERTOMAIN, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_DISPLAY_PROGSCAN, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_DISPLAY_NTSCJ, CConfigMain::DisplaySettingsChanged)
+EVT_CHECKBOX(ID_AUDIO_DSP_HLE, CConfigMain::AudioSettingsChanged)
+EVT_BUTTON(ID_AUDIO_CONFIG, CConfigMain::OnDSPConfig)
+
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
@@ -164,9 +172,6 @@ EVT_FILEPICKER_CHANGED(ID_APPLOADERPATH, CConfigMain::ApploaderPathChanged)
EVT_CHOICE(ID_GRAPHIC_CB, CConfigMain::OnSelectionChanged)
EVT_BUTTON(ID_GRAPHIC_CONFIG, CConfigMain::OnConfig)
-EVT_CHOICE(ID_DSP_CB, CConfigMain::OnSelectionChanged)
-EVT_BUTTON(ID_DSP_CONFIG, CConfigMain::OnConfig)
-
END_EVENT_TABLE()
CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
@@ -211,6 +216,9 @@ void CConfigMain::UpdateGUI()
ProgressiveScan->Disable();
NTSCJ->Disable();
+ // Disable stuff on AudioPage
+ DSP_HLE->Disable();
+ DSPConfig->Disable();
// Disable stuff on GamecubePage
GCSystemLang->Disable();
@@ -232,7 +240,6 @@ void CConfigMain::UpdateGUI()
// Disable stuff on PluginsPage
GraphicSelection->Disable();
- DSPSelection->Disable();
}
}
@@ -349,12 +356,17 @@ void CConfigMain::InitializeGUIValues()
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
Theme->SetSelection(startup_params.iTheme);
// need redesign
- for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
+ for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++) {
if (langIds[i] == SConfig::GetInstance().m_InterfaceLanguage)
{
InterfaceLang->SetSelection(i);
break;
}
+ }
+
+
+ // Audio
+ DSP_HLE->SetValue(startup_params.bDSPHLE);
// Gamecube - IPL
GCSystemLang->SetSelection(startup_params.SelectedLanguage);
@@ -389,7 +401,6 @@ void CConfigMain::InitializeGUIValues()
// Plugins
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, startup_params.m_strVideoPlugin);
- FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, startup_params.m_strDSPPlugin);
}
void CConfigMain::InitializeGUITooltips()
@@ -424,11 +435,9 @@ void CConfigMain::InitializeGUITooltips()
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
-
// Gamecube - Devices
GCEXIDevice[2]->SetToolTip(_("Serial Port 1 - This is the port which devices such as the net adapter use"));
-
// Wii - Devices
WiiKeyboard->SetToolTip(_("This could cause slow down in Wii Menu and some games."));
}
@@ -441,6 +450,7 @@ void CConfigMain::CreateGUIControls()
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
DisplayPage = new wxPanel(Notebook, ID_DISPLAYPAGE, wxDefaultPosition, wxDefaultSize);
+ AudioPage = new wxPanel(Notebook, ID_AUDIOPAGE, wxDefaultPosition, wxDefaultSize);
GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
WiiPage = new wxPanel(Notebook, ID_WIIPAGE, wxDefaultPosition, wxDefaultSize);
PathsPage = new wxPanel(Notebook, ID_PATHSPAGE, wxDefaultPosition, wxDefaultSize);
@@ -448,6 +458,7 @@ void CConfigMain::CreateGUIControls()
Notebook->AddPage(GeneralPage, _("General"));
Notebook->AddPage(DisplayPage, _("Display"));
+ Notebook->AddPage(AudioPage, _("Audio"));
Notebook->AddPage(GamecubePage, _("Gamecube"));
Notebook->AddPage(WiiPage, _("Wii"));
Notebook->AddPage(PathsPage, _("Paths"));
@@ -513,6 +524,14 @@ void CConfigMain::CreateGUIControls()
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS, _("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ // Audio page
+ sAudioPage = new wxBoxSizer(wxVERTICAL);
+ DSP_HLE = new wxCheckBox(AudioPage, ID_AUDIO_DSP_HLE, _("DSP HLE emulation (fast)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ DSPConfig = new wxButton(AudioPage, ID_AUDIO_CONFIG, _("Configure DSP"), wxDefaultPosition, wxDefaultSize);
+ sAudioPage->Add(DSP_HLE);
+ sAudioPage->Add(DSPConfig);
+ AudioPage->SetSizer(sAudioPage);
+
// Themes - this should really be a wxChoice...
Theme = new wxRadioBox(DisplayPage, ID_INTERFACE_THEME, _("Theme"), wxDefaultPosition, wxDefaultSize, arrayStringFor_Themes, 1, wxRA_SPECIFY_ROWS);
@@ -786,21 +805,13 @@ void CConfigMain::CreateGUIControls()
GraphicSelection = new wxChoice(PluginsPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
GraphicConfig = new wxButton(PluginsPage, ID_GRAPHIC_CONFIG, _("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- sbDSPPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginsPage, _("DSP"));
- DSPSelection = new wxChoice(PluginsPage, ID_DSP_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
- DSPConfig = new wxButton(PluginsPage, ID_DSP_CONFIG, _("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
// Populate the settings
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
- sbDSPPlugin->Add(DSPSelection, 1, wxEXPAND|wxALL, 5);
- sbDSPPlugin->Add(DSPConfig, 0, wxALL, 5);
-
// Populate the Plugins page
sPluginsPage = new wxBoxSizer(wxVERTICAL);
sPluginsPage->Add(sbGraphicsPlugin, 0, wxEXPAND|wxALL, 5);
- sPluginsPage->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
PluginsPage->SetSizer(sPluginsPage);
@@ -947,6 +958,15 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
}
}
+void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
+{
+ switch (event.GetId())
+ {
+ case ID_AUDIO_DSP_HLE:
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = DSP_HLE->IsChecked();
+ break;
+ }
+}
// GC settings
// -----------------------
@@ -1122,9 +1142,6 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
}
-
-
-
// Paths settings
// -------------------
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event))
@@ -1198,8 +1215,6 @@ void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
// Update plugin filenames
if (GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin))
CPluginManager::GetInstance().FreeVideo();
- if (GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin))
- CPluginManager::GetInstance().FreeDSP();
}
void CConfigMain::OnConfig(wxCommandEvent& event)
@@ -1209,12 +1224,28 @@ void CConfigMain::OnConfig(wxCommandEvent& event)
case ID_GRAPHIC_CONFIG:
CallConfig(GraphicSelection);
break;
- case ID_DSP_CONFIG:
- CallConfig(DSPSelection);
+ }
+}
+
+void CConfigMain::OnDSPConfig(wxCommandEvent& event)
+{
+ switch (event.GetId())
+ {
+ case ID_AUDIO_CONFIG:
+ if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE) {
+ DSPConfigDialogHLE *dlg = new DSPConfigDialogHLE(this);
+ dlg->ShowModal();
+ dlg->Destroy();
+ } else {
+ DSPConfigDialogLLE *dlg = new DSPConfigDialogLLE(this);
+ dlg->ShowModal();
+ dlg->Destroy();
+ }
break;
}
}
+
void CConfigMain::CallConfig(wxChoice* _pChoice)
{
int Index = _pChoice->GetSelection();
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.h b/Source/Core/DolphinWX/Src/ConfigMain.h
index 4fc094fabf..e38c6bc27b 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.h
+++ b/Source/Core/DolphinWX/Src/ConfigMain.h
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include
#include "ConfigManager.h"
@@ -43,6 +44,7 @@ public:
void CloseClick(wxCommandEvent& event);
void OnSelectionChanged(wxCommandEvent& event);
void OnConfig(wxCommandEvent& event);
+ void OnDSPConfig(wxCommandEvent& event);
bool bRefreshList;
@@ -51,6 +53,7 @@ private:
wxPanel* GeneralPage;
wxPanel* GamecubePage;
wxPanel* DisplayPage;
+ wxPanel* AudioPage;
wxPanel* WiiPage;
wxPanel* PathsPage;
wxPanel* PluginsPage;
@@ -86,6 +89,11 @@ private:
wxCheckBox* ProgressiveScan;
wxCheckBox* NTSCJ;
+ // Audio
+ wxBoxSizer* sAudioPage; // GC settings
+ wxCheckBox* DSP_HLE;
+ wxButton* DSPConfig;
+
// Interface
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
@@ -142,7 +150,6 @@ private:
wxDirPickerCtrl* DVDRoot;
wxFilePickerCtrl* ApploaderPath;
-
wxBoxSizer* sPluginsPage; // Plugins settings
wxStaticBoxSizer* sbGraphicsPlugin, *sbDSPPlugin; // Graphics, DSP sections
@@ -150,10 +157,6 @@ private:
wxChoice* GraphicSelection;
wxButton* GraphicConfig;
- // DSP
- wxChoice* DSPSelection;
- wxButton* DSPConfig;
-
wxButton* m_Ok;
FILE* pStream;
@@ -174,6 +177,7 @@ private:
ID_NOTEBOOK = 1000,
ID_GENERALPAGE,
ID_DISPLAYPAGE,
+ ID_AUDIOPAGE,
ID_GAMECUBEPAGE,
ID_WIIPAGE,
ID_PATHSPAGE,
@@ -202,6 +206,10 @@ private:
ID_DISPLAY_PROGSCAN,
ID_DISPLAY_NTSCJ,
+ // Audio Settings
+ ID_AUDIO_DSP_HLE,
+ ID_AUDIO_CONFIG,
+
// Interface settings
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
@@ -269,6 +277,8 @@ private:
void AddResolutions();
void OnSpin(wxSpinEvent& event);
+ void AudioSettingsChanged(wxCommandEvent& event);
+
void GCSettingsChanged(wxCommandEvent& event);
void ChooseMemcardPath(std::string& strMemcard, bool isSlotA);
void ChooseSIDevice(std::string deviceName, int deviceNum);
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp b/Source/Core/DolphinWX/Src/DSPHLEConfigDlg.cpp
similarity index 92%
rename from Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp
rename to Source/Core/DolphinWX/Src/DSPHLEConfigDlg.cpp
index 726eda622f..cb52a08ac4 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp
+++ b/Source/Core/DolphinWX/Src/DSPHLEConfigDlg.cpp
@@ -15,12 +15,14 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "Config.h"
-#include "ConfigDlg.h"
+#include
+#include
+
+#include "HW/DSPHLE/DSPHLE.h"
+#include "DSPHLEConfigDlg.h"
BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogHLE::SettingsChanged)
- EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
EVT_CHOICE(ID_FREQUENCY, DSPConfigDialogHLE::SettingsChanged)
@@ -32,6 +34,7 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
+ DSPHLE_LoadConfig();
wxButton *m_OK = new wxButton(this, wxID_OK, _("OK"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@@ -39,8 +42,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, _("Volume"));
// Create items
- m_buttonEnableHLEAudio = new wxCheckBox(this, ID_ENABLE_HLE_AUDIO, _("Enable HLE Audio"),
- wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"),
@@ -63,12 +64,10 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
ac_Config.m_Volume), wxDefaultPosition, wxDefaultSize, 0);
// Update values
- m_buttonEnableHLEAudio->SetValue(g_Config.m_EnableHLEAudio ? true : false);
m_buttonEnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
m_buttonEnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
// Add tooltips
- m_buttonEnableHLEAudio->SetToolTip(_("This is usually used to play voice and sound effects."));
m_buttonEnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
m_buttonEnableThrottle->SetToolTip(_("This is used to control game speed by sound throttle.\nDisabling this could cause abnormal game speed, such as too fast.\nBut sometimes enabling this could cause constant noise.\n\nKeyboard Shortcut : Hold down to instantly disable Throttle."));
m_FrequencySelection->
@@ -83,7 +82,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
wxBoxSizer *sFrequency = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sButtons = new wxBoxSizer(wxHORIZONTAL);
- sbSettings->Add(m_buttonEnableHLEAudio, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
@@ -115,6 +113,15 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
SetSizerAndFit(sMain);
+ // add backends
+ std::vector backends = AudioCommon::GetSoundBackends();
+
+ for (std::vector::const_iterator iter = backends.begin();
+ iter != backends.end(); ++iter)
+ {
+ AddBackend((*iter).c_str());
+ }
+
// Center window
CenterOnParent();
}
@@ -148,14 +155,13 @@ void DSPConfigDialogHLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event)
{
- g_Config.m_EnableHLEAudio = m_buttonEnableHLEAudio->GetValue();
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
ac_Config.sFrequency = m_FrequencySelection->GetStringSelection().mb_str();
ac_Config.Update();
- g_Config.Save();
+ DSPHLE_SaveConfig();
if (event.GetId() == wxID_OK)
EndModal(wxID_OK);
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h b/Source/Core/DolphinWX/Src/DSPHLEConfigDlg.h
similarity index 94%
rename from Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h
rename to Source/Core/DolphinWX/Src/DSPHLEConfigDlg.h
index 8cf3bcb959..9f579572c0 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h
+++ b/Source/Core/DolphinWX/Src/DSPHLEConfigDlg.h
@@ -29,7 +29,7 @@ class DSPConfigDialogHLE : public wxDialog
public:
DSPConfigDialogHLE(wxWindow *parent,
wxWindowID id = wxID_ANY,
- const wxString &title = _("Dolphin DSP-HLE Plugin Settings"),
+ const wxString &title = _("DSP-HLE Settings"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
@@ -42,7 +42,6 @@ private:
wxSlider* m_volumeSlider;
wxStaticText* m_volumeText;
- wxCheckBox* m_buttonEnableHLEAudio;
wxCheckBox* m_buttonEnableDTKMusic;
wxCheckBox* m_buttonEnableThrottle;
wxArrayString wxArrayBackends;
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp b/Source/Core/DolphinWX/Src/DSPLLEConfigDlg.cpp
similarity index 94%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp
rename to Source/Core/DolphinWX/Src/DSPLLEConfigDlg.cpp
index 1ce045a471..2793edeea9 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp
+++ b/Source/Core/DolphinWX/Src/DSPLLEConfigDlg.cpp
@@ -16,8 +16,8 @@
// http://code.google.com/p/dolphin-emu/
-#include "Config.h"
-#include "DSPConfigDlgLLE.h"
+#include "HW/DSPLLE/DSPLLE.h"
+#include "DSPLLEConfigDlg.h"
BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
@@ -31,8 +31,7 @@ END_EVENT_TABLE()
DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
- // Load config settings
- g_Config.Load();
+ DSPLLE_LoadConfig();
m_OK = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@@ -87,6 +86,15 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
SetSizerAndFit(sMain);
+ // add backends
+ std::vector backends = AudioCommon::GetSoundBackends();
+
+ for (std::vector::const_iterator iter = backends.begin();
+ iter != backends.end(); ++iter)
+ {
+ AddBackend((*iter).c_str());
+ }
+
// Center window
CenterOnParent();
}
@@ -127,7 +135,7 @@ void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
ac_Config.Update();
- g_Config.Save();
+ DSPLLE_SaveConfig();
if (event.GetId() == wxID_OK)
EndModal(wxID_OK);
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h b/Source/Core/DolphinWX/Src/DSPLLEConfigDlg.h
similarity index 96%
rename from Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h
rename to Source/Core/DolphinWX/Src/DSPLLEConfigDlg.h
index 048d36e283..d494481d44 100644
--- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h
+++ b/Source/Core/DolphinWX/Src/DSPLLEConfigDlg.h
@@ -22,6 +22,7 @@
#include
#include
#include
+
#include "AudioCommon.h"
class DSPConfigDialogLLE : public wxDialog
@@ -29,7 +30,7 @@ class DSPConfigDialogLLE : public wxDialog
public:
DSPConfigDialogLLE(wxWindow *parent,
wxWindowID id = wxID_ANY,
- const wxString &title = _("Dolphin DSP-LLE Plugin Settings"),
+ const wxString &title = _("DSP-LLE Settings"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
diff --git a/Source/Core/DolphinWX/Src/FrameAui.cpp b/Source/Core/DolphinWX/Src/FrameAui.cpp
index 6987d441db..3d21e81202 100644
--- a/Source/Core/DolphinWX/Src/FrameAui.cpp
+++ b/Source/Core/DolphinWX/Src/FrameAui.cpp
@@ -195,7 +195,7 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
g_pCodeWindow->ToggleJitWindow(bShow);
break;
case IDM_SOUNDWINDOW:
- g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, bShow);
+ g_pCodeWindow->ToggleSoundWindow(bShow);
break;
case IDM_VIDEOWINDOW:
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, bShow);
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index c33b364872..10818b2115 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -44,6 +44,8 @@ Core::GetWindowHandle().
#include "CheatsWindow.h"
#include "LuaWindow.h"
#include "AboutDolphin.h"
+#include "DSPHLEConfigDlg.h"
+#include "DSPLLEConfigDlg.h"
#include "GameListCtrl.h"
#include "BootManager.h"
#include "LogWindow.h"
@@ -1059,18 +1061,15 @@ void CFrame::OnPluginGFX(wxCommandEvent& WXUNUSED (event))
void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
{
- #ifdef _WIN32
- Disable(); // Fake a modal dialog
- #endif
- CPluginManager::GetInstance().OpenConfig(
- this,
- SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
- PLUGIN_TYPE_DSP
- );
- #ifdef _WIN32
- Enable();
- Raise();
- #endif
+ if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE) {
+ DSPConfigDialogHLE *dlg = new DSPConfigDialogHLE(this);
+ dlg->ShowModal();
+ dlg->Destroy();
+ } else {
+ DSPConfigDialogLLE *dlg = new DSPConfigDialogLLE(this);
+ dlg->ShowModal();
+ dlg->Destroy();
+ }
}
void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h
index 9b5beb8ce8..ca842144f2 100644
--- a/Source/Core/DolphinWX/Src/Globals.h
+++ b/Source/Core/DolphinWX/Src/Globals.h
@@ -19,8 +19,8 @@
// This file holds global data for DolphinWx and DebuggerWx
-#ifndef _GLOBALS_H
-#define _GLOBALS_H
+#ifndef _WX_GLOBALS_H
+#define _WX_GLOBALS_H
#include "Common.h"
@@ -273,4 +273,4 @@ enum
extern const wxEventType wxEVT_HOST_COMMAND;
-#endif // _GLOBALS_H
+#endif // _WX_GLOBALS_H
diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp
index 1348cab1c0..c1dfccdcf0 100644
--- a/Source/Core/DolphinWX/Src/Main.cpp
+++ b/Source/Core/DolphinWX/Src/Main.cpp
@@ -290,10 +290,6 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin =
std::string(videoPluginFilename.mb_str());
- if (selectAudioPlugin && audioPluginFilename != wxEmptyString)
- SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin =
- std::string(audioPluginFilename.mb_str());
-
// Enable the PNG image handler for screenshots
wxImage::AddHandler(new wxPNGHandler);
diff --git a/Source/Core/VideoCommon/Src/VideoCommon.h b/Source/Core/VideoCommon/Src/VideoCommon.h
index 1d3d2a5fdf..5a573369cd 100644
--- a/Source/Core/VideoCommon/Src/VideoCommon.h
+++ b/Source/Core/VideoCommon/Src/VideoCommon.h
@@ -95,14 +95,6 @@ inline u32* Memory_Read_U32_Unswapped_Ptr(u32 _uAddress)
}
-inline float Memory_Read_Float(u32 _uAddress)
-{
- union {u32 i; float f;} temp;
- temp.i = Memory_Read_U32(_uAddress);
- return temp.f;
-}
-
-
// Logging
// ----------
void HandleGLError();
diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln
index 4e6ebacac6..02ebf3dcbd 100644
--- a/Source/Dolphin.sln
+++ b/Source/Dolphin.sln
@@ -1,12 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
+# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcproj", "{F0B874CB-4476-4199-9315-8343D05AE684}"
ProjectSection(ProjectDependencies) = postProject
{C7E5D50A-2916-464B-86A7-E10B3CC88ADA} = {C7E5D50A-2916-464B-86A7-E10B3CC88ADA}
{DA4CA030-A741-4DDC-9DA8-B2F351F0F158} = {DA4CA030-A741-4DDC-9DA8-B2F351F0F158}
{33546D62-7F34-4EA6-A88E-D538B36E16BF} = {33546D62-7F34-4EA6-A88E-D538B36E16BF}
+ {FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{823DDC98-42D5-4A38-88CF-9DC06C788AE4} = {823DDC98-42D5-4A38-88CF-9DC06C788AE4}
+ {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED} = {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
@@ -63,14 +65,13 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dolphin", "Core\DolphinWX\DolphinWX.vcproj", "{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
ProjectSection(ProjectDependencies) = postProject
{C7E5D50A-2916-464B-86A7-E10B3CC88ADA} = {C7E5D50A-2916-464B-86A7-E10B3CC88ADA}
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8} = {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}
{D4833C30-FA5F-4DFE-BD32-109DE1F09ED1} = {D4833C30-FA5F-4DFE-BD32-109DE1F09ED1}
{05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
{33546D62-7F34-4EA6-A88E-D538B36E16BF} = {33546D62-7F34-4EA6-A88E-D538B36E16BF}
{11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
+ {FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{823DDC98-42D5-4A38-88CF-9DC06C788AE4} = {823DDC98-42D5-4A38-88CF-9DC06C788AE4}
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4} = {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA} = {E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
@@ -84,6 +85,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Debugger", "Core\DebuggerWX\DebuggerWX.vcproj", "{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}"
ProjectSection(ProjectDependencies) = postProject
{F81AE75C-3D17-4D8C-A201-82FA5351C123} = {F81AE75C-3D17-4D8C-A201-82FA5351C123}
+ {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED} = {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
@@ -98,17 +100,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoCommon", "Core\VideoCo
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_HLE", "Plugins\Plugin_DSP_HLE\Plugin_DSP_HLE.vcproj", "{D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}"
- ProjectSection(ProjectDependencies) = postProject
- {05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
- {11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
- {FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
- {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
- {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
- {B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
- {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LZO", "..\Externals\LZO\LZO.vcproj", "{33546D62-7F34-4EA6-A88E-D538B36E16BF}"
ProjectSection(ProjectDependencies) = postProject
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
@@ -125,19 +116,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioCommon", "Core\AudioCo
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_LLE", "Plugins\Plugin_DSP_LLE\Plugin_DSP_LLE.vcproj", "{3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}"
- ProjectSection(ProjectDependencies) = postProject
- {05C75041-D67D-4903-A362-8395A7B35C75} = {05C75041-D67D-4903-A362-8395A7B35C75}
- {F81AE75C-3D17-4D8C-A201-82FA5351C123} = {F81AE75C-3D17-4D8C-A201-82FA5351C123}
- {11F55366-12EC-4C44-A8CB-1D4E315D61ED} = {11F55366-12EC-4C44-A8CB-1D4E315D61ED}
- {FBAFB369-07EB-4460-9CAD-08BE5789DAB6} = {FBAFB369-07EB-4460-9CAD-08BE5789DAB6}
- {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED} = {838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}
- {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
- {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE} = {1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}
- {B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
- {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSPCore", "Core\DSPCore\DSPCore.vcproj", "{838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}"
ProjectSection(ProjectDependencies) = postProject
{B807E8DB-4241-4754-BC2A-2F435BCA881A} = {B807E8DB-4241-4754-BC2A-2F435BCA881A}
@@ -380,18 +358,6 @@ Global
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|Win32.Build.0 = Release|Win32
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|x64.ActiveCfg = Release|x64
{E5D1F0C0-AA07-4841-A4EB-4CF4DAA6B0FA}.Release|x64.Build.0 = Release|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Debug|Win32.ActiveCfg = Debug|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Debug|Win32.Build.0 = Debug|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Debug|x64.ActiveCfg = Debug|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Debug|x64.Build.0 = Debug|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.DebugFast|Win32.ActiveCfg = DebugFast|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.DebugFast|Win32.Build.0 = DebugFast|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.DebugFast|x64.ActiveCfg = DebugFast|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.DebugFast|x64.Build.0 = DebugFast|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Release|Win32.ActiveCfg = Release|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Release|Win32.Build.0 = Release|Win32
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Release|x64.ActiveCfg = Release|x64
- {D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}.Release|x64.Build.0 = Release|x64
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Debug|Win32.ActiveCfg = Debug|Win32
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Debug|Win32.Build.0 = Debug|Win32
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Debug|x64.ActiveCfg = Debug|x64
@@ -428,18 +394,6 @@ Global
{FBAFB369-07EB-4460-9CAD-08BE5789DAB6}.Release|Win32.Build.0 = Release|Win32
{FBAFB369-07EB-4460-9CAD-08BE5789DAB6}.Release|x64.ActiveCfg = Release|x64
{FBAFB369-07EB-4460-9CAD-08BE5789DAB6}.Release|x64.Build.0 = Release|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Debug|Win32.ActiveCfg = Debug|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Debug|Win32.Build.0 = Debug|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Debug|x64.ActiveCfg = Debug|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Debug|x64.Build.0 = Debug|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.DebugFast|Win32.ActiveCfg = DebugFast|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.DebugFast|Win32.Build.0 = DebugFast|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.DebugFast|x64.ActiveCfg = DebugFast|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.DebugFast|x64.Build.0 = DebugFast|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Release|Win32.ActiveCfg = Release|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Release|Win32.Build.0 = Release|Win32
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Release|x64.ActiveCfg = Release|x64
- {3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}.Release|x64.Build.0 = Release|x64
{838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}.Debug|Win32.ActiveCfg = Debug|Win32
{838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}.Debug|Win32.Build.0 = Debug|Win32
{838A89A3-3AA0-4A45-ACBE-3D1E0980C2ED}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/Source/PluginSpecs/pluginspecs_dsp.h b/Source/PluginSpecs/pluginspecs_dsp.h
deleted file mode 100644
index ae9ffef048..0000000000
--- a/Source/PluginSpecs/pluginspecs_dsp.h
+++ /dev/null
@@ -1,115 +0,0 @@
-//__________________________________________________________________________________________________
-// Common dsp plugin spec, version #1.0 maintained by F|RES
-//
-
-#ifndef _DSP_H_INCLUDED__
-#define _DSP_H_INCLUDED__
-
-#include "PluginSpecs.h"
-#include "ExportProlog.h"
-
-typedef unsigned char (*TARAM_Read_U8)(const unsigned int _uAddress);
-typedef void (*TARAM_Write_U8)(const unsigned char _uValue, const unsigned int _uAddress);
-typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _uAddress);
-typedef unsigned char* (*TGetARAMPointer)(void);
-typedef void (*TLogv)(const char* _szMessage, int _v);
-typedef const char* (*TName)(void);
-typedef void (*TDebuggerBreak)(void);
-typedef void (*TGenerateDSPInt)(void);
-typedef unsigned int (*TAudioGetStreaming)(short* _pDestBuffer, unsigned int _numSamples, unsigned int _sampleRate);
-typedef void (*TGetSampleRate)(unsigned int &AISampleRate, unsigned int &DACSampleRate);
-
-typedef struct
-{
- void *hWnd;
- TARAM_Read_U8 pARAM_Read_U8;
- TARAM_Write_U8 pARAM_Write_U8;
- TGetMemoryPointer pGetMemoryPointer;
- TGetARAMPointer pGetARAMPointer;
- TLogv pLog;
- TName pName;
- TDebuggerBreak pDebuggerBreak;
- TGenerateDSPInt pGenerateDSPInterrupt;
- TAudioGetStreaming pGetAudioStreaming;
- TGetSampleRate pGetSampleRate;
- int *pEmulatorState;
- bool bWii;
- bool bOnThread;
-} DSPInitialize;
-
-
-// __________________________________________________________________________________________________
-// Function: DSP_ReadMailboxHigh
-// Purpose: Send mail to high DSP Mailbox
-// input: none
-// output: none
-//
-EXPORT unsigned short CALL DSP_ReadMailboxHigh(bool _CPUMailbox);
-
-// __________________________________________________________________________________________________
-// Function: DSP_ReadMailboxLow
-// Purpose: Send mail to low DSP Mailbox
-// input: none
-// output: none
-//
-EXPORT unsigned short CALL DSP_ReadMailboxLow(bool _CPUMailbox);
-
-// __________________________________________________________________________________________________
-// Function: DSP_WriteMailboxHigh
-// Purpose: Send mail to high CPU Mailbox
-// input: none
-// output: none
-//
-EXPORT void CALL DSP_WriteMailboxHigh(bool _CPUMailbox, unsigned short _uHighMail);
-
-// __________________________________________________________________________________________________
-// Function: DSP_WriteMailboxLow
-// Purpose: Send mail to low CPU Mailbox
-// input: none
-// output: none
-//
-EXPORT void CALL DSP_WriteMailboxLow(bool _CPUMailbox, unsigned short _uLowMail);
-
-// __________________________________________________________________________________________________
-// Function: DSP_WriteControlRegister
-// Purpose: This function is called if the core reads from the DSP control register
-// input: Value to be written
-// output: value of the control register
-//
-EXPORT unsigned short CALL DSP_WriteControlRegister(unsigned short _Value);
-
-// __________________________________________________________________________________________________
-// Function: DSP_ReadControlRegister
-// Purpose: This function is called if the core reads from the DSP control register
-// output: value of the control register
-//
-EXPORT unsigned short CALL DSP_ReadControlRegister(void);
-
-// __________________________________________________________________________________________________
-// Function: DSP_Update
-// Purpose: This function is called from time to time from the core.
-// input: cycles - run this number of DSP clock cycles.
-// output: TRUE if the flag is set, else FALSE
-//
-EXPORT void CALL DSP_Update(int cycles);
-
-// __________________________________________________________________________________________________
-// Function: DSP_SendAIBuffer
-// Purpose: This function sends the current AI Buffer to the DSP plugin
-// input: _Address : Memory-Address
-// input: _Number : Number of the Samples
-//
-EXPORT void CALL DSP_SendAIBuffer(unsigned int address, unsigned int num_samples);
-
-// __________________________________________________________________________________________________
-// Function: DSP_StopSoundStream
-// Purpose: Stops audio playback. Must be called before Shutdown().
-EXPORT void CALL DSP_StopSoundStream();
-
-// __________________________________________________________________________________________________
-// Function: DSP_ClearAudioBuffer
-// Purpose: Stops audio. Called while pausing to stop the annoying noises.
-EXPORT void CALL DSP_ClearAudioBuffer(bool mute);
-
-#include "ExportEpilog.h"
-#endif
diff --git a/Source/Plugins/CMakeLists.txt b/Source/Plugins/CMakeLists.txt
index c02727570c..619e00ded1 100644
--- a/Source/Plugins/CMakeLists.txt
+++ b/Source/Plugins/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_subdirectory(Plugin_DSP_HLE)
-add_subdirectory(Plugin_DSP_LLE)
add_subdirectory(Plugin_VideoOGL)
add_subdirectory(Plugin_VideoSoftware)
# TODO: Add other plugins here!
diff --git a/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt b/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt
deleted file mode 100644
index 73b8e341a3..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-set(SRCS
- Src/DSPHandler.cpp
- Src/MailHandler.cpp
- Src/HLEMixer.cpp
- Src/main.cpp
- Src/Config.cpp
- Src/UCodes/UCode_AX.cpp
- Src/UCodes/UCode_AXWii.cpp
- Src/UCodes/UCode_CARD.cpp
- Src/UCodes/UCode_InitAudioSystem.cpp
- Src/UCodes/UCode_ROM.cpp
- Src/UCodes/UCodes.cpp
- Src/UCodes/UCode_GBA.cpp
- Src/UCodes/UCode_Zelda.cpp
- Src/UCodes/UCode_Zelda_ADPCM.cpp
- Src/UCodes/UCode_Zelda_Voice.cpp
- Src/UCodes/UCode_Zelda_Synth.cpp)
-
-if(wxWidgets_FOUND)
- set(SRCS ${SRCS} Src/ConfigDlg.cpp)
-endif(wxWidgets_FOUND)
-
-add_library(Plugin_DSP_HLE MODULE ${SRCS})
-target_link_libraries(Plugin_DSP_HLE audiocommon common ${wxWidgets_LIBRARIES})
-install(TARGETS Plugin_DSP_HLE
- LIBRARY DESTINATION ${plugindir}
- RUNTIME DESTINATION ${plugindir})
diff --git a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj b/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj
deleted file mode 100644
index 3b0d96237d..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj
+++ /dev/null
@@ -1,829 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcxproj b/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcxproj
deleted file mode 100644
index d4af4ed4a1..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcxproj
+++ /dev/null
@@ -1,305 +0,0 @@
-
-
-
-
- DebugFast
- Win32
-
-
- DebugFast
- x64
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {27980B4B-F26C-41E8-9C44-A3D4F259D6E7}
- Plugin_DSP_HLE
-
-
-
- DynamicLibrary
- true
- Unicode
-
-
- DynamicLibrary
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)D
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)D
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)DF
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)DF
-
-
-
- Level3
- Disabled
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreadedDebug
- stdafx.h
- Use
-
-
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- Disabled
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreadedDebug
- stdafx.h
- Use
-
-
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;%(AdditionalIncludeDirectories)
- DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
-
-
-
-
-
-
- Create
- Create
- Create
- Create
- Create
- Create
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {0e231fb1-f3c9-4724-accb-de8bcb3c089e}
-
-
- {1c8436c9-dbaf-42be-83bc-cf3ec9175abe}
-
-
- {11f55366-12ec-4c44-a8cb-1d4e315d61ed}
-
-
- {37d007bd-d66c-4eaf-b56c-bd1aac340a05}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp
deleted file mode 100644
index e2e8be2ae8..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2003 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 "Globals.h"
-#include "Common.h"
-#include "IniFile.h"
-#include "Config.h"
-#include "AudioCommon.h"
-#include "FileUtil.h"
-
-CConfig g_Config;
-
-void CConfig::Load()
-{
- // first load defaults
- IniFile file;
- file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
- file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true); // Sound Settings
- ac_Config.Load(file);
-}
-
-void CConfig::Save()
-{
- IniFile file;
- file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
- file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio); // Sound Settings
- ac_Config.Set(file);
-
- file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
-}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h b/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h
deleted file mode 100644
index 347cd2fb25..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2003 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 _GLOBALS_H
-#define _GLOBALS_H
-
-#include "Common.h"
-#include "pluginspecs_dsp.h"
-#include "StringUtil.h"
-
-extern DSPInitialize g_dspInitialize;
-extern PLUGIN_GLOBALS* globals;
-
-extern u8* g_pMemory;
-
-// TODO: Wii support? Most likely audio data still must be in the old 24MB TRAM.
-#define RAM_MASK 0x1FFFFFF
-
-inline u8 Memory_Read_U8(u32 _uAddress)
-{
- _uAddress &= RAM_MASK;
- return g_pMemory[_uAddress];
-}
-
-inline u16 Memory_Read_U16(u32 _uAddress)
-{
- _uAddress &= RAM_MASK;
- return Common::swap16(*(u16*)&g_pMemory[_uAddress]);
-}
-
-inline u32 Memory_Read_U32(u32 _uAddress)
-{
- _uAddress &= RAM_MASK;
- return Common::swap32(*(u32*)&g_pMemory[_uAddress]);
-}
-
-inline float Memory_Read_Float(u32 _uAddress)
-{
- u32 uTemp = Memory_Read_U32(_uAddress);
- return *(float*)&uTemp;
-}
-
-inline void* Memory_Get_Pointer(u32 _uAddress)
-{
- _uAddress &= RAM_MASK;
- return &g_pMemory[_uAddress];
-}
-
-#endif
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript b/Source/Plugins/Plugin_DSP_HLE/Src/SConscript
deleted file mode 100644
index 660e037e22..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/SConscript
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- python -*-
-
-Import('env')
-import os
-
-name = os.sep + "Plugin_DSP_HLE"
-
-files = [
- 'DSPHandler.cpp',
- 'MailHandler.cpp',
- 'HLEMixer.cpp',
- 'main.cpp',
- 'Config.cpp',
- 'UCodes/UCode_AX.cpp',
- 'UCodes/UCode_AXWii.cpp',
- 'UCodes/UCode_CARD.cpp',
- 'UCodes/UCode_InitAudioSystem.cpp',
- 'UCodes/UCode_ROM.cpp',
- 'UCodes/UCodes.cpp',
- 'UCodes/UCode_GBA.cpp',
- 'UCodes/UCode_Zelda.cpp',
- 'UCodes/UCode_Zelda_ADPCM.cpp',
- 'UCodes/UCode_Zelda_Voice.cpp',
- 'UCodes/UCode_Zelda_Synth.cpp',
- ]
-
-if env['HAVE_WX']:
- files += [
- 'ConfigDlg.cpp'
- ]
-
-libs = [ 'common', 'audiocommon' ]
-
-env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = libs + env['LIBS'])
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
deleted file mode 100644
index a0b368fca3..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-// Copyright (C) 2003 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
-
-#include "Globals.h" // Local
-
-#if defined(HAVE_WX) && HAVE_WX
-#include "ConfigDlg.h"
-DSPConfigDialogHLE* m_ConfigFrame = NULL;
-#endif
-
-#include "ChunkFile.h"
-#include "HLEMixer.h"
-#include "DSPHandler.h"
-#include "Config.h"
-#include "Setup.h"
-#include "StringUtil.h"
-#include "LogManager.h"
-#include "IniFile.h"
-
-
-// Declarations and definitions
-PLUGIN_GLOBALS* globals = NULL;
-DSPInitialize g_dspInitialize;
-u8* g_pMemory;
-extern std::vector sMailLog, sMailTime;
-
-bool g_InitMixer = false;
-SoundStream *soundStream = NULL;
-
-// Mailbox utility
-struct DSPState
-{
- u32 CPUMailbox;
- u32 DSPMailbox;
-
- void Reset() {
- CPUMailbox = 0x00000000;
- DSPMailbox = 0x00000000;
- }
-
- DSPState()
- {
- Reset();
- }
-};
-DSPState g_dspState;
-
-// Standard crap to make wxWidgets happy
-#ifdef _WIN32
-HINSTANCE g_hInstance;
-
-wxLocale *InitLanguageSupport()
-{
- wxLocale *m_locale;
- unsigned int language = 0;
-
- IniFile ini;
- ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
- ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
-
- // Load language if possible, fall back to system default otherwise
- if(wxLocale::IsAvailable(language))
- {
- m_locale = new wxLocale(language);
-
- m_locale->AddCatalogLookupPathPrefix(wxT("Languages"));
-
- m_locale->AddCatalog(wxT("dolphin-emu"));
-
- if(!m_locale->IsOk())
- {
- PanicAlertT("Error loading selected language. Falling back to system default.");
- delete m_locale;
- m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
- }
- }
- else
- {
- PanicAlertT("The selected language is not supported by your system. Falling back to system default.");
- m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
- }
- return m_locale;
-}
-
-class wxDLLApp : public wxApp
-{
- bool OnInit()
- {
- return true;
- }
-};
-IMPLEMENT_APP_NO_MAIN(wxDLLApp)
-WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
-
-BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
-{
- static wxLocale *m_locale;
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- wxSetInstance((HINSTANCE)hinstDLL);
- wxInitialize();
- m_locale = InitLanguageSupport();
- }
- break;
-
- case DLL_PROCESS_DETACH:
- wxUninitialize();
- delete m_locale;
- break;
- }
-
- g_hInstance = hinstDLL;
- return TRUE;
-}
-#endif
-
-void *DllDebugger(void *_hParent, bool Show)
-{
- return NULL;
-}
-
-
-void GetDllInfo(PLUGIN_INFO* _PluginInfo)
-{
- _PluginInfo->Version = 0x0100;
- _PluginInfo->Type = PLUGIN_TYPE_DSP;
-#ifdef DEBUGFAST
- sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin (DebugFast)");
-#elif defined _DEBUG
- sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin (Debug)");
-#else
- sprintf(_PluginInfo->Name, _trans("Dolphin DSP-HLE Plugin"));
-#endif
-}
-
-
-void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
-{
- globals = _pPluginGlobals;
- LogManager::SetInstance((LogManager*)globals->logManager);
-}
-
-void DllConfig(void *_hParent)
-{
-#if defined(HAVE_WX) && HAVE_WX
- // Load config settings
- g_Config.Load();
-
- m_ConfigFrame = new DSPConfigDialogHLE((wxWindow *)_hParent);
-
- // add backends
- std::vector backends = AudioCommon::GetSoundBackends();
-
- for (std::vector::const_iterator iter = backends.begin();
- iter != backends.end(); ++iter)
- {
- m_ConfigFrame->AddBackend((*iter).c_str());
- }
-
- m_ConfigFrame->ShowModal();
- m_ConfigFrame->Destroy();
-#endif
-}
-
-
-void Initialize(void *init)
-{
- g_InitMixer = false;
- g_dspInitialize = *(DSPInitialize*)init;
-
- g_Config.Load();
- g_pMemory = g_dspInitialize.pGetMemoryPointer(0);
-
- g_dspState.Reset();
-
- CDSPHandler::CreateInstance();
-}
-
-void DSP_StopSoundStream()
-{
-}
-
-void Shutdown()
-{
- AudioCommon::ShutdownSoundStream();
-
- // Delete the UCodes
- CDSPHandler::Destroy();
-}
-
-void DoState(unsigned char **ptr, int mode)
-{
- PointerWrap p(ptr, mode);
- p.Do(g_InitMixer);
- CDSPHandler::GetInstance().GetUCode()->DoState(p);
-}
-
-void EmuStateChange(PLUGIN_EMUSTATE newState)
-{
- DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
-}
-
-// Mailbox fuctions
-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 DSP_WriteMailboxHigh(bool _CPUMailbox, unsigned short _Value)
-{
- if (_CPUMailbox)
- {
- g_dspState.CPUMailbox = (g_dspState.CPUMailbox & 0xFFFF) | (_Value << 16);
- }
- 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;
- CDSPHandler::GetInstance().SendMailToDSP(g_dspState.CPUMailbox);
- // Mail sent so clear MSB to show that it is progressed
- g_dspState.CPUMailbox &= 0x7FFFFFFF;
- }
- else
- {
- PanicAlert("CPU can't write %08x to DSP mailbox", _Value);
- }
-}
-
-
-// Other DSP fuctions
-unsigned short DSP_WriteControlRegister(unsigned short _Value)
-{
- UDSPControl Temp(_Value);
- if (!g_InitMixer)
- {
- if (!Temp.DSPHalt && Temp.DSPInit)
- {
- unsigned int AISampleRate, DACSampleRate, BackendSampleRate;
- g_dspInitialize.pGetSampleRate(AISampleRate, DACSampleRate);
- std::string frequency = ac_Config.sFrequency;
- if (frequency == "48,000 Hz")
- BackendSampleRate = 48000;
- else
- BackendSampleRate = 32000;
-
- soundStream = AudioCommon::InitSoundStream(new HLEMixer(AISampleRate, DACSampleRate, BackendSampleRate));
- if(!soundStream) PanicAlert("Error starting up sound stream");
- // Mixer is initialized
- g_InitMixer = true;
- }
- }
- return CDSPHandler::GetInstance().WriteControlRegister(_Value);
-}
-
-unsigned short DSP_ReadControlRegister()
-{
- return CDSPHandler::GetInstance().ReadControlRegister();
-}
-
-void DSP_Update(int cycles)
-{
- // This is called OFTEN - better not do anything expensive!
- // ~1/6th as many cycles as the period PPC-side.
- CDSPHandler::GetInstance().Update(cycles / 6);
-}
-
-// The reason that we don't disable this entire
-// function when Other Audio is disabled is that then we can't turn it back on
-// again once the game has started.
-void DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
-{
- if (!soundStream)
- return;
-
- CMixer* pMixer = soundStream->GetMixer();
-
- if (pMixer && address)
- {
- short* samples = (short*)Memory_Get_Pointer(address);
- // Internal sample rate is always 32khz
- pMixer->PushSamples(samples, num_samples);
-
- // FIXME: Write the audio to a file
- //if (log_ai)
- // g_wave_writer.AddStereoSamples(samples, 8);
- }
-
- soundStream->Update();
-}
-
-void DSP_ClearAudioBuffer(bool mute)
-{
- if (soundStream)
- soundStream->Clear(mute);
-}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.h b/Source/Plugins/Plugin_DSP_HLE/Src/main.h
deleted file mode 100644
index a4390944b9..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/main.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2003 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 __MAIN_H__
-#define __MAIN_H__
-
-#include "SoundStream.h"
-#include "Globals.h" // Local
-
-extern SoundStream *soundStream;
-
-#endif
-
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.cpp
deleted file mode 100644
index 177b4afe23..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (C) 2003 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"
-
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.h b/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.h
deleted file mode 100644
index b0913a01b4..0000000000
--- a/Source/Plugins/Plugin_DSP_HLE/Src/stdafx.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2003 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
-#include
-
-#endif
diff --git a/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt b/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt
deleted file mode 100644
index f646cdd543..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-set(SRCS
- Src/Config.cpp
- Src/DSPDebugInterface.cpp
- Src/DSPHost.cpp
- Src/DSPSymbols.cpp
- Src/Globals.cpp
- Src/main.cpp
- Src/Tools.cpp)
-
-set(LIBS dspcore audiocommon common)
-
-if(wxWidgets_FOUND)
- set(SRCS
- ${SRCS}
- Src/DSPConfigDlgLLE.cpp
- Src/Debugger/DSPDebugWindow.cpp
- Src/Debugger/DSPRegisterView.cpp)
- set(LIBS ${LIBS} debugger_ui_util ${wxWidgets_LIBRARIES})
-endif(wxWidgets_FOUND)
-
-add_library(Plugin_DSP_LLE MODULE ${SRCS})
-target_link_libraries(Plugin_DSP_LLE ${LIBS})
-install(TARGETS Plugin_DSP_LLE
- LIBRARY DESTINATION ${plugindir}
- RUNTIME DESTINATION ${plugindir})
-
diff --git a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj b/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj
deleted file mode 100644
index e5833fec89..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj
+++ /dev/null
@@ -1,874 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcxproj b/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcxproj
deleted file mode 100644
index 7ed9893a89..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcxproj
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
-
-
- DebugFast
- Win32
-
-
- DebugFast
- x64
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {14BF7DCF-8078-4FB4-B1E8-CDAC61271DFC}
- Plugin_DSP_LLE
-
-
-
- DynamicLibrary
- true
- Unicode
-
-
- DynamicLibrary
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
- DynamicLibrary
- false
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)D
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)D
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)DF
-
-
- $(PlatformName)\$(ConfigurationName)
-
-
- $(PlatformName)\$(ConfigurationName)
- $(ProjectName)DF
-
-
-
- Level3
- Disabled
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreadedDebug
- stdafx.h
- Use
-
-
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- Disabled
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreadedDebug
- stdafx.h
- Use
-
-
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- _SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- ..\..\Core\Common\Src;..\..\PluginSpecs;..\..\Core\AudioCommon\Src;..\..\..\Externals\wxWidgets\include;..\..\Core\DSPCore\Src;..\..\Core\DebuggerUICommon\Src;%(AdditionalIncludeDirectories)
- DEBUGFAST;_SECURE_SCL=0;%(PreprocessorDefinitions)
- MultiThreaded
- stdafx.h
- Use
-
-
- true
- true
- true
- ..\..\..\Binary\$(PlatformName)\Plugins\$(TargetName)$(TargetExt)
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create
- Create
- Create
- Create
- Create
- Create
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {0e231fb1-f3c9-4724-accb-de8bcb3c089e}
-
-
- {05c75041-d67d-4903-a362-8395a7b35c75}
-
-
- {1c8436c9-dbaf-42be-83bc-cf3ec9175abe}
-
-
- {11f55366-12ec-4c44-a8cb-1d4e315d61ed}
-
-
- {37d007bd-d66c-4eaf-b56c-bd1aac340a05}
-
-
- {c5a30052-1fc7-4a30-b4a2-6b06da298ab3}
-
-
- {4ed3c8be-91a7-4361-8d46-16d03b678d4c}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Config.h b/Source/Plugins/Plugin_DSP_LLE/Src/Config.h
deleted file mode 100644
index 4b78dd99f1..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Src/Config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2003 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 _PLUGIN_DSP_LLE_CONFIG_H
-#define _PLUGIN_DSP_LLE_CONFIG_H
-
-#include
-
-struct CConfig
-{
- void Load();
- void Save();
-};
-
-extern CConfig g_Config;
-
-#endif // _PLUGIN_DSP_LLE_CONFIG_H
-
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript b/Source/Plugins/Plugin_DSP_LLE/Src/SConscript
deleted file mode 100644
index a7cee3b9fb..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Src/SConscript
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- python -*-
-
-Import('env')
-import os
-
-name = os.sep + "Plugin_DSP_LLE"
-
-files = [
- "Config.cpp",
- "DSPDebugInterface.cpp",
- "DSPSymbols.cpp",
- "Globals.cpp",
- "main.cpp",
- "Tools.cpp",
- "DSPHost.cpp",
- ]
-
-if env['HAVE_WX']:
- files += [
- "DSPConfigDlgLLE.cpp",
- "Debugger/DSPDebugWindow.cpp",
- "Debugger/DSPRegisterView.cpp",
- ]
-
-libs = [ 'dspcore', 'audiocommon', 'common' ]
-
-if env['HAVE_WX']:
- libs += [ 'debugger_ui_util' ]
-
-env.SharedLibrary(env['plugin_dir'] + name, files, LIBS = libs + env['LIBS'])
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.cpp
deleted file mode 100644
index 177b4afe23..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (C) 2003 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"
-
diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.h b/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.h
deleted file mode 100644
index bb6193ef16..0000000000
--- a/Source/Plugins/Plugin_DSP_LLE/Src/stdafx.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2003 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
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-#define _CRT_SECURE_NO_DEPRECATE 1
-
-#include
-#include
-
-#include "PluginSpecs_DSP.h"
-
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.cpp
index 746762901b..4dab4192df 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.cpp
@@ -19,9 +19,9 @@
#include "IniFile.h"
#include "VideoConfig.h"
-VideoConfig g_Config;
+SWVideoConfig g_Config;
-VideoConfig::VideoConfig()
+SWVideoConfig::SWVideoConfig()
{
bFullscreen = false;
bHideCursor = false;
@@ -42,7 +42,7 @@ VideoConfig::VideoConfig()
drawEnd = 100000;
}
-void VideoConfig::Load(const char* ini_file)
+void SWVideoConfig::Load(const char* ini_file)
{
std::string temp;
IniFile iniFile;
@@ -65,7 +65,7 @@ void VideoConfig::Load(const char* ini_file)
iniFile.Get("Misc", "DrawEnd", &drawEnd, 100000);
}
-void VideoConfig::Save(const char* ini_file)
+void SWVideoConfig::Save(const char* ini_file)
{
IniFile iniFile;
iniFile.Load(ini_file);
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.h b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.h
index fe52b494a0..f10517331b 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.h
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfig.h
@@ -23,9 +23,9 @@
#define STATISTICS 1
// NEVER inherit from this class.
-struct VideoConfig : NonCopyable
+struct SWVideoConfig : NonCopyable
{
- VideoConfig();
+ SWVideoConfig();
void Load(const char* ini_file);
void Save(const char* ini_file);
@@ -50,6 +50,6 @@ struct VideoConfig : NonCopyable
u32 drawEnd;
};
-extern VideoConfig g_Config;
+extern SWVideoConfig g_Config;
#endif // _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.h b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.h
index 513550b2cf..679769dbd9 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.h
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.h
@@ -76,7 +76,7 @@ protected:
void Event_ClickClose(wxCommandEvent&);
void Event_Close(wxCloseEvent&);
- VideoConfig& vconfig;
+ SWVideoConfig& vconfig;
std::string ininame;
};