summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/barata.cpp
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-05-20 19:27:20 +0200
committer R. Belmont <rb6502@users.noreply.github.com>2018-05-20 13:27:20 -0400
commit2beba4ce73fad917c7159a39939bace54f76494b (patch)
treee9d33c059bc5045f13d0c1748f0a044650370b8d /src/mame/drivers/barata.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/mame/drivers/barata.cpp')
-rw-r--r--src/mame/drivers/barata.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mame/drivers/barata.cpp b/src/mame/drivers/barata.cpp
index 540f8bf6d68..d385371a1ba 100644
--- a/src/mame/drivers/barata.cpp
+++ b/src/mame/drivers/barata.cpp
@@ -50,7 +50,8 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_digits(*this, "digit%u", 0U)
- { }
+ , m_lamp(*this, "lamp%u", 0U)
+ { }
DECLARE_WRITE8_MEMBER(fpga_w);
DECLARE_WRITE8_MEMBER(port0_w);
@@ -60,9 +61,10 @@ public:
private:
unsigned char row_selection;
void fpga_send(unsigned char cmd);
- virtual void machine_start() override { m_digits.resolve(); }
+ virtual void machine_start() override { m_digits.resolve(); m_lamp.resolve(); }
required_device<cpu_device> m_maincpu;
output_finder<4> m_digits;
+ output_finder<16> m_lamp;
};
/************************
@@ -204,12 +206,12 @@ void barata_state::fpga_send(unsigned char cmd)
{
// logerror("LED: ERASE ALL\n");
for (int i=0; i<16; i++){
- output().set_led_value(i, 1);
+ m_lamp[i] = 1;
}
}
else
{
- output().set_led_value(lamp_index, state ? 0 : 1);
+ m_lamp[lamp_index] = state ? 0 : 1;
}
default:
mode = FPGA_WAITING_FOR_NEW_CMD;