1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 #ifndef MAME_INCLUDES_GALPANIC_H 4 #define MAME_INCLUDES_GALPANIC_H 5 6 #pragma once 7 8 #include "machine/timer.h" 9 #include "video/kan_pand.h" 10 #include "emupal.h" 11 #include "screen.h" 12 13 class galpanic_state : public driver_device 14 { 15 public: galpanic_state(const machine_config & mconfig,device_type type,const char * tag)16 galpanic_state(const machine_config &mconfig, device_type type, const char *tag) 17 : driver_device(mconfig, type, tag) 18 , m_maincpu(*this, "maincpu") 19 , m_bgvideoram(*this, "bgvideoram") 20 , m_fgvideoram(*this, "fgvideoram") 21 , m_gfxdecode(*this, "gfxdecode") 22 , m_screen(*this, "screen") 23 , m_palette(*this, "palette") 24 , m_pandora(*this, "pandora") 25 { } 26 27 void galpanica(machine_config &config); 28 void galpanic(machine_config &config); 29 30 private: 31 required_device<cpu_device> m_maincpu; 32 required_shared_ptr<uint16_t> m_bgvideoram; 33 required_shared_ptr<uint16_t> m_fgvideoram; 34 required_device<gfxdecode_device> m_gfxdecode; 35 required_device<screen_device> m_screen; 36 required_device<palette_device> m_palette; 37 required_device<kaneko_pandora_device> m_pandora; 38 39 bitmap_ind16 m_bitmap; 40 41 void m6295_bankswitch_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 42 void coin_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 43 void bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 44 45 virtual void machine_start() override; 46 virtual void video_start() override; 47 void galpanic_palette(palette_device &palette) const; 48 49 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 50 DECLARE_WRITE_LINE_MEMBER(screen_vblank); 51 TIMER_DEVICE_CALLBACK_MEMBER(scanline); 52 void draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); 53 54 void galpanic_map(address_map &map); 55 void galpanic_oki_map(address_map &map); 56 void galpanica_map(address_map &map); 57 }; 58 59 #endif // MAME_INCLUDES_GALPANIC_H 60