[Project64] Rename x86CodeLog.cpp to RecompilerCodeLog.cpp
This commit is contained in:
parent
562f791f37
commit
11be52a917
|
@ -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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/N64RomClass.h>
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
|
||||
#include <Project64-core/N64System/Mips/OpcodeName.h>
|
||||
#include <Project64-core/N64System/Mips/Disk.h>
|
||||
#include <Project64-core/ExceptionHandler.h>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "N64Class.h"
|
||||
#include <Project64-core/3rdParty/zip.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/Mempak.H>
|
||||
#include <Project64-core/N64System/Mips/Transferpak.h>
|
||||
|
@ -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");
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
#include <string.h>
|
||||
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
|
||||
#include "x86CodeLog.h"
|
||||
#include "RecompilerCodeLog.h"
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/TranslateVaddr.h>
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <Project64-core/N64System/Mips/OpCode.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
#include <Project64-core/N64System/Interpreter/InterpreterCPU.h>
|
||||
|
@ -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("=======================");
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <Project64-core/N64System/N64Types.h>
|
||||
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||
#include <Project64-core/N64System/Mips/OpcodeName.h>
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerClass.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
#include <Project64-core/N64System/Interpreter/InterpreterCPU.h>
|
||||
#include <Project64-core/ExceptionHandler.h>
|
||||
|
||||
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<CCompiledFuncList::iterator, bool> ret = m_Functions.insert(CCompiledFuncList::value_type(Func->EnterPC(), Func));
|
||||
std::pair<CCompiledFuncList::iterator, bool> 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__);
|
||||
}
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "x86CodeLog.h"
|
||||
#include "RecompilerCodeLog.h"
|
||||
#include <Common/path.h>
|
||||
#include <Common/Platform.h>
|
||||
|
||||
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;
|
|
@ -14,10 +14,10 @@
|
|||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#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;
|
|
@ -19,7 +19,7 @@
|
|||
#include <Project64-core/N64System/Recompiler/RecompilerOps.h>
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
#include <stdio.h>
|
||||
#include "x86CodeLog.h"
|
||||
#include "RecompilerCodeLog.h"
|
||||
|
||||
CCodeSection * CRecompilerOps::m_Section = NULL;
|
||||
CRegInfo CRecompilerOps::m_RegWorkingSet;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include "x86CodeLog.h"
|
||||
#include "RecompilerCodeLog.h"
|
||||
|
||||
uint32_t CRegInfo::m_fpuControl = 0;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||
#include <Project64-core/N64System/Recompiler/X86ops.h>
|
||||
#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;
|
||||
|
|
|
@ -460,6 +460,10 @@
|
|||
RelativePath=".\N64System\Recompiler\RecompilerClass.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\Recompiler\RecompilerCodeLog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\Recompiler\RecompilerMemory.cpp"
|
||||
>
|
||||
|
@ -476,10 +480,6 @@
|
|||
RelativePath=".\N64System\Recompiler\SectionInfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\Recompiler\x86CodeLog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\Recompiler\X86ops.cpp"
|
||||
>
|
||||
|
|
|
@ -72,11 +72,11 @@
|
|||
<ClCompile Include="N64System\Recompiler\FunctionMapClass.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\LoopAnalysis.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerClass.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerCodeLog.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerMemory.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerOps.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\RegInfo.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\SectionInfo.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\X86ops.cpp" />
|
||||
<ClCompile Include="N64System\SpeedLimiterClass.cpp" />
|
||||
<ClCompile Include="N64System\SystemGlobals.cpp" />
|
||||
|
@ -166,11 +166,11 @@
|
|||
<ClInclude Include="N64System\Recompiler\JumpInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\LoopAnalysis.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RecompilerClass.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RecompilerCodeLog.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RecompilerMemory.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RecompilerOps.h" />
|
||||
<ClInclude Include="N64System\Recompiler\RegInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\SectionInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86CodeLog.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86ops.h" />
|
||||
<ClInclude Include="N64System\SpeedLimiterClass.h" />
|
||||
<ClInclude Include="N64System\SystemGlobals.h" />
|
||||
|
|
|
@ -150,9 +150,6 @@
|
|||
<ClCompile Include="3rdParty\7zip.cpp">
|
||||
<Filter>Source Files\3rd Party</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\X86ops.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler</Filter>
|
||||
</ClCompile>
|
||||
|
@ -318,6 +315,9 @@
|
|||
<ClCompile Include="RomList\RomList.cpp">
|
||||
<Filter>Source Files\Rom List</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\Recompiler\RecompilerCodeLog.cpp">
|
||||
<Filter>Source Files\N64 System\Recompiler</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
|
@ -518,9 +518,6 @@
|
|||
<ClInclude Include="N64System\Recompiler\SectionInfo.h">
|
||||
<Filter>Header Files\N64 System\Recompiler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\X86CodeLog.h">
|
||||
<Filter>Header Files\N64 System\Recompiler</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\X86ops.h">
|
||||
<Filter>Header Files\N64 System\Recompiler</Filter>
|
||||
</ClInclude>
|
||||
|
@ -611,5 +608,8 @@
|
|||
<ClInclude Include="N64System\Arm\ArmOpCode.h">
|
||||
<Filter>Source Files\N64 System\Arm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\Recompiler\RecompilerCodeLog.h">
|
||||
<Filter>Header Files\N64 System\Recompiler</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue