1 // license:BSD-3-Clause 2 // copyright-holders:Luca Elia 3 /************************************************************************* 4 5 Skyfox 6 7 *************************************************************************/ 8 #ifndef MAME_INCLUDES_SKYFOX_H 9 #define MAME_INCLUDES_SKYFOX_H 10 11 #pragma once 12 13 #include "machine/gen_latch.h" 14 #include "emupal.h" 15 #include "screen.h" 16 17 class skyfox_state : public driver_device 18 { 19 public: skyfox_state(const machine_config & mconfig,device_type type,const char * tag)20 skyfox_state(const machine_config &mconfig, device_type type, const char *tag) : 21 driver_device(mconfig, type, tag), 22 m_maincpu(*this, "maincpu"), 23 m_audiocpu(*this, "audiocpu"), 24 m_gfxdecode(*this, "gfxdecode"), 25 m_screen(*this, "screen"), 26 m_palette(*this, "palette"), 27 m_soundlatch(*this, "soundlatch"), 28 m_spriteram(*this, "spriteram"), 29 m_bgram(*this, "bgram") 30 { } 31 32 void skyfox(machine_config &config); 33 34 void init_skyfox(); 35 36 DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); 37 38 private: 39 /* devices/memory pointers */ 40 required_device<cpu_device> m_maincpu; 41 required_device<cpu_device> m_audiocpu; 42 required_device<gfxdecode_device> m_gfxdecode; 43 required_device<screen_device> m_screen; 44 required_device<palette_device> m_palette; 45 required_device<generic_latch_8_device> m_soundlatch; 46 required_shared_ptr<uint8_t> m_spriteram; 47 required_shared_ptr<uint8_t> m_bgram; 48 49 int m_bg_ctrl; 50 51 void output_w(offs_t offset, uint8_t data); 52 virtual void machine_start() override; 53 virtual void machine_reset() override; 54 void skyfox_palette(palette_device &palette) const; 55 uint32_t screen_update_skyfox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 56 void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 57 void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); 58 59 void skyfox_map(address_map &map); 60 void skyfox_sound_map(address_map &map); 61 }; 62 63 #endif // MAME_INCLUDES_SKYFOX_H 64