summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2017-10-23 14:40:57 +0200
committer Vas Crabb <vas@vastheman.com>2017-10-24 14:20:20 +1100
commitbe5d1e3e92001b88f20b25ca373c0d4f80470428 (patch)
tree778e73c2e5550826a3e0921bab5144f1a6d1d2a2
parentdbe533062b922ae748f027ca88763e4f0f9972f4 (diff)
einstein: Fix MT #6728
-rw-r--r--src/mame/drivers/einstein.cpp26
-rw-r--r--src/mame/includes/einstein.h2
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"
@@ -247,21 +248,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;