summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/msx_cart/disk.cpp
diff options
context:
space:
mode:
authorGravatarGravatar wilbertpol <wilbertpol@users.noreply.github.com>2018-05-20 19:27:20 +0200
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2018-05-20 13:27:20 -0400
commit2beba4ce73fad917c7159a39939bace54f76494b (patch)
treee9d33c059bc5045f13d0c1748f0a044650370b8d /src/devices/bus/msx_cart/disk.cpp
parentacf93837ac21b2b0bb003d1649b893200c269812 (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/devices/bus/msx_cart/disk.cpp')
-rw-r--r--src/devices/bus/msx_cart/disk.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/devices/bus/msx_cart/disk.cpp b/src/devices/bus/msx_cart/disk.cpp
index 24dca42fd93..ba4b9f0d04c 100644
--- a/src/devices/bus/msx_cart/disk.cpp
+++ b/src/devices/bus/msx_cart/disk.cpp
@@ -142,6 +142,7 @@ msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig,
msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_cart_disk_wd_device(mconfig, type, tag, owner, clock)
+ , m_led(*this, "led0")
, m_side_control(0)
, m_control(0)
{
@@ -150,6 +151,7 @@ msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mco
msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_cart_disk_wd_device(mconfig, type, tag, owner, clock)
+ , m_led(*this, "led0")
, m_control(0)
{
}
@@ -262,6 +264,8 @@ MACHINE_CONFIG_END
void msx_cart_disk_type1_device::device_start()
{
+ m_led.resolve();
+
save_item(NAME(m_side_control));
save_item(NAME(m_control));
@@ -312,7 +316,7 @@ void msx_cart_disk_type1_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
- machine().output().set_led_value(0, !(m_control & 0x40));
+ m_led = BIT(~m_control, 6);
}
}
@@ -418,6 +422,8 @@ WRITE8_MEMBER(msx_cart_disk_type1_device::write_cart)
void msx_cart_disk_type2_device::device_start()
{
+ m_led.resolve();
+
save_item(NAME(m_control));
machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_disk_type2_device::post_load), this));
@@ -472,7 +478,7 @@ void msx_cart_disk_type2_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
- machine().output().set_led_value(0, !(m_control & 0x40));
+ m_led = BIT(~m_control, 6);
}
}