1 // license:BSD-3-Clause 2 // copyright-holders:David Haywood 3 #ifndef MAME_INCLUDES_PASS_H 4 #define MAME_INCLUDES_PASS_H 5 6 #pragma once 7 8 #include "tilemap.h" 9 10 class pass_state : public driver_device 11 { 12 public: pass_state(const machine_config & mconfig,device_type type,const char * tag)13 pass_state(const machine_config &mconfig, device_type type, const char *tag) : 14 driver_device(mconfig, type, tag), 15 m_bg_tilemap(nullptr), 16 m_fg_tilemap(nullptr), 17 m_bg_videoram(*this, "bg_videoram"), 18 m_fg_videoram(*this, "fg_videoram"), 19 m_maincpu(*this, "maincpu"), 20 m_gfxdecode(*this, "gfxdecode") 21 { 22 } 23 24 void pass(machine_config &config); 25 26 protected: 27 virtual void video_start() override; 28 29 private: 30 void pass_bg_videoram_w(offs_t offset, uint16_t data); 31 void pass_fg_videoram_w(offs_t offset, uint16_t data); 32 TILE_GET_INFO_MEMBER(get_pass_bg_tile_info); 33 TILE_GET_INFO_MEMBER(get_pass_fg_tile_info); 34 35 uint32_t screen_update_pass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 36 37 void pass_map(address_map &map); 38 void pass_sound_io_map(address_map &map); 39 void pass_sound_map(address_map &map); 40 41 tilemap_t *m_bg_tilemap; 42 tilemap_t *m_fg_tilemap; 43 44 required_shared_ptr<uint16_t> m_bg_videoram; 45 required_shared_ptr<uint16_t> m_fg_videoram; 46 required_device<cpu_device> m_maincpu; 47 required_device<gfxdecode_device> m_gfxdecode; 48 }; 49 50 #endif // MAME_INCLUDES_PASS_H 51