summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/eacc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/eacc.cpp')
-rw-r--r--src/mame/drivers/eacc.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/mame/drivers/eacc.cpp b/src/mame/drivers/eacc.cpp
index 2ef947a1bb9..712a52b355a 100644
--- a/src/mame/drivers/eacc.cpp
+++ b/src/mame/drivers/eacc.cpp
@@ -59,10 +59,11 @@ class eacc_state : public driver_device
{
public:
eacc_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_pia(*this, "pia"),
- m_p_nvram(*this, "nvram")
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_pia(*this, "pia")
+ , m_p_nvram(*this, "nvram")
+ , m_digits(*this, "digit%u", 0U)
{ }
DECLARE_READ_LINE_MEMBER( eacc_cb1_r );
@@ -72,19 +73,21 @@ public:
DECLARE_WRITE_LINE_MEMBER( eacc_cb2_w );
DECLARE_WRITE8_MEMBER( eacc_digit_w );
DECLARE_WRITE8_MEMBER( eacc_segment_w );
- bool m_cb1;
- bool m_cb2;
- bool m_nmi;
- required_device<cpu_device> m_maincpu;
- required_device<pia6821_device> m_pia;
- required_shared_ptr<uint8_t> m_p_nvram;
- virtual void machine_reset() override;
TIMER_DEVICE_CALLBACK_MEMBER(eacc_cb1);
TIMER_DEVICE_CALLBACK_MEMBER(eacc_nmi);
void eacc(machine_config &config);
void eacc_mem(address_map &map);
private:
uint8_t m_digit;
+ bool m_cb1;
+ bool m_cb2;
+ bool m_nmi;
+ virtual void machine_reset() override;
+ virtual void machine_start() override { m_digits.resolve(); }
+ required_device<cpu_device> m_maincpu;
+ required_device<pia6821_device> m_pia;
+ required_shared_ptr<uint8_t> m_p_nvram;
+ output_finder<7> m_digits;
};
@@ -221,7 +224,7 @@ WRITE8_MEMBER( eacc_state::eacc_segment_w )
{
for (i = 3; i < 7; i++)
if (BIT(m_digit, i))
- output().set_digit_value(i, bitswap<8>(data, 7, 0, 1, 4, 5, 6, 2, 3));
+ m_digits[i] = bitswap<8>(data, 7, 0, 1, 4, 5, 6, 2, 3);
}
}
}