From 4e077701c92a9911373c2e239fe3c717b36c9611 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 19 Nov 2023 16:37:47 -0500 Subject: [PATCH] Exit without further modification upon latch. --- Machines/PCCompatible/PCCompatible.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index c3d70feb0..372ccf1be 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -46,15 +46,16 @@ class PIT { printf("Set mode on %d\n", channel_id); Channel &channel = channels_[channel_id]; - - channel.is_bcd = value & 1; switch((value >> 1) & 3) { - default: channel.latch_value(); break; + default: + channel.latch_value(); + return; case 1: channel.latch_mode = LatchMode::LowOnly; break; case 2: channel.latch_mode = LatchMode::HighOnly; break; case 3: channel.latch_mode = LatchMode::LowHigh; break; } + channel.is_bcd = value & 1; channel.next_write_high = false; const auto operating_mode = (value >> 3) & 7;