From d0ec40be37ca5678139ef55174b590b037e54c55 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 20 Jun 2020 18:08:24 -0400 Subject: [PATCH] GB: Fixed serial control behavior (bit 7 is cleared after transfer) Fixes freeze in Renju Club --- Core/GbMemoryManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/GbMemoryManager.cpp b/Core/GbMemoryManager.cpp index a234280..2e79676 100644 --- a/Core/GbMemoryManager.cpp +++ b/Core/GbMemoryManager.cpp @@ -86,6 +86,11 @@ void GbMemoryManager::Exec() if(_state.SerialBitCount && (_state.CycleCount & 0x1FF) == 0) { _state.SerialData = (_state.SerialData << 1) | 0x01; if(--_state.SerialBitCount == 0) { + //"It will be notified that the transfer is complete in two ways: + //SC's Bit 7 will be cleared" + _state.SerialControl &= 0x7F; + + //"and the Serial Interrupt handler will be called" RequestIrq(GbIrqSource::Serial); } }