From ab193a14fa79468560ba7d8a52228b835c9a5408 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 21 May 2018 20:14:24 +1000 Subject: Some cleanup on #3592 (nw) --- src/devices/bus/sunkbd/hlekbd.cpp | 24 ++++++++++----------- src/devices/bus/sunkbd/hlekbd.h | 2 +- src/mame/drivers/cvs.cpp | 2 +- src/mame/drivers/harddriv.cpp | 2 +- src/mame/drivers/mephisto_montec.cpp | 34 ++++++++++++++++-------------- src/mame/drivers/polyplay.cpp | 41 +++--------------------------------- src/mame/drivers/seabattl.cpp | 6 +++--- src/mame/drivers/tek405x.cpp | 8 +++---- src/mame/drivers/tiki100.cpp | 6 +++--- src/mame/drivers/tmc1800.cpp | 4 ++-- src/mame/drivers/tmc2000e.cpp | 2 +- src/mame/includes/cvs.h | 4 ++-- src/mame/includes/harddriv.h | 2 +- src/mame/includes/microtan.h | 4 ++-- src/mame/includes/msx.h | 4 ++-- src/mame/includes/polyplay.h | 6 +++--- src/mame/includes/seta.h | 2 +- src/mame/includes/tek405x.h | 4 ++-- src/mame/includes/tiki100.h | 6 +++--- src/mame/includes/tmc1800.h | 12 +++++------ src/mame/includes/tmc2000e.h | 4 ++-- src/mame/machine/harddriv.cpp | 6 +++--- src/mame/machine/microtan.cpp | 4 ++-- src/mame/machine/mmboard.h | 2 +- src/mame/machine/msx.cpp | 6 +++--- src/mame/video/cvs.cpp | 4 ++-- 26 files changed, 84 insertions(+), 117 deletions(-) diff --git a/src/devices/bus/sunkbd/hlekbd.cpp b/src/devices/bus/sunkbd/hlekbd.cpp index a32365fa388..48b16f13348 100644 --- a/src/devices/bus/sunkbd/hlekbd.cpp +++ b/src/devices/bus/sunkbd/hlekbd.cpp @@ -753,7 +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_leds(*this, "led%u", 0U) , m_make_count(0U) , m_rx_state(RX_IDLE) , m_keyclick(0U) @@ -803,7 +803,7 @@ MACHINE_CONFIG_END void hle_device_base::device_start() { - m_led.resolve(); + m_leds.resolve(); m_click_timer = timer_alloc(CLICK_TIMER_ID); save_item(NAME(m_make_count)); @@ -838,11 +838,11 @@ void hle_device_base::device_reset() output_rxd(1); // start with keyboard LEDs off - 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; + m_leds[LED_NUM] = 0; + m_leds[LED_COMPOSE] = 0; + m_leds[LED_SCROLL] = 0; + m_leds[LED_CAPS] = 0; + m_leds[LED_KANA] = 0; // no beep m_click_timer->reset(); @@ -974,11 +974,11 @@ void hle_device_base::received_byte(uint8_t byte) switch (m_rx_state) { case RX_LED: - 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_leds[LED_NUM] = BIT(byte, 0); + m_leds[LED_COMPOSE] = BIT(byte, 1); + m_leds[LED_SCROLL] = BIT(byte, 2); + m_leds[LED_CAPS] = BIT(byte, 3); + m_leds[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 2b4f17217b5..a4f6d886f5c 100644 --- a/src/devices/bus/sunkbd/hlekbd.h +++ b/src/devices/bus/sunkbd/hlekbd.h @@ -93,7 +93,7 @@ private: emu_timer *m_click_timer; required_device m_beeper; - output_finder<5> m_led; + output_finder<5> m_leds; uint8_t m_make_count; uint8_t m_rx_state; diff --git a/src/mame/drivers/cvs.cpp b/src/mame/drivers/cvs.cpp index 9554c76c9dc..4c855821e19 100644 --- a/src/mame/drivers/cvs.cpp +++ b/src/mame/drivers/cvs.cpp @@ -928,7 +928,7 @@ GFXDECODE_END void cvs_state::machine_start() { - m_lamp.resolve(); + m_lamps.resolve(); /* allocate memory */ if (m_gfxdecode->gfx(1) != nullptr) diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index 8eb20c3d6a9..48920f097b1 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -361,7 +361,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, m_screen(*this, "screen"), m_duartn68681(*this, "duartn68681"), m_adc8(*this, "adc8"), - m_lamp(*this, "lamp%u", 0U), + m_lamps(*this, "lamp%u", 1U), m_hd34010_host_access(0), m_msp_ram(*this, "msp_ram"), m_dsk_ram(nullptr), diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index cb92c2162ac..30e5bb8d2de 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -41,7 +41,8 @@ public: , m_beeper(*this, "beeper") , m_keys(*this, "KEY.%u", 0) , m_digits(*this, "digit%u", 0U) - , m_led(*this, "led%u", 0U) + , m_low_leds(*this, "led%u", 0U) + , m_high_leds(*this, "led%u", 100U) { } @@ -86,7 +87,7 @@ private: required_device m_beeper; optional_ioport_array<2> m_keys; output_finder<8> m_digits; - output_finder<116> m_led; + output_finder<16> m_low_leds, m_high_leds; uint8_t m_lcd_mux; uint8_t m_input_mux; @@ -106,7 +107,8 @@ private: void mephisto_montec_state::machine_start() { m_digits.resolve(); - m_led.resolve(); + m_low_leds.resolve(); + m_high_leds.resolve(); save_item(NAME(m_lcd_mux)); save_item(NAME(m_input_mux)); @@ -136,7 +138,7 @@ WRITE8_MEMBER(mephisto_montec_state::montec_led_w) for(int i=0; i<4; i++) for(int j=0; j<4; j++) if (BIT(data, i)) - m_led[100 + i * 4 + j] = BIT(data, 4 + j); + m_high_leds[(i << 2) | j] = BIT(data, 4 + j); } @@ -231,9 +233,9 @@ WRITE8_MEMBER(mephisto_montec_state::megaiv_led_w) { if (!BIT(m_leds_mux, i)) { - m_led[100 + i] = BIT(data, 0) | BIT(data, 1); - m_led[0 + i] = BIT(data, 2) | BIT(data, 3); - m_led[8 + i] = BIT(data, 4) | BIT(data, 5); + m_high_leds[i] = BIT(data, 0) | BIT(data, 1); + m_low_leds[0 + i] = BIT(data, 2) | BIT(data, 3); + m_low_leds[8 + i] = BIT(data, 4) | BIT(data, 5); } } } @@ -302,9 +304,9 @@ WRITE8_MEMBER(mephisto_montec_state::smondial_board_mux_w) for (int i=0; i<8; i++) { - if (m_leds_mux & 0x03) m_led[100 + i] = BIT(~m_smondial_board_mux, i); - if (m_leds_mux & 0x0c) m_led[ 8 + i] = BIT(~m_smondial_board_mux, i); - if (m_leds_mux & 0x30) m_led[ 0 + i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x03) m_high_leds[i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x0c) m_low_leds[8 + i] = BIT(~m_smondial_board_mux, i); + if (m_leds_mux & 0x30) m_low_leds[0 + i] = BIT(~m_smondial_board_mux, i); } } @@ -339,9 +341,9 @@ WRITE8_MEMBER(mephisto_montec_state::mondial2_input_mux_w) { if (!BIT(leds_data, i)) { - if (data & 0x10) m_led[100 + i] = 1; - if (data & 0x20) m_led[ 8 + i] = 1; - if (data & 0x40) m_led[ 0 + i] = 1; + if (data & 0x10) m_high_leds[i] = 1; + if (data & 0x20) m_low_leds[8 + i] = 1; + if (data & 0x40) m_low_leds[0 + i] = 1; } } @@ -363,9 +365,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(mephisto_montec_state::refresh_leds) { for (int i=0; i<8; i++) { - m_led[0 + i] = 0; - m_led[8 + i] = 0; - m_led[100 + i] = 0; + m_low_leds[0 + i] = 0; + m_low_leds[8 + i] = 0; + m_high_leds[i] = 0; } } diff --git a/src/mame/drivers/polyplay.cpp b/src/mame/drivers/polyplay.cpp index b9618c19055..49c69a7acee 100644 --- a/src/mame/drivers/polyplay.cpp +++ b/src/mame/drivers/polyplay.cpp @@ -183,47 +183,12 @@ READ8_MEMBER(polyplay_state::pio_portb_r) WRITE8_MEMBER(polyplay_state::pio_portb_w) { - uint8_t lightState = data & 0x07; + uint8_t const lightState = data & 0x07; //uint8_t soundState = data & 0xe0; // there is a DS8205D attached to bit 0 and 1 - switch (lightState) - { - case 0: - m_lamp[1] = 1; - m_lamp[2] = 0; - m_lamp[3] = 0; - m_lamp[4] = 0; - break; - - case 1: - m_lamp[1] = 0; - m_lamp[2] = 1; - m_lamp[3] = 0; - m_lamp[4] = 0; - break; - - case 2: - m_lamp[1] = 0; - m_lamp[2] = 0; - m_lamp[3] = 1; - m_lamp[4] = 0; - break; - - case 3: - m_lamp[1] = 0; - m_lamp[2] = 0; - m_lamp[3] = 0; - m_lamp[4] = 1; - break; - - default: - m_lamp[1] = 0; - m_lamp[2] = 0; - m_lamp[3] = 0; - m_lamp[4] = 0; - break; - } + for (unsigned i = 0; 4 > i; ++i) + m_lamps[i] = (lightState == i) ? 1 : 0; } INPUT_CHANGED_MEMBER(polyplay_state::input_changed) diff --git a/src/mame/drivers/seabattl.cpp b/src/mame/drivers/seabattl.cpp index cbc859ddec7..c678f558d58 100644 --- a/src/mame/drivers/seabattl.cpp +++ b/src/mame/drivers/seabattl.cpp @@ -53,12 +53,12 @@ public: m_digits(*this, { "sc_thousand", "sc_hundred", "sc_half", "sc_unity", "tm_half", "tm_unity" }), m_s2636(*this, "s2636"), m_7segs(*this, "digit%u", 0U), + m_lamp(*this, "lamp0"), m_waveenable(false), m_collision(0), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_lamp(*this, "lamp0") + m_palette(*this, "palette") { } TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -96,6 +96,7 @@ private: required_device_array m_digits; required_device m_s2636; output_finder<6> m_7segs; + output_finder<> m_lamp; tilemap_t *m_bg_tilemap; bitmap_ind16 m_collision_bg; @@ -105,7 +106,6 @@ private: required_device m_gfxdecode; required_device m_screen; required_device m_palette; - output_finder<> m_lamp; }; diff --git a/src/mame/drivers/tek405x.cpp b/src/mame/drivers/tek405x.cpp index fd50c8a1e20..7400754590a 100644 --- a/src/mame/drivers/tek405x.cpp +++ b/src/mame/drivers/tek405x.cpp @@ -622,9 +622,9 @@ WRITE8_MEMBER( tek4051_state::kb_pia_pb_w ) */ // lamps - m_lamp[1] = BIT(~data, 5); - m_lamp[2] = BIT(~data, 6); - m_lamp[3] = BIT(~data, 7); + m_lamps[0] = BIT(~data, 5); + m_lamps[1] = BIT(~data, 6); + m_lamps[2] = BIT(~data, 7); // end or identify m_gpib->eoi_w(!BIT(data, 4)); @@ -958,7 +958,7 @@ WRITE_LINE_MEMBER( tek4051_state::write_acia_clock ) void tek4051_state::machine_start() { - m_lamp.resolve(); + m_lamps.resolve(); address_space &program = m_maincpu->space(AS_PROGRAM); diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp index fbd5398666c..f026716f5ab 100644 --- a/src/mame/drivers/tiki100.cpp +++ b/src/mame/drivers/tiki100.cpp @@ -281,10 +281,10 @@ WRITE8_MEMBER( tiki100_state::system_w ) if (floppy) floppy->mon_w(!BIT(data, 6)); /* GRAFIKK key led */ - m_led[1] = BIT(data, 5); + m_leds[0] = BIT(data, 5); /* LOCK key led */ - m_led[2] = BIT(data, 7); + m_leds[1] = BIT(data, 7); /* bankswitch */ m_rome = BIT(data, 2); @@ -671,7 +671,7 @@ WRITE_LINE_MEMBER( tiki100_state::busrq_w ) void tiki100_state::machine_start() { - m_led.resolve(); + m_leds.resolve(); /* allocate video RAM */ m_video_ram.allocate(TIKI100_VIDEORAM_SIZE); diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index 2d1039fce4e..dfa64a8e9e0 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -553,7 +553,7 @@ WRITE_LINE_MEMBER( tmc2000_state::q_w ) m_cti->aoe_w(state); /* set Q led status */ - m_led[1] = state ? 1 : 0; + m_led = state ? 1 : 0; /* tape output */ m_cassette->output(state ? 1.0 : -1.0); @@ -598,7 +598,7 @@ WRITE_LINE_MEMBER( nano_state::q_w ) m_cti->aoe_w(state); /* set Q led status */ - m_led[1] = state ? 1 : 0; + m_led = state ? 1 : 0; /* tape output */ m_cassette->output(state ? 1.0 : -1.0); diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp index 0dfde634fda..1e518b8ee9a 100644 --- a/src/mame/drivers/tmc2000e.cpp +++ b/src/mame/drivers/tmc2000e.cpp @@ -243,7 +243,7 @@ WRITE_LINE_MEMBER( tmc2000e_state::q_w ) m_cti->aoe_w(state); // set Q led status - m_led[1] = state ? 1 : 0; + m_led = state ? 1 : 0; // tape out m_cassette->output(state ? -1.0 : +1.0); diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 2fe961b5603..6abadcaf13d 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -44,7 +44,7 @@ public: , m_screen(*this, "screen") , m_palette(*this, "palette") , m_soundlatch(*this, "soundlatch") - , m_lamp(*this, "lamp%u", 0U) + , m_lamps(*this, "lamp%u", 1U) { } DECLARE_READ_LINE_MEMBER(speech_rom_read_bit); @@ -141,7 +141,7 @@ protected: required_device m_screen; required_device m_palette; optional_device m_soundlatch; - output_finder<3> m_lamp; + output_finder<2> m_lamps; /* memory */ uint8_t m_color_ram[0x400]; diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 6b21e733012..add763e9742 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -301,7 +301,7 @@ protected: optional_device m_screen; optional_device m_duartn68681; required_device m_adc8; - output_finder<3> m_lamp; + output_finder<2> m_lamps; uint8_t m_hd34010_host_access; diff --git a/src/mame/includes/microtan.h b/src/mame/includes/microtan.h index 83818e913f8..31ede86c416 100644 --- a/src/mame/includes/microtan.h +++ b/src/mame/includes/microtan.h @@ -38,7 +38,7 @@ public: m_via6522_0(*this, "via6522_0"), m_via6522_1(*this, "via6522_1"), m_gfxdecode(*this, "gfxdecode"), - m_led(*this, "led%u", 0U) + m_led(*this, "led1") { } DECLARE_READ8_MEMBER(microtan_sound_r); @@ -103,7 +103,7 @@ protected: required_device m_via6522_0; required_device m_via6522_1; required_device m_gfxdecode; - output_finder<2> m_led; + output_finder<> m_led; }; #endif // MAME_INCLUDES_MICROTAN_H diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h index bc846957773..d45f079d6ff 100644 --- a/src/mame/includes/msx.h +++ b/src/mame/includes/msx.h @@ -131,7 +131,7 @@ public: , m_io_mouse0(*this, "MOUSE0") , m_io_mouse1(*this, "MOUSE1") , m_io_key(*this, {"KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5"}) - , m_led(*this, "led%u", 0U) + , m_leds(*this, "led%u", 1U) , m_psg_b(0) , m_rtc_latch(0) , m_kanji_latch(0) @@ -498,7 +498,7 @@ private: required_ioport m_io_mouse0; required_ioport m_io_mouse1; required_ioport_array<6> m_io_key; - output_finder<3> m_led; + output_finder<2> m_leds; /* PSG */ int m_psg_b; diff --git a/src/mame/includes/polyplay.h b/src/mame/includes/polyplay.h index 70c6bd37cac..8357fe25fa6 100644 --- a/src/mame/includes/polyplay.h +++ b/src/mame/includes/polyplay.h @@ -32,7 +32,7 @@ public: m_palette(*this, "palette"), m_speaker1(*this, "speaker1"), m_speaker2(*this, "speaker2"), - m_lamp(*this, "lamp%u", 0U) + m_lamps(*this, "lamp%u", 1U) { } INTERRUPT_GEN_MEMBER(nmi_handler); @@ -60,7 +60,7 @@ public: void polyplay_mem_zrepp(address_map &map); protected: - virtual void machine_start() override { m_lamp.resolve(); } + virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; required_shared_ptr m_videoram; @@ -79,7 +79,7 @@ protected: uint8_t m_flipflop2; required_device m_speaker1; required_device m_speaker2; - output_finder<5> m_lamp; + output_finder<4> m_lamps; }; #endif // MAME_INCLUDES_POLYPLAY_H diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index 8c12dd7dd23..b5ad08cce6c 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -64,7 +64,7 @@ public: m_vctrl(*this,"vctrl_%u", 0), m_paletteram(*this,"paletteram%u", 1), m_subbank(*this,"subbank"), - m_leds(*this,"led%u", 0U), + m_leds(*this, "led%u", 0U), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } diff --git a/src/mame/includes/tek405x.h b/src/mame/includes/tek405x.h index 805ab42c1b2..e4e806f5414 100644 --- a/src/mame/includes/tek405x.h +++ b/src/mame/includes/tek405x.h @@ -52,7 +52,7 @@ public: m_bsofl_rom(*this, "020_0147_00"), m_bscom_rom(*this, "021_0188_00"), m_special(*this, "SPECIAL"), - m_lamp(*this, "lamp%u", 0U) + m_lamps(*this, "lamp%u", 1U) { } void bankswitch(uint8_t data); @@ -125,7 +125,7 @@ protected: required_memory_region m_bsofl_rom; required_memory_region m_bscom_rom; required_ioport m_special; - output_finder<4> m_lamp; + output_finder<3> m_lamps; // interrupts int m_x_pia_irqa; diff --git a/src/mame/includes/tiki100.h b/src/mame/includes/tiki100.h index 101e1c4fd3f..ecf279ed632 100644 --- a/src/mame/includes/tiki100.h +++ b/src/mame/includes/tiki100.h @@ -62,9 +62,9 @@ public: m_y(*this, "Y%u", 1), m_st_io(*this, "ST"), m_palette(*this, "palette"), + m_leds(*this, "led%u", 1U), m_rome(1), - m_vire(1), - m_led(*this, "led%u", 0U) + m_vire(1) { } uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -122,6 +122,7 @@ protected: required_ioport_array<12> m_y; required_ioport m_st_io; required_device m_palette; + output_finder<2> m_leds; enum { @@ -151,7 +152,6 @@ protected: // serial state bool m_st; - output_finder<3> m_led; }; #endif // MAME_INCLUDES_TIKI100_H diff --git a/src/mame/includes/tmc1800.h b/src/mame/includes/tmc1800.h index 7fabc43512c..fb24b4fceed 100644 --- a/src/mame/includes/tmc1800.h +++ b/src/mame/includes/tmc1800.h @@ -1,10 +1,10 @@ // license:BSD-3-Clause // copyright-holders:Curt Coder -#pragma once - #ifndef MAME_INCLUDES_TMC1800_H #define MAME_INCLUDES_TMC1800_H +#pragma once + #include "cpu/cosmac/cosmac.h" #include "imagedev/cassette.h" @@ -121,7 +121,7 @@ public: , m_cti(*this, CDP1864_TAG) , m_colorram(*this, "color_ram") , m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}) - , m_led(*this, "led%u", 0U) + , m_led(*this, "led1") { } DECLARE_WRITE8_MEMBER( keylatch_w ); @@ -150,7 +150,7 @@ protected: required_device m_cti; optional_shared_ptr m_colorram; required_ioport_array<8> m_key_row; - output_finder<2> m_led; + output_finder<> m_led; // memory int m_rac; @@ -172,7 +172,7 @@ public: , m_ny0(*this, "NY0") , m_ny1(*this, "NY1") , m_monitor(*this, "MONITOR") - , m_led(*this, "led%u", 0U) + , m_led(*this, "led1") { } enum @@ -203,7 +203,7 @@ protected: required_ioport m_ny0; required_ioport m_ny1; required_ioport m_monitor; - output_finder<2> m_led; + output_finder<> m_led; /* keyboard state */ int m_keylatch; /* key latch */ }; diff --git a/src/mame/includes/tmc2000e.h b/src/mame/includes/tmc2000e.h index 781f2197be8..0016bcd6a8a 100644 --- a/src/mame/includes/tmc2000e.h +++ b/src/mame/includes/tmc2000e.h @@ -29,7 +29,7 @@ public: , m_colorram(*this, "colorram") , m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"}) , m_run(*this, "RUN") - , m_led(*this, "led%u", 0U) + , m_led(*this, "led1") { } DECLARE_READ8_MEMBER( vismac_r ); @@ -71,7 +71,7 @@ protected: required_shared_ptr m_colorram; required_ioport_array<8> m_key_row; required_ioport m_run; - output_finder<2> m_led; + output_finder<> m_led; }; #endif diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index 817ed77db22..fbae3bc7b54 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -37,7 +37,7 @@ void harddriv_state::device_start() { - m_lamp.resolve(); + m_lamps.resolve(); //atarigen_state::machine_start(); /* predetermine memory regions */ @@ -416,11 +416,11 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w ) break; case 2: /* LC1 */ // used for seat locking on harddriv - m_lamp[1] = data; + m_lamps[0] = data; break; case 3: /* LC2 */ // used for "abort" button lamp - m_lamp[2] = data; + m_lamps[1] = data; break; case 4: /* ZP1 */ m_m68k_zp1 = data; diff --git a/src/mame/machine/microtan.cpp b/src/mame/machine/microtan.cpp index 07acc1cdc21..1f121327963 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 ) - m_led[1] = BIT(~m_keyrows[3], 7); + m_led = 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(); } - m_led[1] = BIT(~m_keyrows[3], 7); + m_led = 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.h b/src/mame/machine/mmboard.h index b0c612a2681..1e01d548b12 100644 --- a/src/mame/machine/mmboard.h +++ b/src/mame/machine/mmboard.h @@ -65,7 +65,7 @@ protected: private: required_ioport_array<8> m_sensors; - output_finder<256> m_led; + output_finder<64> 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 4f07d97e20d..b01836180e4 100644 --- a/src/mame/machine/msx.cpp +++ b/src/mame/machine/msx.cpp @@ -58,7 +58,7 @@ void msx_state::machine_reset() void msx_state::machine_start() { - m_led.resolve(); + m_leds.resolve(); m_port_c_old = 0xff; for (device_t &device : device_iterator(*this)) @@ -296,7 +296,7 @@ WRITE8_MEMBER(msx_state::msx_psg_port_b_w) { /* Arabic or kana mode led */ if ( (data ^ m_psg_b) & 0x80) - m_led[2] = BIT(~data, 7); + m_leds[1] = BIT(~data, 7); if ( (m_psg_b ^ data) & 0x10) { @@ -350,7 +350,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_c_w ) /* caps lock */ if ( BIT(m_port_c_old ^ data, 6) ) - m_led[1] = BIT(~data, 6); + m_leds[0] = BIT(~data, 6); /* key click */ if ( BIT(m_port_c_old ^ data, 7) ) diff --git a/src/mame/video/cvs.cpp b/src/mame/video/cvs.cpp index 5e0d38640a0..a88258bcd67 100644 --- a/src/mame/video/cvs.cpp +++ b/src/mame/video/cvs.cpp @@ -90,8 +90,8 @@ WRITE8_MEMBER(cvs_state::cvs_video_fx_w) if (data & 0x04) logerror(" SCREEN ROTATE\n"); if (data & 0x08) logerror(" SHADE BRIGHTER TO LEFT\n"); - m_lamp[1] = BIT(data, 4); /* lamp 1 */ - m_lamp[2] = BIT(data, 5); /* lamp 2 */ + m_lamps[0] = BIT(data, 4); /* lamp 1 */ + m_lamps[1] = BIT(data, 5); /* lamp 2 */ if (data & 0x40) logerror(" SHADE BRIGHTER TO BOTTOM\n"); if (data & 0x80) logerror(" SHADE BRIGHTER TO TOP\n"); -- cgit v1.2.3