From 4adbe3f5607766d5209086bdd070e9b447507953 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Sat, 4 Aug 2018 17:15:11 +1000 Subject: [PATCH] Fixed bug where the drive could incorrectly write to the disk just after a reset. --- src/Drive.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Drive.cpp b/src/Drive.cpp index c3942b3..ce8ba85 100644 --- a/src/Drive.cpp +++ b/src/Drive.cpp @@ -445,7 +445,8 @@ bool Drive::Update() } else if (diskImage && motor) { - bool writing = (m_pVIA->GetFCR() & m6522::FCR_CB2_OUTPUT_MODE0) == 0; + unsigned char FCR = m_pVIA->GetFCR(); + bool writing = ((FCR & m6522::FCR_CB2_OUTPUT_MODE0) == 0) && ((FCR & m6522::FCR_CB2_IO) != 0); if (SO) {