1 // license:BSD-3-Clause 2 // copyright-holders:Chris Hardy 3 #ifndef MAME_AUDIO_HYPROLYB_H 4 #define MAME_AUDIO_HYPROLYB_H 5 6 #pragma once 7 8 #include "machine/gen_latch.h" 9 #include "sound/msm5205.h" 10 11 class hyprolyb_adpcm_device : public device_t 12 { 13 public: 14 hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 15 16 void write(uint8_t data); 17 uint8_t busy_r(); 18 19 void msm_data_w(uint8_t data); 20 uint8_t msm_vck_r(); 21 uint8_t ready_r(); 22 uint8_t data_r(); 23 24 void vck_callback( int st ); 25 protected: 26 // device-level overrides 27 virtual void device_start() override; 28 virtual void device_reset() override; 29 30 private: 31 // internal state 32 required_device<cpu_device> m_audiocpu; 33 required_device<generic_latch_8_device> m_soundlatch2; 34 required_device<msm5205_device> m_msm; 35 uint8_t m_adpcm_ready; // only bootlegs 36 uint8_t m_adpcm_busy; 37 uint8_t m_vck_ready; 38 }; 39 40 DECLARE_DEVICE_TYPE(HYPROLYB_ADPCM, hyprolyb_adpcm_device) 41 42 #endif // MAME_AUDIO_HYPROLYB_H 43