diff options
author | smf- <smf-@users.noreply.github.com> | 2014-01-10 13:52:54 +0000 |
---|---|---|
committer | smf- <smf-@users.noreply.github.com> | 2014-01-10 13:52:54 +0000 |
commit | 68125fe084d0987e30152aadfda38b0e06c98bf3 (patch) | |
tree | c6e963c4734278e96e6e6ff0ec8765c407cec8d7 | |
parent | e7563a244ccf14038e718715258dccd9b6650933 (diff) |
hooked up RS232 port [smf]
-rw-r--r-- | src/mess/drivers/pipbug.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/mess/drivers/pipbug.c b/src/mess/drivers/pipbug.c index a80da377b02..98bce1ec45a 100644 --- a/src/mess/drivers/pipbug.c +++ b/src/mess/drivers/pipbug.c @@ -48,13 +48,15 @@ class pipbug_state : public driver_device public: pipbug_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_terminal(*this, TERMINAL_TAG) , - m_maincpu(*this, "maincpu") { } + m_rs232(*this, "rs232"), + m_maincpu(*this, "maincpu") + { + } DECLARE_WRITE8_MEMBER(pipbug_ctrl_w); DECLARE_READ8_MEMBER(pipbug_serial_r); DECLARE_WRITE8_MEMBER(pipbug_serial_w); - required_device<serial_terminal_device> m_terminal; + required_device<rs232_port_device> m_rs232; required_device<cpu_device> m_maincpu; DECLARE_QUICKLOAD_LOAD_MEMBER( pipbug ); }; @@ -66,12 +68,12 @@ WRITE8_MEMBER( pipbug_state::pipbug_ctrl_w ) READ8_MEMBER( pipbug_state::pipbug_serial_r ) { - return m_terminal->tx_r(); + return m_rs232->rx(); } WRITE8_MEMBER( pipbug_state::pipbug_serial_w ) { - m_terminal->rx_w(data); + m_rs232->tx(data); } static ADDRESS_MAP_START(pipbug_mem, AS_PROGRAM, 8, pipbug_state) @@ -97,11 +99,6 @@ static DEVICE_INPUT_DEFAULTS_START( terminal ) DEVICE_INPUT_DEFAULTS( "TERM_STOPBITS", 0xff, 0x00 ) // 1 DEVICE_INPUT_DEFAULTS_END -static const serial_terminal_interface terminal_intf = -{ - DEVCB_NULL -}; - QUICKLOAD_LOAD_MEMBER( pipbug_state, pipbug ) { address_space &space = m_maincpu->space(AS_PROGRAM); @@ -183,8 +180,8 @@ static MACHINE_CONFIG_START( pipbug, pipbug_state ) MCFG_CPU_IO_MAP(pipbug_io) /* video hardware */ - MCFG_SERIAL_TERMINAL_ADD(TERMINAL_TAG, terminal_intf, 110) - MCFG_DEVICE_INPUT_DEFAULTS(terminal) + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal") + MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("serial_terminal", terminal) /* quickload */ MCFG_QUICKLOAD_ADD("quickload", pipbug_state, pipbug, "pgm", 1) |