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.

This commit is contained in:
SarahW 2018-02-24 14:44:24 +00:00
commit ff94c18a91

View file

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