diff options
Diffstat (limited to 'src/mame/audio/midway.h')
-rw-r--r-- | src/mame/audio/midway.h | 70 |
1 files changed, 59 insertions, 11 deletions
diff --git a/src/mame/audio/midway.h b/src/mame/audio/midway.h index bd327926ebe..3367f409866 100644 --- a/src/mame/audio/midway.h +++ b/src/mame/audio/midway.h @@ -21,6 +21,7 @@ #include "sound/tms5220.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/hc55516.h" //************************************************************************** @@ -28,6 +29,7 @@ //************************************************************************** DECLARE_DEVICE_TYPE(BALLY_AS3022, bally_as3022_device) +DECLARE_DEVICE_TYPE(BALLY_SOUNDS_PLUS, bally_sounds_plus_device) DECLARE_DEVICE_TYPE(MIDWAY_SSIO, midway_ssio_device) DECLARE_DEVICE_TYPE(MIDWAY_SOUNDS_GOOD, midway_sounds_good_device) DECLARE_DEVICE_TYPE(MIDWAY_TURBO_CHEAP_SQUEAK, midway_turbo_cheap_squeak_device) @@ -41,42 +43,65 @@ DECLARE_DEVICE_TYPE(MIDWAY_SQUAWK_N_TALK, midway_squawk_n_talk_device) // ======================> bally_as3022_device -class bally_as3022_device : public device_t, - public device_mixer_interface +class bally_as3022_device : public device_t, public device_mixer_interface { public: - // construction/destruction - bally_as3022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 3'579'545); + bally_as3022_device( + const machine_config &mconfig, + const char *tag, + device_t *owner, + uint32_t clock = 3'579'545) : + bally_as3022_device(mconfig, BALLY_AS3022, tag, owner, clock) + { } // read/write + DECLARE_INPUT_CHANGED_MEMBER(sw1); DECLARE_WRITE8_MEMBER(sound_select); DECLARE_WRITE_LINE_MEMBER(sound_int); void as3022_map(address_map &map); protected: + bally_as3022_device( + const machine_config &mconfig, + device_type type, + const char *tag, + device_t *owner, + uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia(*this, "pia"), + m_ay(*this, "ay"), + m_mc3417(*this, "mc3417") + { } + // device-level overrides virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; - -private: - bool m_bc1; - bool m_bdir; - uint8 m_sound_select; - uint8 m_ay_data; + virtual ioport_constructor device_input_ports() const override; // devices // The schematics list an optional 555, but it never seemed to be used required_device<m6808_cpu_device> m_cpu; required_device<pia6821_device> m_pia; required_device<ay8910_device> m_ay; + optional_device<mc3417_device> m_mc3417; + + // overwridden by children + DECLARE_WRITE8_MEMBER(pia_portb_w); + +private: + bool m_bc1; + bool m_bdir; + uint8 m_sound_select; + uint8 m_ay_data; // internal communications TIMER_CALLBACK_MEMBER(sound_select_sync); TIMER_CALLBACK_MEMBER(sound_int_sync); DECLARE_READ8_MEMBER(pia_porta_r); DECLARE_WRITE8_MEMBER(pia_porta_w); - DECLARE_WRITE8_MEMBER(pia_portb_w); DECLARE_WRITE_LINE_MEMBER(pia_cb2_w); DECLARE_WRITE_LINE_MEMBER(irq_w); DECLARE_READ8_MEMBER(ay_io_r); @@ -84,6 +109,29 @@ private: void update_sound_selects(); }; +// ======================> bally_sounds_plus_device +class bally_sounds_plus_device : public bally_as3022_device +{ +public: + bally_sounds_plus_device( + const machine_config &mconfig, + const char *tag, + device_t *owner, + uint32_t clock = 3'579'545) : + bally_as3022_device(mconfig, BALLY_SOUNDS_PLUS, tag, owner, clock) + { } + + void sounds_plus_map(address_map &map); + +protected: + // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; + +private: + // internal communications + DECLARE_WRITE8_MEMBER(vocalizer_pia_portb_w); +}; + // ======================> midway_ssio_device class midway_ssio_device : public device_t, |