From c428d71e7594121ea9423a45b2a723bd92465a48 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 31 Aug 2017 08:58:26 +1000 Subject: [PATCH] [Project64] Skip frozen Dlist only in HLE gfx --- Source/Project64-core/N64System/N64Class.cpp | 22 +++++----- .../Project64-core/Settings/GameSettings.cpp | 2 + Source/Project64-core/Settings/GameSettings.h | 40 ++++++++++--------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index 14b68a537..2f56f5221 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -1006,16 +1006,16 @@ void CN64System::ExecuteCPU() _controlfp(_PC_53, _MCW_PC); #endif - CPU_TYPE cpuType; + CPU_TYPE cpuType; - if (g_Settings->LoadBool(Setting_ForceInterpreterCPU)) - { - cpuType = CPU_Interpreter; - } - else - { - cpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType); - } + if (g_Settings->LoadBool(Setting_ForceInterpreterCPU)) + { + cpuType = CPU_Interpreter; + } + else + { + cpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType); + } switch (cpuType) { @@ -1982,7 +1982,7 @@ void CN64System::RunRSP() if (m_RspBroke) { 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"); return; @@ -2213,4 +2213,4 @@ void CN64System::TLB_Changed() { g_Debugger->TLBChanged(); } -} +} \ No newline at end of file diff --git a/Source/Project64-core/Settings/GameSettings.cpp b/Source/Project64-core/Settings/GameSettings.cpp index 6a3aad836..8886da9a2 100644 --- a/Source/Project64-core/Settings/GameSettings.cpp +++ b/Source/Project64-core/Settings/GameSettings.cpp @@ -13,6 +13,7 @@ #include #include +bool CGameSettings::m_UseHleGfx = true; bool CGameSettings::m_bSMM_StoreInstruc; bool CGameSettings::m_bSMM_Protect; bool CGameSettings::m_bSMM_ValidFunc; @@ -42,6 +43,7 @@ uint32_t CGameSettings::m_OverClockModifier = 1; void CGameSettings::RefreshGameSettings() { WriteTrace(TraceN64System, TraceDebug, "start"); + m_UseHleGfx = g_Settings->LoadBool(Game_UseHleGfx); m_bSMM_StoreInstruc = false /*g_Settings->LoadBool(Game_SMM_StoreInstruc)*/; m_bSMM_Protect = g_Settings->LoadBool(Game_SMM_Protect); m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc); diff --git a/Source/Project64-core/Settings/GameSettings.h b/Source/Project64-core/Settings/GameSettings.h index 4f59ff4be..63109c0c1 100644 --- a/Source/Project64-core/Settings/GameSettings.h +++ b/Source/Project64-core/Settings/GameSettings.h @@ -17,27 +17,28 @@ class CGameSettings public: void RefreshGameSettings(void); - inline static bool bRomInMemory(void) { return m_bRomInMemory; } - inline static bool bRegCaching(void) { return m_RegCaching; } - inline static bool bLinkBlocks(void) { return m_bLinkBlocks; } + inline static bool UseHleGfx(void) { return m_UseHleGfx; } + inline static bool bRomInMemory(void) { return m_bRomInMemory; } + 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 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 ViRefreshRate(void) { return m_ViRefreshRate; } inline static uint32_t AiCountPerBytes(void) { return m_AiCountPerBytes; } - inline static bool bDelayDP(void) { return m_DelayDP; } - inline static bool bDelaySI(void) { return m_DelaySI; } + inline static bool bDelayDP(void) { return m_DelayDP; } + inline static bool bDelaySI(void) { return m_DelaySI; } inline static uint32_t RdramSize(void) { return m_RdramSize; } - inline static bool bFixedAudio(void) { return m_bFixedAudio; } - inline static bool bSyncToAudio(void) { return m_bSyncingToAudio; } - inline static bool bFastSP(void) { return m_bFastSP; } - inline static bool b32BitCore(void) { return m_b32Bit; } - inline static bool RspAudioSignal(void) { return m_RspAudioSignal; } - inline static bool bSMM_StoreInstruc(void) { return m_bSMM_StoreInstruc; } - inline static bool bSMM_Protect(void) { return m_bSMM_Protect; } - inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; } - inline static bool bSMM_PIDMA(void) { return m_bSMM_PIDMA; } - inline static bool bSMM_TLB(void) { return m_bSMM_TLB; } + inline static bool bFixedAudio(void) { return m_bFixedAudio; } + inline static bool bSyncToAudio(void) { return m_bSyncingToAudio; } + inline static bool bFastSP(void) { return m_bFastSP; } + inline static bool b32BitCore(void) { return m_b32Bit; } + inline static bool RspAudioSignal(void) { return m_RspAudioSignal; } + inline static bool bSMM_StoreInstruc(void) { return m_bSMM_StoreInstruc; } + inline static bool bSMM_Protect(void) { return m_bSMM_Protect; } + inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; } + inline static bool bSMM_PIDMA(void) { return m_bSMM_PIDMA; } + inline static bool bSMM_TLB(void) { return m_bSMM_TLB; } inline static SYSTEM_TYPE SystemType(void) { return m_SystemType; } inline static CPU_TYPE CpuType(void) { return m_CpuType; } inline static uint32_t OverClockModifier(void) { return m_OverClockModifier; } @@ -47,9 +48,10 @@ protected: private: //Settings that can be changed on the fly - static bool m_bRomInMemory; - static bool m_RegCaching; - static bool m_bLinkBlocks; + static bool m_UseHleGfx; + static bool m_bRomInMemory; + static bool m_RegCaching; + static bool m_bLinkBlocks; static uint32_t m_LookUpMode; //FUNC_LOOKUP_METHOD static bool m_bUseTlb; static uint32_t m_CountPerOp;