From bb1dd31f53d7ca4e0e807bbb26d079f0c4ba2ab6 Mon Sep 17 00:00:00 2001 From: Bonta-kun <40473493+Bonta0@users.noreply.github.com> Date: Fri, 30 Apr 2021 04:55:13 +0200 Subject: [PATCH] SI: Fix COMERR update --- Source/Core/Core/HW/SI/SI.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Core/HW/SI/SI.cpp b/Source/Core/Core/HW/SI/SI.cpp index 1f2e95f1ed..7b17a213c1 100644 --- a/Source/Core/Core/HW/SI/SI.cpp +++ b/Source/Core/Core/HW/SI/SI.cpp @@ -240,7 +240,6 @@ static void SetNoResponse(u32 channel) s_status_reg.NOREP3 = 1; break; } - s_com_csr.COMERR = 1; } static void ChangeDeviceCallback(u64 user_data, s64 cycles_late) @@ -331,6 +330,7 @@ static void RunSIBuffer(u64 user_data, s64 cycles_late) if (actual_response_length != 0) { s_com_csr.TSTART = 0; + s_com_csr.COMERR = actual_response_length < 0; if (actual_response_length < 0) SetNoResponse(s_com_csr.CHANNEL); GenerateSIInterrupt(INT_TCINT); @@ -503,8 +503,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) s_com_csr.RDSTINTMSK = tmp_com_csr.RDSTINTMSK; s_com_csr.TCINTMSK = tmp_com_csr.TCINTMSK; - s_com_csr.COMERR = 0; - if (tmp_com_csr.RDSTINT) s_com_csr.RDSTINT = 0; if (tmp_com_csr.TCINT)