From 4c23b7d4c3aa3b2ac429ff979c27d8015057df60 Mon Sep 17 00:00:00 2001 From: 68bit Date: Fri, 18 Oct 2019 11:43:33 +1100 Subject: IE15 terminal: rework the RS232 interfaces The RS232 port has been moved out of the ie15 device. It is only needed in stand alone operation, and not when connected to the rs232 bus, it was odd leaving it in there, odd to still have an rs232 port slot option when running stand alone. The IE15 UART implementation has been removed from the rs232 bus code and back into the ie15 device code. This leaves the rs232 bus code dealing with only serial data, and not the parallel data, and that should make it easier in future to have a common interface to RS232 terminals. --- src/devices/machine/ie15.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'src/devices/machine/ie15.h') diff --git a/src/devices/machine/ie15.h b/src/devices/machine/ie15.h index 7390fb5fea5..fe964397832 100644 --- a/src/devices/machine/ie15.h +++ b/src/devices/machine/ie15.h @@ -39,13 +39,22 @@ class ie15_device : public device_t, public device_serial_interface public: ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_WRITE8_MEMBER(write) { term_write(data); } - - DECLARE_WRITE_LINE_MEMBER(serial_rx_callback); + // Interface to a RS232 connection. + auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } + auto rs232_conn_dtr_handler() { return m_rs232_conn_dtr_handler.bind(); } + auto rs232_conn_rts_handler() { return m_rs232_conn_rts_handler.bind(); } + DECLARE_WRITE_LINE_MEMBER(rs232_conn_dcd_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_dsr_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_ri_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_cts_w); + DECLARE_WRITE_LINE_MEMBER(rs232_conn_rxd_w); + + DECLARE_WRITE_LINE_MEMBER(update_serial); protected: ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + virtual void device_resolve_objects() override; virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -58,8 +67,6 @@ protected: virtual void tra_callback() override; virtual void tra_complete() override; - void term_write(uint8_t data) { m_serial_rx_char = data; m_serial_rx_ready = IE_FALSE; } - private: static const device_timer_id TIMER_HBLANK = 0; void scanline_callback(); @@ -129,10 +136,20 @@ private: required_region_ptr m_p_videoram; required_region_ptr m_p_chargen; required_device m_beeper; - required_device m_rs232; required_device m_screen; required_device m_keyboard; required_ioport m_io_keyboard; + + devcb_write_line m_rs232_conn_txd_handler; + devcb_write_line m_rs232_conn_dtr_handler; + devcb_write_line m_rs232_conn_rts_handler; + + // Until the UART is implemented + required_ioport m_rs232_txbaud; + required_ioport m_rs232_rxbaud; + required_ioport m_rs232_databits; + required_ioport m_rs232_parity; + required_ioport m_rs232_stopbits; }; DECLARE_DEVICE_TYPE(IE15, ie15_device) -- cgit v1.2.3-70-g09d2