GB: Fixed serial control behavior (bit 7 is cleared after transfer)

Fixes freeze in Renju Club
This commit is contained in:
Sour 2020-06-20 18:08:24 -04:00
parent cf745e1faf
commit d0ec40be37

View file

@ -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);
}
}