diff --git a/Source/Android/Bridge/jniBridgeSettings.cpp b/Source/Android/Bridge/jniBridgeSettings.cpp index 5f18a7608..eb017858e 100644 --- a/Source/Android/Bridge/jniBridgeSettings.cpp +++ b/Source/Android/Bridge/jniBridgeSettings.cpp @@ -84,7 +84,6 @@ CJniBridegSettings::CJniBridegSettings() ADD_SETTING(Default_SyncViaAudio); ADD_SETTING(Default_FixedAudio); ADD_SETTING(Default_RandomizeSIPIInterrupts); - ADD_SETTING(Default_SMM_Protect_Memory); ADD_SETTING(Default_DiskSeekTiming); // RDB settings @@ -114,7 +113,6 @@ CJniBridegSettings::CJniBridegSettings() ADD_SETTING(Rdb_SMM_Cache); ADD_SETTING(Rdb_SMM_PIDMA); ADD_SETTING(Rdb_SMM_TLB); - ADD_SETTING(Rdb_SMM_Protect); ADD_SETTING(Rdb_SMM_ValidFunc); ADD_SETTING(Rdb_ViRefreshRate); ADD_SETTING(Rdb_AiCountPerBytes); @@ -148,7 +146,6 @@ CJniBridegSettings::CJniBridegSettings() ADD_SETTING(Game_SyncViaAudio); ADD_SETTING(Game_32Bit); ADD_SETTING(Game_SMM_Cache); - ADD_SETTING(Game_SMM_Protect); ADD_SETTING(Game_SMM_ValidFunc); ADD_SETTING(Game_SMM_PIDMA); ADD_SETTING(Game_SMM_TLB); @@ -293,7 +290,6 @@ CJniBridegSettings::CJniBridegSettings() ADD_SETTING(Debugger_TraceRegisterCache); ADD_SETTING(Debugger_TraceRecompiler); ADD_SETTING(Debugger_TraceTLB); - ADD_SETTING(Debugger_TraceProtectedMEM); ADD_SETTING(Debugger_TraceUserInterface); ADD_SETTING(Debugger_TraceRomList); ADD_SETTING(Debugger_TraceExceptionHandler); diff --git a/Source/Project64-core/AppInit.cpp b/Source/Project64-core/AppInit.cpp index 2a3fa3227..a5a0448ef 100644 --- a/Source/Project64-core/AppInit.cpp +++ b/Source/Project64-core/AppInit.cpp @@ -68,7 +68,6 @@ void SetTraceModuleNames(void) TraceSetModuleName(TraceRegisterCache, "Register Cache"); TraceSetModuleName(TraceRecompiler, "Recompiler"); TraceSetModuleName(TraceTLB, "TLB"); - TraceSetModuleName(TraceProtectedMem, "Protected Memory"); TraceSetModuleName(TraceUserInterface, "User Interface"); TraceSetModuleName(TraceRomList, "Rom List"); TraceSetModuleName(TraceExceptionHandler, "Exception Handler"); @@ -94,7 +93,6 @@ void UpdateTraceLevel(void * /*NotUsed*/) g_ModuleLogLevel[TraceRegisterCache] = (uint8_t)g_Settings->LoadDword(Debugger_TraceRegisterCache); g_ModuleLogLevel[TraceRecompiler] = (uint8_t)g_Settings->LoadDword(Debugger_TraceRecompiler); g_ModuleLogLevel[TraceTLB] = (uint8_t)g_Settings->LoadDword(Debugger_TraceTLB); - g_ModuleLogLevel[TraceProtectedMem] = (uint8_t)g_Settings->LoadDword(Debugger_TraceProtectedMEM); g_ModuleLogLevel[TraceUserInterface] = (uint8_t)g_Settings->LoadDword(Debugger_TraceUserInterface); g_ModuleLogLevel[TraceRomList] = (uint8_t)g_Settings->LoadDword(Debugger_TraceRomList); g_ModuleLogLevel[TraceExceptionHandler] = (uint8_t)g_Settings->LoadDword(Debugger_TraceExceptionHandler); @@ -122,7 +120,6 @@ void SetupTrace(void) g_Settings->RegisterChangeCB(Debugger_TraceRegisterCache, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->RegisterChangeCB(Debugger_TraceRecompiler, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->RegisterChangeCB(Debugger_TraceTLB, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); - g_Settings->RegisterChangeCB(Debugger_TraceProtectedMEM, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->RegisterChangeCB(Debugger_TraceUserInterface, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->RegisterChangeCB(Debugger_TraceRomList, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->RegisterChangeCB(Debugger_TraceExceptionHandler, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); @@ -154,7 +151,6 @@ void CleanupTrace(void) g_Settings->UnregisterChangeCB(Debugger_TraceRegisterCache, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceRecompiler, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceTLB, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); - g_Settings->UnregisterChangeCB(Debugger_TraceProtectedMEM, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceUserInterface, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceRomList, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceExceptionHandler, nullptr, (CSettings::SettingChangedFunc)UpdateTraceLevel); diff --git a/Source/Project64-core/ExceptionHandler.h b/Source/Project64-core/ExceptionHandler.h deleted file mode 100644 index e3a66a6f2..000000000 --- a/Source/Project64-core/ExceptionHandler.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef _WIN32 -#include - -#define __except_try() __try -#define __except_catch() __except (g_MMU->MemoryFilter(_exception_code(), _exception_info())) -#else -#define __except_try() try -#define __except_catch() catch (...) -#endif diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index 94652808a..3e0adff95 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -298,7 +298,6 @@ enum LanguageStringID ADVANCE_SMM_CACHE = 510, ADVANCE_SMM_PIDMA = 511, ADVANCE_SMM_VALIDATE = 512, - ADVANCE_SMM_PROTECT = 513, ADVANCE_SMM_TLB = 514, ADVANCE_ALWAYS_INTERPRETER = 515, diff --git a/Source/Project64-core/Multilanguage/Language.cpp b/Source/Project64-core/Multilanguage/Language.cpp index 660564a78..c306029aa 100644 --- a/Source/Project64-core/Multilanguage/Language.cpp +++ b/Source/Project64-core/Multilanguage/Language.cpp @@ -246,7 +246,6 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ADVANCE_SMM_CACHE, "Cache"); DEF_STR(ADVANCE_SMM_PIDMA, "PI DMA"); DEF_STR(ADVANCE_SMM_VALIDATE, "Start changed"); - DEF_STR(ADVANCE_SMM_PROTECT, "Protect memory"); DEF_STR(ADVANCE_SMM_TLB, "TLB unmapping"); DEF_STR(ADVANCE_ALWAYS_INTERPRETER, "Always use interpreter core"); diff --git a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp index 45a431e08..887641fd0 100644 --- a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp +++ b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" #include -#include #include #include #include @@ -208,106 +207,99 @@ void R4300iOp::ExecuteOps(int32_t Cycles) uint32_t CountPerOp = m_System.CountPerOp(); bool CheckTimer = false; - __except_try() + while (!Done) { - while (!Done) + if (Cycles <= 0) { - if (Cycles <= 0) + g_SystemTimer->UpdateTimers(); + return; + } + + if (m_MMU.MemoryValue32(m_PROGRAM_COUNTER, m_Opcode.Value)) + { + /*if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER< 0x80380000) { - g_SystemTimer->UpdateTimers(); - return; + WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str()); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str(),m_GPR[0x19].UW[0],m_GPR[0x03].UW[0]); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",m_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType()); + }*/ + /*if (PROGRAM_COUNTER > 0x80323000 && PROGRAM_COUNTER< 0x80380000) + { + WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str()); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str(),m_GPR[0x19].UW[0],m_GPR[0x03].UW[0]); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",m_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType()); + }*/ + (this->*Jump_Opcode[m_Opcode.op])(); + m_GPR[0].DW = 0; /* MIPS $zero hard-wired to 0 */ + + Cycles -= CountPerOp; + *g_NextTimer -= CountPerOp; + + /*static uint32_t TestAddress = 0x80077B0C, TestValue = 0, CurrentValue = 0; + if (m_MMU.MemoryValue32(TestAddress, TestValue)) + { + if (TestValue != CurrentValue) + { + WriteTraceF(TraceError,"%X: %X changed (%s)",PROGRAM_COUNTER,TestAddress,R4300iInstruction(PROGRAM_COUNTER, m_Opcode.Value).NameAndParam().c_str()); + CurrentValue = TestValue; } + }*/ - if (m_MMU.MemoryValue32(m_PROGRAM_COUNTER, m_Opcode.Value)) + switch (PipelineStage) { - /*if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER< 0x80380000) + case PIPELINE_STAGE_NORMAL: + m_PROGRAM_COUNTER += 4; + break; + case PIPELINE_STAGE_DELAY_SLOT: + PipelineStage = PIPELINE_STAGE_JUMP; + m_PROGRAM_COUNTER += 4; + break; + case PIPELINE_STAGE_PERMLOOP_DO_DELAY: + PipelineStage = PIPELINE_STAGE_PERMLOOP_DELAY_DONE; + m_PROGRAM_COUNTER += 4; + break; + case PIPELINE_STAGE_JUMP: + CheckTimer = (JumpToLocation < m_PROGRAM_COUNTER || TestTimer); + m_PROGRAM_COUNTER = JumpToLocation; + PipelineStage = PIPELINE_STAGE_NORMAL; + if (CheckTimer) { - WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str()); - //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str(),m_GPR[0x19].UW[0],m_GPR[0x03].UW[0]); - //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",m_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType()); - }*/ - /*if (PROGRAM_COUNTER > 0x80323000 && PROGRAM_COUNTER< 0x80380000) - { - WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str()); - //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",m_PROGRAM_COUNTER,R4300iInstruction(m_PROGRAM_COUNTER, Opcode.Value).NameAndParam().c_str(),m_GPR[0x19].UW[0],m_GPR[0x03].UW[0]); - //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",m_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType()); - }*/ - (this->*Jump_Opcode[m_Opcode.op])(); - m_GPR[0].DW = 0; /* MIPS $zero hard-wired to 0 */ - - Cycles -= CountPerOp; - *g_NextTimer -= CountPerOp; - - /*static uint32_t TestAddress = 0x80077B0C, TestValue = 0, CurrentValue = 0; - if (m_MMU.MemoryValue32(TestAddress, TestValue)) - { - if (TestValue != CurrentValue) - { - WriteTraceF(TraceError,"%X: %X changed (%s)",PROGRAM_COUNTER,TestAddress,R4300iInstruction(PROGRAM_COUNTER, m_Opcode.Value).NameAndParam().c_str()); - CurrentValue = TestValue; - } - }*/ - - switch (PipelineStage) - { - case PIPELINE_STAGE_NORMAL: - m_PROGRAM_COUNTER += 4; - break; - case PIPELINE_STAGE_DELAY_SLOT: - PipelineStage = PIPELINE_STAGE_JUMP; - m_PROGRAM_COUNTER += 4; - break; - case PIPELINE_STAGE_PERMLOOP_DO_DELAY: - PipelineStage = PIPELINE_STAGE_PERMLOOP_DELAY_DONE; - m_PROGRAM_COUNTER += 4; - break; - case PIPELINE_STAGE_JUMP: - CheckTimer = (JumpToLocation < m_PROGRAM_COUNTER || TestTimer); - m_PROGRAM_COUNTER = JumpToLocation; - PipelineStage = PIPELINE_STAGE_NORMAL; - if (CheckTimer) + TestTimer = false; + if (*g_NextTimer < 0) { - TestTimer = false; - if (*g_NextTimer < 0) - { - g_SystemTimer->TimerDone(); - } - if (DoSomething) - { - SystemEvents.ExecuteEvents(); - } + g_SystemTimer->TimerDone(); } - break; - case PIPELINE_STAGE_JUMP_DELAY_SLOT: - PipelineStage = PIPELINE_STAGE_JUMP; - m_PROGRAM_COUNTER = JumpToLocation; - JumpToLocation = JumpDelayLocation; - break; - case PIPELINE_STAGE_PERMLOOP_DELAY_DONE: - m_PROGRAM_COUNTER = JumpToLocation; - PipelineStage = PIPELINE_STAGE_NORMAL; - InPermLoop(); - g_SystemTimer->TimerDone(); if (DoSomething) { SystemEvents.ExecuteEvents(); } - break; - default: - g_Notify->BreakPoint(__FILE__, __LINE__); } - } - else - { - m_Reg.TriggerAddressException((int32_t)m_PROGRAM_COUNTER, EXC_RMISS); + break; + case PIPELINE_STAGE_JUMP_DELAY_SLOT: + PipelineStage = PIPELINE_STAGE_JUMP; + m_PROGRAM_COUNTER = JumpToLocation; + JumpToLocation = JumpDelayLocation; + break; + case PIPELINE_STAGE_PERMLOOP_DELAY_DONE: m_PROGRAM_COUNTER = JumpToLocation; PipelineStage = PIPELINE_STAGE_NORMAL; + InPermLoop(); + g_SystemTimer->TimerDone(); + if (DoSomething) + { + SystemEvents.ExecuteEvents(); + } + break; + default: + g_Notify->BreakPoint(__FILE__, __LINE__); } } - } - __except_catch() - { - g_Notify->FatalError(GS(MSG_UNKNOWN_MEM_ACTION)); + else + { + m_Reg.TriggerAddressException((int32_t)m_PROGRAM_COUNTER, EXC_RMISS); + m_PROGRAM_COUNTER = JumpToLocation; + PipelineStage = PIPELINE_STAGE_NORMAL; + } } } diff --git a/Source/Project64-core/N64System/MemoryHandler/DisplayControlRegHandler.cpp b/Source/Project64-core/N64System/MemoryHandler/DisplayControlRegHandler.cpp index c03e868cc..8f15db7ab 100644 --- a/Source/Project64-core/N64System/MemoryHandler/DisplayControlRegHandler.cpp +++ b/Source/Project64-core/N64System/MemoryHandler/DisplayControlRegHandler.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" #include "SPRegistersHandler.h" -#include #include #include #include diff --git a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp index aa4ae4821..634ef20d9 100755 --- a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp +++ b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -876,7 +875,6 @@ bool CMipsMemoryVM::SB_PhysicalAddress(uint32_t PAddr, uint32_t Value) if (PAddr < RdramSize()) { g_Recompiler->ClearRecompCode_Phys(PAddr & ~0xFFF, 0xFFC, CRecompiler::Remove_ProtectedMem); - ::ProtectMemory(m_RDRAM + (PAddr & ~0xFFF), 0xFFC, MEM_READWRITE); *(uint8_t *)(m_RDRAM + (PAddr ^ 3)) = (uint8_t)Value; } break; @@ -909,18 +907,11 @@ bool CMipsMemoryVM::SH_PhysicalAddress(uint32_t PAddr, uint32_t Value) case 0x00700000: if (PAddr < RdramSize()) { - if (CGameSettings::bSMM_Protect() || CGameSettings::bSMM_StoreInstruc()) + if (CGameSettings::bSMM_StoreInstruc()) { g_Recompiler->ClearRecompCode_Phys(PAddr & ~0xFFF, 0x1000, CRecompiler::Remove_ProtectedMem); - if (CGameSettings::bSMM_Protect()) - { - ::ProtectMemory(m_RDRAM + (PAddr & ~0xFFF), 0xFFC, MEM_READWRITE); - } - if (CGameSettings::bSMM_StoreInstruc()) - { - m_TLB_WriteMap[(0x80000000 + PAddr) >> 12] = PAddr - (0x80000000 + PAddr); - m_TLB_WriteMap[(0xA0000000 + PAddr) >> 12] = PAddr - (0xA0000000 + PAddr); - } + m_TLB_WriteMap[(0x80000000 + PAddr) >> 12] = PAddr - (0x80000000 + PAddr); + m_TLB_WriteMap[(0xA0000000 + PAddr) >> 12] = PAddr - (0xA0000000 + PAddr); *(uint16_t *)(m_RDRAM + (PAddr ^ 2)) = (uint16_t)Value; } } @@ -957,18 +948,11 @@ bool CMipsMemoryVM::SW_PhysicalAddress(uint32_t PAddr, uint32_t Value) case 0x00800000: if (PAddr < RdramSize()) { - if (CGameSettings::bSMM_Protect() || CGameSettings::bSMM_StoreInstruc()) + if (CGameSettings::bSMM_StoreInstruc()) { g_Recompiler->ClearRecompCode_Phys(PAddr & ~0xFFF, 0x1000, CRecompiler::Remove_ProtectedMem); - if (CGameSettings::bSMM_Protect()) - { - ::ProtectMemory(m_RDRAM + (PAddr & ~0xFFF), 0xFFC, MEM_READWRITE); - } - if (CGameSettings::bSMM_StoreInstruc()) - { - m_TLB_WriteMap[(0x80000000 + PAddr) >> 12] = PAddr - (0x80000000 + PAddr); - m_TLB_WriteMap[(0xA0000000 + PAddr) >> 12] = PAddr - (0xA0000000 + PAddr); - } + m_TLB_WriteMap[(0x80000000 + PAddr) >> 12] = PAddr - (0x80000000 + PAddr); + m_TLB_WriteMap[(0xA0000000 + PAddr) >> 12] = PAddr - (0xA0000000 + PAddr); *(uint32_t *)(m_RDRAM + PAddr) = Value; } } @@ -1020,7 +1004,6 @@ bool CMipsMemoryVM::SD_PhysicalAddress(uint32_t PAddr, uint64_t Value) if (PAddr < RdramSize()) { g_Recompiler->ClearRecompCode_Phys(PAddr & ~0xFFF, 0xFFC, CRecompiler::Remove_ProtectedMem); - ::ProtectMemory(m_RDRAM + (PAddr & ~0xFFF), 0xFFC, MEM_READWRITE); *(uint64_t *)(m_RDRAM + PAddr) = Value; } break; @@ -1054,56 +1037,6 @@ void CMipsMemoryVM::ClearMemoryWriteMap(uint32_t VAddr, uint32_t Length) } } -void CMipsMemoryVM::ProtectMemory(uint32_t StartVaddr, uint32_t EndVaddr) -{ - WriteTrace(TraceProtectedMem, TraceDebug, "StartVaddr: %08X EndVaddr: %08X", StartVaddr, EndVaddr); - - if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr) || EndVaddr < StartVaddr) - { - return; - } - - int32_t Length = ((EndVaddr + 3) - StartVaddr) & ~3; - if (Length < 0) - { - g_Notify->BreakPoint(__FILE__, __LINE__); - return; - } - uint8_t * MemLoc = MemoryPtr(StartVaddr, Length, true); - if (MemLoc == nullptr) - { - g_Notify->BreakPoint(__FILE__, __LINE__); - return; - } - WriteTrace(TraceProtectedMem, TraceDebug, "Length: 0x%X", Length); - ::ProtectMemory(MemLoc, Length, MEM_READONLY); -} - -void CMipsMemoryVM::UnProtectMemory(uint32_t StartVaddr, uint32_t EndVaddr) -{ - WriteTrace(TraceProtectedMem, TraceDebug, "StartVaddr: %08X EndVaddr: %08X", StartVaddr, EndVaddr); - if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr) || EndVaddr < StartVaddr) - { - return; - } - - int32_t Length = ((EndVaddr + 3) - StartVaddr) & ~3; - if (Length < 0) - { - g_Notify->BreakPoint(__FILE__, __LINE__); - return; - } - uint8_t * MemLoc = MemoryPtr(StartVaddr, Length, true); - if (MemLoc == nullptr) - { - g_Notify->BreakPoint(__FILE__, __LINE__); - return; - } - - WriteTrace(TraceProtectedMem, TraceDebug, "Length: 0x%X", Length); - ::ProtectMemory(MemLoc, Length, MEM_READWRITE); -} - const char * CMipsMemoryVM::LabelName(uint32_t Address) const { sprintf(m_strLabelName, "0x%08X", Address); diff --git a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.h b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.h index 446ee5684..012a97190 100644 --- a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.h +++ b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.h @@ -117,10 +117,6 @@ public: void ClearMemoryWriteMap(uint32_t VAddr, uint32_t Length); - // Protect the memory from being written to - void ProtectMemory(uint32_t StartVaddr, uint32_t EndVaddr); - void UnProtectMemory(uint32_t StartVaddr, uint32_t EndVaddr); - // Functions for TLB notification void TLB_Mapped(uint32_t VAddr, uint32_t Len, uint32_t PAddr, bool bReadOnly); void TLB_Unmaped(uint32_t Vaddr, uint32_t Len); diff --git a/Source/Project64-core/N64System/N64System.cpp b/Source/Project64-core/N64System/N64System.cpp index a3f667cdb..47066dae9 100644 --- a/Source/Project64-core/N64System/N64System.cpp +++ b/Source/Project64-core/N64System/N64System.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -800,16 +799,7 @@ void CN64System::StartEmulation2(bool NewThread) void CN64System::StartEmulation(bool NewThread) { WriteTrace(TraceN64System, TraceDebug, "Start (NewThread: %s)", NewThread ? "true" : "false"); - __except_try() - { - StartEmulation2(NewThread); - } - __except_catch() - { - char message[400]; - sprintf(message, "Exception caught\nFile: %s\nLine: %d", __FILE__, __LINE__); - g_Notify->DisplayError(message); - } + StartEmulation2(NewThread); WriteTrace(TraceN64System, TraceDebug, "Done (NewThread: %s)", NewThread ? "true" : "false") } @@ -1939,9 +1929,6 @@ bool CN64System::LoadState(const char * FileName) } Reset(false, true); - m_MMU_VM.UnProtectMemory(0x80000000, 0x80000000 + m_MMU_VM.RdramSize() - 4); - m_MMU_VM.UnProtectMemory(0xA4000000, 0xA4000FFC); - m_MMU_VM.UnProtectMemory(0xA4001000, 0xA4001FFC); g_Settings->SaveDword(Game_RDRamSize, SaveRDRAMSize); unzReadCurrentFile(file, &NextVITimer, sizeof(NextVITimer)); if (SaveID == 0x23D8A6C8) @@ -2084,8 +2071,6 @@ bool CN64System::LoadState(const char * FileName) } } Reset(false, true); - m_MMU_VM.UnProtectMemory(0x80000000, 0x80000000 + m_MMU_VM.RdramSize() - 4); - m_MMU_VM.UnProtectMemory(0xA4000000, 0xA4001FFC); g_Settings->SaveDword(Game_RDRamSize, SaveRDRAMSize); hSaveFile.Read(&NextVITimer, sizeof(NextVITimer)); @@ -2368,20 +2353,13 @@ void CN64System::RefreshScreen() m_CPU_Usage.StartTimer(Timer_UpdateScreen); } - __except_try() + WriteTrace(TraceVideoPlugin, TraceDebug, "UpdateScreen starting"); + m_Plugins->Gfx()->UpdateScreen(); + if (g_Debugger != nullptr && HaveDebugger()) { - WriteTrace(TraceVideoPlugin, TraceDebug, "UpdateScreen starting"); - m_Plugins->Gfx()->UpdateScreen(); - if (g_Debugger != nullptr && HaveDebugger()) - { - g_Debugger->FrameDrawn(); - } - WriteTrace(TraceVideoPlugin, TraceDebug, "UpdateScreen done"); - } - __except_catch() - { - WriteTrace(TraceVideoPlugin, TraceError, "Exception caught"); + g_Debugger->FrameDrawn(); } + WriteTrace(TraceVideoPlugin, TraceDebug, "UpdateScreen done"); g_MMU->VideoInterface().UpdateFieldSerration((m_Reg.VI_STATUS_REG & 0x40) != 0); if ((bBasicMode() || bLimitFPS()) && (!bSyncToAudio() || !FullSpeed())) diff --git a/Source/Project64-core/N64System/Recompiler/CodeSection.cpp b/Source/Project64-core/N64System/Recompiler/CodeSection.cpp index 3436bc03d..a2f65e40e 100644 --- a/Source/Project64-core/N64System/Recompiler/CodeSection.cpp +++ b/Source/Project64-core/N64System/Recompiler/CodeSection.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" #include -#include #include #include #include diff --git a/Source/Project64-core/N64System/Recompiler/Recompiler.cpp b/Source/Project64-core/N64System/Recompiler/Recompiler.cpp index 12bb0da8c..568812500 100644 --- a/Source/Project64-core/N64System/Recompiler/Recompiler.cpp +++ b/Source/Project64-core/N64System/Recompiler/Recompiler.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" -#include #include #include #include @@ -42,38 +41,31 @@ void CRecompiler::Run() } m_EndEmulation = false; - __except_try() + if (m_System.LookUpMode() == FuncFind_VirtualLookup) { - if (m_System.LookUpMode() == FuncFind_VirtualLookup) + if (m_System.bSMM_ValidFunc()) { - if (m_System.bSMM_ValidFunc()) - { - RecompilerMain_VirtualTable_validate(); - } - else - { - RecompilerMain_VirtualTable(); - } - } - else if (m_System.LookUpMode() == FuncFind_ChangeMemory) - { - RecompilerMain_ChangeMemory(); + RecompilerMain_VirtualTable_validate(); } else { - if (m_System.bSMM_ValidFunc()) - { - RecompilerMain_Lookup_validate(); - } - else - { - RecompilerMain_Lookup(); - } + RecompilerMain_VirtualTable(); } } - __except_catch() + else if (m_System.LookUpMode() == FuncFind_ChangeMemory) { - g_Notify->DisplayError(MSG_UNKNOWN_MEM_ACTION); + RecompilerMain_ChangeMemory(); + } + else + { + if (m_System.bSMM_ValidFunc()) + { + RecompilerMain_Lookup_validate(); + } + else + { + RecompilerMain_Lookup(); + } } WriteTrace(TraceRecompiler, TraceDebug, "Done"); @@ -125,11 +117,6 @@ void CRecompiler::RecompilerMain_VirtualTable() g_Notify->FatalError(MSG_MEM_ALLOC_ERROR); } memset(table, 0, sizeof(PCCompiledFunc) * (0x1000 >> 2)); - if (m_System.bSMM_Protect()) - { - WriteTrace(TraceRecompiler, TraceError, "Create Table (%X): Index = %d", table, PC >> 0xC); - m_MMU.ProtectMemory(PC & ~0xFFF, PC | 0xFFF); - } } table[TableEntry] = info; @@ -171,10 +158,6 @@ void CRecompiler::RecompilerMain_Lookup() { break; } - if (m_System.bSMM_Protect()) - { - m_MMU.ProtectMemory(PROGRAM_COUNTER & ~0xFFF, PROGRAM_COUNTER | 0xFFF); - } JumpTable()[PhysicalAddr >> 2] = info; } (info->Function())(); @@ -230,10 +213,6 @@ void CRecompiler::RecompilerMain_Lookup_validate() { break; } - if (m_System.bSMM_Protect()) - { - m_MMU.ProtectMemory(PC & ~0xFFF, PC | 0xFFF); - } JumpTable()[PhysicalAddr >> 2] = info; } else @@ -466,10 +445,6 @@ void CRecompiler::ClearRecompCode_Phys(uint32_t Address, int length, REMOVE_REAS } WriteTrace(TraceRecompiler, TraceInfo, "Resetting jump table, Addr: %X len: %d", Address, ClearLen); memset((uint8_t *)JumpTable() + Address, 0, ClearLen); - if (m_System.bSMM_Protect()) - { - m_MMU.UnProtectMemory(Address + 0x80000000, Address + 0x80000004); - } } else { @@ -501,7 +476,6 @@ void CRecompiler::ClearRecompCode_Virt(uint32_t Address, int length, REMOVE_REAS WriteTrace(TraceRecompiler, TraceError, "Delete table (%X): Index = %d", table, AddressIndex); delete table; table = nullptr; - m_MMU.UnProtectMemory(Address, Address + length); } if (DataLeft > 0) diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index fc22d204b..365e4c9de 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -3,7 +3,6 @@ #if defined(__i386__) || defined(_M_IX86) #include -#include #include #include #include diff --git a/Source/Project64-core/Project64-core.vcxproj b/Source/Project64-core/Project64-core.vcxproj index e315c48fa..67f26ab47 100644 --- a/Source/Project64-core/Project64-core.vcxproj +++ b/Source/Project64-core/Project64-core.vcxproj @@ -166,7 +166,6 @@ - diff --git a/Source/Project64-core/Project64-core.vcxproj.filters b/Source/Project64-core/Project64-core.vcxproj.filters index 128fdf3cf..fe48f2a2c 100644 --- a/Source/Project64-core/Project64-core.vcxproj.filters +++ b/Source/Project64-core/Project64-core.vcxproj.filters @@ -647,9 +647,6 @@ Header Files - - Header Files - Header Files\N64 System\Mips diff --git a/Source/Project64-core/Settings.cpp b/Source/Project64-core/Settings.cpp index daed602f1..8f0d68a70 100644 --- a/Source/Project64-core/Settings.cpp +++ b/Source/Project64-core/Settings.cpp @@ -140,7 +140,6 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Default_SyncViaAudio, new CSettingTypeApplication("Defaults", "Audio-Sync Audio", true)); AddHandler(Default_FixedAudio, new CSettingTypeApplication("Defaults", "Fixed Audio", true)); AddHandler(Default_RandomizeSIPIInterrupts, new CSettingTypeApplication("Defaults", "Randomize SI/PI Interrupts", true)); - AddHandler(Default_SMM_Protect_Memory, new CSettingTypeApplication("Defaults", "SMM-Protect", false)); AddHandler(Default_DiskSeekTiming, new CSettingTypeApplication("Defaults", "Disk Seek Timing", (uint32_t)DiskSeek_Turbo)); AddHandler(Rdb_GoodName, new CSettingTypeRomDatabase("Good Name", Game_GameName)); @@ -175,7 +174,6 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Rdb_SMM_StoreInstruc, new CSettingTypeRomDatabase("SMM-StoreInst", false)); AddHandler(Rdb_SMM_PIDMA, new CSettingTypeRomDatabase("SMM-PI DMA", true)); AddHandler(Rdb_SMM_TLB, new CSettingTypeRomDatabase("SMM-TLB", true)); - AddHandler(Rdb_SMM_Protect, new CSettingTypeRomDatabase("SMM-Protect", Default_SMM_Protect_Memory)); AddHandler(Rdb_SMM_ValidFunc, new CSettingTypeRomDatabase("SMM-FUNC", true)); AddHandler(Rdb_ViRefreshRate, new CSettingTypeRomDatabase("ViRefresh", Default_ViRefreshRate)); AddHandler(Rdb_AiCountPerBytes, new CSettingTypeRomDatabase("AiCountPerBytes", Default_AiCountPerBytes)); @@ -232,7 +230,6 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Game_SMM_Cache, new CSettingTypeGame("SMM-Cache", Rdb_SMM_Cache)); AddHandler(Game_SMM_PIDMA, new CSettingTypeGame("SMM-PI DMA", Rdb_SMM_PIDMA)); AddHandler(Game_SMM_TLB, new CSettingTypeGame("SMM-TLB", Rdb_SMM_TLB)); - AddHandler(Game_SMM_Protect, new CSettingTypeGame("SMM-Protect", Rdb_SMM_Protect)); AddHandler(Game_SMM_ValidFunc, new CSettingTypeGame("SMM-FUNC", Rdb_SMM_ValidFunc)); AddHandler(Game_ViRefreshRate, new CSettingTypeGame("ViRefresh", Rdb_ViRefreshRate)); AddHandler(Game_AiCountPerBytes, new CSettingTypeGame("AiCountPerBytes", Rdb_AiCountPerBytes)); @@ -374,7 +371,6 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Debugger_TraceRegisterCache, new CSettingTypeApplication("Logging", "Register Cache", (uint32_t)g_ModuleLogLevel[TraceRegisterCache])); AddHandler(Debugger_TraceRecompiler, new CSettingTypeApplication("Logging", "Recompiler", (uint32_t)g_ModuleLogLevel[TraceRecompiler])); AddHandler(Debugger_TraceTLB, new CSettingTypeApplication("Logging", "TLB", (uint32_t)g_ModuleLogLevel[TraceTLB])); - AddHandler(Debugger_TraceProtectedMEM, new CSettingTypeApplication("Logging", "Protected MEM", (uint32_t)g_ModuleLogLevel[TraceProtectedMem])); AddHandler(Debugger_TraceUserInterface, new CSettingTypeApplication("Logging", "User Interface", (uint32_t)g_ModuleLogLevel[TraceUserInterface])); AddHandler(Debugger_TraceRomList, new CSettingTypeApplication("Logging", "Rom List", (uint32_t)g_ModuleLogLevel[TraceRomList])); AddHandler(Debugger_TraceExceptionHandler, new CSettingTypeApplication("Logging", "Exception Handler", (uint32_t)g_ModuleLogLevel[TraceExceptionHandler])); diff --git a/Source/Project64-core/Settings/GameSettings.cpp b/Source/Project64-core/Settings/GameSettings.cpp index 3a6c11c60..122201434 100644 --- a/Source/Project64-core/Settings/GameSettings.cpp +++ b/Source/Project64-core/Settings/GameSettings.cpp @@ -8,7 +8,6 @@ bool CGameSettings::m_RspMultiThreaded = false; bool CGameSettings::m_UseHleGfx = true; bool CGameSettings::m_UseHleAudio = false; bool CGameSettings::m_bSMM_StoreInstruc; -bool CGameSettings::m_bSMM_Protect; bool CGameSettings::m_bSMM_ValidFunc; bool CGameSettings::m_bSMM_PIDMA; bool CGameSettings::m_bSMM_TLB; @@ -66,7 +65,6 @@ void CGameSettings::RefreshGameSettings() 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_Protect = g_Settings->LoadBool(Game_SMM_Protect); m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc); m_bSMM_PIDMA = g_Settings->LoadBool(Game_SMM_PIDMA); m_bSMM_TLB = g_Settings->LoadBool(Game_SMM_TLB); diff --git a/Source/Project64-core/Settings/GameSettings.h b/Source/Project64-core/Settings/GameSettings.h index 3a077cd29..2501057ef 100644 --- a/Source/Project64-core/Settings/GameSettings.h +++ b/Source/Project64-core/Settings/GameSettings.h @@ -95,10 +95,6 @@ public: { return m_bSMM_StoreInstruc; } - inline static bool bSMM_Protect(void) - { - return m_bSMM_Protect; - } inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; @@ -170,7 +166,6 @@ private: static bool m_b32Bit; static bool m_RspAudioSignal; static bool m_bSMM_StoreInstruc; - static bool m_bSMM_Protect; static bool m_bSMM_ValidFunc; static bool m_bSMM_PIDMA; static bool m_bSMM_TLB; diff --git a/Source/Project64-core/Settings/SettingsID.h b/Source/Project64-core/Settings/SettingsID.h index c58222e5b..9f17178cd 100644 --- a/Source/Project64-core/Settings/SettingsID.h +++ b/Source/Project64-core/Settings/SettingsID.h @@ -75,7 +75,6 @@ enum SettingID Default_SyncViaAudio, Default_FixedAudio, Default_RandomizeSIPIInterrupts, - Default_SMM_Protect_Memory, Default_DiskSeekTiming, // RDB settings @@ -106,7 +105,6 @@ enum SettingID Rdb_SMM_Cache, Rdb_SMM_PIDMA, Rdb_SMM_TLB, - Rdb_SMM_Protect, Rdb_SMM_ValidFunc, Rdb_ViRefreshRate, Rdb_AiCountPerBytes, @@ -142,7 +140,6 @@ enum SettingID Game_SyncViaAudio, Game_32Bit, Game_SMM_Cache, - Game_SMM_Protect, Game_SMM_ValidFunc, Game_SMM_PIDMA, Game_SMM_TLB, @@ -291,7 +288,6 @@ enum SettingID Debugger_TraceRegisterCache, Debugger_TraceRecompiler, Debugger_TraceTLB, - Debugger_TraceProtectedMEM, Debugger_TraceUserInterface, Debugger_TraceRomList, Debugger_TraceExceptionHandler, diff --git a/Source/Project64-core/TraceModulesProject64.h b/Source/Project64-core/TraceModulesProject64.h index 6a336ba1b..51b36b656 100644 --- a/Source/Project64-core/TraceModulesProject64.h +++ b/Source/Project64-core/TraceModulesProject64.h @@ -18,7 +18,6 @@ enum TraceModuleProject64 TraceRegisterCache, TraceRecompiler, TraceTLB, - TraceProtectedMem, TraceUserInterface, TraceRomList, TraceExceptionHandler, diff --git a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp index b8b41477d..deef60d71 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-ViewMemory.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" #include -#include #include diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index 271033120..e657797b2 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -51,7 +51,6 @@ CMainMenu::CMainMenu(CMainGui * hMainWindow) : m_ChangeSettingList.push_back(Debugger_TraceRegisterCache); m_ChangeSettingList.push_back(Debugger_TraceRecompiler); m_ChangeSettingList.push_back(Debugger_TraceTLB); - m_ChangeSettingList.push_back(Debugger_TraceProtectedMEM); m_ChangeSettingList.push_back(Debugger_TraceUserInterface); m_ChangeSettingList.push_back(Debugger_AppLogFlush); m_ChangeSettingList.push_back(Game_CurrentSaveState); @@ -554,7 +553,6 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI case ID_DEBUGGER_TRACE_REGISTERCACHE: SetTraceModuleSetttings(Debugger_TraceRegisterCache); break; case ID_DEBUGGER_TRACE_RECOMPILER: SetTraceModuleSetttings(Debugger_TraceRecompiler); break; case ID_DEBUGGER_TRACE_TLB: SetTraceModuleSetttings(Debugger_TraceTLB); break; - case ID_DEBUGGER_TRACE_PROTECTEDMEM: SetTraceModuleSetttings(Debugger_TraceProtectedMEM); break; case ID_DEBUGGER_TRACE_USERINTERFACE: SetTraceModuleSetttings(Debugger_TraceUserInterface); break; case ID_DEBUGGER_APPLOG_FLUSH: @@ -1254,10 +1252,6 @@ void CMainMenu::FillOutMenu(HMENU hMenu) Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceTLB) == TraceVerbose); DebugAppLoggingMenu.push_back(Item); - Item.Reset(ID_DEBUGGER_TRACE_PROTECTEDMEM, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"Protected MEM"); - Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceProtectedMEM) == TraceVerbose); - DebugAppLoggingMenu.push_back(Item); - Item.Reset(ID_DEBUGGER_TRACE_USERINTERFACE, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"User interface"); Item.SetItemTicked(g_Settings->LoadDword(Debugger_TraceUserInterface) == TraceVerbose); DebugAppLoggingMenu.push_back(Item); diff --git a/Source/Project64/UserInterface/MainMenu.h b/Source/Project64/UserInterface/MainMenu.h index d07f30e7d..a462b8cb5 100644 --- a/Source/Project64/UserInterface/MainMenu.h +++ b/Source/Project64/UserInterface/MainMenu.h @@ -123,7 +123,6 @@ enum MainMenuID ID_DEBUGGER_TRACE_REGISTERCACHE, ID_DEBUGGER_TRACE_RECOMPILER, ID_DEBUGGER_TRACE_TLB, - ID_DEBUGGER_TRACE_PROTECTEDMEM, ID_DEBUGGER_TRACE_USERINTERFACE, // Profile menu diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp index 06eda736f..60235a81e 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp @@ -19,7 +19,6 @@ CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay) SetDlgItemText(IDC_ROM_FIXEDAUDIO, wGS(ROM_FIXED_AUDIO).c_str()); SetDlgItemText(IDC_SYNC_AUDIO, wGS(ROM_SYNC_AUDIO).c_str()); SetDlgItemText(IDC_RANDOMIZE_SIPI_INTERRUPTS, wGS(ROM_RANDOMIZE_SIPI_INTERRUPTS).c_str()); - SetDlgItemText(IDC_PROTECT_MEMORY, wGS(ADVANCE_SMM_PROTECT).c_str()); SetDlgItemText(IDC_DISKSEEKTIMING_TEXT1, wGS(ROM_DISK_SEEK_TIMING).c_str()); CModifiedComboBox * ComboBox; @@ -60,7 +59,6 @@ CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay) AddModCheckBox(GetDlgItem(IDC_SYNC_AUDIO), Default_SyncViaAudio); AddModCheckBox(GetDlgItem(IDC_ROM_FIXEDAUDIO), Default_FixedAudio); AddModCheckBox(GetDlgItem(IDC_RANDOMIZE_SIPI_INTERRUPTS), Default_RandomizeSIPIInterrupts); - AddModCheckBox(GetDlgItem(IDC_PROTECT_MEMORY), Default_SMM_Protect_Memory); AddModCheckBox(GetDlgItem(IDC_DISKSEEKTIMING), Default_DiskSeekTiming); ComboBox = AddModComboBox(GetDlgItem(IDC_DISKSEEKTIMING), Default_DiskSeekTiming); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.h b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.h index 0bc10732f..9446d279b 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.h +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.h @@ -10,7 +10,6 @@ class CDefaultsOptionsPage : COMMAND_ID_HANDLER_EX(IDC_SYNC_AUDIO, CheckBoxChanged); COMMAND_ID_HANDLER_EX(IDC_ROM_FIXEDAUDIO, CheckBoxChanged); COMMAND_ID_HANDLER_EX(IDC_RANDOMIZE_SIPI_INTERRUPTS, CheckBoxChanged); - COMMAND_ID_HANDLER_EX(IDC_PROTECT_MEMORY, CheckBoxChanged); COMMAND_HANDLER_EX(IDC_RDRAM_SIZE_KNOWN, LBN_SELCHANGE, ComboBoxChanged); COMMAND_HANDLER_EX(IDC_RDRAM_SIZE_UNKNOWN, LBN_SELCHANGE, ComboBoxChanged); COMMAND_HANDLER_EX(IDC_COUNTFACT, LBN_SELCHANGE, ComboBoxChanged); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.cpp index 7e784ecb4..318196b68 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.cpp @@ -25,7 +25,6 @@ CGameRecompilePage::CGameRecompilePage(HWND hParent, const RECT & rcDispay) SetDlgItemText(IDC_SMM_DMA, wGS(ADVANCE_SMM_PIDMA).c_str()); SetDlgItemText(IDC_SMM_VALIDATE, wGS(ADVANCE_SMM_VALIDATE).c_str()); SetDlgItemText(IDC_SMM_TLB, wGS(ADVANCE_SMM_TLB).c_str()); - SetDlgItemText(IDC_SMM_PROTECT, wGS(ADVANCE_SMM_PROTECT).c_str()); m_SelfModGroup.Attach(GetDlgItem(IDC_SMM_FRAME)); @@ -36,7 +35,6 @@ CGameRecompilePage::CGameRecompilePage(HWND hParent, const RECT & rcDispay) AddModCheckBox(GetDlgItem(IDC_SMM_DMA), Game_SMM_PIDMA); AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE), Game_SMM_ValidFunc); AddModCheckBox(GetDlgItem(IDC_SMM_TLB), Game_SMM_TLB); - AddModCheckBox(GetDlgItem(IDC_SMM_PROTECT), Game_SMM_Protect); AddModCheckBox(GetDlgItem(IDC_SMM_STORE), Game_SMM_StoreInstruc); AddModCheckBox(GetDlgItem(IDC_ROM_FASTSP), Game_FastSP); AddModCheckBox(GetDlgItem(IDC_ROM_32BIT), Game_32Bit); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.h b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.h index ba0d5fbbb..7bce8df31 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.h +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Game-Recompiler.h @@ -18,7 +18,6 @@ class CGameRecompilePage : COMMAND_ID_HANDLER_EX(IDC_SMM_DMA, CheckBoxChanged); COMMAND_ID_HANDLER_EX(IDC_SMM_VALIDATE, CheckBoxChanged); COMMAND_ID_HANDLER_EX(IDC_SMM_TLB, CheckBoxChanged); - COMMAND_ID_HANDLER_EX(IDC_SMM_PROTECT, CheckBoxChanged); COMMAND_ID_HANDLER_EX(IDC_SMM_STORE, CheckBoxChanged); } END_MSG_MAP() diff --git a/Source/Project64/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index 718b2a822..5cb07daaf 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -575,7 +575,6 @@ BEGIN CONTROL "PI DMA",IDC_SMM_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,111,89,10 CONTROL "TLB Unmapping",IDC_SMM_TLB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,111,89,10 CONTROL "Start Changed",IDC_SMM_VALIDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,123,89,10 - CONTROL "Protect Memory",IDC_SMM_PROTECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,123,89,10 CONTROL "FPU Register caching",IDC_ROM_FPUREGCACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,62,95,10 END @@ -1248,7 +1247,6 @@ BEGIN CONTROL "Use High Level GFX",IDC_HLE_GFX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,107,91,10 CONTROL "Randomize SI/PI interrupts",IDC_RANDOMIZE_SIPI_INTERRUPTS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,107,107,10 - CONTROL "Protect Memory",IDC_PROTECT_MEMORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,119,91,10 END IDD_Enhancement_Config DIALOGEX 0, 0, 206, 214 diff --git a/Source/Project64/UserInterface/resource.h b/Source/Project64/UserInterface/resource.h index c668de9ef..b69cdb6c9 100644 --- a/Source/Project64/UserInterface/resource.h +++ b/Source/Project64/UserInterface/resource.h @@ -163,7 +163,6 @@ #define IDC_S_CURRENT_ASSIGN 1040 #define IDC_SMM_VALIDATE 1041 #define IDC_ROM_HEADER 1042 -#define IDC_SMM_PROTECT 1042 #define IDC_UNKOWN 1043 #define IDC_FUNCFIND 1043 #define IDC_RI_REG 1044 @@ -335,7 +334,6 @@ #define IDC_SYNC_AUDIO 1156 #define IDC_UNALIGNED_DMA 1158 #define IDC_RANDOMIZE_SIPI_INTERRUPTS 1159 -#define IDC_PROTECT_MEMORY 1160 #define IDC_R16_EDIT 1165 #define IDC_R17_EDIT 1166 #define IDC_R18_EDIT 1167