[Project64] Skip frozen Dlist only in HLE gfx

This commit is contained in:
zilmar 2017-08-31 08:58:26 +10:00
parent 1b699418f4
commit c428d71e75
3 changed files with 34 additions and 30 deletions

View File

@ -1006,16 +1006,16 @@ void CN64System::ExecuteCPU()
_controlfp(_PC_53, _MCW_PC); _controlfp(_PC_53, _MCW_PC);
#endif #endif
CPU_TYPE cpuType; CPU_TYPE cpuType;
if (g_Settings->LoadBool(Setting_ForceInterpreterCPU)) if (g_Settings->LoadBool(Setting_ForceInterpreterCPU))
{ {
cpuType = CPU_Interpreter; cpuType = CPU_Interpreter;
} }
else else
{ {
cpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType); cpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType);
} }
switch (cpuType) switch (cpuType)
{ {
@ -1982,7 +1982,7 @@ void CN64System::RunRSP()
if (m_RspBroke) if (m_RspBroke)
{ {
g_MMU->LW_VAddr(0xA4000FC0, Task); g_MMU->LW_VAddr(0xA4000FC0, Task);
if (Task == 1 && (m_Reg.DPC_STATUS_REG & DPC_STATUS_FREEZE) != 0) if (Task == 1 && UseHleGfx() && (m_Reg.DPC_STATUS_REG & DPC_STATUS_FREEZE) != 0)
{ {
WriteTrace(TraceRSP, TraceDebug, "Dlist that is frozen"); WriteTrace(TraceRSP, TraceDebug, "Dlist that is frozen");
return; return;
@ -2213,4 +2213,4 @@ void CN64System::TLB_Changed()
{ {
g_Debugger->TLBChanged(); g_Debugger->TLBChanged();
} }
} }

View File

@ -13,6 +13,7 @@
#include <Project64-core/N64System/N64Class.h> #include <Project64-core/N64System/N64Class.h>
#include <Project64-core/Settings/GameSettings.h> #include <Project64-core/Settings/GameSettings.h>
bool CGameSettings::m_UseHleGfx = true;
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;
@ -42,6 +43,7 @@ uint32_t CGameSettings::m_OverClockModifier = 1;
void CGameSettings::RefreshGameSettings() void CGameSettings::RefreshGameSettings()
{ {
WriteTrace(TraceN64System, TraceDebug, "start"); WriteTrace(TraceN64System, TraceDebug, "start");
m_UseHleGfx = g_Settings->LoadBool(Game_UseHleGfx);
m_bSMM_StoreInstruc = false /*g_Settings->LoadBool(Game_SMM_StoreInstruc)*/; m_bSMM_StoreInstruc = false /*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);

View File

@ -17,27 +17,28 @@ class CGameSettings
public: public:
void RefreshGameSettings(void); void RefreshGameSettings(void);
inline static bool bRomInMemory(void) { return m_bRomInMemory; } inline static bool UseHleGfx(void) { return m_UseHleGfx; }
inline static bool bRegCaching(void) { return m_RegCaching; } inline static bool bRomInMemory(void) { return m_bRomInMemory; }
inline static bool bLinkBlocks(void) { return m_bLinkBlocks; } inline static bool bRegCaching(void) { return m_RegCaching; }
inline static bool bLinkBlocks(void) { return m_bLinkBlocks; }
inline static FUNC_LOOKUP_METHOD LookUpMode(void) { return (FUNC_LOOKUP_METHOD)m_LookUpMode; } inline static FUNC_LOOKUP_METHOD LookUpMode(void) { return (FUNC_LOOKUP_METHOD)m_LookUpMode; }
inline static bool bUseTlb(void) { return m_bUseTlb; } inline static bool bUseTlb(void) { return m_bUseTlb; }
inline static uint32_t CountPerOp(void) { return m_CountPerOp; } inline static uint32_t CountPerOp(void) { return m_CountPerOp; }
inline static uint32_t ViRefreshRate(void) { return m_ViRefreshRate; } inline static uint32_t ViRefreshRate(void) { return m_ViRefreshRate; }
inline static uint32_t AiCountPerBytes(void) { return m_AiCountPerBytes; } inline static uint32_t AiCountPerBytes(void) { return m_AiCountPerBytes; }
inline static bool bDelayDP(void) { return m_DelayDP; } inline static bool bDelayDP(void) { return m_DelayDP; }
inline static bool bDelaySI(void) { return m_DelaySI; } inline static bool bDelaySI(void) { return m_DelaySI; }
inline static uint32_t RdramSize(void) { return m_RdramSize; } inline static uint32_t RdramSize(void) { return m_RdramSize; }
inline static bool bFixedAudio(void) { return m_bFixedAudio; } inline static bool bFixedAudio(void) { return m_bFixedAudio; }
inline static bool bSyncToAudio(void) { return m_bSyncingToAudio; } inline static bool bSyncToAudio(void) { return m_bSyncingToAudio; }
inline static bool bFastSP(void) { return m_bFastSP; } inline static bool bFastSP(void) { return m_bFastSP; }
inline static bool b32BitCore(void) { return m_b32Bit; } inline static bool b32BitCore(void) { return m_b32Bit; }
inline static bool RspAudioSignal(void) { return m_RspAudioSignal; } inline static bool RspAudioSignal(void) { return m_RspAudioSignal; }
inline static bool bSMM_StoreInstruc(void) { return m_bSMM_StoreInstruc; } inline static bool bSMM_StoreInstruc(void) { return m_bSMM_StoreInstruc; }
inline static bool bSMM_Protect(void) { return m_bSMM_Protect; } inline static bool bSMM_Protect(void) { return m_bSMM_Protect; }
inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; } inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; }
inline static bool bSMM_PIDMA(void) { return m_bSMM_PIDMA; } inline static bool bSMM_PIDMA(void) { return m_bSMM_PIDMA; }
inline static bool bSMM_TLB(void) { return m_bSMM_TLB; } inline static bool bSMM_TLB(void) { return m_bSMM_TLB; }
inline static SYSTEM_TYPE SystemType(void) { return m_SystemType; } inline static SYSTEM_TYPE SystemType(void) { return m_SystemType; }
inline static CPU_TYPE CpuType(void) { return m_CpuType; } inline static CPU_TYPE CpuType(void) { return m_CpuType; }
inline static uint32_t OverClockModifier(void) { return m_OverClockModifier; } inline static uint32_t OverClockModifier(void) { return m_OverClockModifier; }
@ -47,9 +48,10 @@ protected:
private: private:
//Settings that can be changed on the fly //Settings that can be changed on the fly
static bool m_bRomInMemory; static bool m_UseHleGfx;
static bool m_RegCaching; static bool m_bRomInMemory;
static bool m_bLinkBlocks; static bool m_RegCaching;
static bool m_bLinkBlocks;
static uint32_t m_LookUpMode; //FUNC_LOOKUP_METHOD static uint32_t m_LookUpMode; //FUNC_LOOKUP_METHOD
static bool m_bUseTlb; static bool m_bUseTlb;
static uint32_t m_CountPerOp; static uint32_t m_CountPerOp;