From 2a06f32bf6db0a373c8d88f03e2be4178578428e Mon Sep 17 00:00:00 2001 From: tomcw Date: Sun, 13 Oct 2019 10:25:33 +0100 Subject: [PATCH] Disk: Fixed write/disk-format issue (regression at 25496d3a52347b0beba09f70ee938a9eecb277cc) --- source/Disk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Disk.cpp b/source/Disk.cpp index 847543e5..bcb14da3 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -1455,7 +1455,7 @@ bool Disk2InterfaceCard::UserSelectNewDiskImage(const int drive, LPCSTR pszFilen void __stdcall Disk2InterfaceCard::LoadWriteProtect(WORD, WORD, BYTE write, BYTE value, ULONG uExecutedCycles) { - _ASSERT(m_seqFunc.function == checkWriteProtAndInitWrite); + // NB. m_seqFunc.function == checkWriteProtAndInitWrite or shiftWrite (both OK) // Don't change latch if drive off after 1 second drive-off delay (UTAIIe page 9-13) // "DRIVES OFF forces the data register to hold its present state." (UTAIIe page 9-12) @@ -1651,7 +1651,7 @@ void Disk2InterfaceCard::SetSequencerFunction(WORD addr) if ((addr & 0xf) < 0xc) return; - switch (addr & 3) + switch ((addr & 3) ^ 2) { case 0: m_seqFunc.writeMode = 0; break; // $C08E,X (sequence addr A2 input) case 1: m_seqFunc.writeMode = 1; break; // $C08F,X (sequence addr A2 input)