Some more work on renaming variables and files to reflect that the plugins are no longer plugins.

Fix another minor issue with frame dumping.
Add the graphics config dialog button back to the main config.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7041 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-02 16:34:12 +00:00
parent 6f93d77106
commit 5a800b765a
33 changed files with 161 additions and 164 deletions

View File

@ -182,9 +182,8 @@ void SConfig::SaveSettings()
ini.Set("Core", "FrameLimit", m_Framelimit);
ini.Set("Core", "UseFPS", b_UseFPS);
// Plugins
// TODO: change key name, it's no longer a plugin
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
// GFX Backend
ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
m_SYSCONF->Save();
@ -313,9 +312,8 @@ void SConfig::LoadSettings()
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default
// Plugins
// TODO: change key name, it's no longer a plugin
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, "");
// GFX Backend
ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
}
m_SYSCONF = new SysConf();

View File

@ -34,10 +34,6 @@ struct SConfig : NonCopyable
bool m_WiiAutoReconnect[4];
bool m_WiiAutoUnpair;
// hard coded default plugins ...
std::string m_DefaultGFXPlugin;
std::string m_DefaultDSPPlugin;
// name of the last used filename
std::string m_LastFilename;

View File

@ -54,7 +54,7 @@
#include "PowerPC/PowerPC.h"
#include "PowerPC/JitCommon/JitBase.h"
#include "PluginDSP.h"
#include "DSPEmulator.h"
#include "ConfigManager.h"
#include "VideoBackendBase.h"
@ -314,7 +314,7 @@ void EmuThread()
g_video_backend->Initialize();
g_pWindowHandle = _CoreParameter.hMainWindow;
DSP::GetPlugin()->Initialize(g_pWindowHandle, _CoreParameter.bWii, _CoreParameter.bDSPThread);
DSP::GetDSPEmulator()->Initialize(g_pWindowHandle, _CoreParameter.bWii, _CoreParameter.bDSPThread);
Pad::Initialize(g_pWindowHandle);
@ -411,7 +411,7 @@ void EmuThread()
// Stop audio thread - Actually this does nothing on HLE plugin.
// But stops the DSP Interpreter on LLE plugin.
DSP::GetPlugin()->DSP_StopSoundStream();
DSP::GetDSPEmulator()->DSP_StopSoundStream();
// We must set up this flag before executing HW::Shutdown()
g_bHwInit = false;
@ -653,7 +653,7 @@ void Callback_DSPLog(const TCHAR* _szMessage, int _v)
// WARNING - THIS MAY BE EXECUTED FROM DSP THREAD
void Callback_DSPInterrupt()
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}

View File

@ -128,9 +128,9 @@ struct SCoreStartupParameter
};
EBootType m_BootType;
// files
std::string m_strVideoPlugin;
std::string m_strVideoBackend;
// files
std::string m_strFilename;
std::string m_strBootROM;
std::string m_strSRAM;

View File

@ -15,12 +15,12 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include "PluginDSP.h"
#include "DSPEmulator.h"
#include "HW/DSPLLE/DSPLLE.h"
#include "HW/DSPHLE/DSPHLE.h"
PluginDSP *CreateDSPPlugin(bool HLE)
DSPEmulator *CreateDSPEmulator(bool HLE)
{
ac_Config.Load();

View File

@ -21,10 +21,10 @@
#include "ChunkFile.h"
class PluginDSP
class DSPEmulator
{
public:
virtual ~PluginDSP() {}
virtual ~DSPEmulator() {}
virtual bool IsLLE() = 0;
@ -45,6 +45,6 @@ public:
virtual void DSP_ClearAudioBuffer(bool mute) = 0;
};
PluginDSP *CreateDSPPlugin(bool LLE);
DSPEmulator *CreateDSPEmulator(bool LLE);
#endif // _PLUGINDSP_H_

View File

@ -18,7 +18,7 @@
#include "Common.h"
#include "Thread.h"
#include "../PluginDSP.h"
#include "../DSPEmulator.h"
#include "../PowerPC/PowerPC.h"
#include "../Host.h"
#include "../Core.h"
@ -118,14 +118,14 @@ void CCPU::EnableStepping(const bool _bStepping)
{
PowerPC::Pause();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE);
DSP::GetPlugin()->DSP_ClearAudioBuffer(true);
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(true);
}
else
{
PowerPC::Start();
m_StepEvent.Set();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PLAY);
DSP::GetPlugin()->DSP_ClearAudioBuffer(false);
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(false);
}
}

