Merge pull request #2202 from skidau/Popup-FIFO
Show no more than one FIFO error per session.
This commit is contained in:
commit
7cda374910
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
|
|
||||||
bool g_bRecordFifoData = false;
|
bool g_bRecordFifoData = false;
|
||||||
|
bool g_bFifoErrorSeen = false;
|
||||||
|
|
||||||
static u32 InterpretDisplayList(u32 address, u32 size)
|
static u32 InterpretDisplayList(u32 address, u32 size)
|
||||||
{
|
{
|
||||||
|
@ -77,12 +78,13 @@ static void UnknownOpcode(u8 cmd_byte, void *buffer, bool preprocess)
|
||||||
{
|
{
|
||||||
// TODO(Omega): Maybe dump FIFO to file on this error
|
// TODO(Omega): Maybe dump FIFO to file on this error
|
||||||
PanicAlert(
|
PanicAlert(
|
||||||
"GFX FIFO: Unknown Opcode (0x%x @ %p, preprocessing=%s).\n"
|
"GFX FIFO: Unknown Opcode (0x%02x @ %p, preprocessing=%s).\n"
|
||||||
"This means one of the following:\n"
|
"This means one of the following:\n"
|
||||||
"* The emulated GPU got desynced, disabling dual core can help\n"
|
"* The emulated GPU got desynced, disabling dual core can help\n"
|
||||||
"* Command stream corrupted by some spurious memory bug\n"
|
"* Command stream corrupted by some spurious memory bug\n"
|
||||||
"* This really is an unknown opcode (unlikely)\n"
|
"* This really is an unknown opcode (unlikely)\n"
|
||||||
"* Some other sort of bug\n\n"
|
"* Some other sort of bug\n\n"
|
||||||
|
"Further errors will be sent to the Video Backend log and\n"
|
||||||
"Dolphin will now likely crash or hang. Enjoy." ,
|
"Dolphin will now likely crash or hang. Enjoy." ,
|
||||||
cmd_byte,
|
cmd_byte,
|
||||||
buffer,
|
buffer,
|
||||||
|
@ -123,6 +125,7 @@ static void UnknownOpcode(u8 cmd_byte, void *buffer, bool preprocess)
|
||||||
|
|
||||||
void OpcodeDecoder_Init()
|
void OpcodeDecoder_Init()
|
||||||
{
|
{
|
||||||
|
g_bFifoErrorSeen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -150,7 +153,12 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list)
|
||||||
totalCycles += 6; // Hm, this means that we scan over nop streams pretty slowly...
|
totalCycles += 6; // Hm, this means that we scan over nop streams pretty slowly...
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GX_LOAD_CP_REG: //0x08
|
case GX_UNKNOWN_RESET:
|
||||||
|
totalCycles += 6; // Datel software uses this command
|
||||||
|
DEBUG_LOG(VIDEO, "GX Reset?: %08x", cmd_byte);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GX_LOAD_CP_REG:
|
||||||
{
|
{
|
||||||
if (src.size() < 1 + 4)
|
if (src.size() < 1 + 4)
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -237,7 +245,7 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list)
|
||||||
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
|
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GX_LOAD_BP_REG: //0x61
|
case GX_LOAD_BP_REG:
|
||||||
// In skipped_frame case: We have to let BP writes through because they set
|
// In skipped_frame case: We have to let BP writes through because they set
|
||||||
// tokens and stuff. TODO: Call a much simplified LoadBPReg instead.
|
// tokens and stuff. TODO: Call a much simplified LoadBPReg instead.
|
||||||
{
|
{
|
||||||
|
@ -283,7 +291,10 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!g_bFifoErrorSeen)
|
||||||
UnknownOpcode(cmd_byte, opcodeStart, is_preprocess);
|
UnknownOpcode(cmd_byte, opcodeStart, is_preprocess);
|
||||||
|
ERROR_LOG(VIDEO, "FIFO: Unknown Opcode(0x%02x @ %p, preprocessing = %s)", cmd_byte, opcodeStart, is_preprocess ? "yes" : "no");
|
||||||
|
g_bFifoErrorSeen = true;
|
||||||
totalCycles += 1;
|
totalCycles += 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "VideoCommon/DataReader.h"
|
#include "VideoCommon/DataReader.h"
|
||||||
|
|
||||||
#define GX_NOP 0x00
|
#define GX_NOP 0x00
|
||||||
|
#define GX_UNKNOWN_RESET 0x01
|
||||||
|
|
||||||
#define GX_LOAD_BP_REG 0x61
|
#define GX_LOAD_BP_REG 0x61
|
||||||
#define GX_LOAD_CP_REG 0x08
|
#define GX_LOAD_CP_REG 0x08
|
||||||
|
|
Loading…
Reference in New Issue