1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 18:55:48 +00:00

Fix field decoding.

This commit is contained in:
Thomas Harte 2023-11-19 21:51:27 -05:00
parent 4e077701c9
commit 119c83eb18

View File

@ -46,7 +46,8 @@ class PIT {
printf("Set mode on %d\n", channel_id);
Channel &channel = channels_[channel_id];
switch((value >> 1) & 3) {
channel.next_write_high = false;
switch((value >> 4) & 3) {
default:
channel.latch_value();
return;
@ -58,7 +59,7 @@ class PIT {
channel.is_bcd = value & 1;
channel.next_write_high = false;
const auto operating_mode = (value >> 3) & 7;
const auto operating_mode = (value >> 1) & 7;
switch(operating_mode) {
default: channel.mode = OperatingMode(operating_mode); break;
case 6: channel.mode = OperatingMode::RateGenerator; break;