From affd4b4ca5cff7eca9e60d48ca0127c81a6e3163 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Mon, 23 Oct 2017 14:40:57 +0200 Subject: einstein: Fix MT #6728 --- src/mame/drivers/einstein.cpp | 26 +++++++------------------- src/mame/includes/einstein.h | 2 -- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp index d6b2873335f..a736d2e7fee 100644 --- a/src/mame/drivers/einstein.cpp +++ b/src/mame/drivers/einstein.cpp @@ -59,6 +59,7 @@ #include "cpu/z80/z80.h" #include "cpu/z80/z80daisy.h" +#include "machine/clock.h" #include "machine/z80pio.h" #include "sound/ay8910.h" @@ -246,21 +247,6 @@ WRITE8_MEMBER(einstein_state::einstein_drsel_w) } -/*************************************************************************** - CTC -***************************************************************************/ - -/* channel 0 and 1 have a 2 MHz input clock for triggering */ -TIMER_DEVICE_CALLBACK_MEMBER(einstein_state::einstein_ctc_trigger_callback) -{ - /* toggle line status */ - m_ctc_trigger ^= 1; - - m_ctc->trg0(m_ctc_trigger); - m_ctc->trg1(m_ctc_trigger); -} - - /*************************************************************************** UART ***************************************************************************/ @@ -414,8 +400,6 @@ void einstein_state::machine_reset() m_interrupt = 0; m_interrupt_mask = 0; - m_ctc_trigger = 0; - /* configure floppy drives */ /* floppy_type_t type_80 = FLOPPY_STANDARD_5_25_DSHD; floppy_type_t type_40 = FLOPPY_STANDARD_5_25_SSDD_40; @@ -697,16 +681,20 @@ static MACHINE_CONFIG_START( einstein ) MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", einstein_state, einstein_keyboard_timer_callback, attotime::from_hz(50)) MCFG_DEVICE_ADD(IC_I063, Z80PIO, XTAL_X002 / 2) + MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(IC_I001, INPUT_LINE_IRQ0)) MCFG_Z80PIO_OUT_PA_CB(DEVWRITE8("cent_data_out", output_latch_device, write)) MCFG_Z80PIO_OUT_PB_CB(DEVWRITELINE("centronics", centronics_device, write_strobe)) MCFG_DEVICE_ADD(IC_I058, Z80CTC, XTAL_X002 / 2) + MCFG_Z80CTC_INTR_CB(INPUTLINE(IC_I001, INPUT_LINE_IRQ0)) MCFG_Z80CTC_ZC0_CB(WRITELINE(einstein_state, einstein_serial_transmit_clock)) MCFG_Z80CTC_ZC1_CB(WRITELINE(einstein_state, einstein_serial_receive_clock)) MCFG_Z80CTC_ZC2_CB(DEVWRITELINE(IC_I058, z80ctc_device, trg3)) - /* the input to channel 0 and 1 of the ctc is a 2 MHz clock */ - MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", einstein_state, einstein_ctc_trigger_callback, attotime::from_hz(XTAL_X002 /4)) + MCFG_CLOCK_ADD("ctc_trigger", XTAL_X002 / 4) + MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE(IC_I058, z80ctc_device, trg0)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(IC_I058, z80ctc_device, trg1)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(IC_I058, z80ctc_device, trg2)) /* Einstein daisy chain support for non-Z80 devices */ MCFG_DEVICE_ADD("keyboard_daisy", EINSTEIN_KEYBOARD_DAISY, 0) diff --git a/src/mame/includes/einstein.h b/src/mame/includes/einstein.h index a05ca13f6e9..936c5e05d11 100644 --- a/src/mame/includes/einstein.h +++ b/src/mame/includes/einstein.h @@ -95,7 +95,6 @@ public: DECLARE_MACHINE_RESET(einstein2); uint32_t screen_update_einstein2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(einstein_keyboard_timer_callback); - TIMER_DEVICE_CALLBACK_MEMBER(einstein_ctc_trigger_callback); DECLARE_WRITE_LINE_MEMBER(einstein_6845_de_changed); DECLARE_WRITE8_MEMBER(einstein_drsel_w); DECLARE_WRITE_LINE_MEMBER(einstein_serial_transmit_clock); @@ -116,7 +115,6 @@ protected: optional_memory_region m_region_gfx1; int m_rom_enabled; - int m_ctc_trigger; /* keyboard */ uint8_t m_keyboard_line; -- cgit v1.2.3