1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix RSP commands dump.

This commit is contained in:
Sergey Lipskiy 2017-07-29 11:19:20 +07:00
parent 1bb170a3c4
commit d37903461c
3 changed files with 12 additions and 17 deletions

View File

@ -196,7 +196,6 @@ static const char *aAText[] =
#else
#define DebugMsg(type, A, ...)
#define DebugRSPState(A, ...)
#define SwitchDump(A)
#endif // DEBUG_DUMP

View File

@ -520,7 +520,6 @@ void RDP_Half_1( u32 _c )
w1 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
RSP.cmd = _SHIFTR( w0, 24, 8 );
//DebugRSPState( RSP.PCi, RSP.PC[RSP.PCi], _SHIFTR( w0, 24, 8 ), w0, w1 );
DebugMsg(DEBUG_NORMAL, "0x%08lX: CMD=0x%02lX W0=0x%08lX W1=0x%08lX\n", RSP.PC[RSP.PCi], _SHIFTR(w0, 24, 8), w0, w1);
RSP.PC[RSP.PCi] += 8;

View File

@ -27,19 +27,13 @@ void _ProcessDList()
{
while (!RSP.halt) {
if ((RSP.PC[RSP.PCi] + 8) > RDRAMSize) {
#ifdef DEBUG
switch (Debug.level)
{
case DEBUG_LOW:
#ifdef DEBUG_DUMP
if ((config.debug.dumpMode & DEBUG_DETAIL) != 0)
DebugMsg(DEBUG_DETAIL | DEBUG_ERROR, "// Attempting to execute RSP command at invalid RDRAM location\n");
else if ((config.debug.dumpMode & DEBUG_NORMAL) != 0)
DebugMsg(DEBUG_NORMAL | DEBUG_ERROR, "Attempting to execute RSP command at invalid RDRAM location\n");
else if ((config.debug.dumpMode & DEBUG_LOW) != 0)
DebugMsg(DEBUG_LOW | DEBUG_ERROR, "ATTEMPTING TO EXECUTE RSP COMMAND AT INVALID RDRAM LOCATION\n");
break;
case DEBUG_MEDIUM:
DebugMsg(DEBUG_MEDIUM | DEBUG_ERROR, "Attempting to execute RSP command at invalid RDRAM location\n");
break;
case DEBUG_HIGH:
DebugMsg(DEBUG_HIGH | DEBUG_ERROR, "// Attempting to execute RSP command at invalid RDRAM location\n");
break;
}
#endif
break;
}
@ -48,9 +42,8 @@ void _ProcessDList()
RSP.w1 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
RSP.cmd = _SHIFTR(RSP.w0, 24, 8);
#ifdef DEBUG
DebugRSPState(RSP.PCi, RSP.PC[RSP.PCi], _SHIFTR(RSP.w0, 24, 8), RSP.w0, RSP.w1);
DebugMsg(DEBUG_LOW | DEBUG_HANDLED, "0x%08lX: CMD=0x%02lX W0=0x%08lX W1=0x%08lX\n", RSP.PC[RSP.PCi], _SHIFTR(RSP.w0, 24, 8), RSP.w0, RSP.w1);
#ifdef DEBUG_DUMP
DebugMsg(DEBUG_LOW, "0x%08lX: CMD=0x%02lX W0=0x%08lX W1=0x%08lX\n", RSP.PC[RSP.PCi], _SHIFTR(RSP.w0, 24, 8), RSP.w0, RSP.w1);
#endif
RSP.PC[RSP.PCi] += 8;
@ -80,6 +73,10 @@ void _ProcessDListSWRS()
RSP.w1 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
RSP.cmd = _SHIFTR(RSP.w0, 24, 8);
#ifdef DEBUG_DUMP
DebugMsg(DEBUG_LOW, "0x%08lX: CMD=0x%02lX W0=0x%08lX W1=0x%08lX\n", RSP.PC[RSP.PCi], _SHIFTR(RSP.w0, 24, 8), RSP.w0, RSP.w1);
#endif
RSP.nextCmd = _SHIFTR(*(u32*)&RDRAM[RSP.PC[RSP.PCi] + 8], 24, 8);
GBI.cmd[RSP.cmd](RSP.w0, RSP.w1);