From 3a92a65f8044f59944c2bb6cbae840310c0de076 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 17 Oct 2018 22:03:08 -0400 Subject: apollo.cpp: It works this way: the following MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS must be changed over as well (nw) --- src/mame/machine/apollo.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp index a041fade651..cf485cecf97 100644 --- a/src/mame/machine/apollo.cpp +++ b/src/mame/machine/apollo.cpp @@ -1175,13 +1175,9 @@ MACHINE_CONFIG_START(apollo_state::apollo_terminal) MCFG_APOLLO_SIO_OUTPORT_CALLBACK(WRITE8(*this, apollo_state, sio_output)) MCFG_APOLLO_SIO_B_TX_CALLBACK(WRITELINE("rs232", rs232_port_device, write_txd)) - MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "terminal") - MCFG_RS232_RXD_HANDLER(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_b_w)) - // this crashes validation with std::bad_cast - //rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal")); - //rs232.rxd_handler().set(APOLLO_SIO_TAG, FUNC(apollo_sio::rx_b_w)); - - MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("terminal", apollo_terminal) + rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal")); + rs232.rxd_handler().set(APOLLO_SIO_TAG, FUNC(apollo_sio::rx_b_w)); + rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(apollo_terminal)); MACHINE_CONFIG_END void apollo_state::init_apollo() -- cgit v1.2.3