From 20f0c7c2a27914a37e05c49fee1c64d543d7739e Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Sat, 23 Jun 2018 15:49:09 +0200 Subject: 6840ptm: fix divide by 8 mode In divide by 8 mode the value computed in compute_counter() is wrong because the function doesn't divide the clock before the calculation. Signed-off-by: Sven Schnelle --- src/devices/machine/6840ptm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devices/machine/6840ptm.cpp b/src/devices/machine/6840ptm.cpp index 6ccf8c24565..c89abb2d6bd 100644 --- a/src/devices/machine/6840ptm.cpp +++ b/src/devices/machine/6840ptm.cpp @@ -307,6 +307,10 @@ uint16_t ptm6840_device::compute_counter( int counter ) const else { clk = m_external_clock[counter]; + if (counter == 2) + { + clk /= m_t3_divisor; + } LOG("Timer #%d external clock freq %f \n", counter + 1, clk); } // See how many are left -- cgit v1.2.3