From e081ee4b8e9a5dca20f960b917a7d9f621d06b65 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 29 Oct 2020 22:04:52 +1000 Subject: [PATCH] CDROM: Return error to guest instead of panicing for unknown commands --- src/core/cdrom.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 1e2d765c6..d661bdce5 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -1250,7 +1250,8 @@ void CDROM::ExecuteCommand() { Log_ErrorPrintf("Unknown CDROM command 0x%04X with %u parameters, please report", static_cast(m_command), m_param_fifo.GetSize()); - Panic("Unknown CDROM command"); + SendErrorResponse(STAT_ERROR, ERROR_REASON_INVALID_COMMAND); + EndCommand(); } break; } @@ -1329,7 +1330,8 @@ void CDROM::ExecuteTestCommand(u8 subcommand) default: { Log_ErrorPrintf("Unknown test command 0x%02X, %u parameters", subcommand, m_param_fifo.GetSize()); - Panic("Unknown test command"); + SendErrorResponse(STAT_ERROR, ERROR_REASON_INVALID_COMMAND); + EndCommand(); return; } }