Merge branch 'master' into armjit-fpu

This commit is contained in:
Henrik Rydgard committed 2013-02-11 19:22:14 +01:00
commit 4eb89e6aec
68 files changed
+5521 -857

No files matched your search

+7
View File
@@ -15,12 +15,19 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include <algorithm>
#include "Hash.h"
#if _M_SSE >= 0x402
#include "CPUDetect.h"
#include <nmmintrin.h>
#endif
#ifdef _WIN32
// Windows defines min/max which conflict with std::min/std::max.
#undef min
#undef max
#endif
static u64 (*ptrHashFunction)(const u8 *src, int len, u32 samples) = &GetMurmurHash3;
// uint32_t
+6
View File
@@ -67,6 +67,11 @@ void CConfig::Load(const char *iniFileName)
graphics->Get("LinearFiltering", &bLinearFiltering, false);
graphics->Get("SSAA", &SSAntiAliasing, 0);
graphics->Get("VBO", &bUseVBO, false);
#ifdef USING_GLES2
graphics->Get("AnisotropyLevel", &iAnisotropyLevel, 0);
#else
graphics->Get("AnisotropyLevel", &iAnisotropyLevel, 8);
#endif
graphics->Get("DisableG3DLog", &bDisableG3DLog, false);
graphics->Get("VertexCache", &bVertexCache, true);
graphics->Get("FullScreen", &bFullScreen, false);
@@ -123,6 +128,7 @@ void CConfig::Save()
graphics->Set("LinearFiltering", bLinearFiltering);
graphics->Set("SSAA", SSAntiAliasing);
graphics->Set("VBO", bUseVBO);
graphics->Set("AnisotropyLevel", iAnisotropyLevel);
graphics->Set("DisableG3DLog", bDisableG3DLog);
graphics->Set("VertexCache", bVertexCache);
graphics->Set("FullScreen", bFullScreen);
+1
View File
@@ -62,6 +62,7 @@ public:
bool bDisableG3DLog;
bool bVertexCache;
bool bFullScreen;
int iAnisotropyLevel;
// Sound
bool bEnableSound;
+9 -1
View File
@@ -99,7 +99,15 @@ reswitch:
// We should never get here on Android.
case CORE_STEPPING:
//1: wait for step command..
#if defined(USING_QT_UI) || defined(_DEBUG)
host->SendCoreWait(true);
#endif
m_hStepEvent.wait(m_hStepMutex);
#if defined(USING_QT_UI) || defined(_DEBUG)
host->SendCoreWait(false);
#endif
if (coreState == CORE_POWERDOWN)
return;
if (coreState != CORE_STEPPING)
@@ -112,7 +120,7 @@ reswitch:
currentCPU = &mipsr4k;
Core_SingleStep();
//4: update disasm dialog
#ifdef _DEBUG
#if defined(USING_QT_UI) || defined(_DEBUG)
host->UpdateDisassembly();
host->UpdateMemView();
#endif
+10 -1
View File
@@ -21,6 +21,7 @@
#include "MsgHandler.h"
#include "StdMutex.h"
#include "Atomic.h"
#include "CoreTiming.h"
#include "Core.h"
#include "HLE/sceKernelThread.h"
@@ -66,6 +67,8 @@ Event *tsLast;
Event *eventPool = 0;
Event *eventTsPool = 0;
int allocatedTsEvents = 0;
// Optimization to skip MoveEvents when possible.
volatile u32 hasTsEvents = false;
// Downcount has been moved to currentMIPS, to save a couple of clocks in every ARM JIT block
// as we can already reach that structure through a register.
@@ -159,6 +162,7 @@ void Init()
slicelength = INITIAL_SLICE_LENGTH;
globalTimer = 0;
idledCycles = 0;
hasTsEvents = 0;
}
void Shutdown()
@@ -209,6 +213,8 @@ void ScheduleEvent_Threadsafe(s64 cyclesIntoFuture, int event_type, u64 userdata
if(tsLast)
tsLast->next = ne;
tsLast = ne;
Common::AtomicStoreRelease(hasTsEvents, 1);
}
// Same as ScheduleEvent_Threadsafe(0, ...) EXCEPT if we are already on the CPU thread
@@ -416,7 +422,8 @@ void RemoveAllEvents(int event_type)
//This raise only the events required while the fifo is processing data
void ProcessFifoWaitEvents()
{
MoveEvents();
if (Common::AtomicLoadAcquire(hasTsEvents))
MoveEvents();
if (!first)
return;
@@ -441,6 +448,8 @@ void ProcessFifoWaitEvents()
void MoveEvents()
{
Common::AtomicStoreRelease(hasTsEvents, 0);
std::lock_guard<std::recursive_mutex> lk(externalEventSection);
// Move events from async queue into main queue
while (tsFirst)
+10
View File
@@ -143,3 +143,13 @@ void CBreakPoints::InvalidateJit()
if (MIPSComp::jit && coreState == CORE_STEPPING)
MIPSComp::jit->ClearCache();
}
int CBreakPoints::GetNumBreakpoints()
{
return m_iBreakPoints.size();
}
int CBreakPoints::GetBreakpointAddress(int i)
{
return m_iBreakPoints[i].iAddress;
}
+3
View File
@@ -83,6 +83,9 @@ public:
static void InvalidateJit(u32 _iAddress);
static void InvalidateJit();
static int GetNumBreakpoints();
static int GetBreakpointAddress(int i);
};
+5
View File
@@ -334,6 +334,11 @@ int SymbolMap::GetNumSymbols()
{
return (int)entries.size();
}
SymbolType SymbolMap::GetSymbolType(int i)
{
return entries[i].type;
}
char *SymbolMap::GetSymbolName(int i)
{
return entries[i].name;
+1 -1
View File
@@ -52,6 +52,7 @@ public:
void SetSymbolName(int i, const char *newname);
u32 GetSymbolSize(int i);
u32 GetSymbolAddr(int i);
SymbolType GetSymbolType(int i);
int FindSymbol(const char *name);
u32 GetAddress(int num);
void IncreaseRunCount(int num);
@@ -61,7 +62,6 @@ public:
void UseFuncSignaturesFile(const char *filename, u32 maxAddress);
void CompileFuncSignaturesFile(const char *filename);
private:
struct MapEntry
{
+60 -9
View File
@@ -47,6 +47,12 @@
// Internal drawing library
#include "../Util/PPGeDraw.h"
#ifdef _WIN32
// Windows defines min/max which conflict with std::min/std::max.
#undef min
#undef max
#endif
struct FrameBufferState {
u32 topaddr;
PspDisplayPixelFormat pspFramebufFormat;
@@ -55,7 +61,8 @@ struct FrameBufferState {
struct WaitVBlankInfo
{
WaitVBlankInfo(u32 tid) : threadID(tid), vcountUnblock(0) {}
WaitVBlankInfo(u32 tid) : threadID(tid), vcountUnblock(1) {}
WaitVBlankInfo(u32 tid, int vcount) : threadID(tid), vcountUnblock(vcount) {}
u32 threadID;
int vcountUnblock; // what was this for again?
@@ -173,6 +180,28 @@ void __DisplayFireVblank() {
}
}
float calculateFPS()
{
static double highestFps = 0.0;
static int lastFpsFrame = 0;
static double lastFpsTime = 0.0;
static double fps = 0.0;
time_update();
double now = time_now_d();
if (now >= lastFpsTime + 1.0)
{
fps = (gpuStats.numFrames - lastFpsFrame) / (now - lastFpsTime);
if (fps > highestFps)
highestFps = fps;
lastFpsFrame = gpuStats.numFrames;
lastFpsTime = now;
}
return fps;
}
void hleEnterVblank(u64 userdata, int cyclesLate) {
int vbCount = userdata;
@@ -185,9 +214,11 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
// Wake up threads waiting for VBlank
for (size_t i = 0; i < vblankWaitingThreads.size(); i++) {
__KernelResumeThreadFromWait(vblankWaitingThreads[i].threadID, 0);
if (--vblankWaitingThreads[i].vcountUnblock == 0) {
__KernelResumeThreadFromWait(vblankWaitingThreads[i].threadID, 0);
vblankWaitingThreads.erase(vblankWaitingThreads.begin() + i--);
}
}
vblankWaitingThreads.clear();
// Trigger VBlank interrupt handlers.
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR, PSP_INTR_SUB_ALL);
@@ -209,7 +240,9 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
if (g_Config.bShowDebugStats && gpuStats.numDrawCalls) {
gpu->UpdateStats();
char stats[2048];
sprintf(stats,
"FPS: %0.1f\n"
"Frames: %i\n"
"DL processing time: %0.2f ms\n"
"Kernel processing time: %0.2f ms\n"
@@ -227,6 +260,7 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
"Vertex shaders loaded: %i\n"
"Fragment shaders loaded: %i\n"
"Combined shaders loaded: %i\n",
calculateFPS(),
gpuStats.numFrames,
gpuStats.msProcessingDisplayLists * 1000.0f,
kernelStats.msInSyscalls * 1000.0f,
@@ -262,6 +296,20 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
kernelStats.ResetFrame();
}
if (g_Config.bShowFPSCounter) {
char stats[50];
sprintf(stats, "FPS: %0.1f", calculateFPS());
float zoom = 0.3f; /// g_Config.iWindowZoom;
float soff = 0.3f;
PPGeBegin();
PPGeDrawText(stats, soff, soff, 0, zoom, 0xCC000000);
PPGeDrawText(stats, -soff, -soff, 0, zoom, 0xCC000000);
PPGeDrawText(stats, 0, 0, 0, zoom, 0xFFFFFFFF);
PPGeEnd();
}
// Yeah, this has to be the right moment to end the frame. Give the graphics backend opportunity
// to blit the framebuffer, in order to support half-framerate games that otherwise wouldn't have
// anything to draw here.
@@ -403,9 +451,9 @@ u32 sceDisplayWaitVblank() {
}
}
u32 sceDisplayWaitVblankStartMulti() {
u32 sceDisplayWaitVblankStartMulti(int vblanks) {
DEBUG_LOG(HLE,"sceDisplayWaitVblankStartMulti()");
vblankWaitingThreads.push_back(WaitVBlankInfo(__KernelGetCurThread()));
vblankWaitingThreads.push_back(WaitVBlankInfo(__KernelGetCurThread(), vblanks));
__KernelWaitCurThread(WAITTYPE_VBLANK, 0, 0, 0, false, "vblank start multi waited");
return 0;
}
@@ -429,9 +477,9 @@ u32 sceDisplayWaitVblankStartCB() {
return 0;
}
u32 sceDisplayWaitVblankStartMultiCB() {
u32 sceDisplayWaitVblankStartMultiCB(int vblanks) {
DEBUG_LOG(HLE,"sceDisplayWaitVblankStartMultiCB()");
vblankWaitingThreads.push_back(WaitVBlankInfo(__KernelGetCurThread()));
vblankWaitingThreads.push_back(WaitVBlankInfo(__KernelGetCurThread(), vblanks));
__KernelWaitCurThread(WAITTYPE_VBLANK, 0, 0, 0, true, "vblank start multi waited");
return 0;
}
@@ -472,20 +520,23 @@ const HLEFunction sceDisplay[] = {
{0xEEDA2E54,WrapU_UUUI<sceDisplayGetFramebuf>,"sceDisplayGetFrameBuf"},
{0x36CDFADE,WrapU_V<sceDisplayWaitVblank>, "sceDisplayWaitVblank"},
{0x984C27E7,WrapU_V<sceDisplayWaitVblankStart>, "sceDisplayWaitVblankStart"},
{0x40f1469c,WrapU_V<sceDisplayWaitVblankStartMulti>, "sceDisplayWaitVblankStartMulti"},
{0x40f1469c,WrapU_I<sceDisplayWaitVblankStartMulti>, "sceDisplayWaitVblankStartMulti"},
{0x8EB9EC49,WrapU_V<sceDisplayWaitVblankCB>, "sceDisplayWaitVblankCB"},
{0x46F186C3,WrapU_V<sceDisplayWaitVblankStartCB>, "sceDisplayWaitVblankStartCB"},
{0x77ed8b3a,WrapU_V<sceDisplayWaitVblankStartMultiCB>,"sceDisplayWaitVblankStartMultiCB"},
{0x77ed8b3a,WrapU_I<sceDisplayWaitVblankStartMultiCB>,"sceDisplayWaitVblankStartMultiCB"},
{0xdba6c4c4,WrapF_V<sceDisplayGetFramePerSec>,"sceDisplayGetFramePerSec"},
{0x773dd3a3,sceDisplayGetCurrentHcount,"sceDisplayGetCurrentHcount"},
{0x210eab3a,sceDisplayGetAccumulatedHcount,"sceDisplayGetAccumulatedHcount"},
{0xA83EF139,0,"sceDisplayAdjustAccumulatedHcount"},
{0x9C6EAAD7,WrapU_V<sceDisplayGetVcount>,"sceDisplayGetVcount"},
{0xDEA197D4,0,"sceDisplayGetMode"},
{0x7ED59BC4,0,"sceDisplaySetHoldMode"},
{0xA544C486,0,"sceDisplaySetResumeMode"},
{0xBF79F646,0,"sceDisplayGetResumeMode"},
{0xB4F378FA,0,"sceDisplayIsForeground"},
{0x31C4BAA8,0,"sceDisplayGetBrightness"},
{0x4D4E10EC,sceDisplayIsVblank,"sceDisplayIsVblank"},
{0x21038913,0,"sceDisplayIsVsync"},
};
void Register_sceDisplay() {
+11
View File
@@ -891,9 +891,20 @@ u32 sceIoOpenAsync(const char *filename, int flags, int mode)
{
DEBUG_LOG(HLE, "sceIoOpenAsync() sorta implemented");
u32 fd = sceIoOpen(filename, flags, mode);
// TODO: This can't actually have a callback yet, but if it's set before waiting, it should be called.
__IoCompleteAsyncIO(fd);
// We have to return an fd here, which may have been destroyed when we reach Wait if it failed.
if (fd == ERROR_ERRNO_FILE_NOT_FOUND)
{
FileNode *f = new FileNode();
fd = kernelObjects.Create(f);
f->handle = 0;
f->fullpath = filename;
f->asyncResult = ERROR_ERRNO_FILE_NOT_FOUND;
}
return fd;
}
+109 -8
View File
@@ -430,6 +430,68 @@ public:
u32 stackBlock;
};
// std::vector<SceUID> with push_front(), remove(), etc.
struct ThreadList
{
std::vector<SceUID> list;
inline bool empty() const
{
return list.empty();
}
inline size_t size() const
{
return list.size();
}
inline SceUID &front()
{
return list.front();
}
inline void push_front(const SceUID threadID)
{
if (empty())
push_back(threadID);
else
{
size_t oldSize = list.size();
list.resize(oldSize + 1);
memmove(&list[1], &list[0], oldSize * sizeof(SceUID));
list[0] = threadID;
}
}
inline void push_back(const SceUID threadID)
{
list.push_back(threadID);
}
inline void pop_front()
{
size_t newSize = list.size() - 1;
list.resize(newSize);
if (newSize > 0)
memmove(&list[0], &list[1], newSize * sizeof(SceUID));
}
inline void pop_back()
{
list.pop_back();
}
inline void remove(const SceUID threadID)
{
list.erase(std::remove(list.begin(), list.end(), threadID), list.end());
}
void DoState(PointerWrap &p)
{
p.Do(list);
}
};
void __KernelExecuteMipsCallOnCurrentThread(int callId, bool reschedAfter);
@@ -446,7 +508,7 @@ int g_inCbCount = 0;
// Normally, the same as currentThread. In an interrupt, remembers the callback's thread id.
SceUID currentCallbackThreadID = 0;
int readyCallbacksCount = 0;
SceUID currentThread = 0;
SceUID currentThread;
u32 idleThreadHackAddr;
u32 threadReturnHackAddr;
u32 cbReturnHackAddr;
@@ -456,7 +518,6 @@ std::vector<ThreadCallback> threadEndListeners;
// Lists all thread ids that aren't deleted/etc.
std::vector<SceUID> threadqueue;
typedef std::list<SceUID> ThreadList;
// Lists only ready thread ids.
std::map<u32, ThreadList> threadReadyQueue;
@@ -556,6 +617,7 @@ void __KernelThreadingInit()
dispatchEnabled = true;
currentThread = 0;
g_inCbCount = 0;
currentCallbackThreadID = 0;
readyCallbacksCount = 0;
@@ -1078,7 +1140,9 @@ void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 time
void hleScheduledWakeup(u64 userdata, int cyclesLate)
{
SceUID threadID = (SceUID)userdata;
__KernelTriggerWait(WAITTYPE_DELAY, threadID, "thread delay finished", true);
u32 error;
if (__KernelGetWaitID(threadID, WAITTYPE_DELAY, error) == threadID)
__KernelResumeThreadFromWait(threadID);
}
void __KernelScheduleWakeup(SceUID threadID, s64 usFromNow)
@@ -1156,6 +1220,11 @@ u32 __KernelDeleteThread(SceUID threadID, int exitStatus, const char *reason, bo
}
Thread *__KernelNextThread() {
// If the current thread is running, it's a valid candidate.
Thread *cur = __GetCurrentThread();
if (cur && cur->isRunning())
__KernelChangeReadyState(cur, currentThread, true);
SceUID bestThread = -1;
// This goes in priority order.
for (auto it = threadReadyQueue.begin(), end = threadReadyQueue.end(); it != end; ++it)
@@ -1198,10 +1267,6 @@ void __KernelReSchedule(const char *reason)
return;
}
// TODO: Not sure if this is correct? Probably should remove.
if (__GetCurrentThread() && __GetCurrentThread()->isRunning())
__KernelChangeReadyState(currentThread, true);
retry:
Thread *nextThread = __KernelNextThread();
@@ -1769,7 +1834,7 @@ void sceKernelChangeThreadPriority()
DEBUG_LOG(HLE,"sceKernelChangeThreadPriority(%i, %i)", id, PARAM(1));
int prio = thread->nt.currentPriority;
threadReadyQueue[prio].erase(std::remove(threadReadyQueue[prio].begin(), threadReadyQueue[prio].end(), id), threadReadyQueue[prio].end());
threadReadyQueue[prio].remove(id);
thread->nt.currentPriority = PARAM(1);
@@ -2288,6 +2353,7 @@ void __KernelSwitchContext(Thread *target, const char *reason)
if (DEBUG_LEVEL <= MAX_LOGLEVEL)
oldName = cur->GetName();
// Normally this is taken care of in __KernelNextThread().
if (cur->isRunning())
__KernelChangeReadyState(cur, oldUID, true);
}
@@ -2722,3 +2788,38 @@ u32 __KernelNotifyCallbackType(RegisteredCallbackType type, SceUID cbId, int not
return 0;
}
std::vector<DebugThreadInfo> GetThreadsInfo()
{
std::vector<DebugThreadInfo> threadList;
u32 error;
for (std::vector<SceUID>::iterator iter = threadqueue.begin(); iter != threadqueue.end(); iter++)
{
Thread *t = kernelObjects.Get<Thread>(*iter, error);
if (!t)
continue;
DebugThreadInfo info;
info.id = *iter;
strncpy(info.name,t->GetName(),KERNELOBJECT_MAX_NAME_LENGTH);
info.name[KERNELOBJECT_MAX_NAME_LENGTH+1] = 0;
info.status = t->nt.status;
info.entrypoint = t->nt.entrypoint;
info.curPC = t->context.pc;
info.isCurrent = (*iter == currentThread);
threadList.push_back(info);
}
return threadList;
}
void __KernelChangeThreadState(SceUID threadId, ThreadStatus newStatus)
{
u32 error;
Thread *t = kernelObjects.Get<Thread>(threadId, error);
if (!t)
return;
__KernelChangeThreadState(t, newStatus);
}
+13
View File
@@ -257,3 +257,16 @@ void __KernelChangeThreadState(Thread *thread, ThreadStatus newStatus);
typedef void (*ThreadCallback)(SceUID threadID);
void __KernelListenThreadEnd(ThreadCallback callback);
struct DebugThreadInfo
{
SceUID id;
char name[KERNELOBJECT_MAX_NAME_LENGTH+1];
u32 status;
int curPC;
int entrypoint;
bool isCurrent;
};
std::vector<DebugThreadInfo> GetThreadsInfo();
void __KernelChangeThreadState(SceUID threadId, ThreadStatus newStatus);
+7
View File
@@ -61,6 +61,13 @@ public:
virtual bool AttemptLoadSymbolMap() {return false;}
virtual void SetWindowTitle(const char *message) {}
virtual void SendCoreWait(bool) {}
virtual bool GpuStep() { return false; }
virtual void SendGPUWait() {}
virtual void SetGPUStep(bool value) {}
virtual void NextGPUStep() {}
// Used for headless.
virtual void SendDebugOutput(const std::string &output) {}
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
+7
View File
@@ -80,6 +80,10 @@ enum
// George Marsaglia-style random number generator.
class GMRng {
public:
GMRng() {
m_w = 0x23E866ED;
m_z = 0x80FD5AF2;
}
void Init(int seed) {
m_w = seed ^ (seed << 16);
if (!m_w) m_w = 1337;
@@ -91,6 +95,9 @@ public:
m_w = 18000 * (m_w & 65535) + (m_w >> 16);
return (m_z << 16) + m_w;
}
float F() {
return (float)R32() / (float)(0xFFFFFFFF);
}
void DoState(PointerWrap &p);
+2 -2
View File
@@ -224,8 +224,8 @@ const MIPSInstruction tableSpecial[64] = /// 000000 ...... ...... .......... xxx
INSTR("sltu", &Jit::Comp_RType3, Dis_RType3, Int_RType3,IN_RS|IN_RT|OUT_RD),
INSTR("max", &Jit::Comp_RType3, Dis_RType3, Int_RType3,IN_RS|IN_RT|OUT_RD),
INSTR("min", &Jit::Comp_RType3, Dis_RType3, Int_RType3,IN_RS|IN_RT|OUT_RD),
INSTR("msub", &Jit::Comp_RType3, Dis_MulDivType, Int_MulDivType, IN_RS|IN_RT|OUT_OTHER),
INSTR("msubu", &Jit::Comp_RType3, Dis_MulDivType, Int_MulDivType, IN_RS|IN_RT|OUT_OTHER),
INSTR("msub", &Jit::Comp_MulDivType, Dis_MulDivType, Int_MulDivType, IN_RS|IN_RT|OUT_OTHER),
INSTR("msubu", &Jit::Comp_MulDivType, Dis_MulDivType, Int_MulDivType, IN_RS|IN_RT|OUT_OTHER),
//48
INSTR("tge", &Jit::Comp_Generic, Dis_RType3, 0, 0),
+99 -69
View File
@@ -423,81 +423,111 @@ namespace MIPSComp
gpr.UnlockAllX();
break;
default:
DISABLE;
/*
case 28: //madd
{
u32 a=R(rs),b=R(rt),hi=HI,lo=LO;
u64 origValBits = (u64)lo | ((u64)(hi)<<32);
s64 origVal = (s64)origValBits;
s64 result = origVal + (s64)(s32)a * (s64)(s32)b;
u64 resultBits = (u64)(result);
LO = (u32)(resultBits);
HI = (u32)(resultBits>>32);
}
break;
case 29: //maddu
{
u32 a=R(rs),b=R(rt),hi=HI,lo=LO;
u64 origVal = (u64)lo | ((u64)(hi)<<32);
u64 result = origVal + (u64)a * (u64)b;
LO = (u32)(result);
HI = (u32)(result>>32);
}
break;
case 46: //msub
{
u32 a=R(rs),b=R(rt),hi=HI,lo=LO;
u64 origValBits = (u64)lo | ((u64)(hi)<<32);
s64 origVal = (s64)origValBits;
s64 result = origVal - (s64)(s32)a * (s64)(s32)b;
u64 resultBits = (u64)(result);
LO = (u32)(resultBits);
HI = (u32)(resultBits>>32);
}
break;
case 47: //msubu
{
u32 a=R(rs),b=R(rt),hi=HI,lo=LO;
u64 origVal = (u64)lo | ((u64)(hi)<<32);
u64 result = origVal - (u64)a * (u64)b;
LO = (u32)(result);
HI = (u32)(result>>32);
}
break;
case 26: //div
{
s32 a = (s32)R(rs);
s32 b = (s32)R(rt);
if (a == (s32)0x80000000 && b == -1) {
LO = 0x80000000;
} else if (b != 0) {
LO = (u32)(a / b);
HI = (u32)(a % b);
} else {
LO = HI = 0; // Not sure what the right thing to do is?
}
}
break;
case 27: //divu
{
u32 a = R(rs);
u32 b = R(rt);
if (b != 0)
{
LO = (a/b);
HI = (a%b);
} else {
LO = HI = 0;
}
gpr.FlushLockX(EDX);
// For CMP.
gpr.KillImmediate(rs, true, false);
gpr.KillImmediate(rt, true, false);
CMP(32, gpr.R(rt), Imm32(0));
FixupBranch divZero = J_CC(CC_E);
// INT_MAX / -1 would overflow.
CMP(32, gpr.R(rs), Imm32(0x80000000));
FixupBranch notOverflow = J_CC(CC_NE);
CMP(32, gpr.R(rt), Imm32((u32) -1));
FixupBranch notOverflow2 = J_CC(CC_NE);
// TODO: Should HI be set to anything?
MOV(32, M((void *)&mips_->lo), Imm32(0x80000000));
FixupBranch skip2 = J();
SetJumpTarget(notOverflow);
SetJumpTarget(notOverflow2);
MOV(32, R(EAX), gpr.R(rs));
CDQ();
IDIV(32, gpr.R(rt));
MOV(32, M((void *)&mips_->hi), R(EDX));
MOV(32, M((void *)&mips_->lo), R(EAX));
FixupBranch skip = J();
SetJumpTarget(divZero);
// TODO: Is this the right way to handle a divide by zero?
MOV(32, M((void *)&mips_->hi), Imm32(0));
MOV(32, M((void *)&mips_->lo), Imm32(0));
SetJumpTarget(skip);
SetJumpTarget(skip2);
gpr.UnlockAllX();
}
break;
case 27: //divu
{
gpr.FlushLockX(EDX);
gpr.KillImmediate(rt, true, false);
CMP(32, gpr.R(rt), Imm32(0));
FixupBranch divZero = J_CC(CC_E);
MOV(32, R(EAX), gpr.R(rs));
MOV(32, R(EDX), Imm32(0));
DIV(32, gpr.R(rt));
MOV(32, M((void *)&mips_->hi), R(EDX));
MOV(32, M((void *)&mips_->lo), R(EAX));
FixupBranch skip = J();
SetJumpTarget(divZero);
// TODO: Is this the right way to handle a divide by zero?
MOV(32, M((void *)&mips_->hi), Imm32(0));
MOV(32, M((void *)&mips_->lo), Imm32(0));
SetJumpTarget(skip);
gpr.UnlockAllX();
}
break;
case 28: // madd
gpr.FlushLockX(EDX);
gpr.KillImmediate(rt, true, false);
MOV(32, R(EAX), gpr.R(rs));
IMUL(32, gpr.R(rt));
ADD(32, M((void *)&mips_->lo), R(EAX));
ADC(32, M((void *)&mips_->hi), R(EDX));
gpr.UnlockAllX();
break;
case 29: // maddu
gpr.FlushLockX(EDX);
gpr.KillImmediate(rt, true, false);
MOV(32, R(EAX), gpr.R(rs));
MUL(32, gpr.R(rt));
ADD(32, M((void *)&mips_->lo), R(EAX));
ADC(32, M((void *)&mips_->hi), R(EDX));
gpr.UnlockAllX();
break;
case 46: // msub
gpr.FlushLockX(EDX);
gpr.KillImmediate(rt, true, false);
MOV(32, R(EAX), gpr.R(rs));
IMUL(32, gpr.R(rt));
SUB(32, M((void *)&mips_->lo), R(EAX));
SBB(32, M((void *)&mips_->hi), R(EDX));
gpr.UnlockAllX();
break;
case 47: // msubu
gpr.FlushLockX(EDX);
gpr.KillImmediate(rt, true, false);
MOV(32, R(EAX), gpr.R(rs));
MUL(32, gpr.R(rt));
SUB(32, M((void *)&mips_->lo), R(EAX));
SBB(32, M((void *)&mips_->hi), R(EDX));
gpr.UnlockAllX();
break;
default:
_dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted");
break;*/
DISABLE;
}
}
}
-1
View File
@@ -164,7 +164,6 @@ void Jit::Comp_SV(u32 op) {
}
if (safe.PrepareSlowRead((void *) &Memory::Read_U32))
{
safe.NextSlowRead((void *) &Memory::Read_U32, 0);
MOV(32, M((void *)&ssLoadStoreTemp), R(EAX));
MOVSS(fpr.VX(vt), M((void *)&ssLoadStoreTemp));
}
+3 -2
View File
@@ -249,16 +249,17 @@ static void PPGeMeasureText(const char *text, float scale, float *w, float *h) {
float maxw = 0;
int lines = 1;
while ((cval = *text++) != '\0') {
if (cval < 32) continue;
if (cval > 127) continue;
if (cval == '\n') {
if (wacc > maxw) maxw = wacc;
wacc = 0;
lines++;
}
if (cval < 32) continue;
if (cval > 127) continue;
AtlasChar c = atlasfont.chars[cval - 32];
wacc += c.wx * scale;
}
if (wacc > maxw) maxw = wacc;
if (w) *w = maxw;
if (h) *h = atlasfont.height * scale * lines;
}
+19 -19
View File
@@ -117,6 +117,24 @@ static const int flushOnChangedBeforeCommandList[] = {
GE_CMD_ZTEST,
GE_CMD_MASKRGB,
GE_CMD_MASKALPHA,
GE_CMD_TEXBUFWIDTH0,
GE_CMD_CLUTADDR,
GE_CMD_LOADCLUT,
GE_CMD_CLUTFORMAT,
GE_CMD_TEXADDR0,GE_CMD_TEXADDR1,GE_CMD_TEXADDR2,GE_CMD_TEXADDR3,
GE_CMD_TEXADDR4,GE_CMD_TEXADDR5,GE_CMD_TEXADDR6,GE_CMD_TEXADDR7,
GE_CMD_TEXSIZE0,GE_CMD_TEXSIZE1,GE_CMD_TEXSIZE2,GE_CMD_TEXSIZE3,
GE_CMD_TEXSIZE4,GE_CMD_TEXSIZE5,GE_CMD_TEXSIZE6,GE_CMD_TEXSIZE7,
GE_CMD_OFFSETX,
GE_CMD_OFFSETY,
GE_CMD_MORPHWEIGHT0,GE_CMD_MORPHWEIGHT1,GE_CMD_MORPHWEIGHT2,GE_CMD_MORPHWEIGHT3,
GE_CMD_MORPHWEIGHT4,GE_CMD_MORPHWEIGHT5,GE_CMD_MORPHWEIGHT6,GE_CMD_MORPHWEIGHT7,
GE_CMD_REGION1,GE_CMD_REGION2,
GE_CMD_FRAMEBUFPTR,
GE_CMD_FRAMEBUFWIDTH,
GE_CMD_FRAMEBUFPIXFORMAT,
GE_CMD_ZBUFPTR,
GE_CMD_ZBUFWIDTH,
};
static const int flushBeforeCommandList[] = {
@@ -125,26 +143,8 @@ static const int flushBeforeCommandList[] = {
GE_CMD_SIGNAL,
GE_CMD_FINISH,
GE_CMD_BJUMP,
GE_CMD_REGION1,GE_CMD_REGION2,
GE_CMD_FRAMEBUFPTR,
GE_CMD_FRAMEBUFWIDTH,
GE_CMD_FRAMEBUFPIXFORMAT,
GE_CMD_TEXADDR0,
GE_CMD_CLUTADDR,
GE_CMD_LOADCLUT,
GE_CMD_CLUTFORMAT,
GE_CMD_TRANSFERSTART,
GE_CMD_TEXBUFWIDTH0,
GE_CMD_TEXSIZE0,GE_CMD_TEXSIZE1,GE_CMD_TEXSIZE2,GE_CMD_TEXSIZE3,
GE_CMD_TEXSIZE4,GE_CMD_TEXSIZE5,GE_CMD_TEXSIZE6,GE_CMD_TEXSIZE7,
GE_CMD_ZBUFPTR,
GE_CMD_ZBUFWIDTH,
GE_CMD_OFFSETY,
GE_CMD_OFFSETX,
GE_CMD_OFFSETY,
GE_CMD_TEXFLUSH,
GE_CMD_MORPHWEIGHT0,GE_CMD_MORPHWEIGHT1,GE_CMD_MORPHWEIGHT2,GE_CMD_MORPHWEIGHT3,
GE_CMD_MORPHWEIGHT4,GE_CMD_MORPHWEIGHT5,GE_CMD_MORPHWEIGHT6,GE_CMD_MORPHWEIGHT7,
//GE_CMD_TEXFLUSH,
// These handle their own flushing.
/*
GE_CMD_WORLDMATRIXNUMBER,
+120 -81
View File
@@ -16,6 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <map>
#include <algorithm>
#include "../../Core/MemMap.h"
#include "../ge_constants.h"
@@ -25,6 +26,7 @@
// If a texture hasn't been seen for 200 frames, get rid of it.
#define TEXTURE_KILL_AGE 200
float maxAnisotropyLevel ;
TextureCache::TextureCache() {
// TODO: Switch to aligned allocations for alignment. AllocateMemoryPages would do the trick.
@@ -34,6 +36,7 @@ TextureCache::TextureCache() {
tmpTexBufRearrange = new u32[1024 * 512]; // 2MB
clutBuf32 = new u32[4096]; // 4K
clutBuf16 = new u16[4096]; // 4K
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyLevel);
}
TextureCache::~TextureCache() {
@@ -64,8 +67,8 @@ void TextureCache::Clear(bool delete_them) {
// Removes old textures.
void TextureCache::Decimate() {
glBindTexture(GL_TEXTURE_2D, 0);
for (TexCache::iterator iter = cache.begin(); iter != cache.end(); ) {
if (iter->second.frameCounter + TEXTURE_KILL_AGE < gpuStats.numFrames) {
for (TexCache::iterator iter = cache.begin(), end = cache.end(); iter != end; ) {
if (iter->second.lastFrame + TEXTURE_KILL_AGE < gpuStats.numFrames) {
glDeleteTextures(1, &iter->second.texture);
cache.erase(iter++);
}
@@ -78,7 +81,7 @@ void TextureCache::Invalidate(u32 addr, int size, bool force) {
addr &= 0xFFFFFFF;
u32 addr_end = addr + size;
for (TexCache::iterator iter = cache.begin(); iter != cache.end(); ) {
for (TexCache::iterator iter = cache.begin(), end = cache.end(); iter != end; ++iter) {
u32 texAddr = iter->second.addr;
u32 texEnd = iter->second.addr + iter->second.sizeInRAM;
// Clear if either the addr or clutaddr is in the range.
@@ -88,27 +91,23 @@ void TextureCache::Invalidate(u32 addr, int size, bool force) {
invalidate = invalidate || (iter->second.clutaddr >= addr && iter->second.clutaddr < addr_end);
if (invalidate) {
if (iter->second.status == TexCacheEntry::STATUS_RELIABLE) {
iter->second.status = TexCacheEntry::STATUS_HASHING;
}
if (force) {
gpuStats.numTextureInvalidations++;
glDeleteTextures(1, &iter->second.texture);
cache.erase(iter++);
// Start it over from 0.
iter->second.numFrames = 0;
iter->second.framesUntilNextFullHash = 0;
} else {
iter->second.invalidHint++;
++iter;
}
}
else
++iter;
}
}
void TextureCache::InvalidateAll(bool force) {
if (force) {
gpuStats.numTextureInvalidations += 1000;
Clear(true);
}
else
Invalidate(0, 0xFFFFFFFF, force);
Invalidate(0, 0xFFFFFFFF, force);
}
TextureCache::TexCacheEntry *TextureCache::GetEntryAt(u32 texaddr) {
@@ -621,10 +620,6 @@ void TextureCache::StartFrame() {
Decimate();
}
static inline u32 MiniHash(const u32 *ptr) {
return ptr[0];
}
static const u8 bitsPerPixel[11] = {
16, //GE_TFMT_5650=16,
16, //GE_TFMT_5551=16,
@@ -653,6 +648,27 @@ static const bool formatUsesClut[11] = {
false,
};
static inline u32 MiniHash(const u32 *ptr) {
return ptr[0];
}
static inline u32 QuickTexHash(u32 addr, int bufw, int w, int h, u32 format) {
int pixToBytes = (bitsPerPixel[format < 11 ? format : 0] + 7) / 8;
int w32 = (w * pixToBytes + 3) / 4;
int pad32 = ((bufw * pixToBytes + 3) / 4) - w32;
const u32 *checkp = (const u32 *) Memory::GetPointer(addr);
u32 check = 0;
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w32; ++x) {
check += *checkp++;
}
checkp += pad32;
}
return check;
}
void TextureCache::SetTexture() {
u32 texaddr = (gstate.texaddr[0] & 0xFFFFF0) | ((gstate.texbufwidth[0]<<8) & 0x0F000000);
@@ -694,17 +710,19 @@ void TextureCache::SetTexture() {
int w = 1 << (gstate.texsize[0] & 0xf);
int h = 1 << ((gstate.texsize[0] >> 8) & 0xf);
int bufw = gstate.texbufwidth[0] & 0x3ff;
TexCache::iterator iter = cache.find(cachekey);
TexCacheEntry *entry = NULL;
if (iter != cache.end()) {
TexCacheEntry &entry = iter->second;
entry = &iter->second;
// Check for FBO - slow!
if (entry.fbo) {
fbo_bind_color_as_texture(entry.fbo, 0);
UpdateSamplingParams(entry, false);
if (entry->fbo) {
fbo_bind_color_as_texture(entry->fbo, 0);
UpdateSamplingParams(*entry, false);
int fbow, fboh;
fbo_get_dimensions(entry.fbo, &fbow, &fboh);
fbo_get_dimensions(entry->fbo, &fbow, &fboh);
// Almost certain this isn't right.
gstate_c.curTextureWidth = fbow;
@@ -716,90 +734,111 @@ void TextureCache::SetTexture() {
int dim = gstate.texsize[0] & 0xF0F;
bool match = true;
bool rehash = entry->status == TexCacheEntry::STATUS_UNRELIABLE;
//TODO: Check more texture parameters, compute real texture hash
if (dim != entry.dim || entry.hash != texhash || entry.format != format)
if (dim != entry->dim || entry->hash != texhash || entry->format != format)
match = false;
//TODO: Check more clut parameters, compute clut hash
if (match && (format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) &&
(entry.clutformat != clutformat ||
entry.clutaddr != clutaddr ||
entry.cluthash != Memory::Read_U32(entry.clutaddr)))
(entry->clutformat != clutformat ||
entry->clutaddr != clutaddr ||
entry->cluthash != Memory::Read_U32(entry->clutaddr)))
match = false;
// If it's not huge or has been invalidated many times, recheck the whole texture.
if (entry.invalidHint > 180 || (entry.invalidHint > 15 && dim <= 0x909)) {
entry.invalidHint = 0;
u32 check = 0;
const u32 *checkp = (const u32 *) Memory::GetPointer(texaddr);
for (u32 i = 0; i < (entry.sizeInRAM * 2) / 4; ++i) {
check += *checkp++;
}
if (check != entry.fullhash) {
match = false;
}
}
if (entry.maxLevel != maxLevel)
if (entry->maxLevel != maxLevel)
match = false;
if (match) {
//got one!
entry.frameCounter = gpuStats.numFrames;
if (entry.texture != lastBoundTexture) {
glBindTexture(GL_TEXTURE_2D, entry.texture);
lastBoundTexture = entry.texture;
if (entry->lastFrame != gpuStats.numFrames) {
entry->numFrames++;
}
UpdateSamplingParams(entry, false);
if (entry->framesUntilNextFullHash == 0) {
// Exponential backoff up to 2048 frames. Textures are often reused.
entry->framesUntilNextFullHash = std::min(2048, entry->numFrames);
rehash = true;
} else {
--entry->framesUntilNextFullHash;
}
}
// If it's not huge or has been invalidated many times, recheck the whole texture.
if (entry->invalidHint > 180 || (entry->invalidHint > 15 && dim <= 0x909)) {
entry->invalidHint = 0;
rehash = true;
}
if (rehash && entry->status != TexCacheEntry::STATUS_RELIABLE) {
u32 check = QuickTexHash(texaddr, bufw, w, h, format);
if (check != entry->fullhash) {
match = false;
gpuStats.numTextureInvalidations++;
entry->status = TexCacheEntry::STATUS_UNRELIABLE;
entry->numFrames = 0;
} else if (entry->status == TexCacheEntry::STATUS_UNRELIABLE && entry->numFrames > TexCacheEntry::FRAMES_REGAIN_TRUST) {
entry->status = TexCacheEntry::STATUS_HASHING;
}
}
if (match) {
// TODO: Mark the entry reliable if it's been safe for long enough?
//got one!
entry->lastFrame = gpuStats.numFrames;
if (entry->texture != lastBoundTexture) {
glBindTexture(GL_TEXTURE_2D, entry->texture);
lastBoundTexture = entry->texture;
}
UpdateSamplingParams(*entry, false);
DEBUG_LOG(G3D, "Texture at %08x Found in Cache, applying", texaddr);
return; //Done!
} else {
INFO_LOG(G3D, "Texture different or overwritten, reloading at %08x", texaddr);
glDeleteTextures(1, &entry.texture);
cache.erase(iter);
glDeleteTextures(1, &entry->texture);
if (entry->status == TexCacheEntry::STATUS_RELIABLE) {
entry->status = TexCacheEntry::STATUS_HASHING;
}
}
} else {
INFO_LOG(G3D,"No texture in cache, decoding...");
TexCacheEntry entryNew = {0};
cache[cachekey] = entryNew;
entry = &cache[cachekey];
entry->status = TexCacheEntry::STATUS_HASHING;
}
//we have to decode it
TexCacheEntry entry = {0};
entry.addr = texaddr;
entry.hash = texhash;
entry.format = format;
entry.frameCounter = gpuStats.numFrames;
entry.fbo = 0;
entry.maxLevel = maxLevel;
entry.lodBias = 0.0f;
entry->addr = texaddr;
entry->hash = texhash;
entry->format = format;
entry->lastFrame = gpuStats.numFrames;
entry->fbo = 0;
entry->maxLevel = maxLevel;
entry->lodBias = 0.0f;
if (format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) {
entry.clutformat = clutformat;
entry.clutaddr = GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2);
entry.cluthash = Memory::Read_U32(entry.clutaddr);
entry->clutformat = clutformat;
entry->clutaddr = GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2);
entry->cluthash = Memory::Read_U32(entry->clutaddr);
} else {
entry.clutaddr = 0;
entry->clutaddr = 0;
}
int bufw = gstate.texbufwidth[0] & 0x3ff;
entry.dim = gstate.texsize[0] & 0xF0F;
entry->dim = gstate.texsize[0] & 0xF0F;
// This would overestimate the size in many case so we underestimate instead
// to avoid excessive clearing caused by cache invalidations.
entry.sizeInRAM = (bitsPerPixel[format < 11 ? format : 0] * bufw * h / 2) / 8;
entry->sizeInRAM = (bitsPerPixel[format < 11 ? format : 0] * bufw * h / 2) / 8;
const u32 *checkp = (const u32 *) Memory::GetPointer(texaddr);
for (u32 i = 0; i < (entry.sizeInRAM * 2) / 4; ++i)
entry.fullhash += *checkp++;
entry->fullhash = QuickTexHash(texaddr, bufw, w, h, format);
gstate_c.curTextureWidth = w;
gstate_c.curTextureHeight = h;
glGenTextures(1, &entry.texture);
glBindTexture(GL_TEXTURE_2D, entry.texture);
glGenTextures(1, &entry->texture);
glBindTexture(GL_TEXTURE_2D, entry->texture);
#ifdef USING_GLES2
// GLES2 doesn't have support for a "Max lod" which is critical as PSP games often
@@ -810,26 +849,26 @@ void TextureCache::SetTexture() {
// For now, I choose to use autogen mips on GLES2 and the game's own on other platforms.
// As is usual, GLES3 will solve this problem nicely but wide distribution of that is
// years away.
LoadTextureLevel(entry, 0);
if (entry.maxLevel > 0)
LoadTextureLevel(*entry, 0);
if (entry->maxLevel > 0)
glGenerateMipmap(GL_TEXTURE_2D);
#else
for (int i = 0; i <= entry.maxLevel; i++) {
LoadTextureLevel(entry, i);
for (int i = 0; i <= entry->maxLevel; i++) {
LoadTextureLevel(*entry, i);
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, entry.maxLevel);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, entry->maxLevel);
#endif
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, (float)entry.maxLevel);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, (float)entry->maxLevel);
float anisotropyLevel = (float) g_Config.iAnisotropyLevel > maxAnisotropyLevel ? maxAnisotropyLevel : (float) g_Config.iAnisotropyLevel;
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel);
// NOTICE_LOG(G3D,"AnisotropyLevel = %0.1f , MaxAnisotropyLevel = %0.1f ", anisotropyLevel, maxAnisotropyLevel );
UpdateSamplingParams(entry, true);
UpdateSamplingParams(*entry, true);
//glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
//glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
cache[cachekey] = entry;
}
+14 -3
View File
@@ -45,11 +45,24 @@ public:
private:
struct TexCacheEntry {
// After marking STATUS_UNRELIABLE, if it stays the same this many frames we'll trust it again.
const static int FRAMES_REGAIN_TRUST = 1000;
enum Status {
STATUS_HASHING,
STATUS_RELIABLE, // cache, don't hash
STATUS_UNRELIABLE, // never cache
};
// Status, but int so we can zero initialize.
int status;
u32 addr;
u32 hash;
FBO *fbo; // if null, not sourced from an FBO.
u32 sizeInRAM;
int frameCounter;
int lastFrame;
int numFrames;
u32 framesUntilNextFullHash;
u8 format;
u8 clutformat;
u16 dim;
@@ -77,8 +90,6 @@ private:
TexCacheEntry *GetEntryAt(u32 texaddr);
typedef std::map<u64, TexCacheEntry> TexCache;
// TODO: Speed up by switching to ReadUnchecked*.
TexCache cache;
u32 *tmpTexBuf32;
+14 -5
View File
@@ -922,7 +922,7 @@ void TransformDrawEngine::Flush() {
u32 dataHash = ComputeHash();
vai->hash = dataHash;
vai->status = VertexArrayInfo::VAI_HASHING;
vai->drawsUntilNextFullHash = 0;
vai->framesUntilNextFullHash = 0;
DecodeVerts(); // writes to indexGen
goto rotateVBO;
}
@@ -932,12 +932,15 @@ void TransformDrawEngine::Flush() {
case VertexArrayInfo::VAI_HASHING:
{
vai->numDraws++;
if (vai->drawsUntilNextFullHash == 0) {
if (vai->lastFrame != gpuStats.numFrames) {
vai->numFrames++;
}
if (vai->framesUntilNextFullHash == 0) {
u32 newHash = ComputeHash();
// exponential backoff up to 16 frames
vai->drawsUntilNextFullHash = std::min(16, vai->numDraws);
vai->framesUntilNextFullHash = std::min(16, vai->numFrames);
// TODO: tweak
//if (vai->numDraws > 1000) {
//if (vai->numFrames > 1000) {
// vai->status = VertexArrayInfo::VAI_RELIABLE;
//}
if (newHash != vai->hash) {
@@ -954,7 +957,7 @@ void TransformDrawEngine::Flush() {
goto rotateVBO;
}
} else {
vai->drawsUntilNextFullHash--;
vai->framesUntilNextFullHash--;
// TODO: "mini-hashing" the first 32 bytes of the vertex/index data or something.
}
@@ -997,6 +1000,9 @@ void TransformDrawEngine::Flush() {
case VertexArrayInfo::VAI_RELIABLE:
{
vai->numDraws++;
if (vai->lastFrame != gpuStats.numFrames) {
vai->numFrames++;
}
gpuStats.numCachedDrawCalls++;
gpuStats.numCachedVertsDrawn += vai->numVerts;
vbo = vai->vbo;
@@ -1012,6 +1018,9 @@ void TransformDrawEngine::Flush() {
case VertexArrayInfo::VAI_UNRELIABLE:
{
vai->numDraws++;
if (vai->lastFrame != gpuStats.numFrames) {
vai->numFrames++;
}
DecodeVerts();
goto rotateVBO;
}
+4 -2
View File
@@ -55,9 +55,10 @@ public:
numDCs = 0;
prim = -1;
numDraws = 0;
numFrames = 0;
lastFrame = gpuStats.numFrames;
numVerts = 0;
drawsUntilNextFullHash = 0;
framesUntilNextFullHash = 0;
}
~VertexArrayInfo();
enum Status {
@@ -84,8 +85,9 @@ public:
// ID information
u8 numDCs;
int numDraws;
int numFrames;
int lastFrame; // So that we can forget.
u16 drawsUntilNextFullHash;
u16 framesUntilNextFullHash;
};
+10 -1
View File
@@ -4,7 +4,9 @@
#include "GPUCommon.h"
#include "GPUState.h"
#include "ChunkFile.h"
#if defined(USING_QT_UI)
#include "Core/Host.h"
#endif
static int dlIdGenerator = 1;
@@ -28,6 +30,7 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, bool head)
{
DisplayList dl;
dl.id = dlIdGenerator++;
dl.startpc = listpc & 0xFFFFFFF;
dl.pc = listpc & 0xFFFFFFF;
dl.stall = stall & 0xFFFFFFF;
dl.status = PSP_GE_LIST_QUEUED;
@@ -82,6 +85,12 @@ bool GPUCommon::InterpretList(DisplayList &list)
list.status = PSP_GE_LIST_STALL_REACHED;
return false;
}
#if defined(USING_QT_UI)
if(host->GpuStep())
{
host->SendGPUWait();
}
#endif
op = Memory::ReadUnchecked_U32(list.pc); //read from memory
u32 cmd = op >> 24;
u32 diff = op ^ gstate.cmdmem[cmd];
+9
View File
@@ -53,4 +53,13 @@ public:
}
return NULL;
}
const std::deque<DisplayList>& GetDisplayLists()
{
return dlQueue;
}
DisplayList* GetCurrentDisplayList()
{
return currentList;
}
};
+3
View File
@@ -35,6 +35,7 @@ enum DisplayListStatus
struct DisplayList
{
int id;
u32 startpc;
u32 pc;
u32 stall;
DisplayListStatus status;
@@ -91,4 +92,6 @@ public:
// Debugging
virtual void DumpNextFrame() = 0;
virtual const std::deque<DisplayList>& GetDisplayLists() = 0;
virtual DisplayList* GetCurrentDisplayList() = 0;
};
+5 -1
View File
@@ -396,7 +396,11 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) {
case GE_CMD_TEXSIZE5:
case GE_CMD_TEXSIZE6:
case GE_CMD_TEXSIZE7:
sprintf(buffer, "Texture Size %i: %06x", cmd - GE_CMD_TEXSIZE0, data);
{
int w = 1 << (data & 0xf);
int h = 1 << ((data>>8) & 0xf);
sprintf(buffer, "Texture Size %i: %06x, width : %d, height : %d", cmd - GE_CMD_TEXSIZE0, data, w, h);
}
break;
case GE_CMD_ZBUFPTR:
+53 -13
View File
@@ -18,9 +18,10 @@
#include "gfx_es2/gl_state.h"
#include "GPU/GPUState.h"
#include "android/jni/ui_atlas.h"
#include "native/util/random/rng.h"
#include "native/base/timeutil.h"
#include "native/base/colorutil.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
#include "qtemugl.h"
#include "QtHost.h"
@@ -114,6 +115,26 @@ void EmuThread_LockDraw(bool value)
}
}
QString GetCurrentFilename()
{
return fileToStart;
}
EmuThread::EmuThread()
: running(false)
, gameRunning(false)
, needInitGame(false)
, frames_(0)
, gameMutex( new QMutex(QMutex::Recursive))
, mutexLockNum(0)
{
}
EmuThread::~EmuThread()
{
delete gameMutex;
}
void EmuThread::init(InputState *inputState)
{
@@ -143,13 +164,14 @@ void EmuThread::run()
//UpdateGamepad(*input_state);
timer.start();
gameMutex.lock();
gameMutex->lock();
bool gRun = gameRunning;
gameMutex.unlock();
gameMutex->unlock();
if(gRun)
{
gameMutex.lock();
gameMutex->lock();
glWindow->makeCurrent();
if(needInitGame)
@@ -227,14 +249,14 @@ void EmuThread::run()
qint64 time = timer.elapsed();
const int frameTime = (1.0f/60.0f) * 1000;
gameMutex.unlock();
gameMutex->unlock();
if(time < frameTime)
{
glWindow->doneCurrent();
msleep(frameTime-time);
glWindow->makeCurrent();
}
gameMutex.lock();
gameMutex->lock();
timer.start();
}
@@ -265,11 +287,11 @@ void EmuThread::run()
#endif
glWindow->swapBuffers();
glWindow->doneCurrent();
gameMutex.unlock();
gameMutex->unlock();
}
else
{
gameMutex.lock();
gameMutex->lock();
glWindow->makeCurrent();
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
@@ -311,7 +333,7 @@ void EmuThread::run()
glWindow->swapBuffers();
glWindow->doneCurrent();
gameMutex.unlock();
gameMutex->unlock();
qint64 time = timer.elapsed();
const int frameTime = (1.0f/60.0f) * 1000;
if(time < frameTime)
@@ -358,18 +380,18 @@ void EmuThread::setRunning(bool value)
void EmuThread::startGame(QString filename)
{
gameMutex.lock();
gameMutex->lock();
needInitGame = true;
gameRunning = true;
fileToStart = filename;
gameMutex.unlock();
gameMutex->unlock();
}
void EmuThread::stopGame()
{
Core_Stop();
gameMutex.lock();
gameMutex->lock();
gameRunning = false;
PSP_Shutdown();
@@ -380,7 +402,25 @@ void EmuThread::stopGame()
g_State.bEmuThreadStarted = false;
frames_ = 0;
gameMutex.unlock();
gameMutex->unlock();
}
void EmuThread::LockGL(bool lock)
{
if(lock)
{
gameMutex->lock();
if(mutexLockNum == 0)
glWindow->makeCurrent();
mutexLockNum++;
}
else
{
mutexLockNum--;
if(mutexLockNum == 0)
glWindow->doneCurrent();
gameMutex->unlock();
}
}
+6 -2
View File
@@ -8,14 +8,15 @@ class QtEmuGL;
class EmuThread : public QThread
{
public:
EmuThread() : running(false), gameRunning(false), needInitGame(false), frames_(0) {}
EmuThread();
~EmuThread();
void init(InputState* inputState);
void run();
void FinalShutdown();
void setRunning(bool value);
void startGame(QString filename);
void stopGame();
QMutex gameMutex;
void LockGL(bool value);
public slots:
void Shutdown();
private:
@@ -24,6 +25,8 @@ private:
bool gameRunning;
bool needInitGame;
int frames_;
QMutex *gameMutex;
int mutexLockNum;
};
@@ -32,3 +35,4 @@ void EmuThread_Stop();
void EmuThread_StartGame(QString filename);
void EmuThread_StopGame();
void EmuThread_LockDraw(bool value);
QString GetCurrentFilename();
+2 -1
View File
@@ -22,7 +22,8 @@ desktop_ui {
}
TRANSLATIONS = languages/ppsspp_en.ts \
languages/ppsspp_pl.ts
languages/ppsspp_pl.ts \
languages/ppsspp_fr.ts
# Main
SOURCES += ../native/base/QtMain.cpp
+57 -23
View File
@@ -12,6 +12,7 @@
#include "android/jni/EmuScreen.h"
#include "android/jni/UIShader.h"
#include "android/jni/ui_atlas.h"
#include "EmuThread.h"
std::string boot_filename = "";
Texture *uiTexture;
@@ -20,20 +21,22 @@ ScreenManager *screenManager;
std::string config_filename;
std::string game_title;
event m_hGPUStepEvent;
recursive_mutex m_hGPUStepMutex;
QtHost::QtHost(MainWindow *mainWindow_)
: mainWindow(mainWindow_)
, m_GPUStep(false)
{
QObject::connect(this,SIGNAL(BootDoneSignal()),mainWindow,SLOT(Boot()));
}
void QtHost::InitGL()
{
}
void QtHost::ShutdownGL()
{
//GL_Shutdown();
}
void QtHost::SetWindowTitle(const char *message)
@@ -45,30 +48,28 @@ void QtHost::SetWindowTitle(const char *message)
void QtHost::UpdateUI()
{
//mainWindow->Update();
mainWindow->Update();
mainWindow->UpdateMenus();
}
void QtHost::UpdateMemView()
{
/*for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->Update();*/
if(mainWindow->GetDialogMemory())
mainWindow->GetDialogMemory()->Update();
}
void QtHost::UpdateDisassembly()
{
/*for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
disasmWindow[i]->Update();*/
/*if(dialogDisasm)
dialogDisasm->Update();*/
if(mainWindow->GetDialogDisasm())
{
mainWindow->GetDialogDisasm()->GotoPC();
mainWindow->GetDialogDisasm()->Update();
}
}
void QtHost::SetDebugMode(bool mode)
{
/*for (int i=0; i<numCPUs; i++)*/
if(mainWindow->GetDialogDisasm())
mainWindow->GetDialogDisasm()->SetDebugMode(mode);
}
@@ -76,14 +77,9 @@ void QtHost::SetDebugMode(bool mode)
void QtHost::BeginFrame()
{
/*for (auto iter = this->input.begin(); iter != this->input.end(); iter++)
if ((*iter)->UpdateState() == 0)
break; // *iter is std::shared_ptr, **iter is InputDevice
GL_BeginFrame();*/
}
void QtHost::EndFrame()
{
//GL_EndFrame();
}
void QtHost::InitSound(PMixer *mixer)
@@ -102,18 +98,26 @@ void QtHost::BootDone()
emit BootDoneSignal();
}
static QString SymbolMapFilename(QString currentFilename)
{
std::string result = currentFilename.toStdString();
size_t dot = result.rfind('.');
if (dot == result.npos)
return (result + ".map").c_str();
result.replace(dot, result.npos, ".map");
return result.c_str();
}
bool QtHost::AttemptLoadSymbolMap()
{
QFileInfo currentFile(fileToStart);
QString ret = currentFile.baseName() + ".map";
return symbolMap.LoadSymbolMap(ret.toAscii().constData());
return symbolMap.LoadSymbolMap(SymbolMapFilename(GetCurrentFilename()).toStdString().c_str());
}
void QtHost::PrepareShutdown()
{
QFileInfo currentFile(fileToStart);
QString ret = currentFile.baseName() + ".map";
symbolMap.SaveSymbolMap(ret.toAscii().constData());
symbolMap.SaveSymbolMap(SymbolMapFilename(GetCurrentFilename()).toStdString().c_str());
}
void QtHost::AddSymbol(std::string name, u32 addr, u32 size, int type=0)
@@ -130,6 +134,36 @@ bool QtHost::IsDebuggingEnabled()
#endif
}
void QtHost::SendCoreWait(bool isWaiting)
{
mainWindow->CoreEmitWait(isWaiting);
}
bool QtHost::GpuStep()
{
return m_GPUStep;
}
void QtHost::SendGPUWait()
{
EmuThread_LockDraw(false);
mainWindow->GetDialogDisasm()->UpdateDisplayList();
m_hGPUStepEvent.wait(m_hGPUStepMutex);
EmuThread_LockDraw(true);
}
void QtHost::SetGPUStep(bool value)
{
m_GPUStep = value;
}
void QtHost::NextGPUStep()
{
m_hGPUStepEvent.notify_one();
}
void NativeMix(short *audio, int num_samples)
{
if (g_mixer)
+8
View File
@@ -12,6 +12,7 @@
#include "gfx/texture.h"
#include "input/input_state.h"
#include "math/math_util.h"
#include "base/mutex.h"
#include "math/lin/matrix4x4.h"
#include <QGLWidget>
@@ -48,10 +49,17 @@ public:
bool AttemptLoadSymbolMap();
void SetWindowTitle(const char *message);
void SendCoreWait(bool);
bool GpuStep();
void SendGPUWait();
void SetGPUStep(bool value);
void NextGPUStep();
signals:
void BootDoneSignal();
private:
MainWindow* mainWindow;
bool m_GPUStep;
};
#endif // QTAPP_H
+9
View File
@@ -70,6 +70,15 @@ void Controls::showEvent(QShowEvent*)
}
}
void Controls::changeEvent(QEvent *event)
{
if (event)
if (event->type() == QEvent::LanguageChange)
ui->retranslateUi(this);
QDialog::changeEvent(event);
}
void Controls::releaseLock()
{
EmuThread_LockDraw(false);
+1
View File
@@ -31,6 +31,7 @@ public:
~Controls();
void showEvent(QShowEvent *);
void changeEvent(QEvent *);
private slots:
void releaseLock();
void on_buttonBox_accepted();
+2 -2
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>618</width>
<height>351</height>
<height>357</height>
</rect>
</property>
<property name="sizePolicy">
@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Controls</string>
<string comment="Controls window title">Controls</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
+435 -2
View File
@@ -1,18 +1,451 @@
#include "ctrldisasmview.h"
#include <QPainter>
#include <QKeyEvent>
#include <QClipboard>
#include <QMenu>
#include <QAction>
#include <QApplication>
#include <QDebug>
#include <QInputDialog>
#include <QMessageBox>
#include "debugger_disasm.h"
#include "Core/Debugger/SymbolMap.h"
namespace
{
u32 halfAndHalf(u32 a, u32 b)
{
return ((a>>1)&0x7f7f7f7f) + ((b>>1)&0x7f7f7f7f);
}
}
CtrlDisAsmView::CtrlDisAsmView(QWidget *parent) :
QTableWidget(parent)
QWidget(parent)
{
curAddress=0;
rowHeight=14;
align=2;
selecting=false;
showHex=false;
}
void CtrlDisAsmView::keyPressEvent(QKeyEvent *e)
{
int page=(rect().bottom()/rowHeight)/2-1;
if(e->key() == Qt::Key_Down)
{
curAddress += align;
e->accept();
}
else if(e->key() == Qt::Key_Up)
{
curAddress -= align;
e->accept();
}
else if(e->key() == Qt::Key_PageDown)
{
curAddress += page*align;
e->accept();
}
else if(e->key() == Qt::Key_PageUp)
{
curAddress -= page*align;
e->accept();
}
update();
}
void CtrlDisAsmView::mousePressEvent(QMouseEvent *e)
{
int x = e->pos().x();
int y = e->pos().y();
if (x>16)
{
oldSelection=selection;
selection=yToAddress(y);
bool oldselecting=selecting;
selecting=true;
if (!oldselecting || (selection!=oldSelection))
redraw();
e->accept();
}
else
{
EmuThread_LockDraw(true);
debugger->toggleBreakpoint(yToAddress(y));
EmuThread_LockDraw(false);
parentWindow->Update();
redraw();
e->accept();
}
}
void CtrlDisAsmView::wheelEvent(QWheelEvent* e)
{
int numDegrees = e->delta() / 8;
int numSteps = numDegrees / 15;
if (e->orientation() == Qt::Horizontal) {
} else {
curAddress -= numSteps*align;
e->accept();
update();
}
}
void CtrlDisAsmView::redraw()
{
update();
}
void CtrlDisAsmView::contextMenu(const QPoint &pos)
{
QMenu menu(this);
QAction *copyAddress = new QAction(tr("Copy &address"), this);
connect(copyAddress, SIGNAL(triggered()), this, SLOT(CopyAddress()));
menu.addAction(copyAddress);
QAction *copyInstrHex = new QAction(tr("Copy instruction (&hex)"), this);
connect(copyInstrHex, SIGNAL(triggered()), this, SLOT(CopyInstrHex()));
menu.addAction(copyInstrHex);
QAction *copyInstrDisAsm = new QAction(tr("Copy instruction (&disasm)"), this);
connect(copyInstrDisAsm, SIGNAL(triggered()), this, SLOT(CopyInstrDisAsm()));
menu.addAction(copyInstrDisAsm);
menu.addSeparator();
QAction *runToHere = new QAction(tr("&Run to here"), this);
connect(runToHere, SIGNAL(triggered()), this, SLOT(RunToHere()));
menu.addAction(runToHere);
QAction *setNextStatement = new QAction(tr("&Set Next Statement"), this);
connect(setNextStatement, SIGNAL(triggered()), this, SLOT(SetNextStatement()));
menu.addAction(setNextStatement);
QAction *toggleBreakpoint = new QAction(tr("&Toggle breakpoint"), this);
connect(toggleBreakpoint, SIGNAL(triggered()), this, SLOT(ToggleBreakpoint()));
menu.addAction(toggleBreakpoint);
QAction *followBranch = new QAction(tr("&Follow branch"), this);
connect(followBranch, SIGNAL(triggered()), this, SLOT(FollowBranch()));
menu.addAction(followBranch);
menu.addSeparator();
//QAction *showDynarecResults = new QAction(tr("&Show Dynarec Results"), this);
//connect(showDynarecResults, SIGNAL(triggered()), this, SLOT(ShowDynarecResults()));
//menu.addAction(showDynarecResults);
QAction *goToMemoryView = new QAction(tr("Go to in &Memory View"), this);
connect(goToMemoryView, SIGNAL(triggered()), this, SLOT(GoToMemoryView()));
menu.addAction(goToMemoryView);
menu.addSeparator();
//QAction *killFunction = new QAction(tr("&Kill function"), this);
//connect(killFunction, SIGNAL(triggered()), this, SLOT(KillFunction()));
//menu.addAction(killFunction);
QAction *renameFunction = new QAction(tr("&Rename function..."), this);
connect(renameFunction, SIGNAL(triggered()), this, SLOT(RenameFunction()));
menu.addAction(renameFunction);
menu.exec( mapToGlobal(pos));
}
void CtrlDisAsmView::click(int row, int col)
void CtrlDisAsmView::GoToMemoryView()
{
parentWindow->ShowMemory(selection);
}
void CtrlDisAsmView::CopyAddress()
{
char temp[16];
sprintf(temp,"%08x",selection);
QApplication::clipboard()->setText(QString(temp));
}
void CtrlDisAsmView::CopyInstrDisAsm()
{
EmuThread_LockDraw(true);
QApplication::clipboard()->setText(debugger->disasm(selection,align));
EmuThread_LockDraw(false);
}
void CtrlDisAsmView::CopyInstrHex()
{
char temp[24];
EmuThread_LockDraw(true);
sprintf(temp,"%08x",debugger->readMemory(selection));
EmuThread_LockDraw(false);
QApplication::clipboard()->setText(temp);
}
void CtrlDisAsmView::SetNextStatement()
{
EmuThread_LockDraw(true);
debugger->setPC(selection);
EmuThread_LockDraw(false);
redraw();
}
void CtrlDisAsmView::ToggleBreakpoint()
{
EmuThread_LockDraw(true);
debugger->toggleBreakpoint(selection);
EmuThread_LockDraw(false);
parentWindow->Update();
redraw();
}
void CtrlDisAsmView::FollowBranch()
{
EmuThread_LockDraw(true);
const char *temp = debugger->disasm(selection,align);
EmuThread_LockDraw(false);
const char *mojs=strstr(temp,"->$");
if (mojs)
{
u32 dest;
sscanf(mojs+3,"%08x",&dest);
if (dest)
{
marker = selection;
gotoAddr(dest);
}
}
}
void CtrlDisAsmView::RunToHere()
{
EmuThread_LockDraw(true);
debugger->setBreakpoint(selection);
debugger->runToBreakpoint();
EmuThread_LockDraw(false);
redraw();
}
void CtrlDisAsmView::RenameFunction()
{
int sym = symbolMap.GetSymbolNum(selection);
if (sym != -1)
{
char name[256];
strncpy(name, symbolMap.GetSymbolName(sym),256);
bool ok;
QString newname = QInputDialog::getText(this, tr("New function name"),
tr("New function name:"), QLineEdit::Normal,
name, &ok);
if (ok && !newname.isEmpty())
{
symbolMap.SetSymbolName(sym,newname.toStdString().c_str());
redraw();
parentWindow->NotifyMapLoaded();
}
}
else
{
QMessageBox::information(this,"Warning","No symbol selected",QMessageBox::Ok);
}
}
void CtrlDisAsmView::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
struct branch
{
int src,dst,srcAddr;
bool conditional;
};
branch branches[256];
int numBranches=0;
int width = rect().width();
int numRows=(rect().height()/rowHeight)/2+1;
QColor bgColor = QColor(0xFFFFFFFF);
QPen nullPen= QPen(bgColor);
QPen currentPen=QPen(QColor(0,0,0));
QPen selPen=QPen(QColor(0xFF808080));
QPen condPen=QPen(QColor(0xFFFF3020));
QBrush lbr;
lbr.setColor(bgColor);
QBrush currentBrush=QBrush(QColor(0xFFFFEfE8));
QBrush pcBrush=QBrush(QColor(0xFF70FF70));
QFont normalFont = QFont("Arial", 10);
QFont boldFont = QFont("Arial", 10);
QFont alignedFont = QFont("Monospace", 10);
boldFont.setBold(true);
painter.setFont(normalFont);
QImage breakPoint(":/images/breakpoint");
int i;
curAddress&=~(align-1);
align=(debugger->getInstructionSize(0));
for (i=-numRows; i<=numRows; i++)
{
unsigned int address=curAddress + i*align;
int rowY1 = rect().bottom()/2 + rowHeight*i - rowHeight/2;
int rowY2 = rect().bottom()/2 + rowHeight*i + rowHeight/2 - 1;
char temp[256];
sprintf(temp,"%08x",address);
lbr.setColor(marker==address?QColor(0xFFFFEEE0):QColor(debugger->getColor(address)));
QColor bg = lbr.color();
painter.setPen(nullPen);
painter.drawRect(0,rowY1,16-1,rowY2-rowY1);
if (selecting && address == selection)
painter.setPen(selPen);
else
painter.setPen(i==0 ? currentPen : nullPen);
QBrush mojsBrush=QBrush(lbr.color());
painter.setBrush(mojsBrush);
if (address == debugger->getPC())
{
painter.setBrush(pcBrush);
qDebug() << address;
}
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
painter.setBrush(currentBrush);
QPen textPen = QPen(QColor(halfAndHalf(bg.rgba(),0)));
painter.setPen(textPen);
painter.setFont(alignedFont);
painter.drawText(17,rowY1-3+rowHeight,QString(temp));
painter.setFont(normalFont);
textPen.setColor(QColor(0xFF000000));
painter.setPen(textPen);
if (debugger->isAlive())
{
const char *dizz = debugger->disasm(address, align);
char dis[512];
strcpy(dis, dizz);
char *dis2 = strchr(dis,'\t');
char desc[256]="";
if (dis2)
{
*dis2=0;
dis2++;
const char *mojs=strstr(dis2,"->$");
if (mojs)
{
for (int i=0; i<8; i++)
{
bool found=false;
for (int j=0; j<22; j++)
{
if (mojs[i+3]=="0123456789ABCDEFabcdef"[j])
found=true;
}
if (!found)
{
mojs=0;
break;
}
}
}
if (mojs)
{
int offs;
sscanf(mojs+3,"%08x",&offs);
branches[numBranches].src=rowY1 + rowHeight/2;
branches[numBranches].srcAddr=address/align;
branches[numBranches].dst=(int)(rowY1+((s64)offs-(s64)address)*rowHeight/align + rowHeight/2);
branches[numBranches].conditional = (dis[1]!=0); //unconditional 'b' branch
numBranches++;
const char *t = debugger->getDescription(offs);
if (memcmp(t,"z_",2)==0)
t+=2;
if (memcmp(t,"zz_",3)==0)
t+=3;
sprintf(desc,"-->%s", t);
textPen.setColor(QColor(0xFF600060));
painter.setPen(textPen);
}
else
{
textPen.setColor(QColor(0xFF000000));
painter.setPen(textPen);
}
painter.drawText(149,rowY1-3+rowHeight,QString(dis2));
}
textPen.setColor(QColor(0xFF007000));
painter.setPen(textPen);
painter.setFont(boldFont);
painter.drawText(84,rowY1-3+rowHeight,QString(dis));
painter.setFont(normalFont);
if (desc[0]==0)
{
const char *t = debugger->getDescription(address);
if (memcmp(t,"z_",2)==0)
t+=2;
if (memcmp(t,"zz_",3)==0)
t+=3;
strcpy(desc,t);
}
if (memcmp(desc,"-->",3) == 0)
{
textPen.setColor(QColor(0xFF0000FF));
painter.setPen(textPen);
}
else
{
textPen.setColor(halfAndHalf(halfAndHalf(bg.rgba(),0),bg.rgba()));
painter.setPen(textPen);
}
if (strlen(desc))
painter.drawText(std::max(280,width/3+190),rowY1-3+rowHeight,QString(desc));
if (debugger->isBreakpoint(address))
{
painter.drawImage(2,rowY1+2,breakPoint);
}
}
}
for (i=0; i<numBranches; i++)
{
painter.setPen(branches[i].conditional ? condPen : currentPen);
int x=280+(branches[i].srcAddr%9)*8;
QPoint curPos = QPoint(x-2,branches[i].src);
if (branches[i].dst<rect().bottom()+200 && branches[i].dst>-200)
{
painter.drawLine(curPos, QPoint(x+2,branches[i].src));
curPos = QPoint(x+2,branches[i].src);
painter.drawLine(curPos, QPoint(x+2,branches[i].dst));
curPos = QPoint(x+2,branches[i].dst);
painter.drawLine(curPos, QPoint(x-4,branches[i].dst));
curPos = QPoint(x,branches[i].dst-4);
painter.drawLine(curPos, QPoint(x-4,branches[i].dst));
curPos = QPoint(x-4,branches[i].dst);
painter.drawLine(curPos, QPoint(x+1,branches[i].dst+5));
}
else
{
painter.drawLine(curPos, QPoint(x+4,branches[i].src));
}
}
}
int CtrlDisAsmView::yToAddress(int y)
{
int ydiff=y-rect().bottom()/2-rowHeight/2;
ydiff=(int)(floor((float)ydiff / (float)rowHeight))+1;
return curAddress + ydiff * align;
}
+33 -3
View File
@@ -1,10 +1,13 @@
#ifndef CTRLDISASMVIEW_H
#define CTRLDISASMVIEW_H
#include <QTableWidget>
#include <QWidget>
#include "Core/Debugger/DebugInterface.h"
#include "EmuThread.h"
class CtrlDisAsmView : public QTableWidget
class Debugger_Disasm;
class CtrlDisAsmView : public QWidget
{
Q_OBJECT
public:
@@ -17,11 +20,18 @@ public:
align=l;
}
void setParentWindow(Debugger_Disasm* win)
{
parentWindow = win;
}
void setDebugger(DebugInterface *deb)
{
EmuThread_LockDraw(true);
debugger=deb;
curAddress=debugger->getPC();
align=debugger->getInstructionSize(0);
EmuThread_LockDraw(false);
}
DebugInterface *getDebugger()
{
@@ -34,7 +44,9 @@ public:
}
void gotoPC()
{
EmuThread_LockDraw(true);
curAddress=debugger->getPC()&(~(align-1));
EmuThread_LockDraw(false);
redraw();
}
unsigned int getSelection()
@@ -49,21 +61,38 @@ public:
void toggleBreakpoint()
{
EmuThread_LockDraw(true);
debugger->toggleBreakpoint(curAddress);
EmuThread_LockDraw(false);
redraw();
}
void contextMenu(const QPoint& pos);
void click(int row, int col);
protected:
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *);
void wheelEvent(QWheelEvent *e);
signals:
public slots:
void CopyAddress();
void CopyInstrDisAsm();
void SetNextStatement();
void FollowBranch();
void CopyInstrHex();
void RunToHere();
void ToggleBreakpoint();
void GoToMemoryView();
void RenameFunction();
private:
int yToAddress(int y);
int curAddress;
int align;
int rowHeight;
int selection;
int marker;
int oldSelection;
@@ -73,6 +102,7 @@ private:
bool showHex;
DebugInterface *debugger;
Debugger_Disasm* parentWindow;
};
+250
View File
@@ -0,0 +1,250 @@
#include "ctrlmemview.h"
#include <QPainter>
#include <QKeyEvent>
#include <QMenu>
#include <QMessageBox>
#include <QApplication>
#include <QClipboard>
#include "EmuThread.h"
#include "Core/MemMap.h"
#include "Core/Debugger/SymbolMap.h"
CtrlMemView::CtrlMemView(QWidget *parent) :
QWidget(parent)
{
curAddress=0;
rowHeight=14;
align=4;
alignMul=4;
selecting=false;
mode=MV_NORMAL;
debugger = 0;
setMinimumWidth(500);
}
void CtrlMemView::redraw()
{
update();
}
void CtrlMemView::wheelEvent(QWheelEvent* e)
{
int numDegrees = e->delta() / 8;
int numSteps = numDegrees / 15;
if (e->orientation() == Qt::Horizontal) {
} else {
curAddress -= numSteps*align*alignMul;
e->accept();
redraw();
}
}
void CtrlMemView::keyPressEvent(QKeyEvent *e)
{
int page=(rect().bottom()/rowHeight)/2-1;
if(e->key() == Qt::Key_Up)
{
curAddress-=align*alignMul;
e->accept();
}
else if(e->key() == Qt::Key_Down)
{
curAddress+=align*alignMul;
e->accept();
}
else if(e->key() == Qt::Key_PageUp)
{
curAddress-=page*align*alignMul;
e->accept();
}
else if(e->key() == Qt::Key_PageDown)
{
curAddress+=page*align*alignMul;
e->accept();
}
redraw();
}
void CtrlMemView::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
if (!debugger)
return;
int width = rect().width();
int numRows=(rect().bottom()/rowHeight)/2+1;
QPen nullPen=QPen(0xFFFFFF);
QPen currentPen=QPen(0xFF000000);
QPen selPen=QPen(0x808080);
QBrush lbr = QBrush(0xFFFFFF);
QBrush nullBrush=QBrush(0xFFFFFF);
QBrush currentBrush=QBrush(0xFFEfE8);
QBrush pcBrush=QBrush(0x70FF70);
QPen textPen;
QFont normalFont = QFont("Arial", 10);
QFont alignedFont = QFont("Monospace", 10);
painter.setFont(normalFont);
int i;
curAddress&=~(align-1);
for (i=-numRows; i<=numRows; i++)
{
unsigned int address=curAddress + i*align*alignMul;
int rowY1 = rect().bottom()/2 + rowHeight*i - rowHeight/2;
int rowY2 = rect().bottom()/2 + rowHeight*i + rowHeight/2;
char temp[256];
sprintf(temp,"%08x",address);
painter.setBrush(currentBrush);
if (selecting && address == selection)
painter.setPen(selPen);
else
painter.setPen(i==0 ? currentPen : nullPen);
painter.drawRect(0, rowY1, 16-1, rowY2 - rowY1 - 1);
painter.drawRect(16, rowY1, width - 16 -1, rowY2 - rowY1 - 1);
painter.setBrush(nullBrush);
textPen.setColor(0x600000);
painter.setPen(textPen);
painter.setFont(alignedFont);
painter.drawText(17,rowY1-2+rowHeight, temp);
textPen.setColor(0xFF000000);
painter.setPen(textPen);
if (debugger->isAlive())
{
switch(mode) {
case MV_NORMAL:
{
const char *m = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
if (Memory::IsValidAddress(address))
{
EmuThread_LockDraw(true);
u32 memory[4] = {
debugger->readMemory(address),
debugger->readMemory(address+4),
debugger->readMemory(address+8),
debugger->readMemory(address+12)
};
EmuThread_LockDraw(false);
m = (const char*)memory;
sprintf(temp, "%08x %08x %08x %08x ................",
memory[0],memory[1],memory[2],memory[3]);
}
for (int i=0; i<16; i++)
{
int c = (unsigned char)m[i];
if (c>=32 && c<255)
temp[i+37]=c;
}
}
painter.setFont(alignedFont);
painter.drawText(85,rowY1 - 2 + rowHeight, temp);
break;
case MV_SYMBOLS:
{
textPen.setColor(0x0000FF);
painter.setPen(textPen);
int fn = symbolMap.GetSymbolNum(address);
if (fn==-1)
{
sprintf(temp, "%s (ns)", Memory::GetAddressName(address));
}
else
sprintf(temp, "%s (0x%x b)", symbolMap.GetSymbolName(fn),symbolMap.GetSymbolSize(fn));
painter.drawText(205,rowY1 - 2 + rowHeight, temp);
textPen.setColor(0xFF0000000);
painter.setPen(textPen);
if (align==4)
{
u32 value = Memory::ReadUnchecked_U32(address);
sprintf(temp, "%08x [%s]", value, symbolMap.GetSymbolName(symbolMap.GetSymbolNum(value)));
}
else if (align==2)
{
u16 value = Memory::ReadUnchecked_U16(address);
sprintf(temp, "%04x [%s]", value, symbolMap.GetSymbolName(symbolMap.GetSymbolNum(value)));
}
painter.drawText(85,rowY1 - 2 + rowHeight, temp);
break;
}
}
}
}
}
void CtrlMemView::mousePressEvent(QMouseEvent *e)
{
int x = e->pos().x();
int y = e->pos().y();
if (x>16)
{
oldSelection=selection;
selection=yToAddress(y);
bool oldselecting=selecting;
selecting=true;
if (!oldselecting || (selection!=oldSelection))
redraw();
}
}
void CtrlMemView::contextMenu(const QPoint &pos)
{
QMenu menu(this);
QAction *gotoDisAsm = new QAction(tr("Go to in &disasm"), this);
//connect(gotoDisAsm, SIGNAL(triggered()), this, SLOT(GotoDisAsm()));
menu.addAction(gotoDisAsm);
menu.addSeparator();
QAction *copyValue = new QAction(tr("&Copy value"), this);
connect(copyValue, SIGNAL(triggered()), this, SLOT(CopyValue()));
menu.addAction(copyValue);
QAction *dump = new QAction(tr("Dump..."), this);
connect(dump, SIGNAL(triggered()), this, SLOT(Dump()));
menu.addAction(dump);
menu.exec( mapToGlobal(pos));
}
void CtrlMemView::CopyValue()
{
char temp[24];
sprintf(temp,"%08x",Memory::ReadUnchecked_U32(selection));
QApplication::clipboard()->setText(temp);
}
void CtrlMemView::Dump()
{
QMessageBox::information(this,"Sorry","This feature has not been implemented.",QMessageBox::Ok);
}
int CtrlMemView::yToAddress(int y)
{
int ydiff=y-rect().bottom()/2-rowHeight/2;
ydiff=(int)(floor((float)ydiff / (float)rowHeight))+1;
return curAddress + ydiff * align*alignMul;
}
+91
View File
@@ -0,0 +1,91 @@
#ifndef CTRLMEMVIEW_H
#define CTRLMEMVIEW_H
#include "Core/Debugger/DebugInterface.h"
#include <QWidget>
enum MemViewMode
{
MV_NORMAL,
MV_SYMBOLS,
MV_MAX
};
class CtrlMemView : public QWidget
{
Q_OBJECT
public:
explicit CtrlMemView(QWidget *parent = 0);
void setDebugger(DebugInterface *deb)
{
debugger=deb;
if (debugger)
align=debugger->getInstructionSize(0);
}
DebugInterface *getDebugger()
{
return debugger;
}
void redraw();
void setMode(MemViewMode m)
{
mode=m;
switch(mode) {
case MV_NORMAL:
alignMul=4;
break;
case MV_SYMBOLS:
alignMul=1;
break;
default:
break;
}
redraw();
}
void setAlign(int l)
{
align=l;
}
int yToAddress(int y);
void gotoAddr(unsigned int addr)
{
curAddress=addr&(~(align-1));
redraw();
}
unsigned int getSelection()
{
return curAddress;
}
void contextMenu(const QPoint &pos);
protected:
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *e);
void wheelEvent(QWheelEvent *e);
void mousePressEvent(QMouseEvent *e);
signals:
public slots:
void CopyValue();
void Dump();
private:
int curAddress;
int align;
int alignMul;
int rowHeight;
int selection;
int oldSelection;
bool selectionChanged;
bool selecting;
bool hasFocus;
DebugInterface *debugger;
MemViewMode mode;
};
#endif // CTRLMEMVIEW_H
+353 -1
View File
@@ -1,10 +1,362 @@
#include "ctrlregisterlist.h"
#include <QPainter>
#include <QFont>
#include <QKeyEvent>
#include <QScrollBar>
#include <QMenu>
#include <QApplication>
#include <QClipboard>
#include <QInputDialog>
#include "EmuThread.h"
#include "debugger_disasm.h"
CtrlRegisterList::CtrlRegisterList(QWidget *parent) :
QListWidget(parent)
QWidget(parent)
{
rowHeight = 14;
selecting=false;
selection=0;
category=0;
showHex=false;
cpu=0;
lastPC = 0;
lastCat0Values = NULL;
changedCat0Regs = NULL;
curVertOffset = 0;
}
CtrlRegisterList::~CtrlRegisterList()
{
if (lastCat0Values != NULL)
delete [] lastCat0Values;
if (changedCat0Regs != NULL)
delete [] changedCat0Regs;
}
void CtrlRegisterList::redraw()
{
update();
}
void CtrlRegisterList::scrollChanged(int action)
{
QScrollBar *bar = findChild<QScrollBar*>("RegListScroll");
switch(action)
{
case QScrollBar::SliderSingleStepAdd:
curVertOffset++;
break;
case QScrollBar::SliderSingleStepSub:
curVertOffset--;
break;
case QScrollBar::SliderPageStepAdd:
curVertOffset+= 4;
break;
case QScrollBar::SliderPageStepSub:
curVertOffset-= 4;
break;
case QScrollBar::SliderMove:
curVertOffset = bar->sliderPosition();
break;
default:
break;
}
redraw();
}
void CtrlRegisterList::keyPressEvent(QKeyEvent *e)
{
if(e->key() == Qt::Key_Down)
{
selection += 1;
e->accept();
}
else if(e->key() == Qt::Key_Up)
{
selection -= 1;
e->accept();
}
else if(e->key() == Qt::Key_PageDown)
{
selection += 4;
e->accept();
}
else if(e->key() == Qt::Key_PageUp)
{
selection -= 4;
e->accept();
}
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
curVertOffset = std::min(std::max(curVertOffset, selection-maxRowsDisplay),selection);
update();
}
void CtrlRegisterList::mousePressEvent(QMouseEvent *e)
{
int x = e->pos().x();
int y = e->pos().y();
if (x>16)
{
oldSelection=selection;
if (y>rowHeight)
{
selection=yToIndex(y);
bool oldselecting=selecting;
selecting=true;
if (!oldselecting || (selection!=oldSelection))
redraw();
}
else
{
int lastCat = category;
category = (x*cpu->GetNumCategories())/(rect().width());
if (category<0) category=0;
if (category>=cpu->GetNumCategories())
category=cpu->GetNumCategories()-1;
if (category!=lastCat)
{
curVertOffset = 0;
redraw();
}
}
}
else
{
redraw();
}
e->accept();
}
void CtrlRegisterList::wheelEvent(QWheelEvent* e)
{
int numDegrees = e->delta() / 8;
int numSteps = numDegrees / 15;
if (e->orientation() == Qt::Horizontal) {
} else {
curVertOffset -= numSteps;
e->accept();
update();
}
}
void CtrlRegisterList::paintEvent(QPaintEvent *)
{
int numRowsTotal = cpu->GetNumRegsInCategory(category);
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
selection = std::min(std::max(selection,0),numRowsTotal);
curVertOffset = std::min(std::max(curVertOffset, 0),numRowsTotal - maxRowsDisplay);
QScrollBar *bar = findChild<QScrollBar*>("RegListScroll");
if(bar)
{
bar->setMinimum(0);
bar->setMaximum(numRowsTotal - maxRowsDisplay);
bar->setPageStep(1);
bar->setValue(curVertOffset);
}
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
if (!cpu)
return;
QFont normalFont = QFont("Arial", 10);
painter.setFont(normalFont);
int width = rect().width();
QColor bgColor = QColor(0xffffff);
QPen nullPen=QPen(bgColor);
QPen currentPen=QPen(QColor(0xFF000000));
QPen selPen=QPen(0x808080);
QPen textPen;
QBrush lbr;
lbr.setColor(bgColor);
QBrush nullBrush=QBrush(bgColor);
QBrush currentBrush=QBrush(0xFFEfE8);
QBrush pcBrush=QBrush(0x70FF70);
int nc = cpu->GetNumCategories();
for (int i=0; i<nc; i++)
{
painter.setPen(i==category?currentPen:nullPen);
painter.setBrush(i==category?pcBrush:nullBrush);
painter.drawRect(width*i/nc,0,width*(i+1)/nc - width*i/nc -1,rowHeight-1);
QString name = cpu->GetCategoryName(i);
painter.setPen(currentPen);
painter.drawText(width*i/nc+1,-3+rowHeight,name);
}
int numRows=rect().bottom()/rowHeight;
for (int i=curVertOffset; i<curVertOffset+numRows; i++)
{
int rowY1 = rowHeight*(i-curVertOffset+1);
int rowY2 = rowHeight*(i-curVertOffset+2)-1;
lbr.setColor(i==selection?0xffeee0:0xffffff);
painter.setBrush(currentBrush);
painter.setPen(nullPen);
painter.drawRect(0,rowY1,16-1,rowY2-rowY1);
if (selecting && i == selection)
painter.setPen(selPen);
else
painter.setPen(nullPen);
QBrush mojsBrush=QBrush(lbr.color());
painter.setBrush(mojsBrush);
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
// Check for any changes in the registers.
if (lastPC != cpu->GetPC())
{
for (int i = 0, n = cpu->GetNumRegsInCategory(0); i < n; ++i)
{
u32 v = cpu->GetRegValue(0, i);
changedCat0Regs[i] = v != lastCat0Values[i];
lastCat0Values[i] = v;
}
lastPC = cpu->GetPC();
}
painter.setBrush(currentBrush);
if (i<cpu->GetNumRegsInCategory(category))
{
char temp[256];
sprintf(temp,"%s",cpu->GetRegName(category,i));
textPen.setColor(0x600000);
painter.setPen(textPen);
painter.drawText(17,rowY1-3+rowHeight,temp);
textPen.setColor(0xFF000000);
painter.setPen(textPen);
cpu->PrintRegValue(category,i,temp);
if (category == 0 && changedCat0Regs[i])
{
textPen.setColor(0x0000FF);
painter.setPen(textPen);
}
else
{
textPen.setColor(0x004000);
painter.setPen(textPen);
}
painter.drawText(77,rowY1-3+rowHeight,temp);
}
}
}
int CtrlRegisterList::yToIndex(int y)
{
int n = (y/rowHeight) - 1 + curVertOffset;
if (n<0) n=0;
return n;
}
void CtrlRegisterList::contextMenu(const QPoint &pos)
{
QMenu menu(this);
QAction *gotoMemory = new QAction(tr("Go to in &memory view"), this);
connect(gotoMemory, SIGNAL(triggered()), this, SLOT(GotoMemory()));
menu.addAction(gotoMemory);
QAction *gotoDisAsm = new QAction(tr("Go to in &disasm"), this);
connect(gotoDisAsm, SIGNAL(triggered()), this, SLOT(GotoDisAsm()));
menu.addAction(gotoDisAsm);
menu.addSeparator();
QAction *copyValue = new QAction(tr("&Copy value"), this);
connect(copyValue, SIGNAL(triggered()), this, SLOT(CopyValue()));
menu.addAction(copyValue);
QAction *change = new QAction(tr("C&hange..."), this);
connect(change, SIGNAL(triggered()), this, SLOT(Change()));
menu.addAction(change);
menu.exec( mapToGlobal(pos));
}
void CtrlRegisterList::GotoMemory()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
EmuThread_LockDraw(true);
u32 val = cpu->GetRegValue(cat,reg);
EmuThread_LockDraw(false);
parentWindow->ShowMemory(val);
}
void CtrlRegisterList::GotoDisAsm()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
EmuThread_LockDraw(true);
u32 val = cpu->GetRegValue(cat,reg);
EmuThread_LockDraw(false);
emit GotoDisasm(val);
}
void CtrlRegisterList::CopyValue()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
EmuThread_LockDraw(true);
u32 val = cpu->GetRegValue(cat,reg);
EmuThread_LockDraw(false);
char temp[24];
sprintf(temp,"%08x",val);
QApplication::clipboard()->setText(temp);
}
void CtrlRegisterList::Change()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
EmuThread_LockDraw(true);
u32 val = cpu->GetRegValue(cat,reg);
EmuThread_LockDraw(false);
bool ok;
QString text = QInputDialog::getText(this, tr("Set new value"),
tr("Set new value:"), QLineEdit::Normal,
QString::number(val), &ok);
if (ok && !text.isEmpty())
{
EmuThread_LockDraw(true);
cpu->SetRegValue(cat,reg,text.toInt());
EmuThread_LockDraw(false);
redraw();
}
}
+29 -4
View File
@@ -1,16 +1,21 @@
#ifndef CTRLREGISTERLIST_H
#define CTRLREGISTERLIST_H
#include <QListWidget>
#include <QWidget>
#include "Core/Debugger/DebugInterface.h"
class CtrlRegisterList : public QListWidget
class Debugger_Disasm;
class CtrlRegisterList : public QWidget
{
Q_OBJECT
public:
explicit CtrlRegisterList(QWidget *parent = 0);
void redraw();
void setParentWindow(Debugger_Disasm* win)
{
parentWindow = win;
}
void setCPU(DebugInterface *deb)
{
@@ -26,10 +31,27 @@ public:
{
return cpu;
}
~CtrlRegisterList();
void contextMenu(const QPoint &pos);
protected:
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *e);
void mousePressEvent(QMouseEvent *e);
void wheelEvent(QWheelEvent *e);
signals:
void GotoDisasm(u32);
public slots:
void redraw();
void scrollChanged(int);
void GotoDisAsm();
void CopyValue();
void Change();
void GotoMemory();
private:
int yToIndex(int y);
int rowHeight;
int selection;
@@ -43,10 +65,13 @@ private:
bool hasFocus;
bool showHex;
DebugInterface *cpu;
int curVertOffset;
u32 lastPC;
u32 *lastCat0Values;
bool *changedCat0Regs;
Debugger_Disasm* parentWindow;
};
#endif // CTRLREGISTERLIST_H
+98
View File
@@ -0,0 +1,98 @@
#include "ctrlvfpuview.h"
#include <QPainter>
#include "Core/MIPS/MIPS.h" // BAD
CtrlVfpuView::CtrlVfpuView(QWidget *parent) :
QWidget(parent)
{
mode = 0;
}
void CtrlVfpuView::setMode(int newMode)
{
mode = newMode;
redraw();
}
void CtrlVfpuView::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
if (!cpu)
return;
QFont normalFont = QFont("Arial", 10);
painter.setFont(normalFont);
QPen currentPen=QPen(0xFF000000);
QBrush nullBrush=QBrush(0xFFEfE8);
painter.setPen(currentPen);
painter.setBrush(nullBrush);
enum
{
rowHeight = 15,
columnWidth = 80,
xStart = columnWidth/2,
yStart = 0
};
for (int matrix = 0; matrix<8; matrix++)
{
int my = (int)(yStart + matrix * rowHeight * 5.5f);
painter.drawRect(0, my, xStart-1, rowHeight-1);
char temp[256];
sprintf(temp, "M%i00", matrix);
painter.drawText(3, my+rowHeight-3, temp);
painter.drawRect(xStart, my+rowHeight, columnWidth*4-1, 4*rowHeight-1);
for (int column = 0; column<4; column++)
{
int y = my;
int x = column * columnWidth + xStart;
painter.drawRect(x, y, columnWidth-1, rowHeight - 1);
char temp[256];
sprintf(temp, "R%i0%i", matrix, column);
painter.drawText(x+3, y-3+rowHeight, temp);
painter.drawRect(0, y+rowHeight*(column+1), xStart - 1, rowHeight - 1);
sprintf(temp, "C%i%i0", matrix, column);
painter.drawText(3, y+rowHeight*(column+2)-3, temp);
y+=rowHeight;
for (int row = 0; row<4; row++)
{
float val = mipsr4k.v[column*32+row+matrix*4];
u32 hex = *((u32*)&val);
char temp[256];
switch (mode)
{
case 0: sprintf(temp,"%f",val); break;
// case 1: sprintf(temp,"??"); break;
case 2: sprintf(temp,"0x%08x",hex); break;
default:sprintf(temp,"%f",val); break;
}
painter.drawText(x+3, y-3 + rowHeight, temp);
y+=rowHeight;
}
}
}
setMinimumHeight((int)(yStart + 8 * rowHeight * 5.5f));
setMinimumWidth(4*columnWidth+xStart);
}
void CtrlVfpuView::redraw()
{
update();
}
+42
View File
@@ -0,0 +1,42 @@
#ifndef CTRLVFPUVIEW_H
#define CTRLVFPUVIEW_H
#include <QWidget>
#include "Core/Debugger/DebugInterface.h"
class Debugger_Vfpu;
class CtrlVfpuView : public QWidget
{
Q_OBJECT
public:
explicit CtrlVfpuView(QWidget *parent = 0);
void setParentWindow(Debugger_Vfpu* win)
{
parentWindow = win;
}
void setCPU(DebugInterface *deb)
{
cpu = deb;
}
DebugInterface *getCPU()
{
return cpu;
}
void setMode(int newMode);
void redraw();
protected:
void paintEvent(QPaintEvent *);
signals:
public slots:
private:
DebugInterface *cpu;
Debugger_Vfpu* parentWindow;
int mode;
};
#endif // CTRLVFPUVIEW_H
+486 -55
View File
@@ -1,15 +1,26 @@
#include <QMenu>
#include <QTimer>
#include <deque>
#include "debugger_disasm.h"
#include "ui_debugger_disasm.h"
#include "Core/CPU.h"
#include "Core/Debugger/DebugInterface.h"
#include "Core/Debugger/SymbolMap.h"
#include "ctrldisasmview.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/HLE/HLE.h"
#include "Core/CoreTiming.h"
#include "mainwindow.h"
#include "ctrlregisterlist.h"
#include "native/base/stringutil.h"
#include "Core/Debugger/SymbolMap.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
#include "GPU/GeDisasm.h"
#include "EmuThread.h"
#include "Core/Host.h"
Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
QDialog(parent),
@@ -19,19 +30,50 @@ Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_,
{
ui->setupUi(this);
vfpudlg = new Debugger_VFPU(_cpu, mainWindow, this);
ui->DisasmView->setWindowTitle(_cpu->GetName());
QObject::connect(ui->RegListScroll,SIGNAL(actionTriggered(int)), ui->RegList, SLOT(scrollChanged(int)));
QObject::connect(ui->RegList,SIGNAL(GotoDisasm(u32)),this,SLOT(Goto(u32)));
QObject::connect(this, SIGNAL(updateDisplayList_()), this, SLOT(UpdateDisplayListGUI()));
QObject::connect(this, SIGNAL(UpdateBreakpoints_()), this, SLOT(UpdateBreakpointsGUI()));
QObject::connect(this, SIGNAL(UpdateThread_()), this, SLOT(UpdateThreadGUI()));
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->setDebugger(cpu);
ptr->setParentWindow(this);
ptr->gotoAddr(0x00000000);
CtrlRegisterList *rl = ui->RegList;
rl->setParentWindow(this);
rl->setCPU(cpu);
//symbolMap.FillSymbolComboBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION)
FillFunctions();
}
void Debugger_Disasm::showEvent(QShowEvent *)
{
#ifdef Q_WS_X11
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
EmuThread_LockDraw(true);
QTimer::singleShot(100, this, SLOT(releaseLock()));
#endif
if(Core_IsStepping())
SetDebugMode(true);
else
SetDebugMode(false);
}
void Debugger_Disasm::releaseLock()
{
EmuThread_LockDraw(false);
}
Debugger_Disasm::~Debugger_Disasm()
{
delete ui;
@@ -39,73 +81,68 @@ Debugger_Disasm::~Debugger_Disasm()
void Debugger_Disasm::ShowVFPU()
{
//vfpudlg->Show(true);
vfpudlg->show();
}
void Debugger_Disasm::FunctionList()
void Debugger_Disasm::Update()
{
}
void Debugger_Disasm::GotoInt()
{
ui->RegList->redraw();
mainWindow->UpdateMenus();
UpdateDialog();
}
void Debugger_Disasm::Go()
{
SetDebugMode(false);
EmuThread_LockDraw(true);
Core_EnableStepping(false);
EmuThread_LockDraw(false);
mainWindow->UpdateMenus();
}
void Debugger_Disasm::Step()
{
CtrlDisAsmView *ptr = ui->DisasmView;
CtrlRegisterList *reglist = ui->RegList;
EmuThread_LockDraw(true);
Core_DoSingleStep();
//Sleep(1);
sleep(1);
EmuThread_LockDraw(false);
_dbg_update_();
ptr->gotoPC();
reglist->redraw();
//vfpudlg->Update();
}
void Debugger_Disasm::StepOver()
{
CtrlDisAsmView *ptr = ui->DisasmView;
CtrlRegisterList *reglist = ui->RegList;
SetDebugMode(false);
EmuThread_LockDraw(true);
CBreakPoints::AddBreakPoint(cpu->GetPC()+cpu->getInstructionSize(0),true);
_dbg_update_();
Core_EnableStepping(false);
EmuThread_LockDraw(false);
mainWindow->UpdateMenus();
//Sleep(1);
sleep(1);
ptr->gotoPC();
reglist->redraw();
}
void Debugger_Disasm::StepHLE()
{
EmuThread_LockDraw(true);
hleDebugBreak();
SetDebugMode(false);
_dbg_update_();
Core_EnableStepping(false);
EmuThread_LockDraw(false);
mainWindow->UpdateMenus();
}
void Debugger_Disasm::UpdateDialog()
{
CtrlDisAsmView *ptr = ui->DisasmView;
CtrlRegisterList *reglist = ui->RegList;
ui->DisasmView->setAlign(cpu->getInstructionSize(0));
ui->DisasmView->redraw();
ui->RegList->redraw();
vfpudlg->Update();
UpdateBreakpoints();
UpdateThread();
UpdateDisplayList();
ptr->setAlign(cpu->getInstructionSize(0));
ptr->redraw();
reglist->redraw();
char tempTicks[24];
sprintf(tempTicks, "%lld", CoreTiming::GetTicks());
ui->debugCount->setText(QString("Ctr : ") + tempTicks);
/*ui->callStack->clear();
u32 pc = currentMIPS->pc;
@@ -116,12 +153,12 @@ void Debugger_Disasm::UpdateDialog()
sprintf(addr_, "0x%08x",pc);
ui->callStack->addItem(new QListWidgetItem(addr_));
u32 addr2 = Memory::ReadUnchecked_U32(ra);
addr = Memory::ReadUnchecked_U32(ra);
sprintf(addr_, "0x%08x",ra);
ui->callStack->addItem(new QListWidgetItem(addr_));
count++;
while (addr != 0xFFFFFFFF && addr!=0 && count++<20)
while (addr != 0xFFFFFFFF && addr!=0 && Memory::IsValidAddress(addr+4) && count++<20)
{
u32 fun = Memory::ReadUnchecked_U32(addr+4);
sprintf(addr_, "0x%08x",fun);
@@ -129,37 +166,30 @@ void Debugger_Disasm::UpdateDialog()
addr = Memory::ReadUnchecked_U32(addr);
}*/
/*
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->Update();
*/
if(mainWindow->GetDialogMemory())
mainWindow->GetDialogMemory()->Update();
}
void Debugger_Disasm::Stop()
{
CtrlDisAsmView *ptr = ui->DisasmView;
CtrlRegisterList *reglist = ui->RegList;
SetDebugMode(true);
EmuThread_LockDraw(true);
Core_EnableStepping(true);
EmuThread_LockDraw(false);
_dbg_update_();
mainWindow->UpdateMenus();
UpdateDialog();
//Sleep(1); //let cpu catch up
sleep(1);
ptr->gotoPC();
reglist->redraw();
//vfpudlg->Update();
}
void Debugger_Disasm::Skip()
{
CtrlDisAsmView *ptr = ui->DisasmView;
EmuThread_LockDraw(true);
cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0));
//Sleep(1);
sleep(1);
EmuThread_LockDraw(false);
ptr->gotoPC();
UpdateDialog();
}
@@ -185,12 +215,13 @@ void Debugger_Disasm::SetDebugMode(bool _bDebug)
{
ui->Go->setEnabled(true);
ui->StepInto->setEnabled(true);
ui->StepOver->setEnabled(true);
ui->StepOver->setEnabled(false); // Crash, so disable for now
ui->NextHLE->setEnabled(true);
ui->Stop->setEnabled(false);
ui->Skip->setEnabled(true);
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoPC();
UpdateDialog();
}
else
{
@@ -200,9 +231,9 @@ void Debugger_Disasm::SetDebugMode(bool _bDebug)
ui->NextHLE->setEnabled(false);
ui->Stop->setEnabled(true);
ui->Skip->setEnabled(false);
CtrlRegisterList *reglist = ui->RegList;
reglist->redraw();
}
CtrlRegisterList *reglist = ui->RegList;
reglist->redraw();
}
void Debugger_Disasm::Goto(u32 addr)
@@ -272,14 +303,414 @@ void Debugger_Disasm::on_DisasmView_customContextMenuRequested(const QPoint &pos
ui->DisasmView->contextMenu(pos);
}
void Debugger_Disasm::on_DisasmView_cellClicked(int row, int column)
{
ui->DisasmView->click(row, column);
}
void Debugger_Disasm::NotifyMapLoaded()
{
//symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION);
FillFunctions();
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->redraw();
}
void Debugger_Disasm::on_RegList_customContextMenuRequested(const QPoint &pos)
{
ui->RegList->contextMenu(pos);
}
void Debugger_Disasm::ShowMemory(u32 addr)
{
mainWindow->ShowMemory(addr);
}
void Debugger_Disasm::on_vfpu_clicked()
{
ShowVFPU();
}
void Debugger_Disasm::on_FuncList_itemClicked(QListWidgetItem *item)
{
u32 addr = item->data(Qt::UserRole).toInt();
ui->DisasmView->gotoAddr(addr);
}
void Debugger_Disasm::FillFunctions()
{
QListWidgetItem* item = new QListWidgetItem();
item->setText("(0x02000000)");
item->setData(Qt::UserRole, 0x02000000);
ui->FuncList->addItem(item);
for(int i = 0; i < symbolMap.GetNumSymbols(); i++)
{
if(symbolMap.GetSymbolType(i) & ST_FUNCTION)
{
QListWidgetItem* item = new QListWidgetItem();
item->setText(QString(symbolMap.GetSymbolName(i)) + " ("+ QVariant(symbolMap.GetSymbolSize(i)).toString() +")");
item->setData(Qt::UserRole, symbolMap.GetAddress(i));
ui->FuncList->addItem(item);
}
}
}
void Debugger_Disasm::UpdateBreakpoints()
{
emit UpdateBreakpoints_();
}
void Debugger_Disasm::UpdateBreakpointsGUI()
{
u32 curBpAddr = 0;
QTreeWidgetItem* curItem = ui->breakpointsList->currentItem();
if(curItem)
curBpAddr = ui->breakpointsList->currentItem()->data(0,Qt::UserRole).toInt();
ui->breakpointsList->clear();
EmuThread_LockDraw(true);
for(int i = 0; i < CBreakPoints::GetNumBreakpoints(); i++)
{
u32 addr_ = CBreakPoints::GetBreakpointAddress(i);
if(!CBreakPoints::IsTempBreakPoint(addr_))
{
QTreeWidgetItem* item = new QTreeWidgetItem();
char temp[24];
sprintf(temp,"%08x",addr_);
item->setText(0,temp);
item->setData(0,Qt::UserRole,addr_);
ui->breakpointsList->addTopLevelItem(item);
if(curBpAddr == addr_)
ui->breakpointsList->setCurrentItem(item);
}
}
EmuThread_LockDraw(false);
}
void Debugger_Disasm::on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column)
{
ui->DisasmView->gotoAddr(item->data(column,Qt::UserRole).toInt());
}
void Debugger_Disasm::on_breakpointsList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->breakpointsList->itemAt(pos);
if(item)
{
breakpointAddr = item->data(0,Qt::UserRole).toInt();
QMenu menu(this);
QAction *removeBP = new QAction(tr("Remove breakpoint"), this);
connect(removeBP, SIGNAL(triggered()), this, SLOT(RemoveBreakpoint()));
menu.addAction(removeBP);
menu.exec( ui->breakpointsList->mapToGlobal(pos));
}
}
void Debugger_Disasm::RemoveBreakpoint()
{
CBreakPoints::RemoveBreakPoint(breakpointAddr);
Update();
}
void Debugger_Disasm::on_clearAllBP_clicked()
{
CBreakPoints::ClearAllBreakPoints();
Update();
}
void Debugger_Disasm::UpdateThread()
{
emit UpdateThread_();
}
void Debugger_Disasm::UpdateThreadGUI()
{
ui->threadList->clear();
EmuThread_LockDraw(true);
std::vector<DebugThreadInfo> threads = GetThreadsInfo();
EmuThread_LockDraw(false);
for(int i = 0; i < threads.size(); i++)
{
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QVariant(threads[i].id).toString());
item->setData(0,Qt::UserRole,threads[i].id);
item->setText(1,threads[i].name);
QString status = "";
if(threads[i].status & THREADSTATUS_RUNNING) status += "Running ";
if(threads[i].status & THREADSTATUS_WAIT) status += "Wait ";
if(threads[i].status & THREADSTATUS_READY) status += "Ready ";
if(threads[i].status & THREADSTATUS_SUSPEND) status += "Suspend ";
if(threads[i].status & THREADSTATUS_DORMANT) status += "Dormant ";
if(threads[i].status & THREADSTATUS_DEAD) status += "Dead ";
item->setText(2,status);
char temp[24];
sprintf(temp,"%08x",threads[i].curPC);
item->setText(3,temp);
item->setData(3,Qt::UserRole,threads[i].curPC);
sprintf(temp,"%08x",threads[i].entrypoint);
item->setText(4,temp);
item->setData(4,Qt::UserRole,threads[i].entrypoint);
if(threads[i].isCurrent)
{
for(int j = 0; j < 5; j++)
item->setTextColor(j,Qt::green);
}
ui->threadList->addTopLevelItem(item);
}
}
void Debugger_Disasm::on_threadList_itemClicked(QTreeWidgetItem *item, int column)
{
ui->DisasmView->gotoAddr(item->data(3,Qt::UserRole).toInt());
}
void Debugger_Disasm::on_threadList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->threadList->itemAt(pos);
if(item)
{
threadRowSelected = item;
QMenu menu(this);
QAction *gotoEntryPoint = new QAction(tr("Go to entry point"), this);
connect(gotoEntryPoint, SIGNAL(triggered()), this, SLOT(GotoThreadEntryPoint()));
menu.addAction(gotoEntryPoint);
QMenu* changeStatus = menu.addMenu("Change status");
QAction *statusRunning = new QAction(tr("Running"), this);
connect(statusRunning, SIGNAL(triggered()), this, SLOT(SetThreadStatusRun()));
changeStatus->addAction(statusRunning);
QAction *statusWait = new QAction(tr("Wait"), this);
connect(statusWait, SIGNAL(triggered()), this, SLOT(SetThreadStatusWait()));
changeStatus->addAction(statusWait);
QAction *statusSuspend = new QAction(tr("Suspend"), this);
connect(statusSuspend, SIGNAL(triggered()), this, SLOT(SetThreadStatusSuspend()));
changeStatus->addAction(statusSuspend);
menu.exec( ui->threadList->mapToGlobal(pos));
}
}
void Debugger_Disasm::GotoThreadEntryPoint()
{
ui->DisasmView->gotoAddr(threadRowSelected->data(4,Qt::UserRole).toInt());
Update();
}
void Debugger_Disasm::SetThreadStatus(ThreadStatus status)
{
EmuThread_LockDraw(true);
__KernelChangeThreadState(threadRowSelected->data(0,Qt::UserRole).toInt(), status);
EmuThread_LockDraw(false);
UpdateThread();
}
void Debugger_Disasm::SetThreadStatusRun()
{
SetThreadStatus(THREADSTATUS_RUNNING);
}
void Debugger_Disasm::SetThreadStatusWait()
{
SetThreadStatus(THREADSTATUS_WAIT);
}
void Debugger_Disasm::SetThreadStatusSuspend()
{
SetThreadStatus(THREADSTATUS_SUSPEND);
}
void Debugger_Disasm::UpdateDisplayList()
{
emit updateDisplayList_();
}
void Debugger_Disasm::UpdateDisplayListGUI()
{
u32 curDlId = 0;
QTreeWidgetItem* curItem = ui->displayList->currentItem();
if(curItem)
curDlId = ui->displayList->currentItem()->data(0,Qt::UserRole).toInt();
ui->displayList->clear();
ui->displayListData->clear();
EmuThread_LockDraw(true);
const std::deque<DisplayList>& dlQueue = gpu->GetDisplayLists();
DisplayList* dl = gpu->GetCurrentDisplayList();
if(dl)
{
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QVariant(dl->id).toString());
item->setData(0, Qt::UserRole, dl->id);
switch(dl->status)
{
case PSP_GE_LIST_DONE: item->setText(1,"Done"); break;
case PSP_GE_LIST_QUEUED: item->setText(1,"Queued"); break;
case PSP_GE_LIST_DRAWING: item->setText(1,"Drawing"); break;
case PSP_GE_LIST_STALL_REACHED: item->setText(1,"Stall Reached"); break;
case PSP_GE_LIST_END_REACHED: item->setText(1,"End Reached"); break;
case PSP_GE_LIST_CANCEL_DONE: item->setText(1,"Cancel Done"); break;
default: break;
}
char temp[24];
sprintf(temp,"%08x",dl->startpc);
item->setText(2,temp);
item->setData(2, Qt::UserRole, dl->startpc);
sprintf(temp,"%08x",dl->pc);
item->setText(3,temp);
item->setData(3, Qt::UserRole, dl->pc);
ui->displayList->addTopLevelItem(item);
if(curDlId == dl->id)
{
ui->displayList->setCurrentItem(item);
displayListRowSelected = item;
ShowDLCode();
}
}
for(auto it = dlQueue.begin(); it != dlQueue.end(); ++it)
{
if(dl && it->id == dl->id)
continue;
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QVariant(it->id).toString());
item->setData(0, Qt::UserRole, it->id);
switch(it->status)
{
case PSP_GE_LIST_DONE: item->setText(1,"Done"); break;
case PSP_GE_LIST_QUEUED: item->setText(1,"Queued"); break;
case PSP_GE_LIST_DRAWING: item->setText(1,"Drawing"); break;
case PSP_GE_LIST_STALL_REACHED: item->setText(1,"Stall Reached"); break;
case PSP_GE_LIST_END_REACHED: item->setText(1,"End Reached"); break;
case PSP_GE_LIST_CANCEL_DONE: item->setText(1,"Cancel Done"); break;
default: break;
}
char temp[24];
sprintf(temp,"%08x",it->startpc);
item->setText(2,temp);
item->setData(2, Qt::UserRole, it->startpc);
sprintf(temp,"%08x",it->pc);
item->setText(3,temp);
item->setData(3, Qt::UserRole, it->pc);
ui->displayList->addTopLevelItem(item);
if(curDlId == it->id)
{
ui->displayList->setCurrentItem(item);
displayListRowSelected = item;
ShowDLCode();
}
}
EmuThread_LockDraw(false);
}
void Debugger_Disasm::on_displayList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->displayList->itemAt(pos);
if(item)
{
displayListRowSelected = item;
QMenu menu(this);
QAction *showCode = new QAction(tr("Show code"), this);
connect(showCode, SIGNAL(triggered()), this, SLOT(ShowDLCode()));
menu.addAction(showCode);
menu.exec( ui->displayList->mapToGlobal(pos));
}
}
void Debugger_Disasm::ShowDLCode()
{
ui->displayListData->clear();
ui->displayListData->setColumnWidth(0,70);
u32 startPc = displayListRowSelected->data(2,Qt::UserRole).toInt();
u32 curPc = displayListRowSelected->data(3,Qt::UserRole).toInt();
std::map<int,std::string> data;
FillDisplayListCmd(data, startPc,0);
for(std::map<int,std::string>::iterator it = data.begin(); it != data.end(); it++)
{
QTreeWidgetItem* item = new QTreeWidgetItem();
char temp[24];
sprintf(temp,"%08x",it->first);
item->setText(0,temp);
item->setText(1,it->second.c_str());
if(curPc == it->first)
{
for(int j = 0; j < 2; j++)
item->setTextColor(j, Qt::green);
}
ui->displayListData->addTopLevelItem(item);
}
}
void Debugger_Disasm::FillDisplayListCmd(std::map<int,std::string>& data, u32 pc, u32 prev)
{
u32 curPc = pc;
int debugLimit = 10000; // Anti crash if this code is bugged
while(Memory::IsValidAddress(curPc) && debugLimit > 0)
{
if(data.find(curPc) != data.end())
return;
u32 op = Memory::ReadUnchecked_U32(curPc); //read from memory
u32 cmd = op >> 24;
u32 diff = op ^ gstate.cmdmem[cmd];
char temp[256];
GeDisassembleOp(curPc, op, prev, temp);
data[curPc] = temp;
prev = op;
if(cmd == GE_CMD_JUMP)
{
u32 target = (((gstate.base & 0x00FF0000) << 8) | (op & 0xFFFFFC)) & 0x0FFFFFFF;
FillDisplayListCmd(data, target, prev);
return;
}
else if(cmd == GE_CMD_CALL)
{
u32 target = gstate_c.getRelativeAddress(op & 0xFFFFFF);
FillDisplayListCmd(data, target, prev);
}
else if(cmd == GE_CMD_RET)
{
return;
}
else if(cmd == GE_CMD_FINISH)
{
return;
}
else if(cmd == GE_CMD_END)
{
if(prev >> 24 == GE_CMD_FINISH)
return;
}
curPc += 4;
debugLimit--;
}
}
void Debugger_Disasm::on_nextGPU_clicked()
{
host->SetGPUStep(true);
host->NextGPUStep();
}
void Debugger_Disasm::on_runBtn_clicked()
{
host->SetGPUStep(false);
host->NextGPUStep();
}
+60 -4
View File
@@ -1,8 +1,12 @@
#ifndef DEBUGGER_DISASM_H
#define DEBUGGER_DISASM_H
#include "Core/HLE/sceKernelThread.h"
#include "Core/Debugger/DebugInterface.h"
#include "debugger_vfpu.h"
#include <QDialog>
#include <QListWidgetItem>
#include <QTreeWidgetItem>
class MainWindow;
namespace Ui {
@@ -17,11 +21,8 @@ public:
explicit Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent = 0);
~Debugger_Disasm();
void SetDebugMode(bool _bDebug);
void Goto(u32 addr);
void ShowVFPU();
void FunctionList();
void GotoInt();
void Go();
void Step();
void StepOver();
@@ -32,7 +33,32 @@ public:
void GotoLR();
void UpdateDialog();
void NotifyMapLoaded();
void Update();
void ShowMemory(u32 addr);
void FillFunctions();
void UpdateBreakpoints();
void UpdateThread();
void UpdateDisplayList();
protected:
void showEvent(QShowEvent *);
void FillDisplayListCmd(std::map<int,std::string>& data, u32 pc, u32 prev);
signals:
void updateDisplayList_();
void UpdateBreakpoints_();
void UpdateThread_();
public slots:
void Goto(u32 addr);
void RemoveBreakpoint();
void GotoThreadEntryPoint();
void ShowDLCode();
private slots:
void UpdateDisplayListGUI();
void UpdateBreakpointsGUI();
void UpdateThreadGUI();
void on_GotoPc_clicked();
void on_Go_clicked();
@@ -55,12 +81,42 @@ private slots:
void on_DisasmView_customContextMenuRequested(const QPoint &pos);
void on_DisasmView_cellClicked(int row, int column);
void releaseLock();
void on_RegList_customContextMenuRequested(const QPoint &pos);
void on_vfpu_clicked();
void on_FuncList_itemClicked(QListWidgetItem *item);
void on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column);
void on_breakpointsList_customContextMenuRequested(const QPoint &pos);
void on_clearAllBP_clicked();
void on_threadList_itemClicked(QTreeWidgetItem *item, int column);
void on_threadList_customContextMenuRequested(const QPoint &pos);
void SetThreadStatusRun();
void SetThreadStatusWait();
void SetThreadStatusSuspend();
void on_displayList_customContextMenuRequested(const QPoint &pos);
void on_nextGPU_clicked();
void on_runBtn_clicked();
private:
void SetThreadStatus(ThreadStatus status);
Ui::Debugger_Disasm *ui;
DebugInterface* cpu;
MainWindow* mainWindow;
Debugger_VFPU* vfpudlg;
u32 breakpointAddr;
QTreeWidgetItem* threadRowSelected;
QTreeWidgetItem* displayListRowSelected;
};
#endif // DEBUGGER_DISASM_H
+525 -244
View File
@@ -7,281 +7,562 @@
<x>0</x>
<y>0</y>
<width>837</width>
<height>423</height>
<height>492</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string comment="Window title">Disassembler</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Ctr:</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="Goto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>&amp;Go to</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="Address"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="debugCount">
<property name="text">
<string>Ctr:</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="Goto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>&amp;Go to</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="GotoPc">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;PC</string>
</property>
</widget>
<widget class="QLineEdit" name="Address"/>
</item>
<item>
<widget class="QPushButton" name="GotoLr">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="text">
<string>&amp;LR</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="GotoInt">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<item>
<widget class="QPushButton" name="GotoPc">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;PC</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="GotoLr">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;LR</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="GotoInt">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="CtrlRegisterList" name="RegList"/>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="vfpu">
<property name="text">
<string>Show VFPU</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QListWidget" name="FuncList"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="Go">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Go</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Stop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepInto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Into</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepOver">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Over</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Skip">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>S&amp;kip</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="NextHLE">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Next &amp;HLE</string>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Regs</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="CtrlRegisterList" name="RegList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>229</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QScrollBar" name="RegListScroll">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Funcs</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QListWidget" name="FuncList"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<widget class="CtrlDisAsmView" name="DisasmView">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>true</bool>
</property>
<property name="gridStyle">
<enum>Qt::NoPen</enum>
</property>
<property name="rowCount">
<number>5</number>
</property>
<property name="columnCount">
<number>5</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<row/>
<row/>
<row/>
<row/>
<row/>
<column/>
<column/>
<column/>
<column/>
<column/>
</widget>
</item>
<item>
<widget class="QListWidget" name="callStack"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="Go">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Go</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Stop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepInto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Into</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepOver">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Over</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Skip">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>S&amp;kip</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="NextHLE">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Next &amp;HLE</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="CtrlDisAsmView" name="DisasmView" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget_2">
<property name="currentIndex">
<number>2</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Breakpoints</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTreeWidget" name="breakpointsList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="clearAllBP">
<property name="text">
<string>Clear All</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_6">
<attribute name="title">
<string>Callstack</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QListWidget" name="callStack"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Display Lists</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeWidget" name="displayList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<column>
<property name="text">
<string>Start Address</string>
</property>
</column>
<column>
<property name="text">
<string>Current Address</string>
</property>
</column>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTreeWidget" name="displayListData">
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<property name="columnCount">
<number>2</number>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
<column>
<property name="text">
<string notr="true">2</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="runBtn">
<property name="text">
<string>Run</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextGPU">
<property name="text">
<string>Step</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>Threads</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QTreeWidget" name="threadList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>50</number>
</attribute>
<column>
<property name="text">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<column>
<property name="text">
<string>Current PC</string>
</property>
</column>
<column>
<property name="text">
<string>Entry point</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CtrlRegisterList</class>
<extends>QListWidget</extends>
<header>ctrlregisterlist.h</header>
<class>CtrlDisAsmView</class>
<extends>QWidget</extends>
<header>ctrldisasmview.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>CtrlDisAsmView</class>
<extends>QTableWidget</extends>
<header>ctrldisasmview.h</header>
<class>CtrlRegisterList</class>
<extends>QWidget</extends>
<header>ctrlregisterlist.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
+110
View File
@@ -0,0 +1,110 @@
#include "debugger_memory.h"
#include "ui_debugger_memory.h"
#include "EmuThread.h"
#include "Core/Debugger/SymbolMap.h"
#include <QTimer>
Debugger_Memory::Debugger_Memory(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
QDialog(parent),
ui(new Ui::Debugger_Memory),
cpu(_cpu),
mainWindow(mainWindow_)
{
ui->setupUi(this);
setWindowTitle(tr("Memory Viewer - %1").arg(cpu->GetName()));
ui->memView->setDebugger(_cpu);
}
Debugger_Memory::~Debugger_Memory()
{
delete ui;
}
void Debugger_Memory::showEvent(QShowEvent *)
{
#ifdef Q_WS_X11
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
EmuThread_LockDraw(true);
QTimer::singleShot(100, this, SLOT(releaseLock()));
#endif
}
void Debugger_Memory::releaseLock()
{
EmuThread_LockDraw(false);
}
void Debugger_Memory::Update()
{
ui->memView->redraw();
}
void Debugger_Memory::Goto(u32 addr)
{
show();
ui->memView->gotoAddr(addr & ~3);
}
void Debugger_Memory::on_editAddress_textChanged(const QString &arg1)
{
u32 addr;
sscanf(arg1.toStdString().c_str(),"%08x",&addr);
ui->memView->gotoAddr(addr & ~3);
}
void Debugger_Memory::on_normalBtn_clicked()
{
ui->memView->setMode(MV_NORMAL);
}
void Debugger_Memory::on_symbolsBtn_clicked()
{
ui->memView->setMode(MV_SYMBOLS);
}
void Debugger_Memory::on_memView_customContextMenuRequested(const QPoint &pos)
{
ui->memView->contextMenu(pos);
}
void Debugger_Memory::NotifyMapLoaded()
{
QListWidgetItem* item = new QListWidgetItem();
item->setText("(0x80000000)");
item->setData(Qt::UserRole, 0x80000000);
ui->symbols->addItem(item);
for(int i = 0; i < symbolMap.GetNumSymbols(); i++)
{
if(symbolMap.GetSymbolType(i) & ST_DATA)
{
QListWidgetItem* item = new QListWidgetItem();
item->setText(QString(symbolMap.GetSymbolName(i)) + " ("+ QVariant(symbolMap.GetSymbolSize(i)).toString() +")");
item->setData(Qt::UserRole, symbolMap.GetAddress(i));
ui->symbols->addItem(item);
}
}
ui->regions->clear();
/*
for (int i = 0; i < cpu->getMemMap()->numRegions; i++)
{
int n = ComboBox_AddString(lb,cpu->getMemMap()->regions[i].name);
ComboBox_SetItemData(lb,n,cpu->getMemMap()->regions[i].start);
}
*/
}
void Debugger_Memory::on_regions_currentIndexChanged(int index)
{
ui->memView->gotoAddr(ui->regions->itemData(index,Qt::UserRole).toInt());
}
void Debugger_Memory::on_symbols_itemClicked(QListWidgetItem *item)
{
ui->memView->gotoAddr(item->data(Qt::UserRole).toInt());
}
+49
View File
@@ -0,0 +1,49 @@
#ifndef DEBUGGER_MEMORY_H
#define DEBUGGER_MEMORY_H
#include "Core/Debugger/DebugInterface.h"
#include <QDialog>
#include <QListWidgetItem>
class MainWindow;
namespace Ui {
class Debugger_Memory;
}
class Debugger_Memory : public QDialog
{
Q_OBJECT
public:
explicit Debugger_Memory(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent = 0);
~Debugger_Memory();
void Update();
void Goto(u32 addr);
void NotifyMapLoaded();
public slots:
void releaseLock();
protected:
void showEvent(QShowEvent *);
private slots:
void on_editAddress_textChanged(const QString &arg1);
void on_normalBtn_clicked();
void on_symbolsBtn_clicked();
void on_memView_customContextMenuRequested(const QPoint &pos);
void on_regions_currentIndexChanged(int index);
void on_symbols_itemClicked(QListWidgetItem *item);
private:
Ui::Debugger_Memory *ui;
DebugInterface* cpu;
MainWindow* mainWindow;
};
#endif // DEBUGGER_MEMORY_H
+92
View File
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_Memory</class>
<widget class="QDialog" name="Debugger_Memory">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>611</width>
<height>384</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Goto:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="editAddress"/>
</item>
<item>
<widget class="QComboBox" name="regions"/>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Mode</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="normalBtn">
<property name="text">
<string>Normal</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="symbolsBtn">
<property name="text">
<string>Symbols</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QListWidget" name="symbols"/>
</item>
<item>
<widget class="CtrlMemView" name="memView" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CtrlMemView</class>
<extends>QWidget</extends>
<header>ctrlmemview.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
+55
View File
@@ -0,0 +1,55 @@
#include "debugger_vfpu.h"
#include "ui_debugger_vfpu.h"
#include "EmuThread.h"
#include "mainwindow.h"
#include <QTimer>
Debugger_VFPU::Debugger_VFPU(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
QDialog(parent),
ui(new Ui::Debugger_VFPU),
cpu(_cpu),
mainWindow(mainWindow_)
{
ui->setupUi(this);
setWindowTitle(QString("VFPU - ")+cpu->GetName());
ui->vfpu->setCPU(_cpu);
}
Debugger_VFPU::~Debugger_VFPU()
{
delete ui;
}
void Debugger_VFPU::showEvent(QShowEvent *)
{
#ifdef Q_WS_X11
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
EmuThread_LockDraw(true);
QTimer::singleShot(100, this, SLOT(releaseLock()));
#endif
}
void Debugger_VFPU::releaseLock()
{
EmuThread_LockDraw(false);
}
void Debugger_VFPU::Update()
{
ui->vfpu->redraw();
}
void Debugger_VFPU::Goto(u32 addr)
{
show();
mainWindow->GetDialogMemory()->Goto(addr & ~3);
}
void Debugger_VFPU::on_comboBox_currentIndexChanged(int index)
{
ui->vfpu->setMode(index);
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef DEBUGGER_VFPU_H
#define DEBUGGER_VFPU_H
#include "Core/Debugger/DebugInterface.h"
#include <QDialog>
class MainWindow;
namespace Ui {
class Debugger_VFPU;
}
class Debugger_VFPU : public QDialog
{
Q_OBJECT
public:
explicit Debugger_VFPU(DebugInterface *_cpu, MainWindow *mainWindow_, QWidget *parent = 0);
~Debugger_VFPU();
void Update();
void Goto(u32 addr);
protected:
void showEvent(QShowEvent *);
public slots:
void releaseLock();
private slots:
void on_comboBox_currentIndexChanged(int index);
private:
Ui::Debugger_VFPU *ui;
DebugInterface* cpu;
MainWindow* mainWindow;
};
#endif // DEBUGGER_VFPU_H
+87
View File
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_VFPU</class>
<widget class="QDialog" name="Debugger_VFPU">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>VFPU</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>Float</string>
</property>
</item>
<item>
<property name="text">
<string>HalfFloat</string>
</property>
</item>
<item>
<property name="text">
<string>Hex</string>
</property>
</item>
<item>
<property name="text">
<string>Bytes</string>
</property>
</item>
<item>
<property name="text">
<string>Shorts</string>
</property>
</item>
<item>
<property name="text">
<string>Ints</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="CtrlVfpuView" name="vfpu" native="true">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CtrlVfpuView</class>
<extends>QWidget</extends>
<header>ctrlvfpuview.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
+405 -91
View File
@@ -6,6 +6,116 @@
<message>
<location filename="../controls.ui" line="20"/>
<source>Controls</source>
<comment>Control window title</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlDisAsmView</name>
<message>
<location filename="../ctrldisasmview.cpp" line="106"/>
<source>Copy &amp;address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="110"/>
<source>Copy instruction (&amp;hex)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="114"/>
<source>Copy instruction (&amp;disasm)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="120"/>
<source>&amp;Run to here</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="124"/>
<source>&amp;Set Next Statement</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="128"/>
<source>&amp;Toggle breakpoint</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="132"/>
<source>&amp;Follow branch</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="142"/>
<source>Go to in &amp;Memory View</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="152"/>
<source>&amp;Rename function...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="240"/>
<source>New function name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="241"/>
<source>New function name:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlMemView</name>
<message>
<location filename="../ctrlmemview.cpp" line="215"/>
<source>Go to in &amp;disasm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="221"/>
<source>&amp;Copy value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="225"/>
<source>Dump...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlRegisterList</name>
<message>
<location filename="../ctrlregisterlist.cpp" line="274"/>
<source>Go to in &amp;memory view</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="278"/>
<source>Go to in &amp;disasm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="284"/>
<source>&amp;Copy value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="288"/>
<source>C&amp;hange...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="352"/>
<source>Set new value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="353"/>
<source>Set new value:</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -13,69 +123,253 @@
<name>Debugger_Disasm</name>
<message>
<location filename="../debugger_disasm.ui" line="17"/>
<source>Dialog</source>
<source>Disassembler</source>
<comment>Window title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="25"/>
<location filename="../debugger_disasm.ui" line="30"/>
<source>Ctr:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="38"/>
<location filename="../debugger_disasm.ui" line="43"/>
<source>&amp;Go to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="73"/>
<location filename="../debugger_disasm.ui" line="78"/>
<source>&amp;PC</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="86"/>
<location filename="../debugger_disasm.ui" line="91"/>
<source>&amp;LR</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="118"/>
<source>Tab 1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="128"/>
<source>Tab 2</source>
<source>Show VFPU</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="153"/>
<location filename="../debugger_disasm.ui" line="147"/>
<source>Regs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="198"/>
<source>Funcs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="223"/>
<source>&amp;Go</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="166"/>
<location filename="../debugger_disasm.ui" line="236"/>
<source>Stop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="179"/>
<location filename="../debugger_disasm.ui" line="249"/>
<source>Step &amp;Into</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="192"/>
<location filename="../debugger_disasm.ui" line="265"/>
<source>Step &amp;Over</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="205"/>
<location filename="../debugger_disasm.ui" line="278"/>
<source>S&amp;kip</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="218"/>
<location filename="../debugger_disasm.ui" line="291"/>
<source>Next &amp;HLE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="320"/>
<source>Breakpoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="339"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="362"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="372"/>
<source>Callstack</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="382"/>
<source>Display Lists</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="408"/>
<location filename="../debugger_disasm.ui" line="519"/>
<source>Id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="413"/>
<location filename="../debugger_disasm.ui" line="529"/>
<source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="418"/>
<source>Start Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="423"/>
<source>Current Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="476"/>
<source>Run</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="483"/>
<source>Step</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="497"/>
<source>Threads</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="524"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="534"/>
<source>Current PC</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="539"/>
<source>Entry point</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="401"/>
<source>Remove breakpoint</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="480"/>
<source>Go to entry point</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="486"/>
<source>Running</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="490"/>
<source>Wait</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="494"/>
<source>Suspend</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="626"/>
<source>Show code</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Debugger_Memory</name>
<message>
<location filename="../debugger_memory.ui" line="14"/>
<source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="22"/>
<source>Goto:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="35"/>
<source>Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="41"/>
<source>Normal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="48"/>
<source>Symbols</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.cpp" line="15"/>
<source>Memory Viewer - %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Debugger_VFPU</name>
<message>
<location filename="../debugger_vfpu.ui" line="14"/>
<source>VFPU</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="23"/>
<source>Float</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="28"/>
<source>HalfFloat</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="33"/>
<source>Hex</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="38"/>
<source>Bytes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="43"/>
<source>Shorts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="48"/>
<source>Ints</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GamePadDialog</name>
@@ -205,340 +499,360 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="79"/>
<location filename="../mainwindow.ui" line="81"/>
<source>Debu&amp;g</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="91"/>
<location filename="../mainwindow.ui" line="95"/>
<source>&amp;Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="95"/>
<location filename="../mainwindow.ui" line="99"/>
<source>&amp;Log Levels</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="99"/>
<location filename="../mainwindow.ui" line="103"/>
<source>G3D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="108"/>
<location filename="../mainwindow.ui" line="112"/>
<source>HLE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="117"/>
<location filename="../mainwindow.ui" line="121"/>
<source>Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="131"/>
<location filename="../mainwindow.ui" line="135"/>
<source>Zoom</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="140"/>
<location filename="../mainwindow.ui" line="144"/>
<source>Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="167"/>
<location filename="../mainwindow.ui" line="172"/>
<source>&amp;Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="182"/>
<location filename="../mainwindow.ui" line="187"/>
<source>&amp;Open...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="187"/>
<location filename="../mainwindow.ui" line="192"/>
<source>&amp;Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="192"/>
<location filename="../mainwindow.ui" line="197"/>
<source>-</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="197"/>
<location filename="../mainwindow.ui" line="202"/>
<source>Quickload state</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="200"/>
<location filename="../mainwindow.ui" line="205"/>
<source>F4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="205"/>
<location filename="../mainwindow.ui" line="210"/>
<source>Quicksave state</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="208"/>
<location filename="../mainwindow.ui" line="213"/>
<source>F2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="213"/>
<location filename="../mainwindow.ui" line="218"/>
<source>&amp;Load State File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="218"/>
<location filename="../mainwindow.ui" line="223"/>
<source>&amp;Save State File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="223"/>
<location filename="../mainwindow.ui" line="228"/>
<source>E&amp;xit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="228"/>
<location filename="../mainwindow.ui" line="233"/>
<source>&amp;Run</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="231"/>
<location filename="../mainwindow.ui" line="236"/>
<source>F7</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="236"/>
<location filename="../mainwindow.ui" line="241"/>
<source>&amp;Pause</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="239"/>
<location filename="../mainwindow.ui" line="244"/>
<source>F8</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="244"/>
<location filename="../mainwindow.ui" line="249"/>
<source>R&amp;eset</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="252"/>
<location filename="../mainwindow.ui" line="257"/>
<source>&amp;Interpreter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="260"/>
<location filename="../mainwindow.ui" line="265"/>
<source>&amp;Slightly Faster Interpreter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="268"/>
<location filename="../mainwindow.ui" line="273"/>
<source>&amp;Dynarec</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="276"/>
<location filename="../mainwindow.ui" line="281"/>
<source>Load &amp;Map File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="284"/>
<location filename="../mainwindow.ui" line="289"/>
<source>&amp;Save Map File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="292"/>
<location filename="../mainwindow.ui" line="297"/>
<source>&amp;Reset Symbol Table</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="300"/>
<location filename="../mainwindow.ui" line="302"/>
<source>&amp;Disassembly</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="303"/>
<location filename="../mainwindow.ui" line="305"/>
<source>Ctrl+D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="311"/>
<location filename="../mainwindow.ui" line="313"/>
<source>&amp;Log Console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="314"/>
<location filename="../mainwindow.ui" line="316"/>
<source>Ctrl+L</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="322"/>
<location filename="../mainwindow.ui" line="321"/>
<source>Memory &amp;View...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="325"/>
<location filename="../mainwindow.ui" line="324"/>
<source>Ctrl+M</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="330"/>
<location filename="../mainwindow.ui" line="329"/>
<source>Keyboard &amp;Controls</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="335"/>
<location filename="../mainwindow.ui" line="334"/>
<source>&amp;Toggle Full Screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="338"/>
<location filename="../mainwindow.ui" line="337"/>
<source>F12</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="346"/>
<location filename="../mainwindow.ui" line="345"/>
<source>&amp;Buffered Rendering</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="349"/>
<location filename="../mainwindow.ui" line="348"/>
<source>F5</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="357"/>
<location filename="../mainwindow.ui" line="356"/>
<source>&amp;Hardware Transform</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="360"/>
<location filename="../mainwindow.ui" line="359"/>
<source>F6</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="368"/>
<location filename="../mainwindow.ui" line="367"/>
<source>&amp;Linear Filtering</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="376"/>
<location filename="../mainwindow.ui" line="375"/>
<source>&amp;Wireframe (experimental)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="384"/>
<location filename="../mainwindow.ui" line="383"/>
<source>&amp;Display Raw Framebuffer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="392"/>
<location filename="../mainwindow.ui" line="391"/>
<source>&amp;Show Debug Statistics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="400"/>
<location filename="../mainwindow.ui" line="399"/>
<source>Screen &amp;1x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="403"/>
<location filename="../mainwindow.ui" line="402"/>
<source>Ctrl+1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="411"/>
<location filename="../mainwindow.ui" line="410"/>
<source>Screen &amp;2x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="414"/>
<location filename="../mainwindow.ui" line="413"/>
<source>Ctrl+2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="422"/>
<location filename="../mainwindow.ui" line="421"/>
<source>Screen &amp;3x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="425"/>
<location filename="../mainwindow.ui" line="424"/>
<source>Ctrl+3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="433"/>
<location filename="../mainwindow.ui" line="432"/>
<source>Screen &amp;4x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="436"/>
<location filename="../mainwindow.ui" line="435"/>
<source>Ctrl+4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="444"/>
<location filename="../mainwindow.ui" line="443"/>
<source>&amp;Fast Memory (dynarec, unstable)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="452"/>
<location filename="../mainwindow.ui" line="451"/>
<source>&amp;Ignore illegal reads/writes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="457"/>
<location filename="../mainwindow.ui" line="456"/>
<source>&amp;Go to http://www.ppsspp.org/</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="462"/>
<location filename="../mainwindow.ui" line="461"/>
<source>&amp;About PPSSPP...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="467"/>
<location filename="../mainwindow.ui" line="466"/>
<source>&amp;Use VBO</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="475"/>
<location filename="../mainwindow.ui" line="507"/>
<location filename="../mainwindow.ui" line="539"/>
<location filename="../mainwindow.ui" line="474"/>
<location filename="../mainwindow.ui" line="506"/>
<location filename="../mainwindow.ui" line="538"/>
<source>Debug</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="483"/>
<location filename="../mainwindow.ui" line="515"/>
<location filename="../mainwindow.ui" line="547"/>
<location filename="../mainwindow.ui" line="482"/>
<location filename="../mainwindow.ui" line="514"/>
<location filename="../mainwindow.ui" line="546"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="491"/>
<location filename="../mainwindow.ui" line="531"/>
<location filename="../mainwindow.ui" line="563"/>
<location filename="../mainwindow.ui" line="490"/>
<location filename="../mainwindow.ui" line="530"/>
<location filename="../mainwindow.ui" line="562"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="499"/>
<location filename="../mainwindow.ui" line="523"/>
<location filename="../mainwindow.ui" line="555"/>
<location filename="../mainwindow.ui" line="498"/>
<location filename="../mainwindow.ui" line="522"/>
<location filename="../mainwindow.ui" line="554"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="568"/>
<location filename="../mainwindow.ui" line="567"/>
<source>GamePad Controls</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="828"/>
<location filename="../mainwindow.ui" line="572"/>
<source>&amp;Run on load</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="577"/>
<source>D&amp;ump next frame to log</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="582"/>
<source>&amp;Vertex Cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="587"/>
<source>Memory View Texture...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="843"/>
<source>No translations</source>
<translation type="unfinished"></translation>
</message>
+948
View File
@@ -0,0 +1,948 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fr_FR">
<context>
<name>Controls</name>
<message>
<location filename="../controls.ui" line="20"/>
<source>Controls</source>
<comment>Control window title</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlDisAsmView</name>
<message>
<location filename="../ctrldisasmview.cpp" line="106"/>
<source>Copy &amp;address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="110"/>
<source>Copy instruction (&amp;hex)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="114"/>
<source>Copy instruction (&amp;disasm)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="120"/>
<source>&amp;Run to here</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="124"/>
<source>&amp;Set Next Statement</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="128"/>
<source>&amp;Toggle breakpoint</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="132"/>
<source>&amp;Follow branch</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="142"/>
<source>Go to in &amp;Memory View</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="152"/>
<source>&amp;Rename function...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="240"/>
<source>New function name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="241"/>
<source>New function name:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlMemView</name>
<message>
<location filename="../ctrlmemview.cpp" line="215"/>
<source>Go to in &amp;disasm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="221"/>
<source>&amp;Copy value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="225"/>
<source>Dump...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CtrlRegisterList</name>
<message>
<location filename="../ctrlregisterlist.cpp" line="274"/>
<source>Go to in &amp;memory view</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="278"/>
<source>Go to in &amp;disasm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="284"/>
<source>&amp;Copy value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="288"/>
<source>C&amp;hange...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="352"/>
<source>Set new value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="353"/>
<source>Set new value:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Debugger_Disasm</name>
<message>
<location filename="../debugger_disasm.ui" line="17"/>
<source>Disassembler</source>
<comment>Window title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="30"/>
<source>Ctr:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="43"/>
<source>&amp;Go to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="78"/>
<source>&amp;PC</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="91"/>
<source>&amp;LR</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="128"/>
<source>Show VFPU</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="147"/>
<source>Regs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="198"/>
<source>Funcs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="223"/>
<source>&amp;Go</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="236"/>
<source>Stop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="249"/>
<source>Step &amp;Into</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="265"/>
<source>Step &amp;Over</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="278"/>
<source>S&amp;kip</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="291"/>
<source>Next &amp;HLE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="320"/>
<source>Breakpoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="339"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="362"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="372"/>
<source>Callstack</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="382"/>
<source>Display Lists</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="408"/>
<location filename="../debugger_disasm.ui" line="519"/>
<source>Id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="413"/>
<location filename="../debugger_disasm.ui" line="529"/>
<source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="418"/>
<source>Start Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="423"/>
<source>Current Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="476"/>
<source>Run</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="483"/>
<source>Step</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="497"/>
<source>Threads</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="524"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="534"/>
<source>Current PC</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="539"/>
<source>Entry point</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="401"/>
<source>Remove breakpoint</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="480"/>
<source>Go to entry point</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="486"/>
<source>Running</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="490"/>
<source>Wait</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="494"/>
<source>Suspend</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="626"/>
<source>Show code</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Debugger_Memory</name>
<message>
<location filename="../debugger_memory.ui" line="14"/>
<source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="22"/>
<source>Goto:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="35"/>
<source>Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="41"/>
<source>Normal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="48"/>
<source>Symbols</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_memory.cpp" line="15"/>
<source>Memory Viewer - %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Debugger_VFPU</name>
<message>
<location filename="../debugger_vfpu.ui" line="14"/>
<source>VFPU</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="23"/>
<source>Float</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="28"/>
<source>HalfFloat</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="33"/>
<source>Hex</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="38"/>
<source>Bytes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="43"/>
<source>Shorts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="48"/>
<source>Ints</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GamePadDialog</name>
<message>
<location filename="../gamepaddialog.ui" line="14"/>
<source>Gamepad Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="22"/>
<source>GamePad List</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="46"/>
<source>Refresh</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="53"/>
<source>Select</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="62"/>
<source>Gamepad Values :</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="86"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="98"/>
<source>Assign Gamepad input</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="108"/>
<source> to PSP button/axis</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="118"/>
<source>Assign</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.ui" line="127"/>
<source>Press buttons on your gamePad to verify mapping :</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="134"/>
<location filename="../gamepaddialog.cpp" line="366"/>
<source>&lt;b&gt;No gamepad&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="146"/>
<source>&lt;b&gt;Unknown gamepad&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="287"/>
<source>Buttons</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="301"/>
<location filename="../gamepaddialog.cpp" line="344"/>
<source>Button %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="304"/>
<source>Axes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="310"/>
<source>%1 Neg</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="317"/>
<source>Axes %1 Neg</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="320"/>
<source>%1 Pos</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="327"/>
<source>Axes %1 Pos</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="331"/>
<source>Hats</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="368"/>
<source>&lt;b&gt;Current gamepad: %1&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.ui" line="20"/>
<source>PPSSPP</source>
<translation>PPSSPP</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="52"/>
<source>&amp;File</source>
<translation>&amp;Fichier</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="66"/>
<source>&amp;Emulation</source>
<translation>&amp;Emulation</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="81"/>
<source>Debu&amp;g</source>
<translation>Debu&amp;g</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="95"/>
<source>&amp;Options</source>
<translation>&amp;Options</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="99"/>
<source>&amp;Log Levels</source>
<translation>Niveaux de &amp;logs</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="103"/>
<source>G3D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="112"/>
<source>HLE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="121"/>
<source>Default</source>
<translation>Défaut</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="135"/>
<source>Zoom</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="144"/>
<source>Language</source>
<translation>Langue</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="172"/>
<source>&amp;Help</source>
<translation>&amp;Aide</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="187"/>
<source>&amp;Open...</source>
<translation>&amp;Ouvrir...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="192"/>
<source>&amp;Close</source>
<translation>&amp;Fermer</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="197"/>
<source>-</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="202"/>
<source>Quickload state</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="205"/>
<source>F4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="210"/>
<source>Quicksave state</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="213"/>
<source>F2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="218"/>
<source>&amp;Load State File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="223"/>
<source>&amp;Save State File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="228"/>
<source>E&amp;xit</source>
<translation>&amp;Quitter</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="233"/>
<source>&amp;Run</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="236"/>
<source>F7</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="241"/>
<source>&amp;Pause</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="244"/>
<source>F8</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="249"/>
<source>R&amp;eset</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="257"/>
<source>&amp;Interpreter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="265"/>
<source>&amp;Slightly Faster Interpreter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="273"/>
<source>&amp;Dynarec</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="281"/>
<source>Load &amp;Map File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="289"/>
<source>&amp;Save Map File...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="297"/>
<source>&amp;Reset Symbol Table</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="302"/>
<source>&amp;Disassembly</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="305"/>
<source>Ctrl+D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="313"/>
<source>&amp;Log Console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="316"/>
<source>Ctrl+L</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="321"/>
<source>Memory &amp;View...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="324"/>
<source>Ctrl+M</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="329"/>
<source>Keyboard &amp;Controls</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="334"/>
<source>&amp;Toggle Full Screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="337"/>
<source>F12</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="345"/>
<source>&amp;Buffered Rendering</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="348"/>
<source>F5</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="356"/>
<source>&amp;Hardware Transform</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="359"/>
<source>F6</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="367"/>
<source>&amp;Linear Filtering</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="375"/>
<source>&amp;Wireframe (experimental)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="383"/>
<source>&amp;Display Raw Framebuffer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="391"/>
<source>&amp;Show Debug Statistics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="399"/>
<source>Screen &amp;1x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="402"/>
<source>Ctrl+1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="410"/>
<source>Screen &amp;2x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="413"/>
<source>Ctrl+2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="421"/>
<source>Screen &amp;3x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="424"/>
<source>Ctrl+3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="432"/>
<source>Screen &amp;4x</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="435"/>
<source>Ctrl+4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="443"/>
<source>&amp;Fast Memory (dynarec, unstable)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="451"/>
<source>&amp;Ignore illegal reads/writes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="456"/>
<source>&amp;Go to http://www.ppsspp.org/</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="461"/>
<source>&amp;About PPSSPP...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="466"/>
<source>&amp;Use VBO</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="474"/>
<location filename="../mainwindow.ui" line="506"/>
<location filename="../mainwindow.ui" line="538"/>
<source>Debug</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="482"/>
<location filename="../mainwindow.ui" line="514"/>
<location filename="../mainwindow.ui" line="546"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="490"/>
<location filename="../mainwindow.ui" line="530"/>
<location filename="../mainwindow.ui" line="562"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="498"/>
<location filename="../mainwindow.ui" line="522"/>
<location filename="../mainwindow.ui" line="554"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="567"/>
<source>GamePad Controls</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="572"/>
<source>&amp;Run on load</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="577"/>
<source>D&amp;ump next frame to log</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="582"/>
<source>&amp;Vertex Cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="587"/>
<source>Memory View Texture...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="843"/>
<source>No translations</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>gamepadMapping</name>
<message>
<location filename="../gamepaddialog.cpp" line="19"/>
<source>Cross</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="20"/>
<source>Circle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="21"/>
<source>Square</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="22"/>
<source>Triangle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="23"/>
<source>Left Trigger</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="24"/>
<source>Right Trigger</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="25"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="26"/>
<source>Select</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="27"/>
<source>Up</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="28"/>
<source>Down</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="29"/>
<source>Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="30"/>
<source>Right</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="32"/>
<source>Home</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="35"/>
<source>Stick left</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="36"/>
<source>Stick right</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="37"/>
<source>Stick up</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="38"/>
<source>Stick bottom</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
+427 -113
View File
@@ -6,74 +6,368 @@
<message>
<location filename="../controls.ui" line="20"/>
<source>Controls</source>
<translation></translation>
<comment>Control window title</comment>
<translation>Układ klawiszy</translation>
</message>
</context>
<context>
<name>CtrlDisAsmView</name>
<message>
<location filename="../ctrldisasmview.cpp" line="106"/>
<source>Copy &amp;address</source>
<translation>Kopiuj &amp;adres</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="110"/>
<source>Copy instruction (&amp;hex)</source>
<translation>Kopiuj instrukcję (&amp;hex)</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="114"/>
<source>Copy instruction (&amp;disasm)</source>
<translation>Kopiuj instrukcję (&amp;deasm)</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="120"/>
<source>&amp;Run to here</source>
<translation>&amp;Uruchom do tego miejsca</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="124"/>
<source>&amp;Set Next Statement</source>
<translation>U&amp;staw następny rozkaz</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="128"/>
<source>&amp;Toggle breakpoint</source>
<translation>Ustaw &amp;breakpoint</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="132"/>
<source>&amp;Follow branch</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="142"/>
<source>Go to in &amp;Memory View</source>
<translation>Przejdź do widoku &amp;pamięci</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="152"/>
<source>&amp;Rename function...</source>
<translation>&amp;Zmień nazwę funkcji...</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="240"/>
<source>New function name</source>
<translation>Nowa nazwa funkcji</translation>
</message>
<message>
<location filename="../ctrldisasmview.cpp" line="241"/>
<source>New function name:</source>
<translation>Nowa nazwa funkcji:</translation>
</message>
</context>
<context>
<name>CtrlMemView</name>
<message>
<location filename="../ctrlmemview.cpp" line="215"/>
<source>Go to in &amp;disasm</source>
<translation>&amp;Przejdź do deasemblera</translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="221"/>
<source>&amp;Copy value</source>
<translation>&amp;Kopiuj wartość</translation>
</message>
<message>
<location filename="../ctrlmemview.cpp" line="225"/>
<source>Dump...</source>
<translation>Zrzut...</translation>
</message>
</context>
<context>
<name>CtrlRegisterList</name>
<message>
<location filename="../ctrlregisterlist.cpp" line="274"/>
<source>Go to in &amp;memory view</source>
<translation>Przejdź do widoku &amp;pamięci</translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="278"/>
<source>Go to in &amp;disasm</source>
<translation>Przejdź do &amp;deasemblera</translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="284"/>
<source>&amp;Copy value</source>
<translation>&amp;Kopiuj wartość</translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="288"/>
<source>C&amp;hange...</source>
<translation>&amp;Zmień...</translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="352"/>
<source>Set new value</source>
<translation>Ustaw nową wartość</translation>
</message>
<message>
<location filename="../ctrlregisterlist.cpp" line="353"/>
<source>Set new value:</source>
<translation>Ustaw nową wartość:</translation>
</message>
</context>
<context>
<name>Debugger_Disasm</name>
<message>
<location filename="../debugger_disasm.ui" line="17"/>
<source>Dialog</source>
<translation type="unfinished"></translation>
<source>Disassembler</source>
<comment>Window title</comment>
<translation>Deasembler</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="25"/>
<location filename="../debugger_disasm.ui" line="30"/>
<source>Ctr:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="38"/>
<location filename="../debugger_disasm.ui" line="43"/>
<source>&amp;Go to</source>
<translation type="unfinished"></translation>
<translation>P&amp;rzejdź do</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="73"/>
<location filename="../debugger_disasm.ui" line="78"/>
<source>&amp;PC</source>
<translation type="unfinished"></translation>
<translation>P&amp;C</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="86"/>
<location filename="../debugger_disasm.ui" line="91"/>
<source>&amp;LR</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="118"/>
<source>Tab 1</source>
<translation type="unfinished"></translation>
<translation>&amp;LR</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="128"/>
<source>Tab 2</source>
<translation type="unfinished"></translation>
<source>Show VFPU</source>
<translation>Pokaż VFPU</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="153"/>
<location filename="../debugger_disasm.ui" line="147"/>
<source>Regs</source>
<translation>Rejestry</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="198"/>
<source>Funcs</source>
<translation>Funkcje</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="223"/>
<source>&amp;Go</source>
<translation type="unfinished"></translation>
<translation>&amp;Przejdź</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="166"/>
<location filename="../debugger_disasm.ui" line="236"/>
<source>Stop</source>
<translation type="unfinished"></translation>
<translation>Stop</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="179"/>
<location filename="../debugger_disasm.ui" line="249"/>
<source>Step &amp;Into</source>
<translation type="unfinished"></translation>
<translation>Wskocz do &amp;wnętrza</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="192"/>
<location filename="../debugger_disasm.ui" line="265"/>
<source>Step &amp;Over</source>
<translation type="unfinished"></translation>
<translation>Wyskocz na &amp;zewnątrz</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="205"/>
<location filename="../debugger_disasm.ui" line="278"/>
<source>S&amp;kip</source>
<translation>P&amp;omiń</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="291"/>
<source>Next &amp;HLE</source>
<translation>Następne &amp;HLE</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="320"/>
<source>Breakpoints</source>
<translation>Breakpointy</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="339"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="362"/>
<source>Clear All</source>
<translation>Wyczyść wszystko</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="372"/>
<source>Callstack</source>
<translation>Stos wywołań</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="382"/>
<source>Display Lists</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="218"/>
<source>Next &amp;HLE</source>
<location filename="../debugger_disasm.ui" line="408"/>
<location filename="../debugger_disasm.ui" line="519"/>
<source>Id</source>
<translation>Id</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="413"/>
<location filename="../debugger_disasm.ui" line="529"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="418"/>
<source>Start Address</source>
<translation>Początkowy adres</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="423"/>
<source>Current Address</source>
<translation>Obecny adres</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="476"/>
<source>Run</source>
<translation>Uruchom</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="483"/>
<source>Step</source>
<translation>Krok</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="497"/>
<source>Threads</source>
<translation>Wątki</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="524"/>
<source>Name</source>
<translation>Nazwa</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="534"/>
<source>Current PC</source>
<translation>Obecny PC</translation>
</message>
<message>
<location filename="../debugger_disasm.ui" line="539"/>
<source>Entry point</source>
<translation>Punkt wejścia</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="401"/>
<source>Remove breakpoint</source>
<translation>Usuń breakpoint</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="480"/>
<source>Go to entry point</source>
<translation>Przejdź do punktu wejścia</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="486"/>
<source>Running</source>
<translation>Działający</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="490"/>
<source>Wait</source>
<translation>Czekający</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="494"/>
<source>Suspend</source>
<translation>Uśpiony</translation>
</message>
<message>
<location filename="../debugger_disasm.cpp" line="626"/>
<source>Show code</source>
<translation>Pokaż kod</translation>
</message>
</context>
<context>
<name>Debugger_Memory</name>
<message>
<location filename="../debugger_memory.ui" line="14"/>
<source>Dialog</source>
<translation>Widok pamięci</translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="22"/>
<source>Goto:</source>
<translation>Przejdź do:</translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="35"/>
<source>Mode</source>
<translation>Tryb</translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="41"/>
<source>Normal</source>
<translation>Normalny</translation>
</message>
<message>
<location filename="../debugger_memory.ui" line="48"/>
<source>Symbols</source>
<translation>Symboliczny</translation>
</message>
<message>
<location filename="../debugger_memory.cpp" line="15"/>
<source>Memory Viewer - %1</source>
<translation>Widok pamięci - %1</translation>
</message>
</context>
<context>
<name>Debugger_VFPU</name>
<message>
<location filename="../debugger_vfpu.ui" line="14"/>
<source>VFPU</source>
<translation>VFPU</translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="23"/>
<source>Float</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="28"/>
<source>HalfFloat</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="33"/>
<source>Hex</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="38"/>
<source>Bytes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="43"/>
<source>Shorts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../debugger_vfpu.ui" line="48"/>
<source>Ints</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -179,7 +473,7 @@
<message>
<location filename="../gamepaddialog.cpp" line="331"/>
<source>Hats</source>
<translation type="unfinished"></translation>
<translation>Haty</translation>
</message>
<message>
<location filename="../gamepaddialog.cpp" line="368"/>
@@ -205,343 +499,363 @@
<translation>&amp;Emulacja</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="79"/>
<location filename="../mainwindow.ui" line="81"/>
<source>Debu&amp;g</source>
<translation>&amp;Debugger</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="91"/>
<location filename="../mainwindow.ui" line="95"/>
<source>&amp;Options</source>
<translation>&amp;Opcje</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="95"/>
<location filename="../mainwindow.ui" line="99"/>
<source>&amp;Log Levels</source>
<translation>P&amp;oziomy logowania</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="99"/>
<location filename="../mainwindow.ui" line="103"/>
<source>G3D</source>
<translation>G3D</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="108"/>
<location filename="../mainwindow.ui" line="112"/>
<source>HLE</source>
<translation>HLE</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="117"/>
<location filename="../mainwindow.ui" line="121"/>
<source>Default</source>
<translation>Domyślne</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="131"/>
<location filename="../mainwindow.ui" line="135"/>
<source>Zoom</source>
<translation>Zoom</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="140"/>
<location filename="../mainwindow.ui" line="144"/>
<source>Language</source>
<translation>Język</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="167"/>
<location filename="../mainwindow.ui" line="172"/>
<source>&amp;Help</source>
<translation>Pomo&amp;c</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="182"/>
<location filename="../mainwindow.ui" line="187"/>
<source>&amp;Open...</source>
<translation>&amp;Otwórz...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="187"/>
<location filename="../mainwindow.ui" line="192"/>
<source>&amp;Close</source>
<translation>&amp;Zamknij</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="192"/>
<location filename="../mainwindow.ui" line="197"/>
<source>-</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="197"/>
<location filename="../mainwindow.ui" line="202"/>
<source>Quickload state</source>
<translation>Wczytaj stan</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="200"/>
<location filename="../mainwindow.ui" line="205"/>
<source>F4</source>
<translation>F4</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="205"/>
<location filename="../mainwindow.ui" line="210"/>
<source>Quicksave state</source>
<translation>Zapisz stan</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="208"/>
<location filename="../mainwindow.ui" line="213"/>
<source>F2</source>
<translation>F2</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="213"/>
<location filename="../mainwindow.ui" line="218"/>
<source>&amp;Load State File...</source>
<translation>&amp;Wczytaj plik stanu...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="218"/>
<location filename="../mainwindow.ui" line="223"/>
<source>&amp;Save State File...</source>
<translation>&amp;Zapisz plik stanu...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="223"/>
<location filename="../mainwindow.ui" line="228"/>
<source>E&amp;xit</source>
<translation>Wyj&amp;dź</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="228"/>
<location filename="../mainwindow.ui" line="233"/>
<source>&amp;Run</source>
<translation>&amp;Uruchom</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="231"/>
<location filename="../mainwindow.ui" line="236"/>
<source>F7</source>
<translation>F7</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="236"/>
<location filename="../mainwindow.ui" line="241"/>
<source>&amp;Pause</source>
<translation>&amp;Pauza</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="239"/>
<location filename="../mainwindow.ui" line="244"/>
<source>F8</source>
<translation>F8</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="244"/>
<location filename="../mainwindow.ui" line="249"/>
<source>R&amp;eset</source>
<translation>&amp;Reset</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="252"/>
<location filename="../mainwindow.ui" line="257"/>
<source>&amp;Interpreter</source>
<translation>&amp;Interpreter</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="260"/>
<location filename="../mainwindow.ui" line="265"/>
<source>&amp;Slightly Faster Interpreter</source>
<translation>&amp;Szybszy interpreter</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="268"/>
<location filename="../mainwindow.ui" line="273"/>
<source>&amp;Dynarec</source>
<translation>R&amp;ekompilacja (Dynarec)</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="276"/>
<location filename="../mainwindow.ui" line="281"/>
<source>Load &amp;Map File...</source>
<translation>&amp;Wczytaj plik mapy...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="284"/>
<location filename="../mainwindow.ui" line="289"/>
<source>&amp;Save Map File...</source>
<translation>&amp;Zapisz plik mapy...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="292"/>
<location filename="../mainwindow.ui" line="297"/>
<source>&amp;Reset Symbol Table</source>
<translation>Zresetuj &amp;tablicę symboli</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="300"/>
<location filename="../mainwindow.ui" line="302"/>
<source>&amp;Disassembly</source>
<translation>&amp;Dekompiluj</translation>
<translation>&amp;Deasembler</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="303"/>
<location filename="../mainwindow.ui" line="305"/>
<source>Ctrl+D</source>
<translation>Ctrl+D</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="311"/>
<location filename="../mainwindow.ui" line="313"/>
<source>&amp;Log Console</source>
<translation>&amp;Konsola logowania</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="314"/>
<location filename="../mainwindow.ui" line="316"/>
<source>Ctrl+L</source>
<translation>Ctrl+L</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="322"/>
<location filename="../mainwindow.ui" line="321"/>
<source>Memory &amp;View...</source>
<translation>Widok &amp;pamięci...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="325"/>
<location filename="../mainwindow.ui" line="324"/>
<source>Ctrl+M</source>
<translation>Ctrl+M</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="330"/>
<location filename="../mainwindow.ui" line="329"/>
<source>Keyboard &amp;Controls</source>
<translation>Ustawienia &amp;klawiatury</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="335"/>
<location filename="../mainwindow.ui" line="334"/>
<source>&amp;Toggle Full Screen</source>
<translation>&amp;Pełny ekran</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="338"/>
<location filename="../mainwindow.ui" line="337"/>
<source>F12</source>
<translation>F12</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="346"/>
<location filename="../mainwindow.ui" line="345"/>
<source>&amp;Buffered Rendering</source>
<translation>&amp;Buffered rendering</translation>
<translation>&amp;Buforowane renderowanie</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="349"/>
<location filename="../mainwindow.ui" line="348"/>
<source>F5</source>
<translation>F5</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="357"/>
<location filename="../mainwindow.ui" line="356"/>
<source>&amp;Hardware Transform</source>
<translation>&amp;Hardware Transform</translation>
<translation>Sprzętowa &amp;transformacja</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="360"/>
<location filename="../mainwindow.ui" line="359"/>
<source>F6</source>
<translation>F6</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="368"/>
<location filename="../mainwindow.ui" line="367"/>
<source>&amp;Linear Filtering</source>
<translation>&amp;Linear Filtering</translation>
<translation>Filtrowanie &amp;liniowe</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="376"/>
<location filename="../mainwindow.ui" line="375"/>
<source>&amp;Wireframe (experimental)</source>
<translation type="unfinished"></translation>
<translation>&amp;Widok siatki (eksperymentalny)</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="384"/>
<location filename="../mainwindow.ui" line="383"/>
<source>&amp;Display Raw Framebuffer</source>
<translation type="unfinished"></translation>
<translation>Wyświetl &amp;surowy framebuffer</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="392"/>
<location filename="../mainwindow.ui" line="391"/>
<source>&amp;Show Debug Statistics</source>
<translation>Pokaż &amp;statystyki emulacji</translation>
<translation>Pokaż statystyki &amp;emulacji</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="400"/>
<location filename="../mainwindow.ui" line="399"/>
<source>Screen &amp;1x</source>
<translation>&amp;1x</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="403"/>
<location filename="../mainwindow.ui" line="402"/>
<source>Ctrl+1</source>
<translation>Ctrl+1</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="411"/>
<location filename="../mainwindow.ui" line="410"/>
<source>Screen &amp;2x</source>
<translation>&amp;2x</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="414"/>
<location filename="../mainwindow.ui" line="413"/>
<source>Ctrl+2</source>
<translation>Ctrl+2</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="422"/>
<location filename="../mainwindow.ui" line="421"/>
<source>Screen &amp;3x</source>
<translation>&amp;3x</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="425"/>
<location filename="../mainwindow.ui" line="424"/>
<source>Ctrl+3</source>
<translation>Ctrl+3</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="433"/>
<location filename="../mainwindow.ui" line="432"/>
<source>Screen &amp;4x</source>
<translation>&amp;4x</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="436"/>
<location filename="../mainwindow.ui" line="435"/>
<source>Ctrl+4</source>
<translation>Ctrl+4</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="444"/>
<location filename="../mainwindow.ui" line="443"/>
<source>&amp;Fast Memory (dynarec, unstable)</source>
<translation>&amp;Fast memory (wymagany Dynarec, niestabilne)</translation>
<translation>S&amp;zybka pamięć (wymagany Dynarec, niestabilne)</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="452"/>
<location filename="../mainwindow.ui" line="451"/>
<source>&amp;Ignore illegal reads/writes</source>
<translation>&amp;Ignoruj nieprawidłowe odczyty/zapisy</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="457"/>
<location filename="../mainwindow.ui" line="456"/>
<source>&amp;Go to http://www.ppsspp.org/</source>
<translation>&amp;Idź do http://www.ppsspp.org</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="462"/>
<location filename="../mainwindow.ui" line="461"/>
<source>&amp;About PPSSPP...</source>
<translation>&amp;O PPSSPP...</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="467"/>
<location filename="../mainwindow.ui" line="466"/>
<source>&amp;Use VBO</source>
<translation>Użyj &amp;VBO</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="475"/>
<location filename="../mainwindow.ui" line="507"/>
<location filename="../mainwindow.ui" line="539"/>
<location filename="../mainwindow.ui" line="474"/>
<location filename="../mainwindow.ui" line="506"/>
<location filename="../mainwindow.ui" line="538"/>
<source>Debug</source>
<translation>Debug</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="483"/>
<location filename="../mainwindow.ui" line="515"/>
<location filename="../mainwindow.ui" line="547"/>
<location filename="../mainwindow.ui" line="482"/>
<location filename="../mainwindow.ui" line="514"/>
<location filename="../mainwindow.ui" line="546"/>
<source>Warning</source>
<translation>Ostrzeżenia</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="491"/>
<location filename="../mainwindow.ui" line="531"/>
<location filename="../mainwindow.ui" line="563"/>
<location filename="../mainwindow.ui" line="490"/>
<location filename="../mainwindow.ui" line="530"/>
<location filename="../mainwindow.ui" line="562"/>
<source>Error</source>
<translation>Błędy</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="499"/>
<location filename="../mainwindow.ui" line="523"/>
<location filename="../mainwindow.ui" line="555"/>
<location filename="../mainwindow.ui" line="498"/>
<location filename="../mainwindow.ui" line="522"/>
<location filename="../mainwindow.ui" line="554"/>
<source>Info</source>
<translation>Info</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="568"/>
<location filename="../mainwindow.ui" line="567"/>
<source>GamePad Controls</source>
<translation>&amp;Ustawienia pada</translation>
<translation>Ustawienia pada</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="828"/>
<source>No translations</source>
<location filename="../mainwindow.ui" line="572"/>
<source>&amp;Run on load</source>
<translation>Uruchom po &amp;załadowaniu</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="577"/>
<source>D&amp;ump next frame to log</source>
<translation>Z&amp;rzuć następną ramkę do logu</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="582"/>
<source>&amp;Vertex Cache</source>
<translation>&amp;Cache wierzchołków</translation>
</message>
<message>
<location filename="../mainwindow.ui" line="587"/>
<source>Memory View Texture...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="843"/>
<source>No translations</source>
<translation>Brak tłumaczeń</translation>
</message>
</context>
<context>
<name>gamepadMapping</name>
+136 -69
View File
@@ -9,6 +9,7 @@
#include <QDesktopWidget>
#include "Core/MIPS/MIPSDebugInterface.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/SaveState.h"
#include "Core/System.h"
#include "Core/Config.h"
@@ -26,7 +27,8 @@ MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
nextState(CORE_POWERDOWN),
dialogDisasm(0)
dialogDisasm(0),
memoryWindow(0)
{
ui->setupUi(this);
qApp->installEventFilter(this);
@@ -36,19 +38,18 @@ MainWindow::MainWindow(QWidget *parent) :
gamePadDlg = new GamePadDialog(&input_state, this);
#endif
SetPlaying(0);
host = new QtHost(this);
w = ui->widget;
w->init(&input_state);
w->resize(pixel_xres, pixel_yres);
w->setMinimumSize(pixel_xres, pixel_yres);
w->setMaximumSize(pixel_xres, pixel_yres);
QObject::connect( w, SIGNAL(doubleClick()), this, SLOT(on_action_OptionsFullScreen_triggered()) );
/*
DialogManager::AddDlg(memoryWindow[0] = new CMemoryDlg(_hInstance, hwndMain, currentDebugMIPS));
DialogManager::AddDlg(vfpudlg = new CVFPUDlg(_hInstance, hwndMain, currentDebugMIPS));
*/
// Update();
createLanguageMenu();
UpdateMenus();
int zoom = g_Config.iWindowZoom;
@@ -173,15 +174,16 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
void MainWindow::SetPlaying(QString text)
{
// TODO
/*if (text == 0)
SetWindowText(hwndMain,programname);
if (text == 0)
{
QString title = "PPSSPP " + QString(PPSSPP_VERSION_STR);
setWindowTitle(title);
}
else
{
char temp[256];
sprintf(temp, "%s - %s", text, programname);
SetWindowText(hwndMain,temp);
}*/
QString title = "PPSSPP " + QString(PPSSPP_VERSION_STR) + "-" + text;
setWindowTitle(title);
}
}
void MainWindow::SetNextState(CoreState state)
@@ -205,20 +207,28 @@ void MainWindow::Boot()
dialogDisasm = new Debugger_Disasm(currentDebugMIPS, this, this);
if(g_Config.bShowDebuggerOnLoad)
dialogDisasm->show();
/*
// TODO
memoryWindow[0] = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
DialogManager::AddDlg(memoryWindow[0]);
if (disasmWindow[0])
disasmWindow[0]->NotifyMapLoaded();
if (memoryWindow[0])
memoryWindow[0]->NotifyMapLoaded();*/
if(g_Config.bFullScreen != isFullScreen())
on_action_OptionsFullScreen_triggered();
memoryWindow = new Debugger_Memory(currentDebugMIPS, this, this);
if (dialogDisasm)
dialogDisasm->NotifyMapLoaded();
if (memoryWindow)
memoryWindow->NotifyMapLoaded();
if (nextState == CORE_RUNNING)
on_action_EmulationRun_triggered();
UpdateMenus();
}
void MainWindow::CoreEmitWait(bool isWaiting)
{
// Unlock mutex while core is waiting;
EmuThread_LockDraw(!isWaiting);
}
void MainWindow::UpdateMenus()
{
ui->action_OptionsDisplayRawFramebuffer->setChecked(g_Config.bDisplayFramebuffer);
@@ -227,10 +237,14 @@ void MainWindow::UpdateMenus()
ui->action_CPUFastInterpreter->setChecked(g_Config.iCpuCore == CPU_FASTINTERPRETER);
ui->action_CPUDynarec->setChecked(g_Config.iCpuCore == CPU_JIT);
ui->action_OptionsBufferedRendering->setChecked(g_Config.bBufferedRendering);
ui->action_OptionsShowDebugStatistics->setChecked(g_Config.bShowDebugStats);
ui->action_OptionsWireframe->setChecked(g_Config.bDrawWireframe);
ui->action_OptionsHardwareTransform->setChecked(g_Config.bHardwareTransform);
ui->action_OptionsFastMemory->setChecked(g_Config.bFastMemory);
ui->action_OptionsLinearFiltering->setChecked(g_Config.bLinearFiltering);
ui->action_EmulationRunLoad->setChecked(g_Config.bAutoRun);
ui->action_OptionsUseVBO->setChecked(g_Config.bUseVBO);
ui->action_OptionsVertexCache->setChecked(g_Config.bVertexCache);
bool enable = !Core_IsStepping() ? false : true;
ui->action_EmulationRun->setEnabled(g_State.bEmuThreadStarted ? enable : false);
@@ -275,6 +289,8 @@ void MainWindow::SetZoom(float zoom) {
pixel_xres = 480 * zoom;
pixel_yres = 272 * zoom;
dp_xres = pixel_xres;
dp_yres = pixel_yres;
w->resize(pixel_xres, pixel_yres);
w->setMinimumSize(pixel_xres, pixel_yres);
@@ -299,7 +315,6 @@ void MainWindow::on_action_EmulationRun_triggered()
{
if (g_State.bEmuThreadStarted)
{
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
@@ -310,34 +325,29 @@ void MainWindow::on_action_EmulationRun_triggered()
void MainWindow::on_action_EmulationStop_triggered()
{
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
}
usleep(100); // TODO : UGLY wait for event instead
// This will wait for ppsspp to pause
EmuThread_LockDraw(true);
EmuThread_LockDraw(false);
/*for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
SendMessage(disasmWindow[i]->GetDlgHandle(), WM_CLOSE, 0, 0);
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
SendMessage(memoryWindow[i]->GetDlgHandle(), WM_CLOSE, 0, 0);*/
if(dialogDisasm && dialogDisasm->isVisible())
dialogDisasm->close();
if(memoryWindow && memoryWindow->isVisible())
memoryWindow->close();
EmuThread_StopGame();
SetPlaying(0);
//Update();
Update();
UpdateMenus();
}
void MainWindow::on_action_EmulationPause_triggered()
{
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
}
}
void SaveStateActionFinished(bool result, void *userdata)
@@ -356,7 +366,6 @@ void SaveStateActionFinished(bool result, void *userdata)
if (g_State.bEmuThreadStarted && mainWindow->GetNextState() == CORE_RUNNING)
{
/*for (int i=0; i<numCPUs; i++)*/
if(mainWindow->GetDialogDisasm())
mainWindow->GetDialogDisasm()->Go();
}
@@ -367,7 +376,6 @@ void MainWindow::on_action_FileLoadStateFile_triggered()
if (g_State.bEmuThreadStarted)
{
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
@@ -393,7 +401,6 @@ void MainWindow::on_action_FileSaveStateFile_triggered()
if (g_State.bEmuThreadStarted)
{
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
@@ -418,7 +425,6 @@ void MainWindow::on_action_FileQuickloadState_triggered()
if (g_State.bEmuThreadStarted)
{
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
@@ -432,7 +438,6 @@ void MainWindow::on_action_FileQuickSaveState_triggered()
if (g_State.bEmuThreadStarted)
{
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
/*for (int i=0; i<numCPUs; i++)*/
if(dialogDisasm)
{
dialogDisasm->Stop();
@@ -510,37 +515,47 @@ void MainWindow::on_action_CPUFastInterpreter_triggered()
void MainWindow::on_action_DebugLoadMapFile_triggered()
{
// TODO
/*if (W32Util::BrowseForFileName(true, hWnd, "Load .MAP",0,"Maps\0*.map\0All files\0*.*\0\0","map",fn))
QFileDialog dialog(0,"Load .MAP");
dialog.setFileMode(QFileDialog::ExistingFile);
QStringList filters;
filters << "Maps (*.map)" << "|All files (*.*)";
dialog.setNameFilters(filters);
dialog.setAcceptMode(QFileDialog::AcceptOpen);
QStringList fileNames;
if (dialog.exec())
{
symbolMap.LoadSymbolMap(fn.c_str());
// HLE_PatchFunctions();
for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
disasmWindow[i]->NotifyMapLoaded();
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->NotifyMapLoaded();
}*/
fileNames = dialog.selectedFiles();
symbolMap.LoadSymbolMap(fileNames[0].toStdString().c_str());
if (dialogDisasm)
dialogDisasm->NotifyMapLoaded();
if (memoryWindow)
memoryWindow->NotifyMapLoaded();
}
}
void MainWindow::on_action_DebugSaveMapFile_triggered()
{
// TODO
/*if (W32Util::BrowseForFileName(false, hWnd, "Save .MAP",0,"Maps\0*.map\0All files\0*.*\0\0","map",fn))
symbolMap.SaveSymbolMap(fn.c_str());*/
QFileDialog dialog(0,"Save .MAP");
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setAcceptMode(QFileDialog::AcceptSave);
QStringList filters;
filters << "Save .MAP (*.map)" << "|All files (*.*)";
dialog.setNameFilters(filters);
QStringList fileNames;
if (dialog.exec())
{
fileNames = dialog.selectedFiles();
symbolMap.SaveSymbolMap(fileNames[0].toStdString().c_str());
}
}
void MainWindow::on_action_DebugResetSymbolTable_triggered()
{
// TODO
/*symbolMap.ResetSymbolMap();
for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
disasmWindow[i]->NotifyMapLoaded();
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->NotifyMapLoaded();*/
symbolMap.ResetSymbolMap();
if (dialogDisasm)
dialogDisasm->NotifyMapLoaded();
if (memoryWindow)
memoryWindow->NotifyMapLoaded();
}
void MainWindow::on_action_DebugDisassembly_triggered()
@@ -551,9 +566,8 @@ void MainWindow::on_action_DebugDisassembly_triggered()
void MainWindow::on_action_DebugMemoryView_triggered()
{
// TODO
/*if (memoryWindow[0])
memoryWindow[0]->Show(true);*/
if (memoryWindow)
memoryWindow->show();
}
void MainWindow::on_action_DebugLog_triggered()
@@ -570,12 +584,14 @@ void MainWindow::on_action_OptionsIgnoreIllegalReadsWrites_triggered()
void MainWindow::on_action_OptionsFullScreen_triggered()
{
if(isFullScreen()) {
g_Config.bFullScreen = false;
showNormal();
ui->menubar->setVisible(true);
ui->statusbar->setVisible(true);
SetZoom(g_Config.iWindowZoom);
}
else {
g_Config.bFullScreen = true;
ui->menubar->setVisible(false);
ui->statusbar->setVisible(false);
@@ -597,6 +613,8 @@ void MainWindow::on_action_OptionsFullScreen_triggered()
PSP_CoreParameter().outputHeight = height;
pixel_xres = width;
pixel_yres = height;
dp_xres = pixel_xres;
dp_yres = pixel_yres;
if (gpu)
gpu->Resized();
}
@@ -638,10 +656,7 @@ void MainWindow::on_action_HelpOpenWebsite_triggered()
void MainWindow::on_action_HelpAbout_triggered()
{
// TODO
/*DialogManager::EnableAll(FALSE);
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
DialogManager::EnableAll(TRUE);*/
// TODO display about
}
void MainWindow::closeEvent(QCloseEvent *event)
@@ -879,3 +894,55 @@ void MainWindow::changeEvent(QEvent *event)
}
}
}
void MainWindow::ShowMemory(u32 addr)
{
if(memoryWindow)
memoryWindow->Goto(addr);
}
void MainWindow::Update()
{
}
void MainWindow::on_action_EmulationReset_triggered()
{
if(dialogDisasm)
dialogDisasm->Stop();
EmuThread_LockDraw(true);
EmuThread_LockDraw(false);
if(dialogDisasm)
dialogDisasm->close();
if(memoryWindow)
memoryWindow->close();
EmuThread_StopGame();
EmuThread_StartGame(GetCurrentFilename());
}
void MainWindow::on_action_DebugDumpFrame_triggered()
{
gpu->DumpNextFrame();
}
void MainWindow::on_action_EmulationRunLoad_triggered()
{
g_Config.bAutoRun = !g_Config.bAutoRun;
UpdateMenus();
}
void MainWindow::on_action_OptionsVertexCache_triggered()
{
g_Config.bVertexCache = !g_Config.bVertexCache;
UpdateMenus();
}
void MainWindow::on_action_OptionsUseVBO_triggered()
{
g_Config.bUseVBO = !g_Config.bUseVBO;
UpdateMenus();
}
+16
View File
@@ -7,6 +7,7 @@
#include "Core/Core.h"
#include "input/input_state.h"
#include "debugger_disasm.h"
#include "debugger_memory.h"
#include "controls.h"
#include "gamepaddialog.h"
@@ -31,13 +32,17 @@ public:
void SetPlaying(QString text);
Debugger_Disasm* GetDialogDisasm() { return dialogDisasm; }
Debugger_Memory* GetDialogMemory() { return memoryWindow; }
CoreState GetNextState() { return nextState; }
void closeEvent(QCloseEvent *event);
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *e);
void ShowMemory(u32 addr);
void Update();
public slots:
void Boot();
void CoreEmitWait(bool);
private slots:
void on_action_FileLoad_triggered();
@@ -138,6 +143,16 @@ private slots:
void on_language_changed(QAction *action);
void on_action_EmulationReset_triggered();
void on_action_DebugDumpFrame_triggered();
void on_action_EmulationRunLoad_triggered();
void on_action_OptionsVertexCache_triggered();
void on_action_OptionsUseVBO_triggered();
private:
void loadLanguage(const QString &language);
void createLanguageMenu();
@@ -156,6 +171,7 @@ private:
InputState input_state;
Debugger_Disasm *dialogDisasm;
Debugger_Memory *memoryWindow;
Controls* controls;
GamePadDialog* gamePadDlg;
};
+25 -6
View File
@@ -70,6 +70,8 @@
<addaction name="separator"/>
<addaction name="action_EmulationReset"/>
<addaction name="separator"/>
<addaction name="action_EmulationRunLoad"/>
<addaction name="separator"/>
<addaction name="action_CPUInterpreter"/>
<addaction name="action_CPUFastInterpreter"/>
<addaction name="action_CPUDynarec"/>
@@ -82,6 +84,8 @@
<addaction name="action_DebugSaveMapFile"/>
<addaction name="action_DebugResetSymbolTable"/>
<addaction name="separator"/>
<addaction name="action_DebugDumpFrame"/>
<addaction name="separator"/>
<addaction name="action_DebugDisassembly"/>
<addaction name="action_DebugLog"/>
<addaction name="action_DebugMemoryView"/>
@@ -148,6 +152,7 @@
<addaction name="action_OptionsHardwareTransform"/>
<addaction name="action_OptionsLinearFiltering"/>
<addaction name="action_OptionsUseVBO"/>
<addaction name="action_OptionsVertexCache"/>
<addaction name="separator"/>
<addaction name="action_OptionsWireframe"/>
<addaction name="action_OptionsDisplayRawFramebuffer"/>
@@ -293,9 +298,6 @@
</property>
</action>
<action name="action_DebugDisassembly">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>&amp;Disassembly</string>
</property>
@@ -315,9 +317,6 @@
</property>
</action>
<action name="action_DebugMemoryView">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Memory &amp;View...</string>
</property>
@@ -568,6 +567,26 @@
<string>GamePad Controls</string>
</property>
</action>
<action name="action_EmulationRunLoad">
<property name="text">
<string>&amp;Run on load</string>
</property>
</action>
<action name="action_DebugDumpFrame">
<property name="text">
<string>D&amp;ump next frame to log</string>
</property>
</action>
<action name="action_OptionsVertexCache">
<property name="text">
<string>&amp;Vertex Cache</string>
</property>
</action>
<action name="action_DebugMemoryViewTexture">
<property name="text">
<string>Memory View Texture...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
+6 -8
View File
@@ -50,14 +50,7 @@ void QtEmuGL::stop_game()
void QtEmuGL::LockDraw(bool value)
{
if(value)
{
thread.gameMutex.lock();
}
else
{
thread.gameMutex.unlock();
}
thread.LockGL(value);
}
void QtEmuGL::resizeEvent(QResizeEvent *evt)
@@ -75,3 +68,8 @@ void QtEmuGL::closeEvent(QCloseEvent *evt)
//TODO stopRendering();
QGLWidget::closeEvent(evt);
}
void QtEmuGL::mouseDoubleClickEvent(QMouseEvent *)
{
emit doubleClick();
}
+3
View File
@@ -19,6 +19,8 @@ public:
void start_game(QString filename);
void stop_game();
void LockDraw(bool value);
signals:
void doubleClick();
protected:
void initializeGL();
@@ -26,6 +28,7 @@ protected:
void resizeEvent(QResizeEvent *evt);
void paintEvent(QPaintEvent *);
void closeEvent(QCloseEvent *evt);
void mouseDoubleClickEvent(QMouseEvent *);
signals:
public slots:
+2
View File
@@ -14,5 +14,7 @@
<file>resources/psp_adown.png</file>
<file>resources/psp_aleft.png</file>
<file>resources/psp_aup.png</file>
<file alias="breakpointDisable">resources/stop1.ico</file>
<file alias="breakpoint">resources/icon1.ico</file>
</qresource>
</RCC>
Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

+5 -1
View File
@@ -26,8 +26,12 @@ static const unsigned short analog_ctrl_map[] = {
};
int KeyboardDevice::UpdateState() {
bool alternate = GetAsyncKeyState(VK_SHIFT) != 0;
static u32 alternator = 0;
bool doAlternate = alternate && (alternator++ % 10) < 5;
for (int i = 0; i < sizeof(key_ctrl_map)/sizeof(key_ctrl_map[0]); i += 2) {
if (!GetAsyncKeyState(key_ctrl_map[i]))
if (!GetAsyncKeyState(key_ctrl_map[i]) || doAlternate)
__CtrlButtonUp(key_ctrl_map[i+1]);
else {
__CtrlButtonDown(key_ctrl_map[i+1]);
+16 -8
View File
@@ -114,16 +114,18 @@ namespace MainWindow
AdjustWindowRect(&rcOuter, WS_OVERLAPPEDWINDOW, TRUE);
}
void ResizeDisplay() {
void ResizeDisplay(bool noWindowMovement = false) {
RECT rc;
GetClientRect(hwndMain, &rc);
if (!noWindowMovement) {
if ((rc.right - rc.left) == PSP_CoreParameter().pixelWidth &&
(rc.bottom - rc.top) == PSP_CoreParameter().pixelHeight)
return;
PSP_CoreParameter().pixelWidth = rc.right - rc.left;
PSP_CoreParameter().pixelHeight = rc.bottom - rc.top;
MoveWindow(hwndDisplay, 0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight, TRUE);
if ((rc.right - rc.left) == PSP_CoreParameter().pixelWidth &&
(rc.bottom - rc.top) == PSP_CoreParameter().pixelHeight)
return;
PSP_CoreParameter().pixelWidth = rc.right - rc.left;
PSP_CoreParameter().pixelHeight = rc.bottom - rc.top;
MoveWindow(hwndDisplay, 0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight, TRUE);
}
// round up to a zoom factor for the render size.
int zoom = (rc.right - rc.left + 479) / 480;
@@ -527,6 +529,10 @@ namespace MainWindow
g_Config.bVertexCache = !g_Config.bVertexCache;
UpdateMenus();
break;
case ID_OPTIONS_SHOWFPS:
g_Config.bShowFPSCounter = !g_Config.bShowFPSCounter;
UpdateMenus();
break;
case ID_OPTIONS_DISPLAYRAWFRAMEBUFFER:
g_Config.bDisplayFramebuffer = !g_Config.bDisplayFramebuffer;
UpdateMenus();
@@ -546,6 +552,7 @@ namespace MainWindow
case ID_OPTIONS_SIMPLE2XSSAA:
g_Config.SSAntiAliasing = !g_Config.SSAntiAliasing;
UpdateMenus();
ResizeDisplay(true);
break;
case ID_OPTIONS_DISABLEG3DLOG:
g_Config.bDisableG3DLog = !g_Config.bDisableG3DLog;
@@ -702,6 +709,7 @@ namespace MainWindow
CHECKITEM(ID_OPTIONS_USEVBO, g_Config.bUseVBO);
CHECKITEM(ID_OPTIONS_DISABLEG3DLOG, g_Config.bDisableG3DLog);
CHECKITEM(ID_OPTIONS_VERTEXCACHE, g_Config.bVertexCache);
CHECKITEM(ID_OPTIONS_SHOWFPS, g_Config.bShowFPSCounter);
UINT enable = !Core_IsStepping() ? MF_GRAYED : MF_ENABLED;
EnableMenuItem(menu,ID_EMULATION_RUN, g_State.bEmuThreadStarted ? enable : MF_GRAYED);
@@ -722,7 +730,6 @@ namespace MainWindow
EnableMenuItem(menu,ID_EMULATION_STOP,!enable);
EnableMenuItem(menu,ID_OPTIONS_SETTINGS,enable);
EnableMenuItem(menu,ID_PLUGINS_CHOOSEPLUGINS,enable);
EnableMenuItem(menu,ID_OPTIONS_SIMPLE2XSSAA,enable);
const int zoomitems[4] = {
ID_OPTIONS_SCREEN1X,
@@ -773,6 +780,7 @@ namespace MainWindow
"Analog Down\tK",
"Analog Left\tJ",
"Analog Right\tL",
"Rapid Fire\tShift",
};
// Message handler for about box.
LRESULT CALLBACK Controls(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+1
View File
@@ -262,6 +262,7 @@ BEGIN
MENUITEM "&Wireframe (experimental)", ID_OPTIONS_WIREFRAME
MENUITEM "&Display Raw Framebuffer", ID_OPTIONS_DISPLAYRAWFRAMEBUFFER
MENUITEM "&Show Debug Statistics", ID_OPTIONS_SHOWDEBUGSTATISTICS
MENUITEM "&Show FPS", ID_OPTIONS_SHOWFPS
MENUITEM "&Disable G3D Log", ID_OPTIONS_DISABLEG3DLOG
MENUITEM SEPARATOR
MENUITEM "Screen &1x\tCtrl+1", ID_OPTIONS_SCREEN1X
+2 -1
View File
@@ -258,6 +258,7 @@
#define ID_OPTIONS_USEVBO 40134
#define ID_OPTIONS_DISABLEG3DLOG 40135
#define ID_OPTIONS_VERTEXCACHE 40136
#define ID_OPTIONS_SHOWFPS 40137
#define IDC_STATIC -1
// Next default values for new objects
@@ -265,7 +266,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 233
#define _APS_NEXT_COMMAND_VALUE 40137
#define _APS_NEXT_COMMAND_VALUE 40138
#define _APS_NEXT_CONTROL_VALUE 1163
#define _APS_NEXT_SYMED_VALUE 101
#endif