1 // license:BSD-3-Clause 2 // copyright-holders:Roberto Fresca, Grull Osgo 3 #ifndef MAME_INCLUDES_AMPOKER2_H 4 #define MAME_INCLUDES_AMPOKER2_H 5 6 #pragma once 7 8 #include "machine/watchdog.h" 9 #include "emupal.h" 10 #include "tilemap.h" 11 12 class ampoker2_state : public driver_device 13 { 14 public: ampoker2_state(const machine_config & mconfig,device_type type,const char * tag)15 ampoker2_state(const machine_config &mconfig, device_type type, const char *tag) : 16 driver_device(mconfig, type, tag), 17 m_videoram(*this, "videoram"), 18 m_maincpu(*this, "maincpu"), 19 m_watchdog(*this, "watchdog"), 20 m_gfxdecode(*this, "gfxdecode"), 21 m_lamps(*this, "lamp%u", 0U) 22 { } 23 24 void sigma2k(machine_config &config); 25 void ampoker2(machine_config &config); 26 27 void init_rabbitpk(); 28 29 protected: 30 virtual void video_start() override; 31 virtual void machine_start() override; 32 33 private: 34 void port30_w(uint8_t data); 35 void port31_w(uint8_t data); 36 void port32_w(uint8_t data); 37 void port33_w(uint8_t data); 38 void port34_w(uint8_t data); 39 void port35_w(uint8_t data); 40 void port36_w(uint8_t data); 41 void watchdog_reset_w(uint8_t data); 42 void videoram_w(offs_t offset, uint8_t data); 43 TILE_GET_INFO_MEMBER(get_bg_tile_info); 44 TILE_GET_INFO_MEMBER(s2k_get_bg_tile_info); 45 void ampoker2_palette(palette_device &palette) const; 46 DECLARE_VIDEO_START(sigma2k); 47 48 void io_map(address_map &map); 49 void program_map(address_map &map); 50 51 required_shared_ptr<uint8_t> m_videoram; 52 tilemap_t *m_bg_tilemap; 53 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 54 55 required_device<cpu_device> m_maincpu; 56 required_device<watchdog_timer_device> m_watchdog; 57 required_device<gfxdecode_device> m_gfxdecode; 58 output_finder<10> m_lamps; 59 }; 60 61 #endif // MAME_INCLUDES_AMPOKER2_H 62