diff options
Diffstat (limited to 'src/mame/drivers/minicom.cpp')
-rw-r--r-- | src/mame/drivers/minicom.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mame/drivers/minicom.cpp b/src/mame/drivers/minicom.cpp index 8b61f4273be..d759d20b58b 100644 --- a/src/mame/drivers/minicom.cpp +++ b/src/mame/drivers/minicom.cpp @@ -70,7 +70,7 @@ private: int m_digit_index; virtual void machine_start() override; virtual void machine_reset() override; - required_device<cpu_device> m_maincpu; + required_device<i87c52_device> m_maincpu; output_finder<20> m_digits; }; @@ -219,24 +219,25 @@ void minicom_state::init_minicom() { } -MACHINE_CONFIG_START(minicom_state::minicom) +void minicom_state::minicom(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", I87C52, XTAL(10'000'000)) /*FIX-ME: verify the correct clock frequency */ - MCFG_MCS51_PORT_P0_OUT_CB(WRITE8(*this, minicom_state, i87c52_p0_w)) - MCFG_MCS51_PORT_P1_IN_CB(READ8(*this, minicom_state, i87c52_p1_r)) - MCFG_MCS51_PORT_P1_OUT_CB(WRITE8(*this, minicom_state, i87c52_p1_w)) - MCFG_MCS51_PORT_P2_IN_CB(READ8(*this, minicom_state, i87c52_p2_r)) - MCFG_MCS51_PORT_P2_OUT_CB(WRITE8(*this, minicom_state, i87c52_p2_w)) - MCFG_MCS51_PORT_P3_OUT_CB(WRITE8(*this, minicom_state, i87c52_p3_w)) + I87C52(config, m_maincpu, XTAL(10'000'000)); /*FIX-ME: verify the correct clock frequency */ + m_maincpu->port_out_cb<0>().set(FUNC(minicom_state::i87c52_p0_w)); + m_maincpu->port_in_cb<1>().set(FUNC(minicom_state::i87c52_p1_r)); + m_maincpu->port_out_cb<1>().set(FUNC(minicom_state::i87c52_p1_w)); + m_maincpu->port_in_cb<2>().set(FUNC(minicom_state::i87c52_p2_r)); + m_maincpu->port_out_cb<2>().set(FUNC(minicom_state::i87c52_p2_w)); + m_maincpu->port_out_cb<3>().set(FUNC(minicom_state::i87c52_p3_w)); /* video hardware */ /* fluorescent 14-segment display forming a row of 20 characters */ config.set_default_layout(layout_minicom); -/* TODO: Map the keyboard rows/cols inputs (43-key, 4-row keyboard) */ + /* TODO: Map the keyboard rows/cols inputs (43-key, 4-row keyboard) */ -/* TODO: Treat the modem as a sound device. That may be an interesting challenge... :-) */ -MACHINE_CONFIG_END + /* TODO: Treat the modem as a sound device. That may be an interesting challenge... :-) */ +} ROM_START( minicom ) ROM_REGION( 0x2000, "maincpu", 0 ) |