summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/abckb/abc99.cpp24
-rw-r--r--src/devices/bus/abckb/abc99.h1
-rw-r--r--src/devices/bus/cbmiec/c1541.cpp5
-rw-r--r--src/devices/bus/cbmiec/c1541.h1
-rw-r--r--src/devices/bus/cbmiec/c1571.cpp5
-rw-r--r--src/devices/bus/cbmiec/c1571.h1
-rw-r--r--src/devices/bus/cbmiec/c1581.cpp7
-rw-r--r--src/devices/bus/cbmiec/c1581.h1
-rw-r--r--src/devices/bus/ieee488/c2031.cpp4
-rw-r--r--src/devices/bus/ieee488/c2031.h1
-rw-r--r--src/devices/bus/ieee488/c2040.cpp8
-rw-r--r--src/devices/bus/ieee488/c2040.h1
-rw-r--r--src/devices/bus/ieee488/c8050.cpp9
-rw-r--r--src/devices/bus/ieee488/c8050.h1
-rw-r--r--src/devices/bus/ieee488/c8280.cpp12
-rw-r--r--src/devices/bus/ieee488/c8280.h1
-rw-r--r--src/devices/bus/ieee488/d9060.cpp9
-rw-r--r--src/devices/bus/ieee488/d9060.h1
-rw-r--r--src/devices/bus/ieee488/hardbox.cpp8
-rw-r--r--src/devices/bus/ieee488/hardbox.h3
-rw-r--r--src/devices/bus/ieee488/softbox.cpp8
-rw-r--r--src/devices/bus/ieee488/softbox.h3
-rw-r--r--src/devices/bus/msx_cart/disk.cpp10
-rw-r--r--src/devices/bus/msx_cart/disk.h2
-rw-r--r--src/devices/bus/msx_slot/disk.cpp6
-rw-r--r--src/devices/bus/msx_slot/disk.h1
-rw-r--r--src/devices/bus/pc_kbd/pcat84.cpp9
-rw-r--r--src/devices/bus/pc_kbd/pcat84.h3
-rw-r--r--src/devices/bus/plus4/c1551.cpp5
-rw-r--r--src/devices/bus/plus4/c1551.h1
-rw-r--r--src/devices/bus/sunkbd/hlekbd.cpp22
-rw-r--r--src/devices/bus/sunkbd/hlekbd.h1
32 files changed, 118 insertions, 56 deletions
diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp
index af0132cc724..49d0e9e7dd9 100644
--- a/src/devices/bus/abckb/abc99.cpp
+++ b/src/devices/bus/abckb/abc99.cpp
@@ -478,6 +478,7 @@ abc99_device::abc99_device(const machine_config &mconfig, const char *tag, devic
m_speaker(*this, "speaker"),
m_z14(*this, "Z14"),
m_mouseb(*this, "MOUSEB"),
+ m_led(*this, "led%u", 0U),
m_si(1),
m_si_en(1),
m_so_z2(1),
@@ -498,6 +499,7 @@ abc99_device::abc99_device(const machine_config &mconfig, const char *tag, devic
void abc99_device::device_start()
{
+ m_led.resolve();
// allocate timers
m_serial_timer = timer_alloc(TIMER_SERIAL);
m_serial_timer->adjust(MCS48_ALE_CLOCK(XTAL(6'000'000)/3), 0, MCS48_ALE_CLOCK(XTAL(6'000'000)/3));
@@ -573,14 +575,14 @@ WRITE8_MEMBER( abc99_device::z2_led_w )
{
if (m_led_en) return;
- machine().output().set_led_value(LED_1, BIT(data, 0));
- machine().output().set_led_value(LED_2, BIT(data, 1));
- machine().output().set_led_value(LED_3, BIT(data, 2));
- machine().output().set_led_value(LED_4, BIT(data, 3));
- machine().output().set_led_value(LED_5, BIT(data, 4));
- machine().output().set_led_value(LED_6, BIT(data, 5));
- machine().output().set_led_value(LED_7, BIT(data, 6));
- machine().output().set_led_value(LED_8, BIT(data, 7));
+ m_led[LED_1] = BIT(data, 0);
+ m_led[LED_2] = BIT(data, 1);
+ m_led[LED_3] = BIT(data, 2);
+ m_led[LED_4] = BIT(data, 3);
+ m_led[LED_5] = BIT(data, 4);
+ m_led[LED_6] = BIT(data, 5);
+ m_led[LED_7] = BIT(data, 6);
+ m_led[LED_8] = BIT(data, 7);
}
@@ -616,9 +618,9 @@ WRITE8_MEMBER( abc99_device::z2_p1_w )
m_t1_z5 = BIT(data, 2);
// key LEDs
- machine().output().set_led_value(LED_INS, BIT(data, 3));
- machine().output().set_led_value(LED_ALT, BIT(data, 4));
- machine().output().set_led_value(LED_CAPS_LOCK, BIT(data, 5));
+ m_led[LED_INS] = BIT(data, 3);
+ m_led[LED_ALT] = BIT(data, 4);
+ m_led[LED_CAPS_LOCK] = BIT(data, 5);
// speaker output
m_speaker->level_w(!BIT(data, 6));
diff --git a/src/devices/bus/abckb/abc99.h b/src/devices/bus/abckb/abc99.h
index 5a997fc3858..83682548275 100644
--- a/src/devices/bus/abckb/abc99.h
+++ b/src/devices/bus/abckb/abc99.h
@@ -97,6 +97,7 @@ private:
required_device<speaker_sound_device> m_speaker;
required_ioport m_z14;
required_ioport m_mouseb;
+ output_finder<11> m_led;
int m_si;
int m_si_en;
diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp
index 3b04805e683..3352de9ea50 100644
--- a/src/devices/bus/cbmiec/c1541.cpp
+++ b/src/devices/bus/cbmiec/c1541.cpp
@@ -726,7 +726,7 @@ WRITE8_MEMBER( c1541_device_base::via1_pb_w )
m_ga->stp_w(data & 0x03);
// activity LED
- machine().output().set_led_value(LED_ACT, BIT(data, 3));
+ m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@@ -943,6 +943,7 @@ c1541_device_base::c1541_device_base(const machine_config &mconfig, device_type
m_via1(*this, M6522_1_TAG),
m_ga(*this, C64H156_TAG),
m_address(*this, "ADDRESS"),
+ m_led(*this, "led%u", 0U),
m_data_out(1),
m_via0_irq(CLEAR_LINE),
m_via1_irq(CLEAR_LINE)
@@ -1057,6 +1058,8 @@ indus_gt_device::indus_gt_device(const machine_config &mconfig, const char *tag,
void c1541_device_base::device_start()
{
+ m_led.resolve();
+
// install image callbacks
m_ga->set_floppy(m_floppy);
diff --git a/src/devices/bus/cbmiec/c1541.h b/src/devices/bus/cbmiec/c1541.h
index 488ee4e438b..263f8618e38 100644
--- a/src/devices/bus/cbmiec/c1541.h
+++ b/src/devices/bus/cbmiec/c1541.h
@@ -93,6 +93,7 @@ private:
required_device<via6522_device> m_via1;
required_device<c64h156_device> m_ga;
required_ioport m_address;
+ output_finder<2> m_led;
// IEC bus
int m_data_out; // serial data out
diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp
index 336cc049118..ead261245e4 100644
--- a/src/devices/bus/cbmiec/c1571.cpp
+++ b/src/devices/bus/cbmiec/c1571.cpp
@@ -459,7 +459,7 @@ WRITE8_MEMBER( c1571_device::via1_pb_w )
m_ga->stp_w(data & 0x03); // TODO actually STP1=0, STP0=!(PB0^PB1), Y0=PB1, Y2=!PB1
// activity LED
- machine().output().set_led_value(LED_ACT, BIT(data, 3));
+ m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@@ -791,6 +791,7 @@ c1571_device::c1571_device(const machine_config &mconfig, device_type type, cons
m_ga(*this, C64H156_TAG),
m_floppy(*this, C64H156_TAG":0:525qd"),
m_address(*this, "ADDRESS"),
+ m_led(*this, "led%u", 0U),
m_1_2mhz(0),
m_data_out(1),
m_ser_dir(0),
@@ -844,6 +845,8 @@ mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *
void c1571_device::device_start()
{
+ m_led.resolve();
+
// install image callbacks
m_ga->set_floppy(m_floppy);
//m_fdc->set_floppy(m_floppy);
diff --git a/src/devices/bus/cbmiec/c1571.h b/src/devices/bus/cbmiec/c1571.h
index 0679dff686b..fa9cab64576 100644
--- a/src/devices/bus/cbmiec/c1571.h
+++ b/src/devices/bus/cbmiec/c1571.h
@@ -107,6 +107,7 @@ protected:
required_device<c64h156_device> m_ga;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
+ output_finder<2> m_led;
// signals
int m_1_2mhz; // clock speed
diff --git a/src/devices/bus/cbmiec/c1581.cpp b/src/devices/bus/cbmiec/c1581.cpp
index f0dad13a58c..569aae45421 100644
--- a/src/devices/bus/cbmiec/c1581.cpp
+++ b/src/devices/bus/cbmiec/c1581.cpp
@@ -171,10 +171,10 @@ WRITE8_MEMBER( c1581_device::cia_pa_w )
m_floppy->mon_w(BIT(data, 2));
// power led
- machine().output().set_led_value(LED_POWER, BIT(data, 5));
+ m_led[LED_POWER] = BIT(data, 5);
// activity led
- machine().output().set_led_value(LED_ACT, BIT(data, 6));
+ m_led[LED_ACT] = BIT(data, 6);
}
READ8_MEMBER( c1581_device::cia_pb_r )
@@ -326,6 +326,7 @@ c1581_device::c1581_device(const machine_config &mconfig, device_type type, cons
m_fdc(*this, WD1772_TAG),
m_floppy(*this, WD1772_TAG":0:35dd"),
m_address(*this, "ADDRESS"),
+ m_led(*this, "led%u", 0U),
m_data_out(0),
m_atn_ack(0),
m_fast_ser_dir(0),
@@ -354,6 +355,8 @@ c1563_device::c1563_device(const machine_config &mconfig, const char *tag, devic
void c1581_device::device_start()
{
+ m_led.resolve();
+
// state saving
save_item(NAME(m_data_out));
save_item(NAME(m_atn_ack));
diff --git a/src/devices/bus/cbmiec/c1581.h b/src/devices/bus/cbmiec/c1581.h
index 64c616bad45..3102bd8eadf 100644
--- a/src/devices/bus/cbmiec/c1581.h
+++ b/src/devices/bus/cbmiec/c1581.h
@@ -82,6 +82,7 @@ private:
required_device<wd1772_device> m_fdc;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
+ output_finder<2> m_led;
int m_data_out; // serial data out
int m_atn_ack; // attention acknowledge
diff --git a/src/devices/bus/ieee488/c2031.cpp b/src/devices/bus/ieee488/c2031.cpp
index af6172cb178..b10d14891d5 100644
--- a/src/devices/bus/ieee488/c2031.cpp
+++ b/src/devices/bus/ieee488/c2031.cpp
@@ -261,7 +261,7 @@ WRITE8_MEMBER( c2031_device::via1_pb_w )
m_ga->stp_w(data & 0x03);
// activity LED
- machine().output().set_led_value(LED_ACT, BIT(data, 3));
+ m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@@ -398,6 +398,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
, m_ga(*this, C64H156_TAG)
, m_floppy(*this, C64H156_TAG":0:525ssqd")
, m_address(*this, "ADDRESS")
+ , m_led(*this, "led%u", 0U)
, m_nrfd_out(1)
, m_ndac_out(1)
, m_atna(1)
@@ -414,6 +415,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
void c2031_device::device_start()
{
+ m_led.resolve();
// install image callbacks
m_ga->set_floppy(m_floppy);
diff --git a/src/devices/bus/ieee488/c2031.h b/src/devices/bus/ieee488/c2031.h
index 886db53db5e..e6ac32b478c 100644
--- a/src/devices/bus/ieee488/c2031.h
+++ b/src/devices/bus/ieee488/c2031.h
@@ -68,6 +68,7 @@ private:
required_device<c64h156_device> m_ga;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
+ output_finder<2> m_led;
// IEEE-488 bus
int m_nrfd_out; // not ready for data
diff --git a/src/devices/bus/ieee488/c2040.cpp b/src/devices/bus/ieee488/c2040.cpp
index aee0f5a895c..609cea7cdc2 100644
--- a/src/devices/bus/ieee488/c2040.cpp
+++ b/src/devices/bus/ieee488/c2040.cpp
@@ -365,13 +365,13 @@ WRITE8_MEMBER( c2040_device::riot1_pb_w )
*/
// activity led 1
- machine().output().set_led_value(LED_ACT1, BIT(data, 3));
+ m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
- machine().output().set_led_value(LED_ACT0, BIT(data, 4));
+ m_led[LED_ACT0] = BIT(data, 4);
// error led
- machine().output().set_led_value(LED_ERR, BIT(data, 5));
+ m_led[LED_ERR] = BIT(data, 5);
}
@@ -650,6 +650,7 @@ c2040_device::c2040_device(const machine_config &mconfig, device_type type, cons
m_fdc(*this, FDC_TAG),
m_gcr(*this, "gcr"),
m_address(*this, "ADDRESS"),
+ m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1),
@@ -689,6 +690,7 @@ c4040_device::c4040_device(const machine_config &mconfig, const char *tag, devic
void c2040_device::device_start()
{
+ m_led.resolve();
// install image callbacks
m_fdc->set_floppy(m_floppy0, m_floppy1);
diff --git a/src/devices/bus/ieee488/c2040.h b/src/devices/bus/ieee488/c2040.h
index 54da6a00654..db592853b60 100644
--- a/src/devices/bus/ieee488/c2040.h
+++ b/src/devices/bus/ieee488/c2040.h
@@ -81,6 +81,7 @@ protected:
required_device<c2040_fdc_device> m_fdc;
required_memory_region m_gcr;
required_ioport m_address;
+ output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output
diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp
index c15eebb6c14..714fc6bcbfe 100644
--- a/src/devices/bus/ieee488/c8050.cpp
+++ b/src/devices/bus/ieee488/c8050.cpp
@@ -415,13 +415,13 @@ WRITE8_MEMBER( c8050_device::riot1_pb_w )
*/
// activity led 1
- machine().output().set_led_value(LED_ACT1, BIT(data, 3));
+ m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
- machine().output().set_led_value(LED_ACT0, BIT(data, 4));
+ m_led[LED_ACT0] = BIT(data, 4);
// error led
- machine().output().set_led_value(LED_ERR, BIT(data, 5));
+ m_led[LED_ERR] = BIT(data, 5);
}
WRITE8_MEMBER( c8050_device::via_pb_w )
@@ -782,6 +782,7 @@ c8050_device::c8050_device(const machine_config &mconfig, device_type type, cons
m_floppy1(*this, FDC_TAG ":1"),
m_fdc(*this, FDC_TAG),
m_address(*this, "ADDRESS"),
+ m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1),
@@ -831,6 +832,8 @@ sfd1001_device::sfd1001_device(const machine_config &mconfig, const char *tag, d
void c8050_device::device_start()
{
+ m_led.resolve();
+
// install image callbacks
m_fdc->set_floppy(m_floppy0, m_floppy1);
diff --git a/src/devices/bus/ieee488/c8050.h b/src/devices/bus/ieee488/c8050.h
index 8a0a3f75935..77fd15b04f3 100644
--- a/src/devices/bus/ieee488/c8050.h
+++ b/src/devices/bus/ieee488/c8050.h
@@ -72,6 +72,7 @@ protected:
optional_device<floppy_connector> m_floppy1;
required_device<c8050_fdc_device> m_fdc;
required_ioport m_address;
+ output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output
diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp
index 4a142b625b5..734d506738e 100644
--- a/src/devices/bus/ieee488/c8280.cpp
+++ b/src/devices/bus/ieee488/c8280.cpp
@@ -269,13 +269,13 @@ WRITE8_MEMBER( c8280_device::riot1_pb_w )
*/
// activity led 1
- machine().output().set_led_value(LED_ACT1, BIT(data, 3));
+ m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
- machine().output().set_led_value(LED_ACT0, BIT(data, 4));
+ m_led[LED_ACT0] = BIT(data, 4);
// error led
- machine().output().set_led_value(LED_ERR, BIT(data, 5));
+ m_led[LED_ERR] = BIT(data, 5);
}
static void c8280_floppies(device_slot_interface &device)
@@ -385,7 +385,9 @@ c8280_device::c8280_device(const machine_config &mconfig, const char *tag, devic
m_fdc(*this, WD1797_TAG),
m_floppy0(*this, WD1797_TAG ":0"),
m_floppy1(*this, WD1797_TAG ":1"),
- m_address(*this, "ADDRESS"), m_floppy(nullptr),
+ m_address(*this, "ADDRESS"),
+ m_floppy(nullptr),
+ m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1), m_ifc(0), m_fk5(0)
@@ -399,6 +401,8 @@ c8280_device::c8280_device(const machine_config &mconfig, const char *tag, devic
void c8280_device::device_start()
{
+ m_led.resolve();
+
// state saving
save_item(NAME(m_rfdo));
save_item(NAME(m_daco));
diff --git a/src/devices/bus/ieee488/c8280.h b/src/devices/bus/ieee488/c8280.h
index 38309ea1089..76aadff7217 100644
--- a/src/devices/bus/ieee488/c8280.h
+++ b/src/devices/bus/ieee488/c8280.h
@@ -71,6 +71,7 @@ private:
required_device<floppy_connector> m_floppy1;
required_ioport m_address;
floppy_image_device *m_floppy;
+ output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output
diff --git a/src/devices/bus/ieee488/d9060.cpp b/src/devices/bus/ieee488/d9060.cpp
index 8618dc944cd..a77c2613fec 100644
--- a/src/devices/bus/ieee488/d9060.cpp
+++ b/src/devices/bus/ieee488/d9060.cpp
@@ -305,13 +305,13 @@ WRITE8_MEMBER( d9060_device_base::riot1_pb_w )
*/
// ready led
- machine().output().set_led_value(LED_READY, BIT(data, 4));
+ m_led[LED_READY] = BIT(data, 4);
// power led
- machine().output().set_led_value(LED_POWER, BIT(data, 5));
+ m_led[LED_POWER] = BIT(data, 5);
// error led
- machine().output().set_led_value(LED_ERROR, !BIT(data, 5));
+ m_led[LED_ERROR] = !BIT(data, 5);
}
@@ -486,6 +486,7 @@ d9060_device_base::d9060_device_base(const machine_config &mconfig, device_type
, m_sasibus(*this, SASIBUS_TAG)
, m_sasi_data_out(*this, "sasi_data_out")
, m_address(*this, "ADDRESS")
+ , m_led(*this, "led%u", 0U)
, m_rfdo(1)
, m_daco(1)
, m_atna(1)
@@ -523,6 +524,8 @@ d9090_device::d9090_device(const machine_config &mconfig, const char *tag, devic
void d9060_device_base::device_start()
{
+ m_led.resolve();
+
// state saving
save_item(NAME(m_rfdo));
save_item(NAME(m_daco));
diff --git a/src/devices/bus/ieee488/d9060.h b/src/devices/bus/ieee488/d9060.h
index d02e0728f72..f1c852745f7 100644
--- a/src/devices/bus/ieee488/d9060.h
+++ b/src/devices/bus/ieee488/d9060.h
@@ -73,6 +73,7 @@ private:
required_device<scsi_port_device> m_sasibus;
required_device<output_latch_device> m_sasi_data_out;
required_ioport m_address;
+ output_finder<3> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output
diff --git a/src/devices/bus/ieee488/hardbox.cpp b/src/devices/bus/ieee488/hardbox.cpp
index 14a2a9a16d2..f8fabf6a967 100644
--- a/src/devices/bus/ieee488/hardbox.cpp
+++ b/src/devices/bus/ieee488/hardbox.cpp
@@ -257,9 +257,9 @@ WRITE8_MEMBER( hardbox_device::ppi1_pc_w )
*/
- machine().output().set_led_value(LED_A, !BIT(data, 0));
- machine().output().set_led_value(LED_B, !BIT(data, 1));
- machine().output().set_led_value(LED_READY, !BIT(data, 2));
+ m_led[LED_A] = BIT(~data, 0);
+ m_led[LED_B] = BIT(~data, 1);
+ m_led[LED_READY] = BIT(~data, 2);
}
@@ -344,6 +344,7 @@ hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, d
, device_ieee488_interface(mconfig, *this)
, m_maincpu(*this, Z80_TAG)
, m_hdc(*this, CORVUS_HDC_TAG)
+ , m_led(*this, "led%u", 0U)
, m_ifc(0)
{
}
@@ -355,6 +356,7 @@ hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, d
void hardbox_device::device_start()
{
+ m_led.resolve();
}
diff --git a/src/devices/bus/ieee488/hardbox.h b/src/devices/bus/ieee488/hardbox.h
index 80b1fc0df07..79d3acacb7b 100644
--- a/src/devices/bus/ieee488/hardbox.h
+++ b/src/devices/bus/ieee488/hardbox.h
@@ -61,13 +61,14 @@ private:
enum
{
- LED_A,
+ LED_A = 0,
LED_B,
LED_READY
};
required_device<cpu_device> m_maincpu;
required_device<corvus_hdc_device> m_hdc;
+ output_finder<3> m_led;
int m_ifc; // Tracks previous state of IEEE-488 IFC line
};
diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp
index 5d6be33930c..b6b3d67dd01 100644
--- a/src/devices/bus/ieee488/softbox.cpp
+++ b/src/devices/bus/ieee488/softbox.cpp
@@ -215,9 +215,9 @@ WRITE8_MEMBER( softbox_device::ppi1_pc_w )
*/
- machine().output().set_led_value(LED_A, !BIT(data, 0));
- machine().output().set_led_value(LED_B, !BIT(data, 1));
- machine().output().set_led_value(LED_READY, !BIT(data, 2));
+ m_led[LED_A] = BIT(~data, 0);
+ m_led[LED_B] = BIT(~data, 1);
+ m_led[LED_READY] = BIT(~data, 2);
}
static DEVICE_INPUT_DEFAULTS_START( terminal )
@@ -324,6 +324,7 @@ softbox_device::softbox_device(const machine_config &mconfig, const char *tag, d
, m_maincpu(*this, Z80_TAG)
, m_dbrg(*this, COM8116_TAG)
, m_hdc(*this, CORVUS_HDC_TAG)
+ , m_led(*this, "led%u", 0U)
, m_ifc(0)
{
}
@@ -335,6 +336,7 @@ softbox_device::softbox_device(const machine_config &mconfig, const char *tag, d
void softbox_device::device_start()
{
+ m_led.resolve();
}
diff --git a/src/devices/bus/ieee488/softbox.h b/src/devices/bus/ieee488/softbox.h
index 74c5f985ae3..9040c9c9853 100644
--- a/src/devices/bus/ieee488/softbox.h
+++ b/src/devices/bus/ieee488/softbox.h
@@ -64,7 +64,7 @@ private:
enum
{
- LED_A,
+ LED_A = 0,
LED_B,
LED_READY
};
@@ -72,6 +72,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<com8116_device> m_dbrg;
required_device<corvus_hdc_device> m_hdc;
+ output_finder<3> m_led;
int m_ifc; // Tracks previous state of IEEE-488 IFC line
};
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);
}
}
diff --git a/src/devices/bus/msx_cart/disk.h b/src/devices/bus/msx_cart/disk.h
index 59f25372e08..8556f807e40 100644
--- a/src/devices/bus/msx_cart/disk.h
+++ b/src/devices/bus/msx_cart/disk.h
@@ -58,6 +58,7 @@ protected:
void post_load();
+ output_finder<> m_led;
uint8_t m_side_control;
uint8_t m_control;
@@ -81,6 +82,7 @@ protected:
void post_load();
+ output_finder<> m_led;
uint8_t m_control;
void set_control(uint8_t data);
diff --git a/src/devices/bus/msx_slot/disk.cpp b/src/devices/bus/msx_slot/disk.cpp
index 10a319ca489..39ec248e3f2 100644
--- a/src/devices/bus/msx_slot/disk.cpp
+++ b/src/devices/bus/msx_slot/disk.cpp
@@ -83,6 +83,7 @@ void msx_slot_disk_device::device_start()
msx_slot_wd_disk_device::msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_slot_disk_device(mconfig, type, tag, owner, clock)
, m_fdc(nullptr)
+ , m_led(*this, "led0")
{
}
@@ -91,6 +92,7 @@ void msx_slot_wd_disk_device::device_start()
{
msx_slot_disk_device::device_start();
+ m_led.resolve();
m_fdc = owner()->subdevice<wd_fdc_analog_device_base>(m_fdc_tag);
if (m_fdc == nullptr)
@@ -200,7 +202,7 @@ void msx_slot_disk1_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);
}
}
@@ -349,7 +351,7 @@ void msx_slot_disk2_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);
}
}
diff --git a/src/devices/bus/msx_slot/disk.h b/src/devices/bus/msx_slot/disk.h
index d619cb1aa25..6b3c4ab055a 100644
--- a/src/devices/bus/msx_slot/disk.h
+++ b/src/devices/bus/msx_slot/disk.h
@@ -109,6 +109,7 @@ protected:
virtual void device_start() override;
wd_fdc_analog_device_base *m_fdc;
+ output_finder<> m_led;
};
diff --git a/src/devices/bus/pc_kbd/pcat84.cpp b/src/devices/bus/pc_kbd/pcat84.cpp
index 77ee7fd4f27..0b78c126d86 100644
--- a/src/devices/bus/pc_kbd/pcat84.cpp
+++ b/src/devices/bus/pc_kbd/pcat84.cpp
@@ -343,6 +343,7 @@ ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config
m_dr(*this, "DR%02u", 0),
m_kbdida(*this, "KBDIDA"),
m_kbdidb(*this, "KBDIDB"),
+ m_led(*this, "led%u", 0U),
m_db(0),
m_cnt(0),
m_sense(0),
@@ -369,6 +370,8 @@ void ibm_pc_at_84_keyboard_device::device_start()
{
set_pc_kbdc_device();
+ m_led.resolve();
+
// state saving
save_item(NAME(m_db));
save_item(NAME(m_cnt));
@@ -526,9 +529,9 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p2_w )
*/
- machine().output().set_led_value(LED_SCROLL, BIT(data, 0));
- machine().output().set_led_value(LED_NUM, BIT(data, 1));
- machine().output().set_led_value(LED_CAPS, BIT(data, 2));
+ m_led[LED_SCROLL] = BIT(data, 0);
+ m_led[LED_NUM] = BIT(data, 1);
+ m_led[LED_CAPS] = BIT(data, 2);
m_pc_kbdc->data_write_from_kb(!BIT(data, 7));
m_pc_kbdc->clock_write_from_kb(!BIT(data, 6));
diff --git a/src/devices/bus/pc_kbd/pcat84.h b/src/devices/bus/pc_kbd/pcat84.h
index 8c4baed317b..fbc73172d90 100644
--- a/src/devices/bus/pc_kbd/pcat84.h
+++ b/src/devices/bus/pc_kbd/pcat84.h
@@ -57,7 +57,7 @@ private:
enum
{
- LED_SCROLL,
+ LED_SCROLL = 0,
LED_NUM,
LED_CAPS
};
@@ -68,6 +68,7 @@ private:
required_ioport_array<16> m_dr;
optional_ioport m_kbdida;
optional_ioport m_kbdidb;
+ output_finder<3> m_led;
uint8_t m_db;
int m_cnt;
diff --git a/src/devices/bus/plus4/c1551.cpp b/src/devices/bus/plus4/c1551.cpp
index 87dce744732..575f3e65171 100644
--- a/src/devices/bus/plus4/c1551.cpp
+++ b/src/devices/bus/plus4/c1551.cpp
@@ -109,7 +109,7 @@ WRITE8_MEMBER( c1551_device::port_w )
m_ga->mtr_w(BIT(data, 2));
// activity LED
- machine().output().set_led_value(LED_ACT, BIT(data, 3));
+ m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@@ -416,6 +416,7 @@ c1551_device::c1551_device(const machine_config &mconfig, const char *tag, devic
, m_floppy(*this, C64H156_TAG":0:525ssqd")
, m_exp(*this, PLUS4_EXPANSION_SLOT_TAG)
, m_jp1(*this, "JP1")
+ , m_led(*this, "led%u", 0U)
, m_tcbm_data(0xff)
, m_status(1)
, m_dav(1)
@@ -432,6 +433,8 @@ c1551_device::c1551_device(const machine_config &mconfig, const char *tag, devic
void c1551_device::device_start()
{
+ m_led.resolve();
+
// allocate timers
m_irq_timer = timer_alloc();
m_irq_timer->adjust(attotime::zero, CLEAR_LINE);
diff --git a/src/devices/bus/plus4/c1551.h b/src/devices/bus/plus4/c1551.h
index 80b4a72ca5c..b79f0fb58eb 100644
--- a/src/devices/bus/plus4/c1551.h
+++ b/src/devices/bus/plus4/c1551.h
@@ -82,6 +82,7 @@ private:
required_device<floppy_image_device> m_floppy;
required_device<plus4_expansion_slot_device> m_exp;
required_ioport m_jp1;
+ output_finder<2> m_led;
// TCBM bus
uint8_t m_tcbm_data; // data
diff --git a/src/devices/bus/sunkbd/hlekbd.cpp b/src/devices/bus/sunkbd/hlekbd.cpp
index 616a2cbd66f..a32365fa388 100644
--- a/src/devices/bus/sunkbd/hlekbd.cpp
+++ b/src/devices/bus/sunkbd/hlekbd.cpp
@@ -753,6 +753,7 @@ hle_device_base::hle_device_base(
, m_dips(*this, "DIP")
, m_click_timer(nullptr)
, m_beeper(*this, "beeper")
+ , m_led(*this, "led%u", 0U)
, m_make_count(0U)
, m_rx_state(RX_IDLE)
, m_keyclick(0U)
@@ -802,6 +803,7 @@ MACHINE_CONFIG_END
void hle_device_base::device_start()
{
+ m_led.resolve();
m_click_timer = timer_alloc(CLICK_TIMER_ID);
save_item(NAME(m_make_count));
@@ -836,11 +838,11 @@ void hle_device_base::device_reset()
output_rxd(1);
// start with keyboard LEDs off
- machine().output().set_led_value(LED_NUM, 0);
- machine().output().set_led_value(LED_COMPOSE, 0);
- machine().output().set_led_value(LED_SCROLL, 0);
- machine().output().set_led_value(LED_CAPS, 0);
- machine().output().set_led_value(LED_KANA, 0);
+ m_led[LED_NUM] = 0;
+ m_led[LED_COMPOSE] = 0;
+ m_led[LED_SCROLL] = 0;
+ m_led[LED_CAPS] = 0;
+ m_led[LED_KANA] = 0;
// no beep
m_click_timer->reset();
@@ -972,11 +974,11 @@ void hle_device_base::received_byte(uint8_t byte)
switch (m_rx_state)
{
case RX_LED:
- machine().output().set_led_value(LED_NUM, BIT(byte, 0));
- machine().output().set_led_value(LED_COMPOSE, BIT(byte, 1));
- machine().output().set_led_value(LED_SCROLL, BIT(byte, 2));
- machine().output().set_led_value(LED_CAPS, BIT(byte, 3));
- machine().output().set_led_value(LED_KANA, BIT(byte, 4));
+ m_led[LED_NUM] = BIT(byte, 0);
+ m_led[LED_COMPOSE] = BIT(byte, 1);
+ m_led[LED_SCROLL] = BIT(byte, 2);
+ m_led[LED_CAPS] = BIT(byte, 3);
+ m_led[LED_KANA] = BIT(byte, 4);
m_rx_state = RX_IDLE;
break;
diff --git a/src/devices/bus/sunkbd/hlekbd.h b/src/devices/bus/sunkbd/hlekbd.h
index 21caa54dac9..2b4f17217b5 100644
--- a/src/devices/bus/sunkbd/hlekbd.h
+++ b/src/devices/bus/sunkbd/hlekbd.h
@@ -93,6 +93,7 @@ private:
emu_timer *m_click_timer;
required_device<beep_device> m_beeper;
+ output_finder<5> m_led;
uint8_t m_make_count;
uint8_t m_rx_state;