From 69a8ee58d496ea76c551ccade9e1be3f1e5c3f7e Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 6 Aug 2018 21:03:20 -0400 Subject: MC6846 uses the E clock too (nw) --- src/devices/machine/mc6846.cpp | 10 +++++----- src/mame/drivers/thomson.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp index 56b2a49f786..75c76b8d283 100644 --- a/src/devices/machine/mc6846.cpp +++ b/src/devices/machine/mc6846.cpp @@ -129,7 +129,7 @@ inline uint16_t mc6846_device::counter() if ( m_timer_started ) { attotime delay = m_interval ->remaining( ); - return delay.as_ticks(1000000) / FACTOR; + return attotime_to_clocks(delay) / FACTOR; } else return m_preset; @@ -201,7 +201,7 @@ inline void mc6846_device::timer_launch() case 0x20: /* single-shot */ m_cto = 0; - m_one_shot->reset( attotime::from_usec(FACTOR) ); + m_one_shot->reset(clocks_to_attotime(FACTOR)); break; case 0x30: /* cascaded single-shot */ @@ -214,7 +214,7 @@ inline void mc6846_device::timer_launch() return; } - m_interval->reset( attotime::from_usec(delay) ); + m_interval->reset(clocks_to_attotime(delay)); m_timer_started = 1; m_csr &= ~1; @@ -255,12 +255,12 @@ TIMER_CALLBACK_MEMBER( mc6846_device::timer_expire ) default: logerror( "mc6846 timer mode %i not implemented\n", MODE ); - m_interval->reset( ); + m_interval->reset(); m_timer_started = 0; return; } - m_interval->reset( attotime::from_usec(delay) ); + m_interval->reset(clocks_to_attotime(delay)); m_csr |= 1; update_cto(); diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp index 4e944b86be3..3461f4540d6 100644 --- a/src/mame/drivers/thomson.cpp +++ b/src/mame/drivers/thomson.cpp @@ -667,7 +667,7 @@ MACHINE_CONFIG_START(thomson_state::to7) MCFG_CASSETTE_INTERFACE("to_cass") /* timer */ - MCFG_DEVICE_ADD("mc6846", MC6846, 0) + MCFG_DEVICE_ADD("mc6846", MC6846, 16_MHz_XTAL / 16) MCFG_MC6846_OUT_PORT_CB(WRITE8(*this, thomson_state, to7_timer_port_out)) MCFG_MC6846_OUT_CP2_CB(WRITELINE("buzzer", dac_bit_interface, write)) MCFG_MC6846_IN_PORT_CB(READ8(*this, thomson_state, to7_timer_port_in)) -- cgit v1.2.3