// license:BSD-3-Clause // copyright-holders:Bryan McPhail /************************************************************************* decocomn.h **************************************************************************/ #ifndef MAME_VIDEO_DECOCOMN_H #define MAME_VIDEO_DECOCOMN_H #pragma once #include "emupal.h" /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ class decocomn_device : public device_t, public device_video_interface { public: decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } DECLARE_WRITE16_MEMBER( buffered_palette_w ); DECLARE_WRITE16_MEMBER( palette_dma_w ); DECLARE_WRITE16_MEMBER( priority_w ); uint16_t priority_r(); DECLARE_READ16_MEMBER( d_71_r ); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; private: // internal state std::unique_ptr m_dirty_palette; uint16_t m_priority; required_device m_palette; required_shared_ptr m_generic_paletteram_16; }; DECLARE_DEVICE_TYPE(DECOCOMN, decocomn_device) #endif // MAME_VIDEO_DECOCOMN_H