summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2015-03-16 13:00:22 +1100
committerskidau <skidau@gmail.com>2015-03-16 13:00:22 +1100
commit7cda374910ffa9fc9680035ea77083b1cc0d14d9 (patch)
treefb9366df0a802edf81c8d5f74362649d9101a4ef /Source/Core/VideoCommon/OpcodeDecoding.cpp
parentb5a1a2f06655a6a243ee6429fed9938e0493b37a (diff)
parentcdff138c671c260527108e6771427c05f265f6a7 (diff)
Merge pull request #2202 from skidau/Popup-FIFO
Show no more than one FIFO error per session.
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
-rw-r--r--Source/Core/VideoCommon/OpcodeDecoding.cpp19
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;