1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 20:29:42 +00:00

Exit without further modification upon latch.

This commit is contained in:
Thomas Harte 2023-11-19 16:37:47 -05:00
parent 8844812910
commit 4e077701c9

View File

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