summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Sven Schnelle <svens@stackframe.org>2018-06-23 15:49:09 +0200
committer Sven Schnelle <svens@stackframe.org>2018-06-23 15:49:09 +0200
commit20f0c7c2a27914a37e05c49fee1c64d543d7739e (patch)
tree3dd47c69399344dcc03e3f9efc3ae0a097c1735d /src
parentdd30364632520a2137858d43760d5a6f8a6077fc (diff)
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 <svens@stackframe.org>
Diffstat (limited to 'src')
-rw-r--r--src/devices/machine/6840ptm.cpp4
1 files changed, 4 insertions, 0 deletions
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