mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
MC6846 uses the E clock too (nw)
This commit is contained in:
parent
42f3d26e1e
commit
69a8ee58d4
@ -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();
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user