[Project64] Fix up some changes to debugger commit
This commit is contained in:
parent
a91d336846
commit
a61a466776
|
@ -23,8 +23,8 @@ static bool TranslateFromMemProtect(MEM_PROTECTION memProtection, int & OsMemPro
|
||||||
{
|
{
|
||||||
case MEM_NOACCESS: OsMemProtection = PROT_NONE; break;
|
case MEM_NOACCESS: OsMemProtection = PROT_NONE; break;
|
||||||
case MEM_READONLY: OsMemProtection = PROT_READ; break;
|
case MEM_READONLY: OsMemProtection = PROT_READ; break;
|
||||||
case MEM_READWRITE: OsMemProtection = PROT_READ|PROT_WRITE; break;
|
case MEM_READWRITE: OsMemProtection = PROT_READ | PROT_WRITE; break;
|
||||||
case MEM_EXECUTE_READWRITE: OsMemProtection = PROT_READ|PROT_WRITE|PROT_EXEC; break;
|
case MEM_EXECUTE_READWRITE: OsMemProtection = PROT_READ | PROT_WRITE | PROT_EXEC; break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -48,12 +48,12 @@ static bool TranslateToMemProtect(int OsMemProtection, MEM_PROTECTION & memProte
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void* AllocateAddressSpace(size_t size, LPVOID lpAddress)
|
void* AllocateAddressSpace(size_t size)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return VirtualAlloc(lpAddress, size, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS);
|
return VirtualAlloc(NULL, size, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS);
|
||||||
#else
|
#else
|
||||||
void * ptr = mmap((void*)0, size, PROT_NONE, MAP_PRIVATE|MAP_ANON, -1, 0);
|
void * ptr = mmap((void*)0, size, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||||
if (ptr == MAP_FAILED)
|
if (ptr == MAP_FAILED)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
enum MEM_PROTECTION
|
enum MEM_PROTECTION
|
||||||
{
|
{
|
||||||
MEM_NOACCESS,
|
MEM_NOACCESS,
|
||||||
MEM_READONLY,
|
MEM_READONLY,
|
||||||
MEM_READWRITE,
|
MEM_READWRITE,
|
||||||
MEM_EXECUTE_READWRITE,
|
MEM_EXECUTE_READWRITE,
|
||||||
};
|
};
|
||||||
|
|
||||||
void* AllocateAddressSpace(size_t size, LPVOID lpAddress = NULL);
|
void* AllocateAddressSpace(size_t size);
|
||||||
bool FreeAddressSpace(void* addr, size_t size);
|
bool FreeAddressSpace(void* addr, size_t size);
|
||||||
void* CommitMemory(void* addr, size_t size, MEM_PROTECTION memProtection);
|
void* CommitMemory(void* addr, size_t size, MEM_PROTECTION memProtection);
|
||||||
bool DecommitMemory(void* addr, size_t size);
|
bool DecommitMemory(void* addr, size_t size);
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "InterpreterCPU.h"
|
#include "InterpreterCPU.h"
|
||||||
#include "Debugger.h"
|
|
||||||
|
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
#include <Project64-core/N64System/N64Class.h>
|
#include <Project64-core/N64System/N64Class.h>
|
||||||
|
@ -21,6 +20,7 @@
|
||||||
#include <Project64-core/Plugins/PluginClass.h>
|
#include <Project64-core/Plugins/PluginClass.h>
|
||||||
#include <Project64-core/Plugins/GFXPlugin.h>
|
#include <Project64-core/Plugins/GFXPlugin.h>
|
||||||
#include <Project64-core/ExceptionHandler.h>
|
#include <Project64-core/ExceptionHandler.h>
|
||||||
|
#include <Project64-core/Debugger.h>
|
||||||
|
|
||||||
R4300iOp::Func * CInterpreterCPU::m_R4300i_Opcode = NULL;
|
R4300iOp::Func * CInterpreterCPU::m_R4300i_Opcode = NULL;
|
||||||
|
|
||||||
|
@ -298,14 +298,14 @@ void CInterpreterCPU::ExecuteCPU()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_Debugger->CPUStepStarted())
|
if (!g_Debugger->CPUStepStarted())
|
||||||
{
|
{
|
||||||
// Skip command if instructed by the debugger
|
// Skip command if instructed by the debugger
|
||||||
PROGRAM_COUNTER += 4;
|
PROGRAM_COUNTER += 4;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Debugger->CPUStep();
|
g_Debugger->CPUStep();
|
||||||
|
|
||||||
/* if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER < 0x80380000)
|
/* if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER < 0x80380000)
|
||||||
{
|
{
|
||||||
|
@ -314,10 +314,9 @@ void CInterpreterCPU::ExecuteCPU()
|
||||||
// WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
// WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
||||||
m_R4300i_Opcode[Opcode.op]();
|
m_R4300i_Opcode[Opcode.op]();
|
||||||
NextTimer -= CountPerOp;
|
NextTimer -= CountPerOp;
|
||||||
|
|
||||||
PROGRAM_COUNTER += 4;
|
PROGRAM_COUNTER += 4;
|
||||||
switch (R4300iOp::m_NextInstruction)
|
switch (R4300iOp::m_NextInstruction)
|
||||||
{
|
{
|
||||||
|
@ -368,8 +367,6 @@ void CInterpreterCPU::ExecuteCPU()
|
||||||
WriteTrace(TraceN64System, TraceDebug, "Done");
|
WriteTrace(TraceN64System, TraceDebug, "Done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CInterpreterCPU::ExecuteOps(int32_t Cycles)
|
void CInterpreterCPU::ExecuteOps(int32_t Cycles)
|
||||||
{
|
{
|
||||||
bool & Done = g_System->m_EndEmulation;
|
bool & Done = g_System->m_EndEmulation;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -49,9 +49,6 @@ extern "C" {
|
||||||
//#define CATCH_EXCEPTIONS // catch exceptions so it doesn't freeze and will report
|
//#define CATCH_EXCEPTIONS // catch exceptions so it doesn't freeze and will report
|
||||||
// "The gfx plugin has caused an exception" instead.
|
// "The gfx plugin has caused an exception" instead.
|
||||||
|
|
||||||
//#define SHOW_FULL_TEXVIEWER // shows the entire contents of the texture in the cache viewer,
|
|
||||||
// usually used to debug clamping issues.
|
|
||||||
|
|
||||||
// Usually enabled
|
// Usually enabled
|
||||||
#define LARGE_TEXTURE_HANDLING // allow large-textured objects to be split?
|
#define LARGE_TEXTURE_HANDLING // allow large-textured objects to be split?
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../Project64-core/Version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1800,13 +1801,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Project64"
|
VALUE "FileDescription", VER_FILE_DESCRIPTION_STR "\0"
|
||||||
VALUE "FileVersion", "2.3.0.9999"
|
VALUE "FileVersion", VER_FILE_VERSION_STR "\0"
|
||||||
VALUE "InternalName", "Project64"
|
VALUE "InternalName", VER_INTERNAL_NAME_STR "\0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2013"
|
VALUE "LegalCopyright", VER_COPYRIGHT_STR "\0"
|
||||||
VALUE "OriginalFilename", "Project64.exe"
|
VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR "\0"
|
||||||
VALUE "ProductName", "Project64"
|
VALUE "ProductName", VER_PRODUCTNAME_STR
|
||||||
VALUE "ProductVersion", "2.3.0.9999"
|
VALUE "ProductVersion", VER_PRODUCT_VERSION_STR "\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -6,4 +6,5 @@ Android Release 9:
|
||||||
Windows 2.4
|
Windows 2.4
|
||||||
- Build with v2015
|
- Build with v2015
|
||||||
- fixed fpu issue - Indiana Jones (#76)
|
- fixed fpu issue - Indiana Jones (#76)
|
||||||
- Fix bug in key assignment (#1309)
|
- Fix bug in key assignment (#1309)
|
||||||
|
- Add Shygoo's debugger code
|
Loading…
Reference in New Issue