diff options
author | 2021-04-19 20:16:49 +0200 | |
---|---|---|
committer | 2021-04-19 20:17:01 +0200 | |
commit | e02da6ccd8726f647a8796f5fd63e25a23b172c1 (patch) | |
tree | e9cbe5eeb7b5cc1e41e70a910e096533c82c0d15 /src/devices/machine/smartboard.cpp | |
parent | 02516af978fc2cb3d5f7d079b4d087d6fa693040 (diff) |
smartboard: add user config to allow duplicate piece ids
Diffstat (limited to 'src/devices/machine/smartboard.cpp')
-rw-r--r-- | src/devices/machine/smartboard.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/devices/machine/smartboard.cpp b/src/devices/machine/smartboard.cpp index 303317d888b..123434e0cb5 100644 --- a/src/devices/machine/smartboard.cpp +++ b/src/devices/machine/smartboard.cpp @@ -73,6 +73,7 @@ tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *ta : device_t(mconfig, TASC_SB30, tag, owner, clock) , m_board(*this, "board") , m_out_leds(*this, "sb30_led_%u.%u", 0U, 0U) + , m_conf(*this, "CONF") , m_data_out(*this) , m_led_out(*this) { } @@ -104,6 +105,23 @@ void tasc_sb30_device::device_start() //------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +static INPUT_PORTS_START( smartboard ) + PORT_START("CONF") + PORT_CONFNAME( 0x01, 0x00, "Duplicate Piece IDs" ) + PORT_CONFSETTING( 0x00, DEF_STR( No ) ) + PORT_CONFSETTING( 0x01, DEF_STR( Yes ) ) +INPUT_PORTS_END + +ioport_constructor tasc_sb30_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(smartboard); +} + + +//------------------------------------------------- // device_add_mconfig - add device-specific // machine configuration //------------------------------------------------- @@ -155,7 +173,7 @@ bool tasc_sb30_device::piece_available(u8 id) for (int x = 0; x < 8; x++) { if (m_board->read_piece(x, y) == id) - return false; + return bool(m_conf->read() & 1); } return true; |