summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/calomega.cpp
diff options
context:
space:
mode:
authorGravatarGravatar wilbertpol <wilbertpol@users.noreply.github.com>2018-05-20 19:27:20 +0200
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2018-05-20 13:27:20 -0400
commit2beba4ce73fad917c7159a39939bace54f76494b (patch) (github)
treee9d33c059bc5045f13d0c1748f0a044650370b8d /src/mame/drivers/calomega.cpp
parentacf93837ac21b2b0bb003d1649b893200c269812 (diff)
downloadmame-2beba4ce73fad917c7159a39939bace54f76494b.tar.bz2
mame-2beba4ce73fad917c7159a39939bace54f76494b.zip
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/calomega.cpp')
-rw-r--r--src/mame/drivers/calomega.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mame/drivers/calomega.cpp b/src/mame/drivers/calomega.cpp
index 0b1b747e70d..f13d80049bd 100644
--- a/src/mame/drivers/calomega.cpp
+++ b/src/mame/drivers/calomega.cpp
@@ -788,33 +788,33 @@ WRITE8_MEMBER(calomega_state::pia1_bout_w)
WRITE8_MEMBER(calomega_state::lamps_903a_w)
{
/* First 5 bits of PIA0 port B */
- output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
- output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
- output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
- output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
- output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
+ m_lamp[1] = BIT(~data, 0); /* L1 (Hold 1) */
+ m_lamp[2] = BIT(~data, 1); /* L2 (Hold 2) */
+ m_lamp[3] = BIT(~data, 2); /* L3 (Hold 3) */
+ m_lamp[4] = BIT(~data, 3); /* L4 (Hold 4) */
+ m_lamp[5] = BIT(~data, 4); /* L5 (Hold 5) */
}
WRITE8_MEMBER(calomega_state::lamps_903b_w)
{
/* First 4 bits of PIA1 port A */
- output().set_lamp_value(6, 1-((data) & 1)); /* L6 (Cancel) */
- output().set_lamp_value(7, 1-((data >> 1) & 1)); /* L7 (Bet) */
- output().set_lamp_value(8, 1-((data >> 2) & 1)); /* L8 (Take) */
- output().set_lamp_value(9, 1-((data >> 3) & 1)); /* L9 (Door?) */
+ m_lamp[6] = BIT(~data, 0); /* L6 (Cancel) */
+ m_lamp[7] = BIT(~data, 1); /* L7 (Bet) */
+ m_lamp[8] = BIT(~data, 2); /* L8 (Take) */
+ m_lamp[9] = BIT(~data, 3); /* L9 (Door?) */
}
WRITE8_MEMBER(calomega_state::lamps_905_w)
{
/* Whole 8 bits of PIA0 port B */
- output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
- output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
- output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
- output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
- output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
- output().set_lamp_value(6, 1-((data >> 5) & 1)); /* L6 (unknown) */
- output().set_lamp_value(7, 1-((data >> 6) & 1)); /* L7 (unknown) */
- output().set_lamp_value(8, 1-((data >> 7) & 1)); /* L8 (unknown) */
+ m_lamp[1] = BIT(~data, 0); /* L1 (Hold 1) */
+ m_lamp[2] = BIT(~data, 1); /* L2 (Hold 2) */
+ m_lamp[3] = BIT(~data, 2); /* L3 (Hold 3) */
+ m_lamp[4] = BIT(~data, 3); /* L4 (Hold 4) */
+ m_lamp[5] = BIT(~data, 4); /* L5 (Hold 5) */
+ m_lamp[6] = BIT(~data, 5); /* L6 (unknown) */
+ m_lamp[7] = BIT(~data, 6); /* L7 (unknown) */
+ m_lamp[8] = BIT(~data, 7); /* L8 (unknown) */
}