1 // license:BSD-3-Clause 2 // copyright-holders:Jarek Parchanski 3 #ifndef MAME_INCLUDES_PINGPONG_H 4 #define MAME_INCLUDES_PINGPONG_H 5 6 #pragma once 7 8 #include "machine/timer.h" 9 #include "emupal.h" 10 #include "tilemap.h" 11 12 class pingpong_state : public driver_device 13 { 14 public: pingpong_state(const machine_config & mconfig,device_type type,const char * tag)15 pingpong_state(const machine_config &mconfig, device_type type, const char *tag) : 16 driver_device(mconfig, type, tag), 17 m_maincpu(*this,"maincpu"), 18 m_colorram(*this, "colorram"), 19 m_videoram(*this, "videoram"), 20 m_spriteram(*this, "spriteram"), 21 m_gfxdecode(*this, "gfxdecode"), 22 m_palette(*this, "palette") 23 { } 24 25 int m_intenable; 26 int m_question_addr_high; 27 required_device<cpu_device> m_maincpu; 28 required_shared_ptr<uint8_t> m_colorram; 29 required_shared_ptr<uint8_t> m_videoram; 30 required_shared_ptr<uint8_t> m_spriteram; 31 required_device<gfxdecode_device> m_gfxdecode; 32 required_device<palette_device> m_palette; 33 tilemap_t *m_bg_tilemap; 34 35 void cashquiz_question_bank_high_w(uint8_t data); 36 void cashquiz_question_bank_low_w(uint8_t data); 37 void coin_w(uint8_t data); 38 void pingpong_videoram_w(offs_t offset, uint8_t data); 39 void pingpong_colorram_w(offs_t offset, uint8_t data); 40 void init_cashquiz(); 41 void init_merlinmm(); 42 TILE_GET_INFO_MEMBER(get_bg_tile_info); 43 virtual void video_start() override; 44 void pingpong_palette(palette_device &palette) const; 45 uint32_t screen_update_pingpong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 46 TIMER_DEVICE_CALLBACK_MEMBER(pingpong_interrupt); 47 TIMER_DEVICE_CALLBACK_MEMBER(merlinmm_interrupt); 48 void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); 49 void merlinmm(machine_config &config); 50 void pingpong(machine_config &config); 51 void merlinmm_map(address_map &map); 52 void pingpong_map(address_map &map); 53 }; 54 55 #endif // MAME_INCLUDES_PINGPONG_H 56