diff options
author | 2019-03-30 18:41:11 +0100 | |
---|---|---|
committer | 2019-03-30 18:41:11 +0100 | |
commit | 322636025283c44616bd5ccc8eba66de77558e8c (patch) | |
tree | e4d9a331c2365bd24f78a0b8ab5f226b8e40be03 /src/devices/machine/k054321.h | |
parent | d040cd23422f2ca6c0c937a99508e78628949454 (diff) |
k054321: simpler to use gen_latch (nw)
Diffstat (limited to 'src/devices/machine/k054321.h')
-rw-r--r-- | src/devices/machine/k054321.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/devices/machine/k054321.h b/src/devices/machine/k054321.h index d108b6563c5..92d0874dc54 100644 --- a/src/devices/machine/k054321.h +++ b/src/devices/machine/k054321.h @@ -6,12 +6,14 @@ #pragma once +#include "machine/gen_latch.h" + class k054321_device : public device_t { public: template<typename T, typename U> - k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&left, U &&right) - : k054321_device(mconfig, tag, owner, 0) + k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&left, U &&right) : + k054321_device(mconfig, tag, owner, 0) { m_left.set_tag(std::forward<T>(left)); m_right.set_tag(std::forward<U>(right)); @@ -24,40 +26,27 @@ public: protected: void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; private: required_device<device_sound_interface> m_left; required_device<device_sound_interface> m_right; + required_device_array<generic_latch_8_device, 3> m_soundlatch; std::unique_ptr<float[]> m_left_gains; std::unique_ptr<float[]> m_right_gains; - u8 m_main1; - u8 m_main2; - u8 m_sound1; - u8 m_volume; u8 m_active; void propagate_volume(); - DECLARE_READ8_MEMBER( main1_r); - DECLARE_WRITE8_MEMBER(main1_w); - DECLARE_READ8_MEMBER( main2_r); - DECLARE_WRITE8_MEMBER(main2_w); - DECLARE_READ8_MEMBER( sound1_r); - DECLARE_WRITE8_MEMBER(sound1_w); - DECLARE_WRITE8_MEMBER(volume_reset_w); DECLARE_WRITE8_MEMBER(volume_up_w); DECLARE_WRITE8_MEMBER(active_w); DECLARE_READ8_MEMBER(busy_r); DECLARE_WRITE8_MEMBER(dummy_w); - - TIMER_CALLBACK_MEMBER(write_main1); - TIMER_CALLBACK_MEMBER(write_main2); - TIMER_CALLBACK_MEMBER(write_sound1); }; DECLARE_DEVICE_TYPE(K054321, k054321_device) |