diff --git a/Project64.sln b/Project64.sln index 9d76e0d88..8e4fb5a18 100644 --- a/Project64.sln +++ b/Project64.sln @@ -62,12 +62,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginRSP", "Source\Android EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JniBridge", "Source\Android\Bridge\Bridge.vcxproj", "{593B00E6-1987-415D-A62C-26533FC3E95C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginAudio", "Source\Android\PluginAudio\PluginAudio.vcxproj", "{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginInput", "Source\Android\PluginInput\PluginInput.vcxproj", "{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JniBridge", "Source\Android\Bridge\Bridge.vcxproj", "{2607037A-ADEE-4C8D-9761-17E7823A9E61}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -132,8 +126,11 @@ Global {731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.Build.0 = Release|Win32 {731BD205-2826-4631-B7AF-117658E88DBC}.Release|x64.ActiveCfg = Release|x64 {731BD205-2826-4631-B7AF-117658E88DBC}.Release|x64.Build.0 = Release|x64 + {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.ActiveCfg = Release|Win32 + {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|x64.ActiveCfg = Release|Win32 {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.ActiveCfg = Release|Win32 {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.Build.0 = Release|Win32 + {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|x64.ActiveCfg = Release|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.ActiveCfg = Debug|x64 @@ -214,30 +211,6 @@ Global {593B00E6-1987-415D-A62C-26533FC3E95C}.Release|Win32.Build.0 = Release|Win32 {593B00E6-1987-415D-A62C-26533FC3E95C}.Release|x64.ActiveCfg = Release|x64 {593B00E6-1987-415D-A62C-26533FC3E95C}.Release|x64.Build.0 = Release|x64 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|Win32.Build.0 = Debug|Win32 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|x64.ActiveCfg = Debug|x64 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|x64.Build.0 = Debug|x64 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|Win32.ActiveCfg = Release|Win32 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|Win32.Build.0 = Release|Win32 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|x64.ActiveCfg = Release|x64 - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|x64.Build.0 = Release|x64 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|Win32.ActiveCfg = Debug|Win32 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|Win32.Build.0 = Debug|Win32 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|x64.ActiveCfg = Debug|x64 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|x64.Build.0 = Debug|x64 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|Win32.ActiveCfg = Release|Win32 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|Win32.Build.0 = Release|Win32 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|x64.ActiveCfg = Release|x64 - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|x64.Build.0 = Release|x64 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|Win32.ActiveCfg = Debug|Win32 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|Win32.Build.0 = Debug|Win32 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|x64.ActiveCfg = Debug|x64 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|x64.Build.0 = Debug|x64 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|Win32.ActiveCfg = Release|Win32 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|Win32.Build.0 = Release|Win32 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|x64.ActiveCfg = Release|x64 - {2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -251,8 +224,8 @@ Global {462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26} {2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26} {B685BB34-D700-4FCC-8503-9B6AA1A0C95D} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} - {FEEA1071-2F0A-4436-A698-D0AF8CF79CFE} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} - {694F79A3-70F8-49F5-9287-8C38E1C8B6B1} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} - {2607037A-ADEE-4C8D-9761-17E7823A9E61} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} + {593B00E6-1987-415D-A62C-26533FC3E95C} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} + {D233025A-231F-4A43-92B6-E87193C60ACC} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} + {1133A1CC-A9E5-4026-B20D-6A2987130D4E} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58} EndGlobalSection EndGlobal diff --git a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp index a54d2529b..f0444f5dd 100644 --- a/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp +++ b/Source/Project64-core/N64System/Mips/MemoryVirtualMem.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index 627d59906..1806a023b 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -11,7 +11,7 @@ #include "stdafx.h" #include "N64Class.h" #include -#include +#include #include #include #include @@ -31,32 +31,32 @@ #pragma warning(disable:4355) // Disable 'this' : used in base member initializer list CN64System::CN64System(CPlugins * Plugins, bool SavesReadOnly) : -CSystemEvents(this, Plugins), -m_EndEmulation(false), -m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)), -m_Plugins(Plugins), -m_SyncCPU(NULL), -m_SyncPlugins(NULL), -m_MMU_VM(SavesReadOnly), -m_TLB(this), -m_Reg(this, this), -m_Recomp(NULL), -m_InReset(false), -m_NextTimer(0), -m_SystemTimer(m_NextTimer), -m_bCleanFrameBox(true), -m_bInitialized(false), -m_RspBroke(true), -m_DMAUsed(false), -m_TestTimer(false), -m_NextInstruction(0), -m_JumpToLocation(0), -m_TLBLoadAddress(0), -m_TLBStoreAddress(0), -m_SyncCount(0), -m_thread(NULL), -m_hPauseEvent(true), -m_CheatsSlectionChanged(false) + CSystemEvents(this, Plugins), + m_EndEmulation(false), + m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)), + m_Plugins(Plugins), + m_SyncCPU(NULL), + m_SyncPlugins(NULL), + m_MMU_VM(SavesReadOnly), + m_TLB(this), + m_Reg(this, this), + m_Recomp(NULL), + m_InReset(false), + m_NextTimer(0), + m_SystemTimer(m_NextTimer), + m_bCleanFrameBox(true), + m_bInitialized(false), + m_RspBroke(true), + m_DMAUsed(false), + m_TestTimer(false), + m_NextInstruction(0), + m_JumpToLocation(0), + m_TLBLoadAddress(0), + m_TLBStoreAddress(0), + m_SyncCount(0), + m_thread(NULL), + m_hPauseEvent(true), + m_CheatsSlectionChanged(false) { uint32_t gameHertz = g_Settings->LoadDword(Game_ScreenHertz); if (gameHertz == 0) @@ -92,7 +92,7 @@ CN64System::~CN64System() void CN64System::ExternalEvent(SystemEvent action) { - if (action == SysEvent_LoadMachineState && + if (action == SysEvent_LoadMachineState && !g_Settings->LoadBool(GameRunning_CPU_Running) && g_BaseSystem != NULL && g_BaseSystem->LoadState()) @@ -947,11 +947,8 @@ void CN64System::ExecuteCPU() switch ((CPU_TYPE)g_Settings->LoadDword(Game_CpuType)) { - // Currently the compiler is 32-bit only. We might have to ignore that RDB setting for now. -#ifdef _WIN32 case CPU_Recompiler: ExecuteRecompiler(); break; case CPU_SyncCores: ExecuteSyncCPU(); break; -#endif default: ExecuteInterpret(); break; } WriteTrace(TraceN64System, TraceDebug, "CPU finished executing"); @@ -1420,7 +1417,7 @@ bool CN64System::SaveState() WriteTrace(TraceN64System, TraceDebug, "Start"); // if (!m_SystemTimer.SaveAllowed()) { return false; } - if ((m_Reg.STATUS_REGISTER & STATUS_EXL) != 0) + if ((m_Reg.STATUS_REGISTER & STATUS_EXL) != 0) { WriteTrace(TraceN64System, TraceDebug, "Done - STATUS_EXL set, can not save"); return false; @@ -1566,7 +1563,7 @@ bool CN64System::SaveState() m_Reg.MI_INTR_REG = MiInterReg; g_Settings->SaveString(GameRunning_InstantSaveFile, ""); g_Settings->SaveDword(Game_LastSaveTime, (uint32_t)time(NULL)); - + g_Notify->DisplayMessage(5, stdstr_f("%s %s", g_Lang->GetString(MSG_SAVED_STATE).c_str(), stdstr(SaveFile.GetNameExtension()).c_str()).c_str()); WriteTrace(TraceN64System, TraceDebug, "Done"); return true; @@ -1682,7 +1679,7 @@ bool CN64System::LoadState(const char * FileName) uint8_t LoadHeader[64]; unzReadCurrentFile(file, LoadHeader, 0x40); if (memcmp(LoadHeader, g_Rom->GetRomAddress(), 0x40) != 0 && - !g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SAVE_STATE_HEADER).c_str())) + !g_Notify->AskYesNoQuestion(g_Lang->GetString(MSG_SAVE_STATE_HEADER).c_str())) { return false; } @@ -1744,7 +1741,7 @@ bool CN64System::LoadState(const char * FileName) } hSaveFile.Read(&SaveRDRAMSize, sizeof(SaveRDRAMSize)); - + //Check header uint8_t LoadHeader[64]; hSaveFile.Read(LoadHeader, 0x40); @@ -1781,7 +1778,7 @@ bool CN64System::LoadState(const char * FileName) hSaveFile.Read(m_MMU_VM.Dmem(), 0x1000); hSaveFile.Read(m_MMU_VM.Imem(), 0x1000); hSaveFile.Close(); - + CPath ExtraInfo(SaveFile); ExtraInfo.SetExtension(".dat"); CFile hExtraInfo(ExtraInfo, CFileBase::modeWrite | CFileBase::modeCreate); @@ -1838,8 +1835,8 @@ bool CN64System::LoadState(const char * FileName) WriteTrace(TraceN64System, TraceDebug, "9"); if (bLogX86Code()) { - Stop_x86_Log(); - Start_x86_Log(); + Start_Recompiler_Log(); + Stop_Recompiler_Log(); } WriteTrace(TraceN64System, TraceDebug, "Done"); diff --git a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp index 0e37f6f29..2df89d30b 100644 --- a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp +++ b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp @@ -11,7 +11,7 @@ #include "stdafx.h" #include #include -#include "x86CodeLog.h" +#include "RecompilerCodeLog.h" #include #include #include diff --git a/Source/Project64-core/N64System/Recompiler/CodeSection.cpp b/Source/Project64-core/N64System/Recompiler/CodeSection.cpp index f98aef1c2..71bef99f6 100644 --- a/Source/Project64-core/N64System/Recompiler/CodeSection.cpp +++ b/Source/Project64-core/N64System/Recompiler/CodeSection.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -2217,7 +2217,7 @@ bool CCodeSection::InheritParentInfo() bool CCodeSection::DisplaySectionInformation(uint32_t ID, uint32_t Test) { - if (!bX86Logging) + if (!g_bRecompilerLogging) { return false; } @@ -2243,9 +2243,12 @@ void CCodeSection::DisplaySectionInformation() CPU_Message("====== Section %d ======", m_SectionID); CPU_Message("Start PC: %X", m_EnterPC); - CPU_Message("End PC: %X", m_EndPC); + if (g_System->bLinkBlocks()) + { + CPU_Message("End PC: %X", m_EndPC); + } CPU_Message("CompiledLocation: %X", m_CompiledLocation); - if (!m_ParentSection.empty()) + if (g_System->bLinkBlocks() && !m_ParentSection.empty()) { stdstr ParentList; for (SECTION_LIST::iterator iter = m_ParentSection.begin(); iter != m_ParentSection.end(); iter++) @@ -2260,25 +2263,28 @@ void CCodeSection::DisplaySectionInformation() CPU_Message("Number of parents: %d (%s)", m_ParentSection.size(), ParentList.c_str()); } - CPU_Message("Jump Address: 0x%08X", m_Jump.JumpPC); - CPU_Message("Jump Target Address: 0x%08X", m_Jump.TargetPC); - if (m_JumpSection != NULL) + if (g_System->bLinkBlocks()) { - CPU_Message("Jump Section: %d", m_JumpSection->m_SectionID); + CPU_Message("Jump Address: 0x%08X", m_Jump.JumpPC); + CPU_Message("Jump Target Address: 0x%08X", m_Jump.TargetPC); + if (m_JumpSection != NULL) + { + CPU_Message("Jump Section: %d", m_JumpSection->m_SectionID); + } + else + { + CPU_Message("Jump Section: None"); + } + CPU_Message("Continue Address: 0x%08X", m_Cont.JumpPC); + CPU_Message("Continue Target Address: 0x%08X", m_Cont.TargetPC); + if (m_ContinueSection != NULL) { + CPU_Message("Continue Section: %d", m_ContinueSection->m_SectionID); + } + else + { + CPU_Message("Continue Section: None"); + } + CPU_Message("In Loop: %s", m_InLoop ? "Yes" : "No"); } - else - { - CPU_Message("Jump Section: None"); - } - CPU_Message("Continue Address: 0x%08X", m_Cont.JumpPC); - CPU_Message("Continue Target Address: 0x%08X", m_Cont.TargetPC); - if (m_ContinueSection != NULL) { - CPU_Message("Continue Section: %d", m_ContinueSection->m_SectionID); - } - else - { - CPU_Message("Continue Section: None"); - } - CPU_Message("In Loop: %s", m_InLoop ? "Yes" : "No"); CPU_Message("======================="); } \ No newline at end of file diff --git a/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp b/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp index 4b8b8b427..27088caa9 100644 --- a/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp +++ b/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/Source/Project64-core/N64System/Recompiler/RecompilerClass.cpp b/Source/Project64-core/N64System/Recompiler/RecompilerClass.cpp index 90e875868..9e3d276de 100644 --- a/Source/Project64-core/N64System/Recompiler/RecompilerClass.cpp +++ b/Source/Project64-core/N64System/Recompiler/RecompilerClass.cpp @@ -11,16 +11,16 @@ #include "stdafx.h" #include #include -#include +#include #include #include #include CRecompiler::CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation) : -m_Registers(Registers), -m_Profile(Profile), -m_EndEmulation(EndEmulation), -PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER) + m_Registers(Registers), + m_Profile(Profile), + m_EndEmulation(EndEmulation), + PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER) { if (g_MMU != NULL) { @@ -35,9 +35,11 @@ CRecompiler::~CRecompiler() void CRecompiler::Run() { + WriteTrace(TraceRecompiler, TraceDebug, "Start"); + if (bLogX86Code()) { - Start_x86_Log(); + Start_Recompiler_Log(); } if (!CRecompMemory::AllocateMemory()) @@ -98,10 +100,12 @@ void CRecompiler::Run() } } } - __except_catch() + __except_catch() { g_Notify->DisplayError(MSG_UNKNOWN_MEM_ACTION); } + + WriteTrace(TraceRecompiler, TraceDebug, "Done"); } void CRecompiler::RecompilerMain_VirtualTable() @@ -633,6 +637,7 @@ void CRecompiler::RecompilerMain_Lookup_validate() void CRecompiler::RecompilerMain_Lookup_validate_TLB() { + WriteTrace(TraceRecompiler, TraceDebug, "Start"); uint32_t PhysicalAddr; while (!m_EndEmulation) @@ -705,6 +710,7 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB() } } } + WriteTrace(TraceRecompiler, TraceDebug, "Done"); } void CRecompiler::Reset() @@ -943,13 +949,13 @@ CCompiledFunc * CRecompiler::CompilerCode() } CCompiledFunc * Func = new CCompiledFunc(CodeBlock); - std::pair ret = m_Functions.insert(CCompiledFuncList::value_type(Func->EnterPC(), Func)); + std::pair ret = m_Functions.insert(CCompiledFuncList::value_type(Func->EnterPC(), Func)); if (ret.second == false) { Func->SetNext(ret.first->second->Next()); ret.first->second->SetNext(Func); - return Func; } + WriteTrace(TraceRecompiler, TraceVerbose, "Done"); return Func; } @@ -999,39 +1005,39 @@ void CRecompiler::ClearRecompCode_Virt(uint32_t Address, int length, REMOVE_REAS switch (g_System->LookUpMode()) { case FuncFind_VirtualLookup: - { - uint32_t AddressIndex = Address >> 0xC; - uint32_t WriteStart = (Address & 0xFFC); - length = ((length + 3) & ~0x3); - - int DataInBlock = 0x1000 - WriteStart; - int DataToWrite = length < DataInBlock ? length : DataInBlock; - int DataLeft = length - DataToWrite; - - PCCompiledFunc_TABLE & table = FunctionTable()[AddressIndex]; - if (table) { - WriteTrace(TraceRecompiler, TraceError, "Delete Table (%X): Index = %d", table, AddressIndex); - delete table; - table = NULL; - g_MMU->UnProtectMemory(Address, Address + length); - } + uint32_t AddressIndex = Address >> 0xC; + uint32_t WriteStart = (Address & 0xFFC); + length = ((length + 3) & ~0x3); - if (DataLeft > 0) - { - g_Notify->BreakPoint(__FILE__, __LINE__); + int DataInBlock = 0x1000 - WriteStart; + int DataToWrite = length < DataInBlock ? length : DataInBlock; + int DataLeft = length - DataToWrite; + + PCCompiledFunc_TABLE & table = FunctionTable()[AddressIndex]; + if (table) + { + WriteTrace(TraceRecompiler, TraceError, "Delete Table (%X): Index = %d", table, AddressIndex); + delete table; + table = NULL; + g_MMU->UnProtectMemory(Address, Address + length); + } + + if (DataLeft > 0) + { + g_Notify->BreakPoint(__FILE__, __LINE__); + } } - } - break; + break; case FuncFind_PhysicalLookup: - { - uint32_t pAddr = 0; - if (g_TransVaddr->TranslateVaddr(Address, pAddr)) { - ClearRecompCode_Phys(pAddr, length, Reason); + uint32_t pAddr = 0; + if (g_TransVaddr->TranslateVaddr(Address, pAddr)) + { + ClearRecompCode_Phys(pAddr, length, Reason); + } } - } - break; + break; default: g_Notify->BreakPoint(__FILE__, __LINE__); } diff --git a/Source/Project64-core/N64System/Recompiler/x86CodeLog.cpp b/Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.cpp similarity index 85% rename from Source/Project64-core/N64System/Recompiler/x86CodeLog.cpp rename to Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.cpp index 22a2d82bc..c1e1ed088 100644 --- a/Source/Project64-core/N64System/Recompiler/x86CodeLog.cpp +++ b/Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.cpp @@ -9,14 +9,14 @@ * * ****************************************************************************/ #include "stdafx.h" -#include "x86CodeLog.h" +#include "RecompilerCodeLog.h" #include #include static CLog * g_CPULogFile = NULL; -bool bX86Logging = false; +bool g_bRecompilerLogging = false; -void x86_Log_Message(const char * strFormat, ...) +void Recompiler_Log_Message(const char * strFormat, ...) { va_list args; va_start(args, strFormat); @@ -32,12 +32,12 @@ void x86_Log_Message(const char * strFormat, ...) va_end(args); } -void Start_x86_Log (void) +void Start_Recompiler_Log (void) { CPath LogFileName(g_Settings->LoadStringVal(Directory_Log).c_str(), "CPUoutput.log"); if (g_CPULogFile != NULL) { - Stop_x86_Log(); + Stop_Recompiler_Log(); } g_CPULogFile = new CLog(); if (g_CPULogFile) @@ -45,7 +45,7 @@ void Start_x86_Log (void) if (g_CPULogFile->Open(LogFileName)) { g_CPULogFile->SetMaxFileSize(300 * CLog::MB); - bX86Logging = true; + g_bRecompilerLogging = true; } else { @@ -55,9 +55,9 @@ void Start_x86_Log (void) } } -void Stop_x86_Log (void) +void Stop_Recompiler_Log (void) { - bX86Logging = false; + g_bRecompilerLogging = false; if (g_CPULogFile != NULL) { delete g_CPULogFile; diff --git a/Source/Project64-core/N64System/Recompiler/x86CodeLog.h b/Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.h similarity index 75% rename from Source/Project64-core/N64System/Recompiler/x86CodeLog.h rename to Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.h index 60d8ddb22..2864786ef 100644 --- a/Source/Project64-core/N64System/Recompiler/x86CodeLog.h +++ b/Source/Project64-core/N64System/Recompiler/RecompilerCodeLog.h @@ -14,10 +14,10 @@ #include #include -#define CPU_Message(Message,... ) if (bX86Logging) { x86_Log_Message(Message,## __VA_ARGS__); } +#define CPU_Message(Message,... ) if (g_bRecompilerLogging) { Recompiler_Log_Message(Message,## __VA_ARGS__); } -void x86_Log_Message (const char * Message, ...); -void Start_x86_Log (void); -void Stop_x86_Log (void); +void Recompiler_Log_Message (const char * Message, ...); +void Start_Recompiler_Log (void); +void Stop_Recompiler_Log (void); -extern bool bX86Logging; +extern bool g_bRecompilerLogging; diff --git a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp index d697e157d..733c50ba9 100644 --- a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "x86CodeLog.h" +#include "RecompilerCodeLog.h" CCodeSection * CRecompilerOps::m_Section = NULL; CRegInfo CRecompilerOps::m_RegWorkingSet; diff --git a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp index 48de8f15e..78cf11f37 100644 --- a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp +++ b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp @@ -17,7 +17,7 @@ #include #include #include -#include "x86CodeLog.h" +#include "RecompilerCodeLog.h" uint32_t CRegInfo::m_fpuControl = 0; diff --git a/Source/Project64-core/N64System/Recompiler/X86ops.cpp b/Source/Project64-core/N64System/Recompiler/X86ops.cpp index 38b64ab20..a26672c28 100644 --- a/Source/Project64-core/N64System/Recompiler/X86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/X86ops.cpp @@ -12,7 +12,7 @@ #include #include #include -#include "x86CodeLog.h" +#include "RecompilerCodeLog.h" #define PUTDST8(dest,value) (*((uint8_t *)(dest))=(uint8_t)(value)); dest += 1; #define PUTDST16(dest,value) (*((uint16_t *)(dest))=(uint16_t)(value)); dest += 2; diff --git a/Source/Project64-core/Project64-core.vcproj b/Source/Project64-core/Project64-core.vcproj index 942b63ab5..94667c7d1 100644 --- a/Source/Project64-core/Project64-core.vcproj +++ b/Source/Project64-core/Project64-core.vcproj @@ -460,6 +460,10 @@ RelativePath=".\N64System\Recompiler\RecompilerClass.cpp" > + + @@ -476,10 +480,6 @@ RelativePath=".\N64System\Recompiler\SectionInfo.cpp" > - - diff --git a/Source/Project64-core/Project64-core.vcxproj b/Source/Project64-core/Project64-core.vcxproj index a05495dcd..c07b8ec96 100644 --- a/Source/Project64-core/Project64-core.vcxproj +++ b/Source/Project64-core/Project64-core.vcxproj @@ -72,11 +72,11 @@ + - @@ -166,11 +166,11 @@ + - diff --git a/Source/Project64-core/Project64-core.vcxproj.filters b/Source/Project64-core/Project64-core.vcxproj.filters index f326393f7..eb2719797 100644 --- a/Source/Project64-core/Project64-core.vcxproj.filters +++ b/Source/Project64-core/Project64-core.vcxproj.filters @@ -150,9 +150,6 @@ Source Files\3rd Party - - Source Files\N64 System\Recompiler - Source Files\N64 System\Recompiler @@ -318,6 +315,9 @@ Source Files\Rom List + + Source Files\N64 System\Recompiler + @@ -518,9 +518,6 @@ Header Files\N64 System\Recompiler - - Header Files\N64 System\Recompiler - Header Files\N64 System\Recompiler @@ -611,5 +608,8 @@ Source Files\N64 System\Arm + + Header Files\N64 System\Recompiler + \ No newline at end of file diff --git a/Source/Project64-core/Settings/SettingsClass.cpp b/Source/Project64-core/Settings/SettingsClass.cpp index a00eefe45..e06c8a911 100644 --- a/Source/Project64-core/Settings/SettingsClass.cpp +++ b/Source/Project64-core/Settings/SettingsClass.cpp @@ -128,14 +128,10 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Rdb_GoodName, new CSettingTypeRomDatabase("Good Name", Game_GameName)); AddHandler(Rdb_SaveChip, new CSettingTypeRDBSaveChip("Save Type", SaveChip_Auto)); -#ifdef _WIN32 #ifdef _DEBUG AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_SyncCores)); #else AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_Recompiler)); -#endif -#else - AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_Interpreter)); #endif AddHandler(Rdb_RDRamSize, new CSettingTypeRDBRDRamSize("RDRAM Size", 0x400000)); AddHandler(Rdb_CounterFactor, new CSettingTypeRomDatabase("Counter Factor", 2));