From 91eec68fffb414f96f489fe0417abf02606fb528 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sun, 28 Jul 2024 16:38:37 +0100 Subject: [PATCH] DiskII: Fix for "DRIVES OFF forces the control flipflops to clear". (@sicklittlemonkey) . fixes Zork0 (#926) and Shogun (#1315) --- source/Disk.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Disk.cpp b/source/Disk.cpp index 84ab0c7c..a66c0282 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -494,6 +494,10 @@ void __stdcall Disk2InterfaceCard::ControlMotor(WORD, WORD address, BYTE, BYTE, BOOL newState = address & 1; bool stateChanged = (newState != m_floppyMotorOn); + // "2. [...] (DRIVES OFF forces the control flipflops to clear.)" (UTAIIe page 9-12) + if (newState == FALSE) + m_magnetStates = 0; // GH#926, GH#1315 + if (stateChanged) { m_floppyMotorOn = newState;