summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/msx_cart/disk.cpp
diff options
context:
space:
mode:
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);
}
}