View File

@ -46,7 +46,7 @@
#include "AudioInterface.h"
#include "../PowerPC/PowerPC.h"
#include "../ConfigManager.h"
#include "../PluginDSP.h"
#include "../DSPEmulator.h"
namespace DSP
{
@ -211,7 +211,7 @@ static ARAM_Info g_ARAM_Info;
static u16 g_AR_MODE;
static u16 g_AR_REFRESH;
PluginDSP *dsp_plugin;
DSPEmulator *dsp_emulator;
static int dsp_slice = 0;
static bool dsp_is_lle = false;
@ -230,7 +230,7 @@ void DoState(PointerWrap &p)
p.Do(g_AR_MODE);
p.Do(g_AR_REFRESH);
dsp_plugin->DoState(p);
dsp_emulator->DoState(p);
}
@ -247,15 +247,15 @@ void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
GenerateDSPInterrupt((DSPInterruptType)(userdata&0xFFFF), (bool)((userdata>>16) & 1));
}
PluginDSP *GetPlugin()
DSPEmulator *GetDSPEmulator()
{
return dsp_plugin;
return dsp_emulator;
}
void Init(bool hle)
{
dsp_plugin = CreateDSPPlugin(hle);
dsp_is_lle = dsp_plugin->IsLLE();
dsp_emulator = CreateDSPEmulator(hle);
dsp_is_lle = dsp_emulator->IsLLE();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{
@ -292,9 +292,9 @@ void Shutdown()
FreeMemoryPages(g_ARAM.ptr, g_ARAM.size);
g_ARAM.ptr = NULL;
dsp_plugin->Shutdown();
delete dsp_plugin;
dsp_plugin = NULL;
dsp_emulator->Shutdown();
delete dsp_emulator;
dsp_emulator = NULL;
}
void Read16(u16& _uReturnValue, const u32 _iAddress)
@ -304,31 +304,31 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
// DSP
case DSP_MAIL_TO_DSP_HI:
if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) {
dsp_plugin->DSP_Update(DSP_MAIL_SLICE);
dsp_emulator->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE;
}
_uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(true);
_uReturnValue = dsp_emulator->DSP_ReadMailBoxHigh(true);
break;
case DSP_MAIL_TO_DSP_LO:
_uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(true);
_uReturnValue = dsp_emulator->DSP_ReadMailBoxLow(true);
break;
case DSP_MAIL_FROM_DSP_HI:
if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) {
dsp_plugin->DSP_Update(DSP_MAIL_SLICE);
dsp_emulator->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE;
}
_uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(false);
_uReturnValue = dsp_emulator->DSP_ReadMailBoxHigh(false);
break;
case DSP_MAIL_FROM_DSP_LO:
_uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(false);
_uReturnValue = dsp_emulator->DSP_ReadMailBoxLow(false);
break;
case DSP_CONTROL:
_uReturnValue = (g_dspState.DSPControl.Hex & ~DSP_CONTROL_MASK) |
(dsp_plugin->DSP_ReadControlRegister() & DSP_CONTROL_MASK);
(dsp_emulator->DSP_ReadControlRegister() & DSP_CONTROL_MASK);
break;
// ARAM
@ -388,11 +388,11 @@ void Write16(const u16 _Value, const u32 _Address)
{
// DSP
case DSP_MAIL_TO_DSP_HI:
dsp_plugin->DSP_WriteMailBoxHigh(true, _Value);
dsp_emulator->DSP_WriteMailBoxHigh(true, _Value);
break;
case DSP_MAIL_TO_DSP_LO:
dsp_plugin->DSP_WriteMailBoxLow(true, _Value);
dsp_emulator->DSP_WriteMailBoxLow(true, _Value);
break;
case DSP_MAIL_FROM_DSP_HI:
@ -408,7 +408,7 @@ void Write16(const u16 _Value, const u32 _Address)
{
UDSPControl tmpControl;
tmpControl.Hex = (_Value & ~DSP_CONTROL_MASK) |
(dsp_plugin->DSP_WriteControlRegister(_Value) & DSP_CONTROL_MASK);
(dsp_emulator->DSP_WriteControlRegister(_Value) & DSP_CONTROL_MASK);
// Not really sure if this is correct, but it works...
// Kind of a hack because DSP_CONTROL_MASK should make this bit
@ -533,7 +533,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_emulator->DSP_ReadMailBoxHigh(true) << 16) | dsp_emulator->DSP_ReadMailBoxLow(true);
break;
// AI
@ -569,8 +569,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_emulator->DSP_WriteMailBoxHigh(true, _iValue >> 16);
dsp_emulator->DSP_WriteMailBoxLow(true, (u16)_iValue);
break;
// AI
@ -626,8 +626,8 @@ void GenerateDSPInterrupt(DSPInterruptType type, bool _bSet)
UpdateInterrupts();
}
// CALLED FROM DSP PLUGIN, POSSIBLY THREADED
void GenerateDSPInterruptFromPlugin(DSPInterruptType type, bool _bSet)
// CALLED FROM DSP EMULATOR, POSSIBLY THREADED
void GenerateDSPInterruptFromDSPEmu(DSPInterruptType type, bool _bSet)
{
CoreTiming::ScheduleEvent_Threadsafe(
0, et_GenerateDSPInterrupt, type | (_bSet<<16));
@ -637,12 +637,12 @@ void GenerateDSPInterruptFromPlugin(DSPInterruptType type, bool _bSet)
void UpdateDSPSlice(int cycles) {
if (dsp_is_lle) {
//use up the rest of the slice(if any)
dsp_plugin->DSP_Update(dsp_slice);
dsp_emulator->DSP_Update(dsp_slice);
dsp_slice %= 6;
//note the new budget
dsp_slice += cycles;
} else {
dsp_plugin->DSP_Update(cycles);
dsp_emulator->DSP_Update(cycles);
}
}
@ -660,7 +660,7 @@ void UpdateAudioDMA()
if (g_audioDMA.BlocksLeft == 0)
{
dsp_plugin->DSP_SendAIBuffer(g_audioDMA.SourceAddress, 8*g_audioDMA.AudioDMAControl.NumBlocks);
dsp_emulator->DSP_SendAIBuffer(g_audioDMA.SourceAddress, 8*g_audioDMA.AudioDMAControl.NumBlocks);
GenerateDSPInterrupt(DSP::INT_AID);
if (g_audioDMA.AudioDMAControl.Enable)
{

View File

@ -20,7 +20,7 @@
#include "Common.h"
class PointerWrap;
class PluginDSP;
class DSPEmulator;
namespace DSP
{
@ -42,12 +42,12 @@ enum
void Init(bool hle);
void Shutdown();
PluginDSP *GetPlugin();
DSPEmulator *GetDSPEmulator();
void DoState(PointerWrap &p);
void GenerateDSPInterrupt(DSPInterruptType _DSPInterruptType, bool _bSet = true);
void GenerateDSPInterruptFromPlugin(DSPInterruptType _DSPInterruptType, bool _bSet = true);
void GenerateDSPInterruptFromDSPEmu(DSPInterruptType _DSPInterruptType, bool _bSet = true);
// Read32
void Read16(u16& _uReturnValue, const u32 _uAddress);
@ -57,7 +57,7 @@ void Read32(u32& _uReturnValue, const u32 _uAddress);
void Write16(const u16 _uValue, const u32 _uAddress);
void Write32(const u32 _uValue, const u32 _uAddress);
// Audio/DSP Plugin Helper
// Audio/DSP Helper
u8 ReadARAM(const u32 _uAddress);
void WriteARAM(u8 value, u32 _uAddress);

View File

@ -21,11 +21,11 @@
#include "AudioCommon.h"
#include "SoundStream.h"
#include "MailHandler.h"
#include "../../PluginDSP.h"
#include "../../DSPEmulator.h"
class IUCode;
class DSPHLE : public PluginDSP {
class DSPHLE : public DSPEmulator {
public:
DSPHLE();

View File

@ -255,12 +255,12 @@ void CUCode_AX::Update(int cycles)
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
// check if we have to send something
else if (!m_rMailHandler.IsEmpty())
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}

View File

@ -145,12 +145,12 @@ void CUCode_AXWii::Update(int cycles)
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
// check if we have to send something
else if (!m_rMailHandler.IsEmpty())
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}

View File

@ -40,7 +40,7 @@ void CUCode_CARD::Update(int cycles)
// check if we have to sent something
if (!m_rMailHandler.IsEmpty())
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}

View File

@ -36,7 +36,7 @@ void CUCode_GBA::Update(int cycles)
// check if we have to send something
if (!m_rMailHandler.IsEmpty())
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}

View File

@ -78,7 +78,7 @@ CUCode_Zelda::CUCode_Zelda(DSPHLE *dsp_hle, u32 _CRC)
else
{
m_rMailHandler.PushMail(DSP_INIT);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3551111); // handshake
}
@ -116,13 +116,13 @@ void CUCode_Zelda::Update(int cycles)
if (!IsLightVersion())
{
if (m_rMailHandler.GetNextMail() == DSP_FRAME_END)
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
if (NeedsResumeMail())
{
m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
}
@ -143,7 +143,7 @@ void CUCode_Zelda::HandleMail_LightVersion(u32 _uMail)
if (m_bSyncCmdPending)
{
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_CurBuffer++;
if (m_CurBuffer == m_NumBuffers)
@ -206,13 +206,13 @@ void CUCode_Zelda::HandleMail_SMSVersion(u32 _uMail)
m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
if (m_CurBuffer == m_NumBuffers)
{
m_rMailHandler.PushMail(DSP_FRAME_END);
// DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
// DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
@ -333,7 +333,7 @@ void CUCode_Zelda::HandleMail_NormalVersion(u32 _uMail)
m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
m_CurVoice = 0;
@ -561,7 +561,7 @@ void CUCode_Zelda::ExecuteList()
else
{
m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3550000 | Sync);
}
}

View File

@ -54,7 +54,7 @@ bool DSPHost_Running()
void DSPHost_InterruptRequest()
{
// Fire an interrupt on the PPC ASAP.
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP);
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
}
u32 DSPHost_CodeLoaded(const u8 *ptr, int size)

View File

@ -21,9 +21,9 @@
#include "Thread.h"
#include "SoundStream.h"
#include "DSPLLEGlobals.h" // Local
#include "../../PluginDSP.h"
#include "../../DSPEmulator.h"
class DSPLLE : public PluginDSP {
class DSPLLE : public DSPEmulator {
public:
DSPLLE();

View File

@ -70,7 +70,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 "../DSPEmulator.h"
#include "Thread.h"
#include "Timer.h"
#include "VideoBackendBase.h"
@ -245,7 +245,7 @@ void Init()
{
CPU_CORE_CLOCK = 729000000u;
if (!DSP::GetPlugin()->IsLLE())
if (!DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
// AyuanX: TO BE TWEAKED
@ -261,11 +261,11 @@ void Init()
{
CPU_CORE_CLOCK = 486000000u;
if (!DSP::GetPlugin()->IsLLE())
if (!DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.005f);
}
if (DSP::GetPlugin()->IsLLE())
if (DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = 12000; // TO BE TWEAKED
// This is the biggest question mark.

View File

@ -32,7 +32,7 @@
#include "Host.h"
#include "PowerPC/PowerPC.h"
#include "CoreTiming.h"
#include "PluginDSP.h"
#include "DSPEmulator.h"
#include "VideoBackendBase.h"
extern "C" {
@ -2959,7 +2959,7 @@ DEFINE_LUA_FUNCTION(movie_close, "")
DEFINE_LUA_FUNCTION(sound_clear, "")
{
DSP::GetPlugin()->DSP_ClearAudioBuffer(false);
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(false);
return 0;
}

View File

@ -15,7 +15,7 @@ files = [
"OnFrame.cpp",
"MemTools.cpp",
"PatchEngine.cpp",
"PluginDSP.cpp",
"DSPEmulator.cpp",
"LuaInterface.cpp",
"State.cpp",
"Tracer.cpp",