From b931e81485a9f84f4e0b89e402ee4fadf1cb31ff Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 10 Apr 2021 07:23:36 +0200 Subject: [PATCH] Fixed a PIT bug (reported by qeggers). --- src/pit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pit.c b/src/pit.c index e9f25237b..9646097ec 100644 --- a/src/pit.c +++ b/src/pit.c @@ -647,7 +647,7 @@ pit_read(uint16_t addr, void *priv) break; case 3: case 0x83: - if (ctr->wm & 0x80) + if (ctr->rm & 0x80) ret = ~(ctr->l & 0xff); else ret = count >> ((ctr->rm & 0x80) ? 8 : 0);