From 93939d216e2cac3b836827fb32eb0da2714039e2 Mon Sep 17 00:00:00 2001 From: dinkc64 <12570148+dinkc64@users.noreply.github.com> Date: Fri, 7 Nov 2014 21:09:37 +0000 Subject: [PATCH] tlcs90: calculate the timer period based on clock --- src/cpu/tlcs90/tlcs90.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/tlcs90/tlcs90.cpp b/src/cpu/tlcs90/tlcs90.cpp index 2ff456934..242385441 100644 --- a/src/cpu/tlcs90/tlcs90.cpp +++ b/src/cpu/tlcs90/tlcs90.cpp @@ -2712,7 +2712,7 @@ void t90_internal_registers_w(UINT16 offset, UINT8 data) cpustate->internal_registers[offset] = data; } -INT32 tlcs90_init(INT32 /*clock*/) +INT32 tlcs90_init(INT32 clock) { t90_Regs *cpustate = &tlcs90_data[0]; INT32 i, p; @@ -2743,7 +2743,7 @@ INT32 tlcs90_init(INT32 /*clock*/) memset(cpustate, 0, sizeof(t90_Regs)); - cpustate->timer_period = 8; // changed to "8" -dink //(1.000000000 / clock) * 8; + cpustate->timer_period = clock / 1000000; // Reset registers to their initial values