summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine')
-rw-r--r--src/mame/machine/ajax.cpp17
-rw-r--r--src/mame/machine/amiga.cpp5
-rw-r--r--src/mame/machine/atarifb.cpp4
-rw-r--r--src/mame/machine/compiskb.cpp4
-rw-r--r--src/mame/machine/compiskb.h6
-rw-r--r--src/mame/machine/galaxold.cpp2
-rw-r--r--src/mame/machine/harddriv.cpp5
-rw-r--r--src/mame/machine/irobot.cpp4
-rw-r--r--src/mame/machine/mhavoc.cpp8
-rw-r--r--src/mame/machine/microtan.cpp4
-rw-r--r--src/mame/machine/mmboard.cpp4
-rw-r--r--src/mame/machine/mmboard.h1
-rw-r--r--src/mame/machine/msx.cpp5
-rw-r--r--src/mame/machine/nb1413m3.cpp14
-rw-r--r--src/mame/machine/nb1413m3.h1
-rw-r--r--src/mame/machine/nitedrvr.cpp4
-rw-r--r--src/mame/machine/pc1512kb.cpp6
-rw-r--r--src/mame/machine/pc1512kb.h1
-rw-r--r--src/mame/machine/pmd85.cpp10
-rw-r--r--src/mame/machine/sms.cpp20
-rw-r--r--src/mame/machine/tandy2kb.cpp6
-rw-r--r--src/mame/machine/tandy2kb.h1
-rw-r--r--src/mame/machine/trs80m2kb.cpp6
-rw-r--r--src/mame/machine/trs80m2kb.h1
-rw-r--r--src/mame/machine/v1050kb.cpp4
-rw-r--r--src/mame/machine/v1050kb.h1
-rw-r--r--src/mame/machine/victor9k_fdc.cpp7
-rw-r--r--src/mame/machine/victor9k_fdc.h1
-rw-r--r--src/mame/machine/wangpckb.cpp3
-rw-r--r--src/mame/machine/wangpckb.h1
-rw-r--r--src/mame/machine/xevious.cpp4
31 files changed, 94 insertions, 66 deletions
diff --git a/src/mame/machine/ajax.cpp b/src/mame/machine/ajax.cpp
index d79a19b3477..c278cc7b3cc 100644
--- a/src/mame/machine/ajax.cpp
+++ b/src/mame/machine/ajax.cpp
@@ -79,14 +79,14 @@ WRITE8_MEMBER(ajax_state::bankswitch_w)
WRITE8_MEMBER(ajax_state::lamps_w)
{
- output().set_led_value(1, data & 0x02); /* super weapon lamp */
- output().set_led_value(2, data & 0x04); /* power up lamps */
- output().set_led_value(5, data & 0x04); /* power up lamps */
- output().set_led_value(0, data & 0x20); /* start lamp */
- output().set_led_value(3, data & 0x40); /* game over lamps */
- output().set_led_value(6, data & 0x40); /* game over lamps */
- output().set_led_value(4, data & 0x80); /* game over lamps */
- output().set_led_value(7, data & 0x80); /* game over lamps */
+ m_lamp[1] = BIT(data, 1); /* super weapon lamp */
+ m_lamp[2] = BIT(data, 2); /* power up lamps */
+ m_lamp[5] = BIT(data, 2); /* power up lamps */
+ m_lamp[0] = BIT(data, 5); /* start lamp */
+ m_lamp[3] = BIT(data, 6); /* game over lamps */
+ m_lamp[6] = BIT(data, 6); /* game over lamps */
+ m_lamp[4] = BIT(data, 7); /* game over lamps */
+ m_lamp[7] = BIT(data, 7); /* game over lamps */
}
/* ajax_ls138_f10:
@@ -199,6 +199,7 @@ void ajax_state::machine_start()
uint8_t *MAIN = memregion("maincpu")->base();
uint8_t *SUB = memregion("sub")->base();
+ m_lamp.resolve();
membank("mainbank")->configure_entries(0, 4, &MAIN[0x00000], 0x2000);
membank("mainbank")->configure_entries(4, 8, &MAIN[0x10000], 0x2000);
membank("subbank")->configure_entries(0, 9, &SUB[0x00000], 0x2000);
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index fffa5566d0b..feb3c25c4ff 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -151,6 +151,8 @@ constexpr XTAL amiga_state::CLK_E_NTSC;
void amiga_state::machine_start()
{
+ m_power_led.resolve();
+
// add callback for RESET instruction
m_maincpu->set_reset_callback(write_line_delegate(FUNC(amiga_state::m68k_reset), this));
@@ -1097,8 +1099,7 @@ WRITE8_MEMBER( amiga_state::cia_0_port_a_write )
m_overlay->set_bank(BIT(data, 0));
// bit 1, power led
- output().set_led_value(0, !BIT(data, 1));
- output().set_value("power_led", !BIT(data, 1));
+ m_power_led = BIT(~data, 1);
}
WRITE_LINE_MEMBER( amiga_state::cia_0_irq )
diff --git a/src/mame/machine/atarifb.cpp b/src/mame/machine/atarifb.cpp
index 5917fb05ef1..5ab2efca34f 100644
--- a/src/mame/machine/atarifb.cpp
+++ b/src/mame/machine/atarifb.cpp
@@ -76,8 +76,8 @@ WRITE8_MEMBER(atarifb_state::soccer_out1_w)
m_discrete->write(space, ATARIFB_ATTRACT_EN, data & 0x10); // Attract
m_discrete->write(space, ATARIFB_NOISE_EN, data & 0x04); // Noise Enable / Kicker
-// output().set_led_value(0, data & 0x10); // !!!!!!!!!! Is this correct????
- output().set_led_value(1, data & 0x80);
+// m_led[0] = BIT(data, 4); // !!!!!!!!!! Is this correct????
+ m_led[1] = BIT(data, 7);
}
diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp
index 5bd963fde4c..765cef9582d 100644
--- a/src/mame/machine/compiskb.cpp
+++ b/src/mame/machine/compiskb.cpp
@@ -228,7 +228,7 @@ compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, co
m_y(*this, "Y%u", 1),
m_special(*this, "SPECIAL"),
m_out_tx_handler(*this),
- m_bus(0xff),
+ m_led_caps(*this, "led_caps"),
m_keylatch(0)
{
}
@@ -297,7 +297,7 @@ WRITE8_MEMBER( compis_keyboard_device::bus_w )
m_speaker->level_w(BIT(data, 5));
// LEDs
- machine().output().set_led_value(LED_CAPS, BIT(data, 6));
+ m_led_caps = BIT(data, 6);
// serial data out
m_out_tx_handler(BIT(data, 7));
diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h
index 86d3b154577..3d13cb2fcbb 100644
--- a/src/mame/machine/compiskb.h
+++ b/src/mame/machine/compiskb.h
@@ -51,16 +51,12 @@ protected:
virtual ioport_constructor device_input_ports() const override;
private:
- enum
- {
- LED_CAPS
- };
-
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_ioport_array<9> m_y;
required_ioport m_special;
devcb_write_line m_out_tx_handler;
+ output_finder<> m_led_caps;
uint8_t m_bus;
uint8_t m_keylatch;
diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp
index a63108c52ec..f8fab4ba017 100644
--- a/src/mame/machine/galaxold.cpp
+++ b/src/mame/machine/galaxold.cpp
@@ -109,7 +109,7 @@ WRITE8_MEMBER(galaxold_state::galaxold_coin_counter_2_w)
WRITE8_MEMBER(galaxold_state::galaxold_leds_w)
{
- output().set_led_value(offset,data & 1);
+ m_led[offset] = BIT(data, 0);
}
READ8_MEMBER(galaxold_state::scramblb_protection_1_r)
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index 25cb9753f95..817ed77db22 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -37,6 +37,7 @@
void harddriv_state::device_start()
{
+ m_lamp.resolve();
//atarigen_state::machine_start();
/* predetermine memory regions */
@@ -415,11 +416,11 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w )
break;
case 2: /* LC1 */
// used for seat locking on harddriv
- machine().output().set_led_value(1, data);
+ m_lamp[1] = data;
break;
case 3: /* LC2 */
// used for "abort" button lamp
- machine().output().set_led_value(2, data);
+ m_lamp[2] = data;
break;
case 4: /* ZP1 */
m_m68k_zp1 = data;
diff --git a/src/mame/machine/irobot.cpp b/src/mame/machine/irobot.cpp
index 1d12f901c8a..c16cba0571d 100644
--- a/src/mame/machine/irobot.cpp
+++ b/src/mame/machine/irobot.cpp
@@ -140,8 +140,8 @@ WRITE8_MEMBER(irobot_state::irobot_rom_banksel_w)
membank("bank1")->set_base(&RAM[0x1A000]);
break;
}
- output().set_led_value(0,data & 0x10);
- output().set_led_value(1,data & 0x20);
+ m_led[0] = BIT(data, 4);
+ m_led[1] = BIT(data, 5);
}
TIMER_CALLBACK_MEMBER(irobot_state::scanline_callback)
diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp
index 81a4b93db40..3c075767ed9 100644
--- a/src/mame/machine/mhavoc.cpp
+++ b/src/mame/machine/mhavoc.cpp
@@ -66,6 +66,8 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_gamma_irq_ack_w)
void mhavoc_state::machine_start()
{
+ m_lamp.resolve();
+
save_item(NAME(m_alpha_data));
save_item(NAME(m_alpha_rcvd));
save_item(NAME(m_alpha_xmtd));
@@ -269,17 +271,17 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_out_0_w)
/* this is the unpopulated processor in the corner of the pcb farthest from the quad pokey, not used on shipping boards */
/* Bit 0 = Roller light (Blinks on fatal errors) */
- output().set_led_value(0, data & 0x01);
+ m_lamp[0] = BIT(data, 0);
}
WRITE8_MEMBER(mhavoc_state::alphaone_out_0_w)
{
/* Bit 5 = P2 lamp */
- output().set_led_value(0, ~data & 0x20);
+ m_lamp[0] = BIT(~data, 5);
/* Bit 4 = P1 lamp */
- output().set_led_value(1, ~data & 0x10);
+ m_lamp[1] = BIT(~data, 4);
/* Bit 1 = right coin counter */
machine().bookkeeping().coin_counter_w(1, data & 0x02);
diff --git a/src/mame/machine/microtan.cpp b/src/mame/machine/microtan.cpp
index bc7e02e8ab8..07acc1cdc21 100644
--- a/src/mame/machine/microtan.cpp
+++ b/src/mame/machine/microtan.cpp
@@ -358,7 +358,7 @@ INTERRUPT_GEN_MEMBER(microtan_state::microtan_interrupt)
m_lastrow = row;
/* CapsLock LED */
if( row == 3 && chg == 0x80 )
- output().set_led_value(1, (m_keyrows[3] & 0x80) ? 0 : 1);
+ m_led[1] = BIT(~m_keyrows[3], 7);
if (newvar & chg) /* key(s) pressed ? */
{
@@ -514,7 +514,7 @@ void microtan_state::machine_reset()
{
m_keyrows[i] = ioport(keynames[i-1])->read();
}
- output().set_led_value(1, (m_keyrows[3] & 0x80) ? 0 : 1);
+ m_led[1] = BIT(~m_keyrows[3], 7);
}
image_verify_result microtan_state::microtan_verify_snapshot(uint8_t *data, int size)
diff --git a/src/mame/machine/mmboard.cpp b/src/mame/machine/mmboard.cpp
index 0ceef258991..55d237aff54 100644
--- a/src/mame/machine/mmboard.cpp
+++ b/src/mame/machine/mmboard.cpp
@@ -204,6 +204,7 @@ ioport_constructor mephisto_buttons_board_device::device_input_ports() const
mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, m_sensors(*this, "IN.%u", 0)
+ , m_led(*this, "led%u", 0U)
, m_disable_leds(false)
{
}
@@ -231,6 +232,7 @@ mephisto_buttons_board_device::mephisto_buttons_board_device(const machine_confi
void mephisto_board_device::device_start()
{
+ m_led.resolve();
m_leds_update_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mephisto_board_device::leds_update_callback), this));
m_leds_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mephisto_board_device::leds_refresh_callback), this));
m_leds_update_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
@@ -268,7 +270,7 @@ TIMER_CALLBACK_MEMBER(mephisto_board_device::leds_refresh_callback)
for (int j=0; j<8; j++)
{
if (!m_disable_leds)
- machine().output().set_led_value(i*8 + j, (m_leds_state[i*8 + j] > 1) ? 1 : 0);
+ m_led[i*8 + j] = (m_leds_state[i*8 + j] > 1) ? 1 : 0;
if (m_leds_state[i*8 + j])
m_leds_state[i*8 + j]--;
diff --git a/src/mame/machine/mmboard.h b/src/mame/machine/mmboard.h
index ec3e4cdd9dc..b0c612a2681 100644
--- a/src/mame/machine/mmboard.h
+++ b/src/mame/machine/mmboard.h
@@ -65,6 +65,7 @@ protected:
private:
required_ioport_array<8> m_sensors;
+ output_finder<256> m_led;
emu_timer * m_leds_update_timer;
emu_timer * m_leds_refresh_timer;
bool m_disable_leds;
diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp
index 28daab967be..4f07d97e20d 100644
--- a/src/mame/machine/msx.cpp
+++ b/src/mame/machine/msx.cpp
@@ -58,6 +58,7 @@ void msx_state::machine_reset()
void msx_state::machine_start()
{
+ m_led.resolve();
m_port_c_old = 0xff;
for (device_t &device : device_iterator(*this))
@@ -295,7 +296,7 @@ WRITE8_MEMBER(msx_state::msx_psg_port_b_w)
{
/* Arabic or kana mode led */
if ( (data ^ m_psg_b) & 0x80)
- output().set_led_value(2, !(data & 0x80) );
+ m_led[2] = BIT(~data, 7);
if ( (m_psg_b ^ data) & 0x10)
{
@@ -349,7 +350,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_c_w )
/* caps lock */
if ( BIT(m_port_c_old ^ data, 6) )
- output().set_led_value(1, !BIT(data, 6) );
+ m_led[1] = BIT(~data, 6);
/* key click */
if ( BIT(m_port_c_old ^ data, 7) )
diff --git a/src/mame/machine/nb1413m3.cpp b/src/mame/machine/nb1413m3.cpp
index f5602e5f64e..2145a56b72e 100644
--- a/src/mame/machine/nb1413m3.cpp
+++ b/src/mame/machine/nb1413m3.cpp
@@ -24,8 +24,8 @@ Memo:
DEFINE_DEVICE_TYPE(NB1413M3, nb1413m3_device, "nb1413m3", "NB1413 Mahjong Custom")
-nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, NB1413M3, tag, owner, clock),
+nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, NB1413M3, tag, owner, clock),
m_maincpu(*this, "^maincpu"),
m_sndromrgntag("voice"),
m_sndrombank1(0),
@@ -42,7 +42,8 @@ nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag,
m_gfxradr_l(0),
m_gfxradr_h(0),
m_gfxrombank(0),
- m_outcoin_enable(0)
+ m_outcoin_enable(0),
+ m_led(*this, "led0")
{
}
@@ -53,6 +54,7 @@ nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag,
void nb1413m3_device::device_start()
{
+ m_led.resolve();
m_timer_cb = timer_alloc(TIMER_CB);
m_timer_cb->adjust(attotime::zero);
@@ -599,7 +601,7 @@ WRITE8_MEMBER( nb1413m3_device::outcoin_w )
break;
}
- machine().output().set_led_value(2, m_outcoin_flag); // out coin
+ m_led = m_outcoin_flag; // out coin
}
WRITE8_MEMBER( nb1413m3_device::vcrctrl_w )
@@ -607,11 +609,11 @@ WRITE8_MEMBER( nb1413m3_device::vcrctrl_w )
if (data & 0x08)
{
popmessage(" ** VCR CONTROL ** ");
- machine().output().set_led_value(2, 1);
+ m_led = 1;
}
else
{
- machine().output().set_led_value(2, 0);
+ m_led = 0;
}
}
diff --git a/src/mame/machine/nb1413m3.h b/src/mame/machine/nb1413m3.h
index 7732cfc8dbb..3c2c8001edf 100644
--- a/src/mame/machine/nb1413m3.h
+++ b/src/mame/machine/nb1413m3.h
@@ -189,6 +189,7 @@ private:
int m_gfxrombank;
int m_outcoin_enable;
emu_timer *m_timer_cb;
+ output_finder<> m_led;
TIMER_CALLBACK_MEMBER( timer_callback );
};
diff --git a/src/mame/machine/nitedrvr.cpp b/src/mame/machine/nitedrvr.cpp
index a7e97f5832c..437f393dc2b 100644
--- a/src/mame/machine/nitedrvr.cpp
+++ b/src/mame/machine/nitedrvr.cpp
@@ -227,7 +227,7 @@ D5 = Spare (Not used)
WRITE8_MEMBER(nitedrvr_state::nitedrvr_out1_w)
{
- output().set_led_value(0, data & 0x10);
+ m_led = BIT(data, 4);
m_crash_en = data & 0x01;
@@ -274,6 +274,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_state::nitedrvr_crash_toggle_callback)
void nitedrvr_state::machine_start()
{
+ m_led.resolve();
+
save_item(NAME(m_gear));
save_item(NAME(m_track));
save_item(NAME(m_steering_buf));
diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp
index 54fec692b1a..fd158211230 100644
--- a/src/mame/machine/pc1512kb.cpp
+++ b/src/mame/machine/pc1512kb.cpp
@@ -204,6 +204,7 @@ pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, co
m_maincpu(*this, I8048_TAG),
m_joy(*this, "joy"),
m_y(*this, "Y%u", 1),
+ m_led(*this, "led%u", 0U),
m_write_clock(*this),
m_write_data(*this),
m_data_in(1),
@@ -222,6 +223,7 @@ pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, co
void pc1512_keyboard_device::device_start()
{
+ m_led.resolve();
// allocate timers
m_reset_timer = timer_alloc();
@@ -440,10 +442,10 @@ WRITE8_MEMBER( pc1512_keyboard_device::kb_p2_w )
m_write_clock(BIT(data, 1));
// CAPS LOCK
- machine().output().set_led_value(LED_CAPS, BIT(data, 2));
+ m_led[LED_CAPS] = BIT(data, 2);
// NUM LOCK
- machine().output().set_led_value(LED_NUM, BIT(data, 3));
+ m_led[LED_NUM] = BIT(data, 3);
// keyboard row
m_kb_y = (((data >> 4) & 0x07) << 8) | (m_kb_y & 0xff);
diff --git a/src/mame/machine/pc1512kb.h b/src/mame/machine/pc1512kb.h
index 2789c998b32..903a98ba1bf 100644
--- a/src/mame/machine/pc1512kb.h
+++ b/src/mame/machine/pc1512kb.h
@@ -79,6 +79,7 @@ private:
required_device<vcs_control_port_device> m_joy;
required_ioport_array<11> m_y;
+ output_finder<2> m_led;
devcb_write_line m_write_clock;
devcb_write_line m_write_data;
diff --git a/src/mame/machine/pmd85.cpp b/src/mame/machine/pmd85.cpp
index 1c3fa6c9d41..40b4b21752b 100644
--- a/src/mame/machine/pmd85.cpp
+++ b/src/mame/machine/pmd85.cpp
@@ -17,7 +17,7 @@
#include "machine/pit8253.h"
-enum {PMD85_LED_1, PMD85_LED_2, PMD85_LED_3};
+enum {PMD85_LED_1 = 0, PMD85_LED_2, PMD85_LED_3};
enum {PMD85_1, PMD85_2, PMD85_2A, PMD85_2B, PMD85_3, ALFA, MATO, C2717};
@@ -257,8 +257,8 @@ WRITE8_MEMBER(pmd85_state::pmd85_ppi_0_portb_w)
WRITE8_MEMBER(pmd85_state::pmd85_ppi_0_portc_w)
{
m_ppi_port_outputs[0][2] = data;
- output().set_led_value(PMD85_LED_2, (data & 0x08) ? 1 : 0);
- output().set_led_value(PMD85_LED_3, (data & 0x04) ? 1 : 0);
+ m_led[PMD85_LED_2] = BIT(data, 3);
+ m_led[PMD85_LED_3] = BIT(data, 2);
}
/*******************************************************************************
@@ -290,8 +290,8 @@ READ8_MEMBER(pmd85_state::mato_ppi_0_portc_r)
WRITE8_MEMBER(pmd85_state::mato_ppi_0_portc_w)
{
m_ppi_port_outputs[0][2] = data;
- output().set_led_value(PMD85_LED_2, BIT(data, 3));
- output().set_led_value(PMD85_LED_3, BIT(data, 2));
+ m_led[PMD85_LED_2] = BIT(data, 3);
+ m_led[PMD85_LED_3] = BIT(data, 2);
}
/*******************************************************************************
diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp
index 2bc272e842a..12e9e66596e 100644
--- a/src/mame/machine/sms.cpp
+++ b/src/mame/machine/sms.cpp
@@ -306,7 +306,7 @@ WRITE_LINE_MEMBER(sms_state::sms_csync_callback)
{
m_rapid_read_state = 0x00;
// Power LED remains lit again
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
}
}
@@ -1023,7 +1023,7 @@ void sms_state::setup_bios()
}
}
-MACHINE_START_MEMBER(sms_state,sms)
+void sms_state::machine_start()
{
m_led_pwr.resolve();
@@ -1119,7 +1119,7 @@ MACHINE_START_MEMBER(sms_state,sms)
m_cartslot->save_ram();
}
-MACHINE_RESET_MEMBER(sms_state,sms)
+void sms_state::machine_reset()
{
if (m_is_smsj)
{
@@ -1134,7 +1134,7 @@ MACHINE_RESET_MEMBER(sms_state,sms)
m_rapid_last_dc = 0xff;
m_rapid_last_dd = 0xff;
// Power LED remains lit again
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
if (!m_is_mark_iii)
@@ -1254,7 +1254,7 @@ void sms_state::init_sg1000m3()
m_is_mark_iii = 1;
m_has_jpn_sms_cart_slot = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
@@ -1268,7 +1268,7 @@ void sms_state::init_sms1()
{
m_has_bios_full = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
@@ -1279,7 +1279,7 @@ void sms_state::init_smsj()
m_ioctrl_region_is_japan = 1;
m_has_jpn_sms_cart_slot = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
@@ -1289,7 +1289,7 @@ void sms_state::init_sms1kr()
m_ioctrl_region_is_japan = 1;
m_has_jpn_sms_cart_slot = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
@@ -1312,7 +1312,7 @@ void sms_state::init_gamegear()
m_is_gamegear = 1;
m_has_bios_0400 = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
@@ -1322,7 +1322,7 @@ void sms_state::init_gamegeaj()
m_has_bios_0400 = 1;
m_ioctrl_region_is_japan = 1;
// turn on the Power LED
- output().set_led_value(0, 1);
+ m_led_pwr = 1;
}
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);
diff --git a/src/mame/machine/tandy2kb.h b/src/mame/machine/tandy2kb.h
index f6a6f1e24eb..ecc9c16cf81 100644
--- a/src/mame/machine/tandy2kb.h
+++ b/src/mame/machine/tandy2kb.h
@@ -73,6 +73,7 @@ private:
required_device<cpu_device> m_maincpu;
required_ioport_array<12> m_y;
+ output_finder<2> m_led;
devcb_write_line m_write_clock;
devcb_write_line m_write_data;
diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp
index f69dcc4b0f0..09a7a7d1592 100644
--- a/src/mame/machine/trs80m2kb.cpp
+++ b/src/mame/machine/trs80m2kb.cpp
@@ -211,6 +211,7 @@ trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig,
device_t(mconfig, TRS80M2_KEYBOARD, tag, owner, clock),
m_maincpu(*this, I8021_TAG),
m_y(*this, "Y%u", 0),
+ m_led(*this, "led%u", 0U),
m_write_clock(*this),
m_busy(1),
m_data(1),
@@ -225,6 +226,7 @@ trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig,
void trs80m2_keyboard_device::device_start()
{
+ m_led.resolve();
// resolve callbacks
m_write_clock.resolve_safe();
@@ -321,8 +323,8 @@ WRITE8_MEMBER( trs80m2_keyboard_device::kb_p1_w )
m_clk = clk;
}
- machine().output().set_led_value(LED_0, BIT(data, 2));
- machine().output().set_led_value(LED_1, BIT(data, 4));
+ m_led[LED_0] = BIT(data, 2);
+ m_led[LED_1] = BIT(data, 4);
}
diff --git a/src/mame/machine/trs80m2kb.h b/src/mame/machine/trs80m2kb.h
index 29ff764f31c..2859bdbf1ce 100644
--- a/src/mame/machine/trs80m2kb.h
+++ b/src/mame/machine/trs80m2kb.h
@@ -68,6 +68,7 @@ private:
required_device<cpu_device> m_maincpu;
required_ioport_array<12> m_y;
+ output_finder<2> m_led;
devcb_write_line m_write_clock;
diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp
index af29f0441fc..c3720032620 100644
--- a/src/mame/machine/v1050kb.cpp
+++ b/src/mame/machine/v1050kb.cpp
@@ -290,6 +290,7 @@ v1050_keyboard_device::v1050_keyboard_device(const machine_config &mconfig, cons
m_discrete(*this, DISCRETE_TAG),
m_y(*this, "Y%u", 0),
m_out_tx_handler(*this),
+ m_led(*this, "led0"),
m_keylatch(0)
{
}
@@ -301,6 +302,7 @@ v1050_keyboard_device::v1050_keyboard_device(const machine_config &mconfig, cons
void v1050_keyboard_device::device_start()
{
+ m_led.resolve();
// state saving
save_item(NAME(m_keylatch));
}
@@ -376,7 +378,7 @@ WRITE8_MEMBER( v1050_keyboard_device::kb_p2_w )
*/
// led output
- machine().output().set_led_value(0, BIT(data, 5));
+ m_led = BIT(data, 5);
// speaker output
m_discrete->write(space, NODE_01, BIT(data, 6));
diff --git a/src/mame/machine/v1050kb.h b/src/mame/machine/v1050kb.h
index 231a135b48e..96172ba33ff 100644
--- a/src/mame/machine/v1050kb.h
+++ b/src/mame/machine/v1050kb.h
@@ -58,6 +58,7 @@ private:
required_device<discrete_sound_device> m_discrete;
required_ioport_array<12> m_y;
devcb_write_line m_out_tx_handler;
+ output_finder<> m_led;
uint8_t m_keylatch;
diff --git a/src/mame/machine/victor9k_fdc.cpp b/src/mame/machine/victor9k_fdc.cpp
index 89909e3237f..c5af61c9060 100644
--- a/src/mame/machine/victor9k_fdc.cpp
+++ b/src/mame/machine/victor9k_fdc.cpp
@@ -216,6 +216,7 @@ victor_9000_fdc_device::victor_9000_fdc_device(const machine_config &mconfig, co
m_floppy0(*this, I8048_TAG":0"),
m_floppy1(*this, I8048_TAG":1"),
m_gcr_rom(*this, "gcr"),
+ m_led(*this, "led%u", 0U),
m_da(0),
m_da0(0),
m_da1(0),
@@ -260,6 +261,8 @@ victor_9000_fdc_device::victor_9000_fdc_device(const machine_config &mconfig, co
void victor_9000_fdc_device::device_start()
{
+ m_led.resolve();
+
// resolve callbacks
m_irq_cb.resolve_safe();
m_syn_cb.resolve_safe();
@@ -892,10 +895,10 @@ WRITE8_MEMBER( victor_9000_fdc_device::via6_pa_w )
*/
// LED, drive A
- machine().output().set_led_value(LED_A, BIT(data, 0));
+ m_led[LED_A] = BIT(data, 0);
// LED, drive B
- machine().output().set_led_value(LED_B, BIT(data, 2));
+ m_led[LED_B] = BIT(data, 2);
bool sync = false;
diff --git a/src/mame/machine/victor9k_fdc.h b/src/mame/machine/victor9k_fdc.h
index 7987bc30f0c..942c8038ac4 100644
--- a/src/mame/machine/victor9k_fdc.h
+++ b/src/mame/machine/victor9k_fdc.h
@@ -132,6 +132,7 @@ private:
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_memory_region m_gcr_rom;
+ output_finder<2> m_led;
void update_stepper_motor(floppy_image_device *floppy, int stp, int old_st, int st);
void update_spindle_motor(floppy_image_device *floppy, emu_timer *t_tach, bool start, bool stop, bool sel, uint8_t &da);
diff --git a/src/mame/machine/wangpckb.cpp b/src/mame/machine/wangpckb.cpp
index 62fec62a771..59a4cbf0cf4 100644
--- a/src/mame/machine/wangpckb.cpp
+++ b/src/mame/machine/wangpckb.cpp
@@ -371,6 +371,7 @@ wangpc_keyboard_device::wangpc_keyboard_device(const machine_config &mconfig, co
m_maincpu(*this, I8051_TAG),
m_y(*this, "Y%u", 0),
m_txd_handler(*this),
+ m_led(*this, "led%u", 0U),
m_keylatch(0),
m_rxd(1)
{
@@ -533,7 +534,7 @@ WRITE8_MEMBER( wangpc_keyboard_device::kb_p1_w )
for (int i = 0; i < 6; i++)
{
- machine().output().set_led_value(i, !BIT(data, i));
+ m_led[i] = BIT(~data, i);
}
//if (LOG) logerror("P1 %02x\n", data);
diff --git a/src/mame/machine/wangpckb.h b/src/mame/machine/wangpckb.h
index 02a4e803896..d22fb31e08d 100644
--- a/src/mame/machine/wangpckb.h
+++ b/src/mame/machine/wangpckb.h
@@ -81,6 +81,7 @@ private:
required_device<i8051_device> m_maincpu;
required_ioport_array<16> m_y;
devcb_write_line m_txd_handler;
+ output_finder<6> m_led;
uint8_t m_keylatch;
int m_rxd;
diff --git a/src/mame/machine/xevious.cpp b/src/mame/machine/xevious.cpp
index 8ec4ce970d6..1bd65aa5937 100644
--- a/src/mame/machine/xevious.cpp
+++ b/src/mame/machine/xevious.cpp
@@ -138,8 +138,8 @@ WRITE8_MEMBER( xevious_state::battles_customio_data3_w )
WRITE8_MEMBER( xevious_state::battles_CPU4_coin_w )
{
- output().set_led_value(0,data & 0x02); // Start 1
- output().set_led_value(1,data & 0x01); // Start 2
+ m_led[0] = BIT(data, 1); // Start 1
+ m_led[1] = BIT(data, 0); // Start 2
machine().bookkeeping().coin_counter_w(0,data & 0x20);
machine().bookkeeping().coin_counter_w(1,data & 0x10);