From ff94c18a919a1160288433e5d3e2f2b2a6f907d4 Mon Sep 17 00:00:00 2001 From: SarahW Date: Sat, 24 Feb 2018 14:44:24 +0000 Subject: [PATCH] PIT readback of timer with mode 3 and gate disabled now reads the counter directly rather than converting the emulator timer value. Fixes 101 error on Compaq Portable Plus. --- src/pit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pit.c b/src/pit.c index e479f31..90dab32 100644 --- a/src/pit.c +++ b/src/pit.c @@ -310,7 +310,7 @@ static int pit_read_timer(PIT *pit, int t) { timer_clock(); // pclog("pit_read_timer: t=%i using_timer=%i m=%i\n", t, pit.using_timer[t], pit.m[t]); - if (pit->using_timer[t]) + if (pit->using_timer[t] && !(pit->m[t] == 3 && !pit->gate[t])) { int read = (int)((pit->c[t] + ((1 << TIMER_SHIFT) - 1)) / PITCONST) >> TIMER_SHIFT; if (pit->m[t] == 2)