summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/rc2014/serial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/rc2014/serial.cpp')
-rw-r--r--src/devices/bus/rc2014/serial.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/devices/bus/rc2014/serial.cpp b/src/devices/bus/rc2014/serial.cpp
index 80bc984579b..1a3eff6a593 100644
--- a/src/devices/bus/rc2014/serial.cpp
+++ b/src/devices/bus/rc2014/serial.cpp
@@ -28,6 +28,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
+ virtual void device_reset() override;
virtual void device_resolve_objects() override;
virtual void device_add_mconfig(machine_config &config) override;
@@ -46,8 +47,12 @@ serial_io_device::serial_io_device(const machine_config &mconfig, const char *ta
void serial_io_device::device_start()
{
- // A5, A4, A3, A2 and A1 not connected
- m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x81, 0, 0x3e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write)));
+}
+
+void serial_io_device::device_reset()
+{
+ // A15-A8 and A5-A1 not connected
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x81, 0, 0xff3e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write)));
}
void serial_io_device::device_resolve_objects()
@@ -58,6 +63,8 @@ void serial_io_device::device_resolve_objects()
m_bus->rx_callback().append(m_acia, FUNC(acia6850_device::write_rxd));
}
+// JP1 is used to enable power from USB-to-Serial cable
+
static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_115200 )
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_115200 )
@@ -115,7 +122,7 @@ protected:
dual_serial_base::dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, type, tag, owner, clock)
, m_clk_portb(0)
- , m_portb(*this, "PORTB")
+ , m_portb(*this, "JP1")
, m_sio(*this, "sio")
{
}
@@ -149,10 +156,11 @@ void dual_serial_base::device_add_mconfig(machine_config &config)
}
static INPUT_PORTS_START( dual_serial_jumpers )
- PORT_START("PORTB")
+ PORT_START("JP1")
PORT_CONFNAME( 0x1, 0x0, "Port B" )
PORT_CONFSETTING( 0x0, "CLK2 (Open)" )
PORT_CONFSETTING( 0x1, "CLK1 (Closed)" )
+ // JP2 and JP3 are used to enable power from USB-to-Serial cable
INPUT_PORTS_END
ioport_constructor dual_serial_base::device_input_ports() const
@@ -172,7 +180,7 @@ public:
protected:
// device-level overrides
- virtual void device_start() override;
+ virtual void device_reset() override;
virtual void device_resolve_objects() override;
// base-class overrides
@@ -187,13 +195,14 @@ dual_serial_device::dual_serial_device(const machine_config &mconfig, const char
{
}
-void dual_serial_device::device_start()
+void dual_serial_device::device_reset()
{
- // A2 not connected
- m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w)));
+ dual_serial_base::device_reset();
+ // A15-A8 and A2 not connected
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w)));
}
void dual_serial_device::device_resolve_objects()
@@ -221,7 +230,7 @@ public:
protected:
// device-level overrides
- virtual void device_start() override;
+ virtual void device_reset() override;
virtual void device_resolve_objects() override;
// base-class overrides
@@ -236,13 +245,14 @@ dual_serial_device_40pin::dual_serial_device_40pin(const machine_config &mconfig
{
}
-void dual_serial_device_40pin::device_start()
+void dual_serial_device_40pin::device_reset()
{
- // A2 not connected
- m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w)));
- m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w)));
+ dual_serial_base::device_reset();
+ // A15-A8 and A2 not connected
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w)));
+ m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w)));
}
void dual_serial_device_40pin::device_resolve_objects()