1 // license:BSD-3-Clause 2 // copyright-holders:Ville Linde 3 /********************************************************* 4 5 Konami 056800 MIRAC sound interface 6 7 *********************************************************/ 8 9 #ifndef MAME_SOUND_K056800_H 10 #define MAME_SOUND_K056800_H 11 12 13 /*************************************************************************** 14 TYPE DEFINITIONS 15 ***************************************************************************/ 16 17 class k056800_device : public device_t 18 { 19 public: 20 // construction/destruction 21 k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 22 23 // configuration helpers int_callback()24 auto int_callback() { return m_int_handler.bind(); } 25 26 uint8_t host_r(offs_t offset); 27 void host_w(offs_t offset, uint8_t data); 28 uint8_t sound_r(offs_t offset); 29 void sound_w(offs_t offset, uint8_t data); 30 31 protected: 32 // device-level overrides 33 virtual void device_start() override; 34 virtual void device_reset() override; 35 36 private: 37 // internal state 38 bool m_int_pending; 39 bool m_int_enabled; 40 uint8_t m_host_to_snd_regs[4]; 41 uint8_t m_snd_to_host_regs[2]; 42 43 devcb_write_line m_int_handler; 44 }; 45 46 DECLARE_DEVICE_TYPE(K056800, k056800_device) 47 48 #endif // MAME_SOUND_K056800_H 49