diff options
| author | skidau <skidau@gmail.com> | 2015-03-13 23:25:15 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-03-13 23:25:15 +1100 |
| commit | cdff138c671c260527108e6771427c05f265f6a7 (patch) | |
| tree | d815e066069f51890b29442ad8320a4fbef70223 /Source/Core/VideoCommon/OpcodeDecoding.cpp | |
| parent | 2916aed1f93ee12e531d3b1f725f46d1563bdba5 (diff) | |
Show no more than one FIFO error per session.
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/OpcodeDecoding.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp index b7bcb8c8e3..20a8f2eac9 100644 --- a/Source/Core/VideoCommon/OpcodeDecoding.cpp +++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp @@ -33,6 +33,7 @@ bool g_bRecordFifoData = false; +bool g_bFifoErrorSeen = false; 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 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" "* The emulated GPU got desynced, disabling dual core can help\n" "* Command stream corrupted by some spurious memory bug\n" "* This really is an unknown opcode (unlikely)\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." , cmd_byte, buffer, @@ -123,6 +125,7 @@ static void UnknownOpcode(u8 cmd_byte, void *buffer, bool preprocess) 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... 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) goto end; @@ -237,7 +245,7 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list) DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)"); 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 // 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 { - UnknownOpcode(cmd_byte, opcodeStart, is_preprocess); + if (!g_bFifoErrorSeen) + 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; } break; |
