diff options
Diffstat (limited to 'src/devices/bus/ss50')
-rw-r--r-- | src/devices/bus/ss50/interface.h | 4 | ||||
-rw-r--r-- | src/devices/bus/ss50/mpc.cpp | 32 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/devices/bus/ss50/interface.h b/src/devices/bus/ss50/interface.h index 5b79e00894c..1865eda6324 100644 --- a/src/devices/bus/ss50/interface.h +++ b/src/devices/bus/ss50/interface.h @@ -20,10 +20,10 @@ MCFG_DEVICE_SLOT_INTERFACE(ss50_##_slot_intf, _def_slot, false) #define MCFG_SS50_INTERFACE_IRQ_CALLBACK(_devcb) \ - devcb = &downcast<ss50_interface_port_device &>(*device).set_irq_cb(DEVCB_##_devcb); + downcast<ss50_interface_port_device &>(*device).set_irq_cb(DEVCB_##_devcb); #define MCFG_SS50_INTERFACE_FIRQ_CALLBACK(_devcb) \ - devcb = &downcast<ss50_interface_port_device &>(*device).set_firq_cb(DEVCB_##_devcb); + downcast<ss50_interface_port_device &>(*device).set_firq_cb(DEVCB_##_devcb); //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/bus/ss50/mpc.cpp b/src/devices/bus/ss50/mpc.cpp index 8489e23e29b..25a6ed43951 100644 --- a/src/devices/bus/ss50/mpc.cpp +++ b/src/devices/bus/ss50/mpc.cpp @@ -25,13 +25,13 @@ class ss50_mpc_device : public device_t, public ss50_card_interface public: // construction/destruction ss50_mpc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, SS50_MPC, tag, owner, clock), - ss50_card_interface(mconfig, *this), - m_pia(*this, "pia"), - m_loopback(*this, "loopback"), - m_counter(*this, "counter"), - m_baud_jumper(*this, "BAUD"), - m_count_select(false) + : device_t(mconfig, SS50_MPC, tag, owner, clock) + , ss50_card_interface(mconfig, *this) + , m_pia(*this, "pia") + , m_loopback(*this, "loopback") + , m_counter(*this, "counter") + , m_baud_jumper(*this, "BAUD") + , m_count_select(false) { } @@ -101,15 +101,15 @@ DEVICE_INPUT_DEFAULTS_END //------------------------------------------------- MACHINE_CONFIG_START(ss50_mpc_device::device_add_mconfig) - MCFG_DEVICE_ADD("pia", PIA6821, 0) // actually MC6820 - MCFG_PIA_WRITEPA_HANDLER(WRITELINE("outgate", input_merger_device, in_w<0>)) MCFG_DEVCB_BIT(0) - MCFG_PIA_CB2_HANDLER(WRITELINE(*this, ss50_mpc_device, reader_control_w)) - MCFG_PIA_READPB_HANDLER(IOPORT("STOP")) MCFG_DEVCB_BIT(6) - MCFG_DEVCB_CHAIN_INPUT(READLINE(*this, ss50_mpc_device, count_r)) MCFG_DEVCB_BIT(7) - MCFG_PIA_WRITEPB_HANDLER(WRITELINE(*this, ss50_mpc_device, count_select_w)) MCFG_DEVCB_BIT(2) - MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("counter", ripple_counter_device, reset_w)) MCFG_DEVCB_BIT(0) - //MCFG_PIA_IRQA_HANDLER(WRITELINE(*this, ss50_mpc_device, pia_irq_w)) - //MCFG_PIA_IRQB_HANDLER(WRITELINE(*this, ss50_mpc_device, pia_irq_w)) + PIA6821(config, m_pia, 0); // actually MC6820 + m_pia->writepa_handler().set("outgate", FUNC(input_merger_device::in_w<0>)).bit(0); + m_pia->cb2_handler().set(FUNC(ss50_mpc_device::reader_control_w)); + m_pia->readpb_handler().set_ioport("STOP").mask(0x01).lshift(6); + m_pia->readpb_handler().append(FUNC(ss50_mpc_device::count_r)).lshift(7); + m_pia->writepb_handler().set(FUNC(ss50_mpc_device::count_select_w)).bit(2); + m_pia->writepb_handler().append(m_counter, FUNC(ripple_counter_device::reset_w)).bit(0); + //m_pia->irqa_handler().set(FUNC(ss50_mpc_device::pia_irq_w)); + //m_pia->irqb_handler().set(FUNC(ss50_mpc_device::pia_irq_w)); MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "terminal") MCFG_RS232_RXD_HANDLER(WRITELINE(*this, ss50_mpc_device, serial_input_w)) |