From 3787af9ee9ca3279f437e17b1a343f6aa7a091ef Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 27 Jan 2017 09:44:31 +0100 Subject: CommandProcessor: Limit scope of ugly SCPFifoStruct. It's only used as an interface between two classes. So no need to declare it in the backend export header. --- Source/Core/VideoCommon/CommandProcessor.cpp | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'Source/Core/VideoCommon/CommandProcessor.cpp') diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp index 56c3fe757e..04ede7c412 100644 --- a/Source/Core/VideoCommon/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/CommandProcessor.cpp @@ -486,4 +486,43 @@ void SetCpClearRegister() { } +void HandleUnknownOpcode(u8 cmd_byte, void* buffer, bool preprocess) +{ + // TODO(Omega): Maybe dump FIFO to file on this error + PanicAlertT("GFX FIFO: Unknown Opcode (0x%02x @ %p, %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, preprocess ? "preprocess=true" : "preprocess=false"); + + { + PanicAlert("Illegal command %02x\n" + "CPBase: 0x%08x\n" + "CPEnd: 0x%08x\n" + "CPHiWatermark: 0x%08x\n" + "CPLoWatermark: 0x%08x\n" + "CPReadWriteDistance: 0x%08x\n" + "CPWritePointer: 0x%08x\n" + "CPReadPointer: 0x%08x\n" + "CPBreakpoint: 0x%08x\n" + "bFF_GPReadEnable: %s\n" + "bFF_BPEnable: %s\n" + "bFF_BPInt: %s\n" + "bFF_Breakpoint: %s\n" + "bFF_GPLinkEnable: %s\n" + "bFF_HiWatermarkInt: %s\n" + "bFF_LoWatermarkInt: %s\n", + cmd_byte, fifo.CPBase, fifo.CPEnd, fifo.CPHiWatermark, fifo.CPLoWatermark, + fifo.CPReadWriteDistance, fifo.CPWritePointer, fifo.CPReadPointer, fifo.CPBreakpoint, + fifo.bFF_GPReadEnable ? "true" : "false", fifo.bFF_BPEnable ? "true" : "false", + fifo.bFF_BPInt ? "true" : "false", fifo.bFF_Breakpoint ? "true" : "false", + fifo.bFF_GPLinkEnable ? "true" : "false", fifo.bFF_HiWatermarkInt ? "true" : "false", + fifo.bFF_LoWatermarkInt ? "true" : "false"); + } +} + } // end of namespace CommandProcessor -- cgit v1.2.3