diff options
| author | 2026-04-04 18:09:44 +0200 | |
|---|---|---|
| committer | 2026-04-04 18:10:23 +0200 | |
| commit | 114e5028f072eee7bc3a5d02f855179242cd6671 (patch) | |
| tree | ce0bb91177593fc5db4645ef5112e534836a0c1e | |
| parent | 43a09d93f4b861013dae4ccd15f84337f1c2ec46 (diff) | |
nss_tvinterface: disable outgoing serial data by default
| -rw-r--r-- | src/devices/bus/rs232/nss_tvinterface.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/devices/bus/rs232/nss_tvinterface.cpp b/src/devices/bus/rs232/nss_tvinterface.cpp index 20530c5030f..797c9d3b28a 100644 --- a/src/devices/bus/rs232/nss_tvinterface.cpp +++ b/src/devices/bus/rs232/nss_tvinterface.cpp @@ -9,7 +9,8 @@ It's a box that connects to a CRT TV, for showing an in-progress chess game. It's meant to be connected either like: PC -> Distributor -> TV Interface, or like: chesscomputer -> Distributor -> TV Interface. But the distributor is only -for converting to/from RS-232/TTL voltage, so MAME can ignore it. +for converting to/from RS-232/TTL voltage, so MAME can ignore it. TxD is blocked +by the distributor. It expects a baud rate of 9600, 8 data bits, 1 stop bit, no parity. @@ -64,7 +65,7 @@ private: required_device<screen_device> m_screen; required_shared_ptr<u8> m_vram; required_region_ptr<u8> m_cg_rom; - required_ioport m_in; + required_ioport m_conf; u8 m_rx_state = 0; @@ -91,7 +92,7 @@ nss_tvinterface_device::nss_tvinterface_device(const machine_config &mconfig, co m_screen(*this, "screen"), m_vram(*this, "vram"), m_cg_rom(*this, "cg_rom"), - m_in(*this, "IN") + m_conf(*this, "CONF") { } void nss_tvinterface_device::device_start() @@ -162,15 +163,16 @@ u8 nss_tvinterface_device::p2_r() void nss_tvinterface_device::p2_w(u8 data) { - // P24: serial out - output_rxd(BIT(~data, 4)); + // P24: serial out (blocked by default) + if (m_conf->read() & 1) + output_rxd(BIT(data, 4)); } void nss_tvinterface_device::main_map(address_map &map) { map(0x8000, 0x87ff).ram().share(m_vram); - map(0xa3bd, 0xa3bd).portr(m_in); + map(0xa3bd, 0xa3bd).portr("IN"); map(0xa3be, 0xa3be).w(FUNC(nss_tvinterface_device::unknown_w)); map(0xa3d0, 0xa3d0).mirror(0x0006).w(m_crtc, FUNC(mc6845_device::address_w)); @@ -193,6 +195,11 @@ static INPUT_PORTS_START( nss_tvinterface ) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Select") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Change") + + PORT_START("CONF") + PORT_CONFNAME( 0x01, 0x00, "Serial Transfer" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x01, DEF_STR( On ) ) INPUT_PORTS_END ioport_constructor nss_tvinterface_device::device_input_ports() const |
