Debugger for DX9 plugin.

Debugger panel is displayed only if Dolphin is started with /d option.
Dump features are not implemented.
Pause/Resume buttons works, only if the plugin is built in DEBUG or DEBUGFAST configuration, not in RELEASE. These features are really only for devs, not for regular gamers.

You will be able to pause frame by frame, or by n frames, or by n primitive flushes. Other pausing options are not implemented yet.

When other pausing and dumping features are implemented, debugging will be much easier.

I have changed the DX9 project setting to use unicode character set in order to use wxWidge tools. If this causes Dolphin building problems for you, check your project setting.txt




git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4154 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
rice1964
2009-09-02 06:33:41 +00:00
parent 3bba897799
commit d616f132d7
23 changed files with 775 additions and 100 deletions

View File

@ -16,7 +16,6 @@
// http://code.google.com/p/dolphin-emu/
#include "Common.h"
#include "FileUtil.h"
#include "D3DBase.h"
@ -37,6 +36,9 @@
#include "BPStructs.h"
#include "XFStructs.h"
#include "debugger/debugger.h"
using namespace D3D;
// internal state for loading vertices
@ -82,8 +84,6 @@ bool Init()
collection = C_NOTHING;
fakeVBuffer = new u8[MAXVBUFFERSIZE];
fakeIBuffer = new u16[MAXIBUFFERSIZE];
memset(fakeVBuffer, 0, MAXVBUFFERSIZE);
memset(fakeIBuffer, 0, MAXIBUFFERSIZE * 2);
CreateDeviceObjects();
VertexManager::s_pCurBufferPointer = fakeVBuffer;
return true;
@ -146,6 +146,9 @@ void AddVertices(int _primitive, int _numVertices)
//We are NOT collecting the right type.
Flush();
// Copy the extra verts that we lost.
memcpy(s_pCurBufferPointer, fakeVBuffer, _numVertices * g_nativeVertexFmt->GetVertexStride());
collection = type;
u16 *ptr = 0;
if (type != C_POINTS)
@ -155,7 +158,7 @@ void AddVertices(int _primitive, int _numVertices)
AddIndices(_primitive, _numVertices);
}
if (_numVertices >= MAXVBUFFERSIZE)
MessageBox(NULL, "Too many vertices for the buffer", "Dolphin DX9 Video Plugin", MB_OK);
MessageBoxA(NULL, "Too many vertices for the buffer", "Dolphin DX9 Video Plugin", MB_OK);
}
else // We are collecting the right type, keep going
{
@ -165,7 +168,7 @@ void AddVertices(int _primitive, int _numVertices)
int last = indexGen.GetNumVerts();
AddIndices(_primitive, _numVertices);
if (_numVertices >= MAXVBUFFERSIZE)
MessageBox(NULL, "Too many vertices for the buffer", "Dolphin DX9 Video Plugin", MB_OK);
MessageBoxA(NULL, "Too many vertices for the buffer", "Dolphin DX9 Video Plugin", MB_OK);
}
}
@ -321,7 +324,9 @@ void Flush()
collection = C_NOTHING;
VertexManager::s_pCurBufferPointer = fakeVBuffer;
DEBUGGER_PAUSE_COUNT_N(NEXT_FLUSH);
}
//DX9DEBUGGER_PAUSE_IF(NEXT_FLUSH);
}
} // namespace