diff --git a/Source/Project64/N64 System/Recompiler/Function Map Class.cpp b/Source/Project64/N64 System/Recompiler/Function Map Class.cpp index c9a68e65f..131af7932 100644 --- a/Source/Project64/N64 System/Recompiler/Function Map Class.cpp +++ b/Source/Project64/N64 System/Recompiler/Function Map Class.cpp @@ -2,8 +2,7 @@ CFunctionMap::CFunctionMap() : m_JumpTable(NULL), - m_FunctionTable(NULL), - m_DelaySlotTable(NULL) + m_FunctionTable(NULL) { } @@ -26,16 +25,6 @@ bool CFunctionMap::AllocateMemory() } memset(m_FunctionTable,0,0xFFFFF * sizeof(CCompiledFunc *)); } - if (m_DelaySlotTable == NULL) - { - m_DelaySlotTable = (BYTE **)VirtualAlloc(NULL,0xFFFFF * sizeof(BYTE *),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE); - if (m_DelaySlotTable == NULL) { - WriteTrace(TraceError,"CFunctionMap::AllocateMemory: failed to allocate delay slot table"); - _Notify->FatalError(MSG_MEM_ALLOC_ERROR); - return false; - } - memset(m_DelaySlotTable,0,0xFFFFF * sizeof(BYTE *)); - } } if (_Recompiler->LookUpMode() == FuncFind_PhysicalLookup) { @@ -46,14 +35,6 @@ bool CFunctionMap::AllocateMemory() return false; } memset(m_JumpTable,0,(_MMU->RdramSize() >> 2) * sizeof(PCCompiledFunc)); - - m_DelaySlotTable = (BYTE **)VirtualAlloc(NULL,(_MMU->RdramSize() >> 0xC) * sizeof(BYTE *),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE); - if (m_DelaySlotTable == NULL) { - WriteTrace(TraceError,"CFunctionMap::AllocateMemory: failed to allocate delay slot table"); - _Notify->FatalError(MSG_MEM_ALLOC_ERROR); - return false; - } - memset(m_DelaySlotTable,0,(_MMU->RdramSize() >> 0xC) * sizeof(BYTE *)); } return true; } @@ -72,11 +53,6 @@ void CFunctionMap::CleanBuffers ( void ) VirtualFree( m_FunctionTable, 0 , MEM_RELEASE); m_FunctionTable = NULL; } - if (m_DelaySlotTable) - { - VirtualFree( m_DelaySlotTable, 0 , MEM_RELEASE); - m_DelaySlotTable = NULL; - } if (m_JumpTable) { delete [] m_JumpTable; diff --git a/Source/Project64/N64 System/Recompiler/Function Map Class.h b/Source/Project64/N64 System/Recompiler/Function Map Class.h index ea0632f1c..3fe939a55 100644 --- a/Source/Project64/N64 System/Recompiler/Function Map Class.h +++ b/Source/Project64/N64 System/Recompiler/Function Map Class.h @@ -13,12 +13,10 @@ protected: public: inline PCCompiledFunc_TABLE * FunctionTable ( void ) const { return m_FunctionTable; } inline PCCompiledFunc * JumpTable ( void ) const { return m_JumpTable; } - inline BYTE ** DelaySlotTable ( void ) const { return m_DelaySlotTable; } private: void CleanBuffers ( void ); PCCompiledFunc * m_JumpTable; PCCompiledFunc_TABLE * m_FunctionTable; - BYTE ** m_DelaySlotTable; }; diff --git a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp index 4ab886f2c..4053cae04 100644 --- a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp +++ b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp @@ -915,14 +915,6 @@ void CRecompiler::ClearRecompCode_Virt(DWORD Address, int length,REMOVE_REASON R bool bUnProtect = false; length = ((length + 3) & ~0x3); - BYTE ** DelaySlotFuncs = DelaySlotTable(); - - if (WriteStart == 0 && DelaySlotFuncs[AddressIndex] != NULL) - { - DelaySlotFuncs[AddressIndex] = NULL; - _MMU->UnProtectMemory(Address,Address+ 4); - } - int DataInBlock = 0x1000 - WriteStart; int DataToWrite = length < DataInBlock ? length : DataInBlock; int DataLeft = length - DataToWrite;