summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/marywu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/marywu.cpp')
-rw-r--r--src/mame/drivers/marywu.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp
index 4275714fb5d..5212016a953 100644
--- a/src/mame/drivers/marywu.cpp
+++ b/src/mame/drivers/marywu.cpp
@@ -29,6 +29,7 @@ class marywu_state : public driver_device
public:
marywu_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
+ , m_digits(*this, "digit%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(display_7seg_data_w);
@@ -43,6 +44,8 @@ public:
void program_map(address_map &map);
private:
uint8_t m_selected_7seg_module;
+ virtual void machine_start() override;
+ output_finder<32> m_digits;
};
static INPUT_PORTS_START( marywu )
@@ -153,8 +156,8 @@ WRITE8_MEMBER( marywu_state::display_7seg_data_w )
{
static const uint8_t patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // HEF4511BP (7 seg display driver)
- output().set_digit_value(2 * m_selected_7seg_module + 0, patterns[data & 0x0F]);
- output().set_digit_value(2 * m_selected_7seg_module + 1, patterns[(data >> 4) & 0x0F]);
+ m_digits[2 * m_selected_7seg_module + 0] = patterns[data & 0x0F];
+ m_digits[2 * m_selected_7seg_module + 1] = patterns[data >> 4];
}
void marywu_state::program_map(address_map &map)
@@ -173,6 +176,11 @@ void marywu_state::io_map(address_map &map)
map(0xf000, 0xf000).noprw(); /* TODO: Investigate this. There's something going on at this address range. */
}
+void marywu_state::machine_start()
+{
+ m_digits.resolve();
+}
+
MACHINE_CONFIG_START(marywu_state::marywu)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I80C31, XTAL(10'738'635)) //actual CPU is a Winbond w78c31b-24