Rsp: Change how SP_SEMAPHORE_REG to how it use to be before adding multithread RSP
This commit is contained in:
parent
5c56f9df83
commit
71067ccdc4
|
@ -4,8 +4,8 @@
|
||||||
#include <Project64-rsp-core/cpu/RSPCpu.h>
|
#include <Project64-rsp-core/cpu/RSPCpu.h>
|
||||||
#include <Settings/Settings.h>
|
#include <Settings/Settings.h>
|
||||||
|
|
||||||
uint16_t Set_AudioHle = 0, Set_GraphicsHle = 0, Set_AllocatedRdramSize = 0, Set_DirectoryLog = 0;
|
uint16_t Set_AudioHle = 0, Set_GraphicsHle = 0, Set_MultiThreaded = 0, Set_AllocatedRdramSize = 0, Set_DirectoryLog = 0;
|
||||||
bool GraphicsHle = true, AudioHle, ConditionalMove, HleAlistTask = false;
|
bool GraphicsHle = true, AudioHle, ConditionalMove, HleAlistTask = false, RspMultiThreaded = false;
|
||||||
bool DebuggingEnabled = false, Profiling, IndvidualBlock, ShowErrors, BreakOnStart = false, LogRDP = false, LogX86Code = false;
|
bool DebuggingEnabled = false, Profiling, IndvidualBlock, ShowErrors, BreakOnStart = false, LogRDP = false, LogX86Code = false;
|
||||||
|
|
||||||
void InitializeRspSetting(void)
|
void InitializeRspSetting(void)
|
||||||
|
@ -13,6 +13,7 @@ void InitializeRspSetting(void)
|
||||||
SetModuleName("RSP");
|
SetModuleName("RSP");
|
||||||
Set_GraphicsHle = FindSystemSettingId("HLE GFX");
|
Set_GraphicsHle = FindSystemSettingId("HLE GFX");
|
||||||
Set_AudioHle = FindSystemSettingId("HLE Audio");
|
Set_AudioHle = FindSystemSettingId("HLE Audio");
|
||||||
|
Set_MultiThreaded = FindSystemSettingId("Rsp Multi Threaded");
|
||||||
Set_AllocatedRdramSize = FindSystemSettingId("AllocatedRdramSize");
|
Set_AllocatedRdramSize = FindSystemSettingId("AllocatedRdramSize");
|
||||||
Set_DirectoryLog = FindSystemSettingId("Dir:Log");
|
Set_DirectoryLog = FindSystemSettingId("Dir:Log");
|
||||||
|
|
||||||
|
@ -43,4 +44,5 @@ void InitializeRspSetting(void)
|
||||||
|
|
||||||
AudioHle = Set_AudioHle != 0 ? GetSystemSetting(Set_AudioHle) != 0 : false;
|
AudioHle = Set_AudioHle != 0 ? GetSystemSetting(Set_AudioHle) != 0 : false;
|
||||||
GraphicsHle = Set_GraphicsHle != 0 ? GetSystemSetting(Set_GraphicsHle) != 0 : true;
|
GraphicsHle = Set_GraphicsHle != 0 ? GetSystemSetting(Set_GraphicsHle) != 0 : true;
|
||||||
|
RspMultiThreaded = Set_MultiThreaded != 0 ? GetSystemSetting(Set_MultiThreaded) != 0 : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
void InitializeRspSetting(void);
|
void InitializeRspSetting(void);
|
||||||
|
|
||||||
extern uint16_t Set_AudioHle, Set_GraphicsHle, Set_AllocatedRdramSize, Set_DirectoryLog;
|
extern uint16_t Set_AudioHle, Set_GraphicsHle, Set_AllocatedRdramSize, Set_DirectoryLog;
|
||||||
extern bool GraphicsHle, AudioHle, ConditionalMove, HleAlistTask;
|
extern bool GraphicsHle, AudioHle, ConditionalMove, HleAlistTask, RspMultiThreaded;
|
||||||
extern bool DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart, LogRDP, LogX86Code;
|
extern bool DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart, LogRDP, LogX86Code;
|
|
@ -427,8 +427,15 @@ void RSP_Cop0_MF(void)
|
||||||
case 5: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_FULL_REG; break;
|
case 5: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_FULL_REG; break;
|
||||||
case 6: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_BUSY_REG; break;
|
case 6: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_BUSY_REG; break;
|
||||||
case 7:
|
case 7:
|
||||||
RSP_GPR[RSPOpC.rt].W = *RSPInfo.SP_SEMAPHORE_REG;
|
if (RspMultiThreaded)
|
||||||
*RSPInfo.SP_SEMAPHORE_REG = 1;
|
{
|
||||||
|
RSP_GPR[RSPOpC.rt].W = *RSPInfo.SP_SEMAPHORE_REG;
|
||||||
|
*RSPInfo.SP_SEMAPHORE_REG = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RSP_GPR[RSPOpC.rt].W = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 8: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.DPC_START_REG; break;
|
case 8: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.DPC_START_REG; break;
|
||||||
case 9: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.DPC_END_REG; break;
|
case 9: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.DPC_END_REG; break;
|
||||||
|
|
Loading…
Reference in New Issue