From 90d85af304d55fcc05abf8e1ae03a85f75efe4cb Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 9 Jun 2023 15:09:14 +0200 Subject: [PATCH] Fixed an accidentally introduced PIT timer mode 0 regression, fixes #3376. --- src/pit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pit.c b/src/pit.c index b39d565d3..cf339607d 100644 --- a/src/pit.c +++ b/src/pit.c @@ -307,7 +307,7 @@ static void ctr_set_state_1(ctr_t *ctr) { uint8_t mode = (ctr->m & 0x03); - int do_reload = !!ctr->incomplete || (ctr->state == 0); + int do_reload = !!ctr->incomplete || (mode == 0) || (ctr->state == 0); ctr->incomplete = 0; @@ -984,7 +984,7 @@ pit_set_clock(int clock) ISACONST = (uint64_t) ((cpuclock / (double) cpu_isa_speed) * (double) (1ULL << 32)); xt_cpu_multi = 1ULL; } else { - cpuclock = 14318184.0; + cpuclock = (157500000.0 / 11.0); PITCONSTD = 12.0; PITCONST = (12ULL << 32ULL); CGACONST = (8ULL << 32ULL);