RSP: Setup option to run in a thread
This commit is contained in:
parent
c4abebe201
commit
42a944c660
|
@ -74,6 +74,7 @@ CJniBridegSettings::CJniBridegSettings()
|
||||||
// Default settings
|
// Default settings
|
||||||
ADD_SETTING(Default_RDRamSizeUnknown);
|
ADD_SETTING(Default_RDRamSizeUnknown);
|
||||||
ADD_SETTING(Default_RDRamSizeKnown);
|
ADD_SETTING(Default_RDRamSizeKnown);
|
||||||
|
ADD_SETTING(Default_RspMultiThreaded);
|
||||||
ADD_SETTING(Default_UseHleGfx);
|
ADD_SETTING(Default_UseHleGfx);
|
||||||
ADD_SETTING(Default_ViRefreshRate);
|
ADD_SETTING(Default_ViRefreshRate);
|
||||||
ADD_SETTING(Default_AiCountPerBytes);
|
ADD_SETTING(Default_AiCountPerBytes);
|
||||||
|
@ -100,6 +101,7 @@ CJniBridegSettings::CJniBridegSettings()
|
||||||
ADD_SETTING(Rdb_TLB_VAddrStart);
|
ADD_SETTING(Rdb_TLB_VAddrStart);
|
||||||
ADD_SETTING(Rdb_TLB_VAddrLen);
|
ADD_SETTING(Rdb_TLB_VAddrLen);
|
||||||
ADD_SETTING(Rdb_TLB_PAddrStart);
|
ADD_SETTING(Rdb_TLB_PAddrStart);
|
||||||
|
ADD_SETTING(Rdb_RspMultiThreaded);
|
||||||
ADD_SETTING(Rdb_UseHleGfx);
|
ADD_SETTING(Rdb_UseHleGfx);
|
||||||
ADD_SETTING(Rdb_UseHleAudio);
|
ADD_SETTING(Rdb_UseHleAudio);
|
||||||
ADD_SETTING(Rdb_ScreenHertz);
|
ADD_SETTING(Rdb_ScreenHertz);
|
||||||
|
@ -162,6 +164,7 @@ CJniBridegSettings::CJniBridegSettings()
|
||||||
ADD_SETTING(Game_BlockLinking);
|
ADD_SETTING(Game_BlockLinking);
|
||||||
ADD_SETTING(Game_ScreenHertz);
|
ADD_SETTING(Game_ScreenHertz);
|
||||||
ADD_SETTING(Game_RspAudioSignal);
|
ADD_SETTING(Game_RspAudioSignal);
|
||||||
|
ADD_SETTING(Game_RspMultiThreaded);
|
||||||
ADD_SETTING(Game_UseHleGfx);
|
ADD_SETTING(Game_UseHleGfx);
|
||||||
ADD_SETTING(Game_UseHleAudio);
|
ADD_SETTING(Game_UseHleAudio);
|
||||||
ADD_SETTING(Game_ViRefreshRate);
|
ADD_SETTING(Game_ViRefreshRate);
|
||||||
|
@ -304,6 +307,7 @@ CJniBridegSettings::CJniBridegSettings()
|
||||||
ADD_SETTING(Plugin_AUDIO_CurVer);
|
ADD_SETTING(Plugin_AUDIO_CurVer);
|
||||||
ADD_SETTING(Plugin_CONT_Current);
|
ADD_SETTING(Plugin_CONT_Current);
|
||||||
ADD_SETTING(Plugin_CONT_CurVer);
|
ADD_SETTING(Plugin_CONT_CurVer);
|
||||||
|
ADD_SETTING(Plugin_RspMultiThreaded);
|
||||||
ADD_SETTING(Plugin_UseHleGfx);
|
ADD_SETTING(Plugin_UseHleGfx);
|
||||||
ADD_SETTING(Plugin_UseHleAudio);
|
ADD_SETTING(Plugin_UseHleAudio);
|
||||||
ADD_SETTING(Plugin_EnableAudio);
|
ADD_SETTING(Plugin_EnableAudio);
|
||||||
|
|
|
@ -127,14 +127,7 @@ bool DisplayControlRegHandler::Write32(uint32_t Address, uint32_t Value, uint32_
|
||||||
{
|
{
|
||||||
if ((SP_STATUS_REG & SP_STATUS_BROKE) == 0)
|
if ((SP_STATUS_REG & SP_STATUS_BROKE) == 0)
|
||||||
{
|
{
|
||||||
__except_try()
|
m_Plugins->RSP()->RunRSP();
|
||||||
{
|
|
||||||
m_System.RunRSP();
|
|
||||||
}
|
|
||||||
__except_catch()
|
|
||||||
{
|
|
||||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ bool SPRegistersHandler::Write32(uint32_t Address, uint32_t Value, uint32_t Mask
|
||||||
MI_INTR_REG |= MI_INTR_SP;
|
MI_INTR_REG |= MI_INTR_SP;
|
||||||
m_Reg.CheckInterrupts();
|
m_Reg.CheckInterrupts();
|
||||||
}
|
}
|
||||||
m_System.RunRSP();
|
m_System.GetPlugins()->RSP()->RunRSP();
|
||||||
break;
|
break;
|
||||||
case 0x0404001C: SP_SEMAPHORE_REG = 0; break;
|
case 0x0404001C: SP_SEMAPHORE_REG = 0; break;
|
||||||
case 0x04080000: SP_PC_REG = MaskedValue & 0xFFC; break;
|
case 0x04080000: SP_PC_REG = MaskedValue & 0xFFC; break;
|
||||||
|
|
|
@ -1187,21 +1187,7 @@ void CMipsMemoryVM::ChangeSpStatus()
|
||||||
g_Reg->MI_INTR_REG |= MI_INTR_SP;
|
g_Reg->MI_INTR_REG |= MI_INTR_SP;
|
||||||
g_Reg->CheckInterrupts();
|
g_Reg->CheckInterrupts();
|
||||||
}
|
}
|
||||||
//if (*( uint32_t *)(DMEM + 0xFC0) == 1)
|
g_Plugins->RSP()->RunRSP();
|
||||||
//{
|
|
||||||
// ChangeTimer(RspTimer,0x40000);
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
g_System->RunRSP();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMipsMemoryVM::ChangeMiIntrMask()
|
void CMipsMemoryVM::ChangeMiIntrMask()
|
||||||
|
|
|
@ -246,14 +246,7 @@ void CSystemTimer::TimerDone()
|
||||||
break;
|
break;
|
||||||
case CSystemTimer::RspTimer:
|
case CSystemTimer::RspTimer:
|
||||||
StopTimer(CSystemTimer::RspTimer);
|
StopTimer(CSystemTimer::RspTimer);
|
||||||
try
|
m_System.GetPlugins()->RSP()->RunRSP();
|
||||||
{
|
|
||||||
m_System.RunRSP();
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case CSystemTimer::RSPTimerDlist:
|
case CSystemTimer::RSPTimerDlist:
|
||||||
StopTimer(CSystemTimer::RSPTimerDlist);
|
StopTimer(CSystemTimer::RSPTimerDlist);
|
||||||
|
|
|
@ -39,7 +39,6 @@ CN64System::CN64System(CPlugins * Plugins, uint32_t randomizer_seed, bool SavesR
|
||||||
m_NextTimer(0),
|
m_NextTimer(0),
|
||||||
m_SystemTimer(*this),
|
m_SystemTimer(*this),
|
||||||
m_bCleanFrameBox(true),
|
m_bCleanFrameBox(true),
|
||||||
m_RspBroke(true),
|
|
||||||
m_TestTimer(false),
|
m_TestTimer(false),
|
||||||
m_PipelineStage(PIPELINE_STAGE_NORMAL),
|
m_PipelineStage(PIPELINE_STAGE_NORMAL),
|
||||||
m_JumpToLocation(0),
|
m_JumpToLocation(0),
|
||||||
|
@ -912,10 +911,6 @@ void CN64System::Reset(bool bInitReg, bool ClearMenory)
|
||||||
m_MMU_VM.Reset(ClearMenory);
|
m_MMU_VM.Reset(ClearMenory);
|
||||||
|
|
||||||
m_CyclesToSkip = 0;
|
m_CyclesToSkip = 0;
|
||||||
m_AlistCount = 0;
|
|
||||||
m_DlistCount = 0;
|
|
||||||
m_UnknownCount = 0;
|
|
||||||
m_RspBroke = true;
|
|
||||||
m_SyncCount = 0;
|
m_SyncCount = 0;
|
||||||
|
|
||||||
for (int i = 0, n = (sizeof(m_LastSuccessSyncPC) / sizeof(m_LastSuccessSyncPC[0])); i < n; i++)
|
for (int i = 0, n = (sizeof(m_LastSuccessSyncPC) / sizeof(m_LastSuccessSyncPC[0])); i < n; i++)
|
||||||
|
@ -2176,11 +2171,6 @@ uint32_t CN64System::GetButtons(int32_t Control) const
|
||||||
return m_Buttons[Control];
|
return m_Buttons[Control];
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::DisplayRSPListCount()
|
|
||||||
{
|
|
||||||
g_Notify->DisplayMessage(0, stdstr_f("Dlist: %d Alist: %d Unknown: %d", m_DlistCount, m_AlistCount, m_UnknownCount).c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CN64System::NotifyCallback(CN64SystemCB Type)
|
void CN64System::NotifyCallback(CN64SystemCB Type)
|
||||||
{
|
{
|
||||||
SETTING_CALLBACK::iterator Callback = m_Callback.find(Type);
|
SETTING_CALLBACK::iterator Callback = m_Callback.find(Type);
|
||||||
|
@ -2234,103 +2224,6 @@ void CN64System::DelayedRelativeJump(uint32_t RelativeLocation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::RunRSP()
|
|
||||||
{
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Start (SP Status %X)", m_Reg.SP_STATUS_REG);
|
|
||||||
|
|
||||||
PROFILE_TIMERS CPU_UsageAddr = m_CPU_Usage.StopTimer();
|
|
||||||
|
|
||||||
if ((m_Reg.SP_STATUS_REG & SP_STATUS_HALT) == 0)
|
|
||||||
{
|
|
||||||
HighResTimeStamp StartTime;
|
|
||||||
|
|
||||||
uint32_t Task = 0;
|
|
||||||
if (m_RspBroke)
|
|
||||||
{
|
|
||||||
g_MMU->MemoryValue32(0xA4000FC0, Task);
|
|
||||||
if (Task == 1 && UseHleGfx() && (m_Reg.DPC_STATUS_REG & DPC_STATUS_FREEZE) != 0)
|
|
||||||
{
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Dlist that is frozen");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_Debugger != NULL && HaveDebugger())
|
|
||||||
{
|
|
||||||
g_Debugger->RSPReceivedTask();
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (Task)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "*** Display list ***");
|
|
||||||
m_DlistCount += 1;
|
|
||||||
m_FPS.UpdateDlCounter();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "*** Audio list ***");
|
|
||||||
m_AlistCount += 1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "*** Unknown list ***");
|
|
||||||
m_UnknownCount += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bShowDListAListCount())
|
|
||||||
{
|
|
||||||
DisplayRSPListCount();
|
|
||||||
}
|
|
||||||
if (bRecordExecutionTimes() || bShowCPUPer())
|
|
||||||
{
|
|
||||||
StartTime.SetToNow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Do cycles - starting");
|
|
||||||
m_Plugins->RSP()->DoRspCycles(100);
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Do cycles - done");
|
|
||||||
|
|
||||||
if (Task == 1 && bDelayDP() && ((m_Reg.m_GfxIntrReg & MI_INTR_DP) != 0))
|
|
||||||
{
|
|
||||||
g_SystemTimer->SetTimer(CSystemTimer::RSPTimerDlist, 0x1000, false);
|
|
||||||
m_Reg.m_GfxIntrReg &= ~MI_INTR_DP;
|
|
||||||
}
|
|
||||||
if (bRecordExecutionTimes() || bShowCPUPer())
|
|
||||||
{
|
|
||||||
HighResTimeStamp EndTime;
|
|
||||||
EndTime.SetToNow();
|
|
||||||
uint32_t TimeTaken = (uint32_t)(EndTime.GetMicroSeconds() - StartTime.GetMicroSeconds());
|
|
||||||
|
|
||||||
switch (Task)
|
|
||||||
{
|
|
||||||
case 1: m_CPU_Usage.RecordTime(Timer_RSP_Dlist, TimeTaken); break;
|
|
||||||
case 2: m_CPU_Usage.RecordTime(Timer_RSP_Alist, TimeTaken); break;
|
|
||||||
default: m_CPU_Usage.RecordTime(Timer_RSP_Unknown, TimeTaken); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m_Reg.SP_STATUS_REG & SP_STATUS_HALT) == 0 &&
|
|
||||||
(m_Reg.SP_STATUS_REG & SP_STATUS_BROKE) == 0 &&
|
|
||||||
m_Reg.m_RspIntrReg == 0)
|
|
||||||
{
|
|
||||||
g_SystemTimer->SetTimer(CSystemTimer::RspTimer, 0x200, false);
|
|
||||||
m_RspBroke = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_RspBroke = true;
|
|
||||||
}
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Check interrupts");
|
|
||||||
g_Reg->CheckInterrupts();
|
|
||||||
}
|
|
||||||
if (bShowCPUPer())
|
|
||||||
{
|
|
||||||
m_CPU_Usage.StartTimer(CPU_UsageAddr);
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteTrace(TraceRSP, TraceDebug, "Done (SP Status %X)", m_Reg.SP_STATUS_REG);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CN64System::RefreshScreen()
|
void CN64System::RefreshScreen()
|
||||||
{
|
{
|
||||||
PROFILE_TIMERS CPU_UsageAddr = Timer_None /*, ProfilingAddr = Timer_None*/;
|
PROFILE_TIMERS CPU_UsageAddr = Timer_None /*, ProfilingAddr = Timer_None*/;
|
||||||
|
|
|
@ -92,7 +92,6 @@ public:
|
||||||
void ApplyGSButton(void);
|
void ApplyGSButton(void);
|
||||||
|
|
||||||
void Pause();
|
void Pause();
|
||||||
void RunRSP();
|
|
||||||
bool SaveState();
|
bool SaveState();
|
||||||
bool LoadState(const char * FileName);
|
bool LoadState(const char * FileName);
|
||||||
bool LoadState();
|
bool LoadState();
|
||||||
|
@ -162,7 +161,6 @@ private:
|
||||||
void DumpSyncErrors(CN64System * SecondCPU);
|
void DumpSyncErrors(CN64System * SecondCPU);
|
||||||
void StartEmulation2(bool NewThread);
|
void StartEmulation2(bool NewThread);
|
||||||
bool SetActiveSystem(bool bActive = true);
|
bool SetActiveSystem(bool bActive = true);
|
||||||
void DisplayRSPListCount();
|
|
||||||
void NotifyCallback(CN64SystemCB Type);
|
void NotifyCallback(CN64SystemCB Type);
|
||||||
void DelayedJump(uint32_t JumpLocation);
|
void DelayedJump(uint32_t JumpLocation);
|
||||||
void DelayedRelativeJump(uint32_t RelativeLocation);
|
void DelayedRelativeJump(uint32_t RelativeLocation);
|
||||||
|
@ -196,7 +194,6 @@ private:
|
||||||
int32_t m_NextTimer;
|
int32_t m_NextTimer;
|
||||||
CSystemTimer m_SystemTimer;
|
CSystemTimer m_SystemTimer;
|
||||||
bool m_bCleanFrameBox;
|
bool m_bCleanFrameBox;
|
||||||
bool m_RspBroke;
|
|
||||||
uint32_t m_Buttons[4];
|
uint32_t m_Buttons[4];
|
||||||
bool m_TestTimer;
|
bool m_TestTimer;
|
||||||
PIPELINE_STAGE m_PipelineStage;
|
PIPELINE_STAGE m_PipelineStage;
|
||||||
|
@ -218,9 +215,6 @@ private:
|
||||||
// Handle to pause mutex
|
// Handle to pause mutex
|
||||||
SyncEvent m_hPauseEvent;
|
SyncEvent m_hPauseEvent;
|
||||||
|
|
||||||
// Number of Alist and Dlist sent to the RSP
|
|
||||||
uint32_t m_AlistCount, m_DlistCount, m_UnknownCount;
|
|
||||||
|
|
||||||
// List of function that have been called (used in profiling)
|
// List of function that have been called (used in profiling)
|
||||||
FUNC_CALLS m_FunctionCalls;
|
FUNC_CALLS m_FunctionCalls;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ CPlugins::CPlugins(SettingID PluginDirSetting, bool SyncPlugins) :
|
||||||
g_Settings->RegisterChangeCB(Plugin_GFX_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Plugin_GFX_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->RegisterChangeCB(Plugin_AUDIO_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Plugin_AUDIO_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->RegisterChangeCB(Plugin_CONT_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Plugin_CONT_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
|
g_Settings->RegisterChangeCB(Plugin_RspMultiThreaded, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->RegisterChangeCB(Plugin_UseHleGfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Plugin_UseHleGfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->RegisterChangeCB(Plugin_UseHleAudio, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Plugin_UseHleAudio, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->RegisterChangeCB(Game_EditPlugin_Gfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->RegisterChangeCB(Game_EditPlugin_Gfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
|
@ -37,6 +38,7 @@ CPlugins::~CPlugins(void)
|
||||||
g_Settings->UnregisterChangeCB(Plugin_GFX_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Plugin_GFX_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->UnregisterChangeCB(Plugin_AUDIO_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Plugin_AUDIO_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->UnregisterChangeCB(Plugin_CONT_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Plugin_CONT_Current, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
|
g_Settings->UnregisterChangeCB(Plugin_RspMultiThreaded, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->UnregisterChangeCB(Plugin_UseHleGfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Plugin_UseHleGfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->UnregisterChangeCB(Plugin_UseHleAudio, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Plugin_UseHleAudio, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
g_Settings->UnregisterChangeCB(Game_EditPlugin_Gfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
g_Settings->UnregisterChangeCB(Game_EditPlugin_Gfx, this, (CSettings::SettingChangedFunc)PluginChanged);
|
||||||
|
@ -159,12 +161,9 @@ void CPlugins::CreatePlugins(void)
|
||||||
LoadPlugin(Game_Plugin_RSP, Plugin_RSP_CurVer, m_RSP, m_PluginDir.c_str(), m_RSPFile, TraceRSPPlugin, "RSP", m_SyncPlugins);
|
LoadPlugin(Game_Plugin_RSP, Plugin_RSP_CurVer, m_RSP, m_PluginDir.c_str(), m_RSPFile, TraceRSPPlugin, "RSP", m_SyncPlugins);
|
||||||
LoadPlugin(Game_Plugin_Controller, Plugin_CONT_CurVer, m_Control, m_PluginDir.c_str(), m_ControlFile, TraceControllerPlugin, "Control", m_SyncPlugins);
|
LoadPlugin(Game_Plugin_Controller, Plugin_CONT_CurVer, m_Control, m_PluginDir.c_str(), m_ControlFile, TraceControllerPlugin, "Control", m_SyncPlugins);
|
||||||
|
|
||||||
// Enable debugger
|
if (m_RSP != nullptr)
|
||||||
if (m_RSP != nullptr && m_RSP->EnableDebugging)
|
|
||||||
{
|
{
|
||||||
WriteTrace(TraceRSPPlugin, TraceInfo, "EnableDebugging starting");
|
|
||||||
m_RSP->EnableDebugging(HaveDebugger());
|
m_RSP->EnableDebugging(HaveDebugger());
|
||||||
WriteTrace(TraceRSPPlugin, TraceInfo, "EnableDebugging done");
|
|
||||||
}
|
}
|
||||||
WriteTrace(TracePlugins, TraceInfo, "Done");
|
WriteTrace(TracePlugins, TraceInfo, "Done");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
#include <Project64-core/Plugins/Plugin.h>
|
#include <Project64-core/Plugins/Plugin.h>
|
||||||
#include <Project64-core/Settings/DebugSettings.h>
|
#include <Project64-core/Settings/DebugSettings.h>
|
||||||
#include <Project64-core/TraceModulesProject64.h>
|
#include <Project64-core/TraceModulesProject64.h>
|
||||||
#include <Project64-plugin-spec\Base.h>
|
#include <Project64-plugin-spec/Base.h>
|
||||||
|
|
||||||
class CPlugin :
|
class CPlugin :
|
||||||
private CDebugSettings
|
protected CDebugSettings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CPlugin();
|
CPlugin();
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include "GFXPlugin.h"
|
#include "GFXPlugin.h"
|
||||||
#include "RSPPlugin.h"
|
#include "RSPPlugin.h"
|
||||||
|
#include <Common/Util.h>
|
||||||
|
#include <Project64-core/Debugger.h>
|
||||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||||
#include <Project64-core/N64System/Mips/Register.h>
|
#include <Project64-core/N64System/Mips/Register.h>
|
||||||
#include <Project64-core/N64System/N64Disk.h>
|
#include <Project64-core/N64System/N64Disk.h>
|
||||||
|
@ -10,17 +12,19 @@
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
#include <Project64-core/Plugins/AudioPlugin.h>
|
#include <Project64-core/Plugins/AudioPlugin.h>
|
||||||
|
|
||||||
void DummyFunc1(int a)
|
|
||||||
{
|
|
||||||
a += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
CRSP_Plugin::CRSP_Plugin(void) :
|
CRSP_Plugin::CRSP_Plugin(void) :
|
||||||
DoRspCycles(nullptr),
|
m_DoRspCycles(nullptr),
|
||||||
EnableDebugging(nullptr),
|
m_EnableDebugging(nullptr),
|
||||||
|
m_GetDebugInfo(nullptr),
|
||||||
|
m_InitiateDebugger(nullptr),
|
||||||
|
m_Thread(stRspThread),
|
||||||
m_CycleCount(0),
|
m_CycleCount(0),
|
||||||
GetDebugInfo(nullptr),
|
m_Plugins(nullptr),
|
||||||
InitiateDebugger(nullptr)
|
m_System(nullptr),
|
||||||
|
m_AlistCount(0),
|
||||||
|
m_DlistCount(0),
|
||||||
|
m_UnknownCount(0),
|
||||||
|
m_RomOpened(false)
|
||||||
{
|
{
|
||||||
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
|
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
|
||||||
}
|
}
|
||||||
|
@ -33,20 +37,13 @@ CRSP_Plugin::~CRSP_Plugin()
|
||||||
|
|
||||||
bool CRSP_Plugin::LoadFunctions(void)
|
bool CRSP_Plugin::LoadFunctions(void)
|
||||||
{
|
{
|
||||||
// Find entries for functions in DLL
|
void(CALL * InitiateRSP)(void) = (void(CALL *)(void))DynamicLibraryGetProc(m_LibHandle, "InitiateRSP");
|
||||||
void(CALL * InitiateRSP)(void);
|
m_DoRspCycles = (uint32_t(CALL *)(uint32_t))DynamicLibraryGetProc(m_LibHandle, "DoRspCycles");
|
||||||
LoadFunction(InitiateRSP);
|
m_GetDebugInfo = (void(CALL *)(RSPDEBUG_INFO * GFXDebugInfo)) DynamicLibraryGetProc(m_LibHandle, "GetRspDebugInfo");
|
||||||
LoadFunction(DoRspCycles);
|
m_InitiateDebugger = (void(CALL *)(DEBUG_INFO DebugInfo))DynamicLibraryGetProc(m_LibHandle, "InitiateRSPDebugger");
|
||||||
_LoadFunction("GetRspDebugInfo", GetDebugInfo);
|
m_EnableDebugging = (void(CALL *)(int32_t Enable))DynamicLibraryGetProc(m_LibHandle, "EnableDebugging");
|
||||||
_LoadFunction("InitiateRSPDebugger", InitiateDebugger);
|
|
||||||
LoadFunction(EnableDebugging);
|
|
||||||
if (EnableDebugging == nullptr)
|
|
||||||
{
|
|
||||||
EnableDebugging = DummyFunc1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure DLL had all needed functions
|
if (m_DoRspCycles == nullptr)
|
||||||
if (DoRspCycles == nullptr)
|
|
||||||
{
|
{
|
||||||
UnloadPlugin();
|
UnloadPlugin();
|
||||||
return false;
|
return false;
|
||||||
|
@ -76,17 +73,49 @@ bool CRSP_Plugin::LoadFunctions(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get debug info if possible
|
if (m_GetDebugInfo != nullptr)
|
||||||
if (GetDebugInfo != nullptr)
|
|
||||||
{
|
{
|
||||||
GetDebugInfo(&m_RSPDebug);
|
m_GetDebugInfo(&m_RSPDebug);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CRSP_Plugin::RomOpened(RenderWindow * Render)
|
||||||
|
{
|
||||||
|
CPlugin::RomOpened(Render);
|
||||||
|
m_AlistCount = 0;
|
||||||
|
m_DlistCount = 0;
|
||||||
|
m_UnknownCount = 0;
|
||||||
|
m_RomOpened = true;
|
||||||
|
m_Thread.Start(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRSP_Plugin::RomClose(RenderWindow * Render)
|
||||||
|
{
|
||||||
|
m_RomOpened = false;
|
||||||
|
m_RunEvent.Trigger();
|
||||||
|
for (uint32_t i = 0; i < 300; i++)
|
||||||
|
{
|
||||||
|
if (!m_Thread.isRunning())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pjutil::Sleep(10);
|
||||||
|
}
|
||||||
|
if (m_Thread.isRunning())
|
||||||
|
{
|
||||||
|
m_Thread.Terminate();
|
||||||
|
}
|
||||||
|
CPlugin::RomClose(Render);
|
||||||
|
m_Plugins = nullptr;
|
||||||
|
m_System = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool CRSP_Plugin::Initiate(CPlugins * Plugins, CN64System * System)
|
bool CRSP_Plugin::Initiate(CPlugins * Plugins, CN64System * System)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceRSPPlugin, TraceDebug, "Starting");
|
WriteTrace(TraceRSPPlugin, TraceDebug, "Starting");
|
||||||
|
m_Plugins = Plugins;
|
||||||
|
m_System = System;
|
||||||
if (m_PluginInfo.Version == 1 || m_PluginInfo.Version == 0x100)
|
if (m_PluginInfo.Version == 1 || m_PluginInfo.Version == 0x100)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceRSPPlugin, TraceDebug, "Invalid version: %X", m_PluginInfo.Version);
|
WriteTrace(TraceRSPPlugin, TraceDebug, "Invalid version: %X", m_PluginInfo.Version);
|
||||||
|
@ -192,21 +221,17 @@ bool CRSP_Plugin::Initiate(CPlugins * Plugins, CN64System * System)
|
||||||
Info.DPC__PIPEBUSY_REG = &Value;
|
Info.DPC__PIPEBUSY_REG = &Value;
|
||||||
Info.DPC__TMEM_REG = &Value;
|
Info.DPC__TMEM_REG = &Value;
|
||||||
}
|
}
|
||||||
// Send initialization information to the DLL
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
||||||
|
CRegisters & Reg = System->m_Reg;
|
||||||
|
|
||||||
Info.ProcessDlist = Plugins->Gfx()->ProcessDList;
|
Info.ProcessDlist = Plugins->Gfx()->ProcessDList;
|
||||||
Info.ProcessRdpList = Plugins->Gfx()->ProcessRDPList;
|
Info.ProcessRdpList = Plugins->Gfx()->ProcessRDPList;
|
||||||
Info.ShowCFB = Plugins->Gfx()->ShowCFB;
|
Info.ShowCFB = Plugins->Gfx()->ShowCFB;
|
||||||
Info.ProcessAlist = Plugins->Audio()->ProcessAList;
|
Info.ProcessAlist = Plugins->Audio()->ProcessAList;
|
||||||
|
|
||||||
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
Info.HEADER = g_Rom->IsLoadedRomDDIPL() && g_Disk != nullptr ? g_Disk->GetDiskHeader() : g_Rom->GetRomAddress();
|
||||||
CRegisters & Reg = System->m_Reg;
|
|
||||||
|
|
||||||
if (g_Rom->IsLoadedRomDDIPL() && g_Disk != nullptr)
|
|
||||||
Info.HEADER = g_Disk->GetDiskHeader();
|
|
||||||
else
|
|
||||||
Info.HEADER = g_Rom->GetRomAddress();
|
|
||||||
Info.RDRAM = MMU.Rdram();
|
Info.RDRAM = MMU.Rdram();
|
||||||
Info.DMEM = MMU.Dmem();
|
Info.DMEM = MMU.Dmem();
|
||||||
Info.IMEM = MMU.Imem();
|
Info.IMEM = MMU.Imem();
|
||||||
|
@ -376,19 +401,209 @@ bool CRSP_Plugin::Initiate(CPlugins * Plugins, CN64System * System)
|
||||||
return m_Initialized;
|
return m_Initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CRSP_Plugin::EnableDebugging(int32_t Enable)
|
||||||
|
{
|
||||||
|
if (m_EnableDebugging != nullptr)
|
||||||
|
{
|
||||||
|
WriteTrace(TraceRSPPlugin, TraceInfo, "EnableDebugging starting");
|
||||||
|
m_EnableDebugging(Enable);
|
||||||
|
WriteTrace(TraceRSPPlugin, TraceInfo, "EnableDebugging done");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRSP_Plugin::RunRSP()
|
||||||
|
{
|
||||||
|
CRegisters & Reg = m_System->m_Reg;
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Start (SP Status %X)", Reg.SP_STATUS_REG);
|
||||||
|
if ((Reg.SP_STATUS_REG & SP_STATUS_HALT) != 0)
|
||||||
|
{
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Done (SP Status %X)", Reg.SP_STATUS_REG);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CProfiling & CPU_Usage = m_System->m_CPU_Usage;
|
||||||
|
PROFILE_TIMERS CPU_UsageAddr = CPU_Usage.StopTimer();
|
||||||
|
CMipsMemoryVM & Memory = m_System->m_MMU_VM;
|
||||||
|
HighResTimeStamp StartTime;
|
||||||
|
uint32_t TaskType = 0;
|
||||||
|
|
||||||
|
Memory.MemoryValue32(0xA4000FC0, TaskType);
|
||||||
|
if (TaskType == 1 && UseHleGfx() && (Reg.DPC_STATUS_REG & DPC_STATUS_FREEZE) != 0)
|
||||||
|
{
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Dlist that is frozen");
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Done (SP Status %X)", Reg.SP_STATUS_REG);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_Debugger != NULL && HaveDebugger())
|
||||||
|
{
|
||||||
|
g_Debugger->RSPReceivedTask();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (TaskType)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "*** Display list ***");
|
||||||
|
m_DlistCount += 1;
|
||||||
|
m_System->m_FPS.UpdateDlCounter();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "*** Audio list ***");
|
||||||
|
m_AlistCount += 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "*** Unknown list ***");
|
||||||
|
m_UnknownCount += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bShowDListAListCount())
|
||||||
|
{
|
||||||
|
g_Notify->DisplayMessage(0, stdstr_f("Dlist: %d Alist: %d Unknown: %d", m_DlistCount, m_AlistCount, m_UnknownCount).c_str());
|
||||||
|
}
|
||||||
|
if (bRecordExecutionTimes() || bShowCPUPer())
|
||||||
|
{
|
||||||
|
StartTime.SetToNow();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t DataPtr = 0;
|
||||||
|
Memory.MemoryValue32(0xA4000FC0, DataPtr);
|
||||||
|
bool ExecuteCycles = true;
|
||||||
|
if (TaskType == 1 && UseHleGfx() && DataPtr != 0)
|
||||||
|
{
|
||||||
|
Memory.MemoryValue32(0xA4000FF0, TaskType);
|
||||||
|
if (m_Plugins->Gfx()->ProcessDList != nullptr)
|
||||||
|
{
|
||||||
|
m_Plugins->Gfx()->ProcessDList();
|
||||||
|
}
|
||||||
|
Reg.SP_STATUS_REG |= (0x0203);
|
||||||
|
if ((Reg.SP_STATUS_REG & SP_STATUS_INTR_BREAK) != 0)
|
||||||
|
{
|
||||||
|
Reg.MI_INTR_REG |= MI_INTR_SP;
|
||||||
|
}
|
||||||
|
|
||||||
|
Reg.DPC_STATUS_REG &= ~0x0002;
|
||||||
|
if (bDelayDP() && ((Reg.m_GfxIntrReg & MI_INTR_DP) != 0))
|
||||||
|
{
|
||||||
|
g_SystemTimer->SetTimer(CSystemTimer::RSPTimerDlist, 0x1000, false);
|
||||||
|
Reg.m_GfxIntrReg &= ~MI_INTR_DP;
|
||||||
|
}
|
||||||
|
ExecuteCycles = false;
|
||||||
|
}
|
||||||
|
else if (TaskType == 2 && UseHleAudio())
|
||||||
|
{
|
||||||
|
if (m_Plugins->Audio()->ProcessAList != nullptr)
|
||||||
|
{
|
||||||
|
m_Plugins->Audio()->ProcessAList();
|
||||||
|
}
|
||||||
|
Reg.SP_STATUS_REG |= (0x0203);
|
||||||
|
if ((Reg.SP_STATUS_REG & SP_STATUS_INTR_BREAK) != 0)
|
||||||
|
{
|
||||||
|
Reg.MI_INTR_REG |= MI_INTR_SP;
|
||||||
|
}
|
||||||
|
ExecuteCycles = false;
|
||||||
|
}
|
||||||
|
else if (TaskType == 7 && UseHleGfx() && m_Plugins->Gfx()->ShowCFB != nullptr)
|
||||||
|
{
|
||||||
|
m_Plugins->Gfx()->ShowCFB();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ExecuteCycles)
|
||||||
|
{
|
||||||
|
if (RspMultiThreaded())
|
||||||
|
{
|
||||||
|
m_RunEvent.Trigger();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Do cycles - starting");
|
||||||
|
m_DoRspCycles(100);
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Do cycles - done");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bRecordExecutionTimes() || bShowCPUPer())
|
||||||
|
{
|
||||||
|
HighResTimeStamp EndTime;
|
||||||
|
EndTime.SetToNow();
|
||||||
|
uint32_t TimeTaken = (uint32_t)(EndTime.GetMicroSeconds() - StartTime.GetMicroSeconds());
|
||||||
|
|
||||||
|
switch (TaskType)
|
||||||
|
{
|
||||||
|
case 1: CPU_Usage.RecordTime(Timer_RSP_Dlist, TimeTaken); break;
|
||||||
|
case 2: CPU_Usage.RecordTime(Timer_RSP_Alist, TimeTaken); break;
|
||||||
|
default: CPU_Usage.RecordTime(Timer_RSP_Unknown, TimeTaken); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ExecuteCycles && (Reg.SP_STATUS_REG & SP_STATUS_HALT) == 0 && Reg.m_RspIntrReg == 0)
|
||||||
|
{
|
||||||
|
g_SystemTimer->SetTimer(CSystemTimer::RspTimer, 0x200, false);
|
||||||
|
}
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Check interrupts");
|
||||||
|
g_Reg->CheckInterrupts();
|
||||||
|
if (bShowCPUPer())
|
||||||
|
{
|
||||||
|
CPU_Usage.StartTimer(CPU_UsageAddr);
|
||||||
|
}
|
||||||
|
WriteTrace(TraceRSP, TraceDebug, "Done (SP Status %X)", Reg.SP_STATUS_REG);
|
||||||
|
}
|
||||||
|
|
||||||
void CRSP_Plugin::UnloadPluginDetails(void)
|
void CRSP_Plugin::UnloadPluginDetails(void)
|
||||||
{
|
{
|
||||||
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
|
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
|
||||||
DoRspCycles = nullptr;
|
m_DoRspCycles = nullptr;
|
||||||
EnableDebugging = nullptr;
|
m_EnableDebugging = nullptr;
|
||||||
GetDebugInfo = nullptr;
|
m_GetDebugInfo = nullptr;
|
||||||
InitiateDebugger = nullptr;
|
m_InitiateDebugger = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRSP_Plugin::ProcessMenuItem(int id)
|
uint32_t CRSP_Plugin::RspThread(void)
|
||||||
|
{
|
||||||
|
CRegisters & Reg = m_System->m_Reg;
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
m_RunEvent.IsTriggered(SyncEvent::INFINITE_TIMEOUT);
|
||||||
|
if (!m_RomOpened)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
m_DoRspCycles(100);
|
||||||
|
if ((Reg.SP_STATUS_REG & SP_STATUS_HALT) != 0)
|
||||||
|
{
|
||||||
|
m_RunEvent.Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t CRSP_Plugin::stRspThread(void * lpThreadParameter)
|
||||||
|
{
|
||||||
|
return ((CRSP_Plugin *)lpThreadParameter)->RspThread();
|
||||||
|
}
|
||||||
|
|
||||||
|
void * CRSP_Plugin::GetDebugMenu(void)
|
||||||
|
{
|
||||||
|
return m_RSPDebug.hRSPMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRSP_Plugin::ProcessMenuItem(int32_t id)
|
||||||
{
|
{
|
||||||
if (m_RSPDebug.ProcessMenuItem)
|
if (m_RSPDebug.ProcessMenuItem)
|
||||||
{
|
{
|
||||||
m_RSPDebug.ProcessMenuItem(id);
|
m_RSPDebug.ProcessMenuItem(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PLUGIN_TYPE CRSP_Plugin::type()
|
||||||
|
{
|
||||||
|
return PLUGIN_TYPE_RSP;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CRSP_Plugin::GetDefaultSettingStartRange() const
|
||||||
|
{
|
||||||
|
return FirstRSPDefaultSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CRSP_Plugin::GetSettingStartRange() const
|
||||||
|
{
|
||||||
|
return FirstRSPSettings;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <Common/SyncEvent.h>
|
||||||
|
#include <Common/Thread.h>
|
||||||
#include <Project64-core/Plugins/PluginBase.h>
|
#include <Project64-core/Plugins/PluginBase.h>
|
||||||
|
#include <Project64-core/Settings/DebugSettings.h>
|
||||||
|
#include <Project64-core/Settings/GameSettings.h>
|
||||||
|
#include <Project64-core/Settings/N64SystemSettings.h>
|
||||||
|
|
||||||
class CRSP_Plugin : public CPlugin
|
class CRSP_Plugin :
|
||||||
|
public CPlugin,
|
||||||
|
protected CN64SystemSettings,
|
||||||
|
protected CGameSettings
|
||||||
{
|
{
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -42,40 +50,40 @@ public:
|
||||||
CRSP_Plugin(void);
|
CRSP_Plugin(void);
|
||||||
~CRSP_Plugin();
|
~CRSP_Plugin();
|
||||||
|
|
||||||
|
void RomOpened(RenderWindow * Render);
|
||||||
|
void RomClose(RenderWindow * Render);
|
||||||
bool Initiate(CPlugins * Plugins, CN64System * System);
|
bool Initiate(CPlugins * Plugins, CN64System * System);
|
||||||
|
void EnableDebugging(int32_t Enable);
|
||||||
|
void RunRSP(void);
|
||||||
|
|
||||||
uint32_t(CALL * DoRspCycles)(uint32_t);
|
void * GetDebugMenu(void);
|
||||||
void(CALL * EnableDebugging)(int32_t Enable);
|
|
||||||
|
|
||||||
void * GetDebugMenu(void)
|
|
||||||
{
|
|
||||||
return m_RSPDebug.hRSPMenu;
|
|
||||||
}
|
|
||||||
void ProcessMenuItem(int32_t id);
|
void ProcessMenuItem(int32_t id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CRSP_Plugin(const CRSP_Plugin &);
|
CRSP_Plugin(const CRSP_Plugin &);
|
||||||
CRSP_Plugin & operator=(const CRSP_Plugin &);
|
CRSP_Plugin & operator=(const CRSP_Plugin &);
|
||||||
|
|
||||||
PLUGIN_TYPE type()
|
PLUGIN_TYPE type();
|
||||||
{
|
int32_t GetDefaultSettingStartRange() const;
|
||||||
return PLUGIN_TYPE_RSP;
|
int32_t GetSettingStartRange() const;
|
||||||
}
|
uint32_t RspThread(void);
|
||||||
virtual int32_t GetDefaultSettingStartRange() const
|
|
||||||
{
|
static uint32_t stRspThread(void * lpThreadParameter);
|
||||||
return FirstRSPDefaultSet;
|
|
||||||
}
|
|
||||||
virtual int32_t GetSettingStartRange() const
|
|
||||||
{
|
|
||||||
return FirstRSPSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool LoadFunctions(void);
|
bool LoadFunctions(void);
|
||||||
void UnloadPluginDetails(void);
|
void UnloadPluginDetails(void);
|
||||||
|
|
||||||
|
void(CALL * m_EnableDebugging)(int32_t Enable);
|
||||||
|
void(CALL * m_GetDebugInfo)(RSPDEBUG_INFO * GFXDebugInfo);
|
||||||
|
void(CALL * m_InitiateDebugger)(DEBUG_INFO DebugInfo);
|
||||||
|
uint32_t(CALL * m_DoRspCycles)(uint32_t);
|
||||||
|
|
||||||
|
CPlugins * m_Plugins;
|
||||||
|
CN64System * m_System;
|
||||||
|
uint32_t m_AlistCount, m_DlistCount, m_UnknownCount;
|
||||||
|
SyncEvent m_RunEvent;
|
||||||
|
CThread m_Thread;
|
||||||
RSPDEBUG_INFO m_RSPDebug;
|
RSPDEBUG_INFO m_RSPDebug;
|
||||||
uint32_t m_CycleCount;
|
uint32_t m_CycleCount;
|
||||||
|
bool m_RomOpened;
|
||||||
void(CALL * GetDebugInfo)(RSPDEBUG_INFO * GFXDebugInfo);
|
|
||||||
void(CALL * InitiateDebugger)(DEBUG_INFO DebugInfo);
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -131,6 +131,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
||||||
|
|
||||||
AddHandler(Default_RDRamSizeUnknown, new CSettingTypeApplication("Defaults", "Unknown RDRAM Size", 0x800000u));
|
AddHandler(Default_RDRamSizeUnknown, new CSettingTypeApplication("Defaults", "Unknown RDRAM Size", 0x800000u));
|
||||||
AddHandler(Default_RDRamSizeKnown, new CSettingTypeApplication("Defaults", "Known RDRAM Size", 0x400000u));
|
AddHandler(Default_RDRamSizeKnown, new CSettingTypeApplication("Defaults", "Known RDRAM Size", 0x400000u));
|
||||||
|
AddHandler(Default_RspMultiThreaded, new CSettingTypeApplication("Defaults", "Rsp Multi Threaded Default", false));
|
||||||
AddHandler(Default_UseHleGfx, new CSettingTypeApplication("Defaults", "HLE GFX Default", true));
|
AddHandler(Default_UseHleGfx, new CSettingTypeApplication("Defaults", "HLE GFX Default", true));
|
||||||
AddHandler(Default_ViRefreshRate, new CSettingTypeApplication("Defaults", "ViRefresh", 1500u));
|
AddHandler(Default_ViRefreshRate, new CSettingTypeApplication("Defaults", "ViRefresh", 1500u));
|
||||||
AddHandler(Default_AiCountPerBytes, new CSettingTypeApplication("Defaults", "AiCountPerBytes", 0u));
|
AddHandler(Default_AiCountPerBytes, new CSettingTypeApplication("Defaults", "AiCountPerBytes", 0u));
|
||||||
|
@ -157,6 +158,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
||||||
AddHandler(Rdb_TLB_VAddrStart, new CSettingTypeRomDatabase("TLB: Vaddr Start", (uint32_t)0));
|
AddHandler(Rdb_TLB_VAddrStart, new CSettingTypeRomDatabase("TLB: Vaddr Start", (uint32_t)0));
|
||||||
AddHandler(Rdb_TLB_VAddrLen, new CSettingTypeRomDatabase("TLB: Vaddr Len", (uint32_t)0));
|
AddHandler(Rdb_TLB_VAddrLen, new CSettingTypeRomDatabase("TLB: Vaddr Len", (uint32_t)0));
|
||||||
AddHandler(Rdb_TLB_PAddrStart, new CSettingTypeRomDatabase("TLB: PAddr Start", (uint32_t)0));
|
AddHandler(Rdb_TLB_PAddrStart, new CSettingTypeRomDatabase("TLB: PAddr Start", (uint32_t)0));
|
||||||
|
AddHandler(Rdb_RspMultiThreaded, new CSettingTypeRomDatabase("Rsp Multi Threaded", Plugin_RspMultiThreaded));
|
||||||
AddHandler(Rdb_UseHleGfx, new CSettingTypeRomDatabase("HLE GFX RDB", Plugin_UseHleGfx));
|
AddHandler(Rdb_UseHleGfx, new CSettingTypeRomDatabase("HLE GFX RDB", Plugin_UseHleGfx));
|
||||||
AddHandler(Rdb_UseHleAudio, new CSettingTypeRomDatabase("HLE Audio RDB", Plugin_UseHleAudio));
|
AddHandler(Rdb_UseHleAudio, new CSettingTypeRomDatabase("HLE Audio RDB", Plugin_UseHleAudio));
|
||||||
AddHandler(Rdb_ScreenHertz, new CSettingTypeRomDatabase("ScreenHertz", (uint32_t)0));
|
AddHandler(Rdb_ScreenHertz, new CSettingTypeRomDatabase("ScreenHertz", (uint32_t)0));
|
||||||
|
@ -217,6 +219,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
||||||
#endif
|
#endif
|
||||||
AddHandler(Game_LastSaveTime, new CSettingTypeTempNumber(0));
|
AddHandler(Game_LastSaveTime, new CSettingTypeTempNumber(0));
|
||||||
AddHandler(Game_SyncViaAudio, new CSettingTypeGame("Sync Audio", Rdb_SyncViaAudio));
|
AddHandler(Game_SyncViaAudio, new CSettingTypeGame("Sync Audio", Rdb_SyncViaAudio));
|
||||||
|
AddHandler(Game_RspMultiThreaded, new CSettingTypeGame("Rsp Multi Threaded", Rdb_RspMultiThreaded));
|
||||||
AddHandler(Game_UseHleGfx, new CSettingTypeGame("HLE GFX", Rdb_UseHleGfx));
|
AddHandler(Game_UseHleGfx, new CSettingTypeGame("HLE GFX", Rdb_UseHleGfx));
|
||||||
AddHandler(Game_UseHleAudio, new CSettingTypeGame("HLE Audio", Rdb_UseHleAudio));
|
AddHandler(Game_UseHleAudio, new CSettingTypeGame("HLE Audio", Rdb_UseHleAudio));
|
||||||
AddHandler(Game_ScreenHertz, new CSettingTypeGame("ScreenHertz", Rdb_ScreenHertz));
|
AddHandler(Game_ScreenHertz, new CSettingTypeGame("ScreenHertz", Rdb_ScreenHertz));
|
||||||
|
@ -401,6 +404,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
||||||
AddHandler(Plugin_AUDIO_CurVer, new CSettingTypeApplication("Plugin", "Audio Dll Ver", ""));
|
AddHandler(Plugin_AUDIO_CurVer, new CSettingTypeApplication("Plugin", "Audio Dll Ver", ""));
|
||||||
AddHandler(Plugin_CONT_CurVer, new CSettingTypeApplication("Plugin", "Controller Dll Ver", ""));
|
AddHandler(Plugin_CONT_CurVer, new CSettingTypeApplication("Plugin", "Controller Dll Ver", ""));
|
||||||
|
|
||||||
|
AddHandler(Plugin_RspMultiThreaded, new CSettingTypeApplication("RSP", "Rsp Multi Threaded Plugin", Default_RspMultiThreaded));
|
||||||
AddHandler(Plugin_UseHleGfx, new CSettingTypeApplication("RSP", "HLE GFX Plugin", Default_UseHleGfx));
|
AddHandler(Plugin_UseHleGfx, new CSettingTypeApplication("RSP", "HLE GFX Plugin", Default_UseHleGfx));
|
||||||
AddHandler(Plugin_UseHleAudio, new CSettingTypeApplication("RSP", "HLE Audio Plugin", false));
|
AddHandler(Plugin_UseHleAudio, new CSettingTypeApplication("RSP", "HLE Audio Plugin", false));
|
||||||
AddHandler(Plugin_EnableAudio, new CSettingTypeApplication("Audio", "Enable Audio", true));
|
AddHandler(Plugin_EnableAudio, new CSettingTypeApplication("Audio", "Enable Audio", true));
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
#include <Project64-core/Settings/GameSettings.h>
|
#include <Project64-core/Settings/GameSettings.h>
|
||||||
|
|
||||||
|
bool CGameSettings::m_RspMultiThreaded = false;
|
||||||
bool CGameSettings::m_UseHleGfx = true;
|
bool CGameSettings::m_UseHleGfx = true;
|
||||||
|
bool CGameSettings::m_UseHleAudio = false;
|
||||||
bool CGameSettings::m_bSMM_StoreInstruc;
|
bool CGameSettings::m_bSMM_StoreInstruc;
|
||||||
bool CGameSettings::m_bSMM_Protect;
|
bool CGameSettings::m_bSMM_Protect;
|
||||||
bool CGameSettings::m_bSMM_ValidFunc;
|
bool CGameSettings::m_bSMM_ValidFunc;
|
||||||
|
@ -60,7 +62,9 @@ CGameSettings::~CGameSettings()
|
||||||
void CGameSettings::RefreshGameSettings()
|
void CGameSettings::RefreshGameSettings()
|
||||||
{
|
{
|
||||||
WriteTrace(TraceN64System, TraceDebug, "start");
|
WriteTrace(TraceN64System, TraceDebug, "start");
|
||||||
|
m_RspMultiThreaded = g_Settings->LoadBool(Game_RspMultiThreaded);
|
||||||
m_UseHleGfx = g_Settings->LoadBool(Game_UseHleGfx);
|
m_UseHleGfx = g_Settings->LoadBool(Game_UseHleGfx);
|
||||||
|
m_UseHleAudio = g_Settings->LoadBool(Game_UseHleAudio);
|
||||||
m_bSMM_StoreInstruc = g_Settings->LoadBool(Game_SMM_StoreInstruc);
|
m_bSMM_StoreInstruc = g_Settings->LoadBool(Game_SMM_StoreInstruc);
|
||||||
m_bSMM_Protect = g_Settings->LoadBool(Game_SMM_Protect);
|
m_bSMM_Protect = g_Settings->LoadBool(Game_SMM_Protect);
|
||||||
m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc);
|
m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc);
|
||||||
|
|
|
@ -11,10 +11,18 @@ public:
|
||||||
|
|
||||||
void RefreshGameSettings(void);
|
void RefreshGameSettings(void);
|
||||||
|
|
||||||
|
inline static bool RspMultiThreaded(void)
|
||||||
|
{
|
||||||
|
return m_RspMultiThreaded;
|
||||||
|
}
|
||||||
inline static bool UseHleGfx(void)
|
inline static bool UseHleGfx(void)
|
||||||
{
|
{
|
||||||
return m_UseHleGfx;
|
return m_UseHleGfx;
|
||||||
}
|
}
|
||||||
|
inline static bool UseHleAudio(void)
|
||||||
|
{
|
||||||
|
return m_UseHleAudio;
|
||||||
|
}
|
||||||
inline static bool bFPURegCaching(void)
|
inline static bool bFPURegCaching(void)
|
||||||
{
|
{
|
||||||
return m_FPURegCaching;
|
return m_FPURegCaching;
|
||||||
|
@ -141,8 +149,9 @@ private:
|
||||||
|
|
||||||
static void EnableDiskChanged(void *);
|
static void EnableDiskChanged(void *);
|
||||||
|
|
||||||
// Settings that can be changed on the fly
|
static bool m_RspMultiThreaded;
|
||||||
static bool m_UseHleGfx;
|
static bool m_UseHleGfx;
|
||||||
|
static bool m_UseHleAudio;
|
||||||
static bool m_RegCaching;
|
static bool m_RegCaching;
|
||||||
static bool m_FPURegCaching;
|
static bool m_FPURegCaching;
|
||||||
static bool m_bLinkBlocks;
|
static bool m_bLinkBlocks;
|
||||||
|
|
|
@ -66,6 +66,7 @@ enum SettingID
|
||||||
// Default settings
|
// Default settings
|
||||||
Default_RDRamSizeUnknown,
|
Default_RDRamSizeUnknown,
|
||||||
Default_RDRamSizeKnown,
|
Default_RDRamSizeKnown,
|
||||||
|
Default_RspMultiThreaded,
|
||||||
Default_UseHleGfx,
|
Default_UseHleGfx,
|
||||||
Default_ViRefreshRate,
|
Default_ViRefreshRate,
|
||||||
Default_AiCountPerBytes,
|
Default_AiCountPerBytes,
|
||||||
|
@ -92,6 +93,7 @@ enum SettingID
|
||||||
Rdb_TLB_VAddrStart,
|
Rdb_TLB_VAddrStart,
|
||||||
Rdb_TLB_VAddrLen,
|
Rdb_TLB_VAddrLen,
|
||||||
Rdb_TLB_PAddrStart,
|
Rdb_TLB_PAddrStart,
|
||||||
|
Rdb_RspMultiThreaded,
|
||||||
Rdb_UseHleGfx,
|
Rdb_UseHleGfx,
|
||||||
Rdb_UseHleAudio,
|
Rdb_UseHleAudio,
|
||||||
Rdb_ScreenHertz,
|
Rdb_ScreenHertz,
|
||||||
|
@ -157,6 +159,7 @@ enum SettingID
|
||||||
Game_BlockLinking,
|
Game_BlockLinking,
|
||||||
Game_ScreenHertz,
|
Game_ScreenHertz,
|
||||||
Game_RspAudioSignal,
|
Game_RspAudioSignal,
|
||||||
|
Game_RspMultiThreaded,
|
||||||
Game_UseHleGfx,
|
Game_UseHleGfx,
|
||||||
Game_UseHleAudio,
|
Game_UseHleAudio,
|
||||||
Game_ViRefreshRate,
|
Game_ViRefreshRate,
|
||||||
|
@ -302,6 +305,7 @@ enum SettingID
|
||||||
Plugin_AUDIO_CurVer,
|
Plugin_AUDIO_CurVer,
|
||||||
Plugin_CONT_Current,
|
Plugin_CONT_Current,
|
||||||
Plugin_CONT_CurVer,
|
Plugin_CONT_CurVer,
|
||||||
|
Plugin_RspMultiThreaded,
|
||||||
Plugin_UseHleGfx,
|
Plugin_UseHleGfx,
|
||||||
Plugin_UseHleAudio,
|
Plugin_UseHleAudio,
|
||||||
Plugin_EnableAudio,
|
Plugin_EnableAudio,
|
||||||
|
|
|
@ -53,7 +53,8 @@ typedef struct {
|
||||||
long left, top, right, bottom;
|
long left, top, right, bottom;
|
||||||
} rectangle; // <windows.h> equivalent: RECT
|
} rectangle; // <windows.h> equivalent: RECT
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
void * hdc;
|
void * hdc;
|
||||||
int32_t fErase;
|
int32_t fErase;
|
||||||
rectangle rcPaint;
|
rectangle rcPaint;
|
||||||
|
@ -62,23 +63,24 @@ typedef struct {
|
||||||
uint8_t rgbReserved[32];
|
uint8_t rgbReserved[32];
|
||||||
} window_paint; // <windows.h> equivalent: PAINTSTRUCT
|
} window_paint; // <windows.h> equivalent: PAINTSTRUCT
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
// Menu
|
// Menu
|
||||||
// Items should have an ID between 5001 and 5100
|
// Items should have an ID between 5001 and 5100
|
||||||
void * hRSPMenu;
|
void * hRSPMenu;
|
||||||
void(*ProcessMenuItem) (int ID);
|
void(*ProcessMenuItem) (int32_t ID);
|
||||||
|
|
||||||
// Breakpoints
|
// Breakpoints
|
||||||
int UseBPoints;
|
int UseBPoints;
|
||||||
char BPPanelName[20];
|
char BPPanelName[20];
|
||||||
void(*Add_BPoint) (void);
|
void(*Add_BPoint)(void);
|
||||||
void(*CreateBPPanel) (void * hDlg, rectangle rcBox);
|
void(*CreateBPPanel)(void * hDlg, rectangle rcBox);
|
||||||
void(*HideBPPanel) (void);
|
void(*HideBPPanel)(void);
|
||||||
void(*PaintBPPanel) (window_paint ps);
|
void(*PaintBPPanel)(window_paint ps);
|
||||||
void(*ShowBPPanel) (void);
|
void(*ShowBPPanel)(void);
|
||||||
void(*RefreshBpoints)(void * hList);
|
void(*RefreshBpoints)(void * hList);
|
||||||
void(*RemoveBpoint) (void * hList, int index);
|
void(*RemoveBpoint)(void * hList, int index);
|
||||||
void(*RemoveAllBpoint) (void);
|
void(*RemoveAllBpoint)(void);
|
||||||
|
|
||||||
// RSP command window
|
// RSP command window
|
||||||
void(*Enter_RSP_Commands_Window) (void);
|
void(*Enter_RSP_Commands_Window) (void);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <Project64-rsp-core/cpu/RspTypes.h>
|
#include <Project64-rsp-core/cpu/RspTypes.h>
|
||||||
|
|
||||||
void ClearAllx86Code(void);
|
void ClearAllx86Code(void);
|
||||||
void ProcessMenuItem(int ID);
|
void ProcessMenuItem(int32_t ID);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
HMENU hRSPMenu = NULL;
|
HMENU hRSPMenu = NULL;
|
||||||
|
@ -159,6 +159,9 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD /*fdwReason*/, LPVOID /*lpvReserved*/
|
||||||
|
|
||||||
void FixMenuState(void)
|
void FixMenuState(void)
|
||||||
{
|
{
|
||||||
|
short Set_MultiThreadedDefault = FindSystemSettingId("Rsp Multi Threaded Default");
|
||||||
|
bool MultiThreadedDefault = Set_MultiThreadedDefault != 0 ? GetSystemSetting(Set_MultiThreadedDefault) != 0 : false;
|
||||||
|
|
||||||
EnableMenuItem(hRSPMenu, ID_RSPCOMMANDS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
EnableMenuItem(hRSPMenu, ID_RSPCOMMANDS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
||||||
EnableMenuItem(hRSPMenu, ID_RSPREGISTERS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
EnableMenuItem(hRSPMenu, ID_RSPREGISTERS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
||||||
EnableMenuItem(hRSPMenu, ID_PROFILING_RESETSTATS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
EnableMenuItem(hRSPMenu, ID_PROFILING_RESETSTATS, MF_BYCOMMAND | (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
|
||||||
|
@ -171,6 +174,7 @@ void FixMenuState(void)
|
||||||
CheckMenuItem(hRSPMenu, ID_BREAKONSTARTOFTASK, MF_BYCOMMAND | (BreakOnStart ? MFS_CHECKED : MF_UNCHECKED));
|
CheckMenuItem(hRSPMenu, ID_BREAKONSTARTOFTASK, MF_BYCOMMAND | (BreakOnStart ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
CheckMenuItem(hRSPMenu, ID_LOGRDPCOMMANDS, MF_BYCOMMAND | (LogRDP ? MFS_CHECKED : MF_UNCHECKED));
|
CheckMenuItem(hRSPMenu, ID_LOGRDPCOMMANDS, MF_BYCOMMAND | (LogRDP ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
CheckMenuItem(hRSPMenu, ID_SETTINGS_LOGX86CODE, MF_BYCOMMAND | (LogX86Code ? MFS_CHECKED : MF_UNCHECKED));
|
CheckMenuItem(hRSPMenu, ID_SETTINGS_LOGX86CODE, MF_BYCOMMAND | (LogX86Code ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
|
CheckMenuItem(hRSPMenu, ID_SETTINGS_MULTITHREADED, MF_BYCOMMAND | (MultiThreadedDefault ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
CheckMenuItem(hRSPMenu, ID_PROFILING_ON, MF_BYCOMMAND | (Profiling ? MFS_CHECKED : MF_UNCHECKED));
|
CheckMenuItem(hRSPMenu, ID_PROFILING_ON, MF_BYCOMMAND | (Profiling ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
CheckMenuItem(hRSPMenu, ID_PROFILING_OFF, MF_BYCOMMAND | (Profiling ? MFS_UNCHECKED : MF_CHECKED));
|
CheckMenuItem(hRSPMenu, ID_PROFILING_OFF, MF_BYCOMMAND | (Profiling ? MFS_UNCHECKED : MF_CHECKED));
|
||||||
CheckMenuItem(hRSPMenu, ID_PROFILING_LOGINDIVIDUALBLOCKS, MF_BYCOMMAND | (IndvidualBlock ? MFS_CHECKED : MF_UNCHECKED));
|
CheckMenuItem(hRSPMenu, ID_PROFILING_LOGINDIVIDUALBLOCKS, MF_BYCOMMAND | (IndvidualBlock ? MFS_CHECKED : MF_UNCHECKED));
|
||||||
|
@ -348,7 +352,7 @@ EXPORT void InitiateRSPDebugger(DEBUG_INFO Debug_Info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void ProcessMenuItem(int ID)
|
void ProcessMenuItem(int32_t ID)
|
||||||
{
|
{
|
||||||
switch (ID)
|
switch (ID)
|
||||||
{
|
{
|
||||||
|
@ -446,6 +450,17 @@ void ProcessMenuItem(int ID)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ID_SETTINGS_MULTITHREADED:
|
||||||
|
{
|
||||||
|
bool Checked = (GetMenuState(hRSPMenu, ID_SETTINGS_MULTITHREADED, MF_BYCOMMAND) & MFS_CHECKED) != 0;
|
||||||
|
CheckMenuItem(hRSPMenu, ID_SETTINGS_MULTITHREADED, MF_BYCOMMAND | (Checked ? MFS_UNCHECKED : MFS_CHECKED));
|
||||||
|
short Set_MultiThreadedDefault = FindSystemSettingId("Rsp Multi Threaded Default");
|
||||||
|
if (Set_MultiThreadedDefault != 0)
|
||||||
|
{
|
||||||
|
SetSystemSetting(Set_MultiThreadedDefault, !Checked);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ID_CPUMETHOD_RECOMPILER:
|
case ID_CPUMETHOD_RECOMPILER:
|
||||||
SetSetting(Set_CPUCore, RecompilerCPU);
|
SetSetting(Set_CPUCore, RecompilerCPU);
|
||||||
g_CPUCore = RecompilerCPU;
|
g_CPUCore = RecompilerCPU;
|
||||||
|
|
|
@ -194,6 +194,7 @@ BEGIN
|
||||||
MENUITEM "Break on start of task", ID_BREAKONSTARTOFTASK
|
MENUITEM "Break on start of task", ID_BREAKONSTARTOFTASK
|
||||||
MENUITEM "Log RDP Commands", ID_LOGRDPCOMMANDS
|
MENUITEM "Log RDP Commands", ID_LOGRDPCOMMANDS
|
||||||
MENUITEM "Log X86 code", ID_SETTINGS_LOGX86CODE
|
MENUITEM "Log X86 code", ID_SETTINGS_LOGX86CODE
|
||||||
|
MENUITEM "Multithreaded", ID_SETTINGS_MULTITHREADED
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,6 @@
|
||||||
<Filter>Header Files\Debugger</Filter>
|
<Filter>Header Files\Debugger</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="Project64-rsp.rc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="breakpoint.cpp">
|
<ClCompile Include="breakpoint.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
|
@ -62,4 +57,9 @@
|
||||||
<Filter>Source Files\Debugger</Filter>
|
<Filter>Source Files\Debugger</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Project64-rsp.rc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -37,13 +37,14 @@
|
||||||
#define ID_CPUMETHOD_RECOMPILER 5016
|
#define ID_CPUMETHOD_RECOMPILER 5016
|
||||||
#define ID_CPUMETHOD_INTERPT 5017
|
#define ID_CPUMETHOD_INTERPT 5017
|
||||||
#define ID_SETTINGS_LOGX86CODE 5019
|
#define ID_SETTINGS_LOGX86CODE 5019
|
||||||
|
#define ID_SETTINGS_MULTITHREADED 5020
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||||
#define _APS_NEXT_COMMAND_VALUE 5020
|
#define _APS_NEXT_COMMAND_VALUE 5021
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1032
|
#define _APS_NEXT_CONTROL_VALUE 1032
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue