diff options
author | 2018-05-20 19:27:20 +0200 | |
---|---|---|
committer | 2018-05-20 13:27:20 -0400 | |
commit | 2beba4ce73fad917c7159a39939bace54f76494b (patch) | |
tree | e9d33c059bc5045f13d0c1748f0a044650370b8d /src/mame/machine/tandy2kb.cpp | |
parent | acf93837ac21b2b0bb003d1649b893200c269812 (diff) |
Replace set_led_value and set_lamp_value with output_finders. [Wilbe… (#3592)
* Replace set_led_value and set_lamp_value with output_finders. [Wilbert Pol]
* segaufo: keep the 2 bit lamp outputs
Diffstat (limited to 'src/mame/machine/tandy2kb.cpp')
-rw-r--r-- | src/mame/machine/tandy2kb.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mame/machine/tandy2kb.cpp b/src/mame/machine/tandy2kb.cpp index 2872e5dd87d..9c11fbeb046 100644 --- a/src/mame/machine/tandy2kb.cpp +++ b/src/mame/machine/tandy2kb.cpp @@ -210,6 +210,7 @@ tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, device_t(mconfig, TANDY2K_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8048_TAG), m_y(*this, "Y%u", 0), + m_led(*this, "led%u", 0U), m_write_clock(*this), m_write_data(*this), m_keylatch(0xffff), @@ -225,6 +226,7 @@ tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, void tandy2k_keyboard_device::device_start() { + m_led.resolve(); // resolve callbacks m_write_clock.resolve_safe(); m_write_data.resolve_safe(); @@ -369,8 +371,8 @@ WRITE8_MEMBER( tandy2k_keyboard_device::kb_p2_w ) m_keylatch = ((data & 0x0f) << 8) | (m_keylatch & 0xff); // led output - machine().output().set_led_value(LED_2, !BIT(data, 4)); - machine().output().set_led_value(LED_1, !BIT(data, 5)); + m_led[LED_2] = BIT(~data, 4); + m_led[LED_1] = BIT(~data, 5); // keyboard clock int clock = BIT(data, 6); |