summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/jpmimpct.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/jpmimpct.h')
-rw-r--r--src/mame/includes/jpmimpct.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h
index 425e0edf9e0..cbfec3351f3 100644
--- a/src/mame/includes/jpmimpct.h
+++ b/src/mame/includes/jpmimpct.h
@@ -70,12 +70,7 @@ public:
, m_upd7759(*this, "upd")
, m_palette(*this, "palette")
, m_dsp(*this, "dsp")
- , m_reel0(*this, "reel0")
- , m_reel1(*this, "reel1")
- , m_reel2(*this, "reel2")
- , m_reel3(*this, "reel3")
- , m_reel4(*this, "reel4")
- , m_reel5(*this, "reel5")
+ , m_reel(*this, "reel%u", 0U)
, m_meters(*this, "meters")
, m_digits(*this, "digit%u", 0U)
, m_lamp_output(*this, "lamp%u", 0U)
@@ -85,12 +80,7 @@ public:
void jpmimpct(machine_config &config);
private:
- DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
- DECLARE_WRITE_LINE_MEMBER(reel4_optic_cb) { if (state) m_optic_pattern |= 0x10; else m_optic_pattern &= ~0x10; }
- DECLARE_WRITE_LINE_MEMBER(reel5_optic_cb) { if (state) m_optic_pattern |= 0x20; else m_optic_pattern &= ~0x20; }
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
DECLARE_READ16_MEMBER(duart_1_r);
DECLARE_WRITE16_MEMBER(duart_1_w);
DECLARE_READ16_MEMBER(duart_2_r);
@@ -154,12 +144,7 @@ private:
required_device<upd7759_device> m_upd7759;
optional_device<palette_device> m_palette;
optional_device<tms34010_device> m_dsp;
- optional_device<stepper_device> m_reel0;
- optional_device<stepper_device> m_reel1;
- optional_device<stepper_device> m_reel2;
- optional_device<stepper_device> m_reel3;
- optional_device<stepper_device> m_reel4;
- optional_device<stepper_device> m_reel5;
+ optional_device_array<stepper_device, 6> m_reel;
required_device<meters_device> m_meters;
output_finder<300> m_digits;
output_finder<256> m_lamp_output;