1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 #ifndef MAME_INCLUDES_SHISEN_H 4 #define MAME_INCLUDES_SHISEN_H 5 6 #pragma once 7 8 #include "audio/m72.h" 9 #include "emupal.h" 10 #include "tilemap.h" 11 12 class shisen_state : public driver_device 13 { 14 public: shisen_state(const machine_config & mconfig,device_type type,const char * tag)15 shisen_state(const machine_config &mconfig, device_type type, const char *tag) : 16 driver_device(mconfig, type, tag), 17 m_maincpu(*this, "maincpu"), 18 m_audio(*this, "m72"), 19 m_gfxdecode(*this, "gfxdecode"), 20 m_palette(*this, "palette"), 21 m_paletteram(*this, "paletteram"), 22 m_videoram(*this, "videoram") 23 { } 24 25 void shisen(machine_config &config); 26 27 private: 28 required_device<cpu_device> m_maincpu; 29 required_device<m72_audio_device> m_audio; 30 required_device<gfxdecode_device> m_gfxdecode; 31 required_device<palette_device> m_palette; 32 33 required_shared_ptr<uint8_t> m_paletteram; 34 required_shared_ptr<uint8_t> m_videoram; 35 36 int m_gfxbank; 37 tilemap_t *m_bg_tilemap; 38 39 void coin_w(uint8_t data); 40 void videoram_w(offs_t offset, uint8_t data); 41 void bankswitch_w(uint8_t data); 42 void paletteram_w(offs_t offset, uint8_t data); 43 44 TILE_GET_INFO_MEMBER(get_bg_tile_info); 45 46 virtual void video_start() override; 47 48 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 49 50 void shisen_io_map(address_map &map); 51 void shisen_map(address_map &map); 52 void shisen_sound_io_map(address_map &map); 53 void shisen_sound_map(address_map &map); 54 }; 55 56 #endif // MAME_INCLUDES_SHISEN_H 57