1 // license:BSD-3-Clause 2 // copyright-holders:Mirko Buffoni 3 /*************************************************************************** 4 5 Capcom Vulgus hardware 6 7 ***************************************************************************/ 8 #ifndef MAME_INCLUDES_VULGUS_H 9 #define MAME_INCLUDES_VULGUS_H 10 11 #pragma once 12 13 #include "emupal.h" 14 #include "tilemap.h" 15 16 class vulgus_state : public driver_device 17 { 18 public: vulgus_state(const machine_config & mconfig,device_type type,const char * tag)19 vulgus_state(const machine_config &mconfig, device_type type, const char *tag) : 20 driver_device(mconfig, type, tag), 21 m_maincpu(*this, "maincpu"), 22 m_audiocpu(*this, "audiocpu"), 23 m_gfxdecode(*this, "gfxdecode"), 24 m_palette(*this, "palette"), 25 m_scroll_low(*this, "scroll_low"), 26 m_scroll_high(*this, "scroll_high"), 27 m_spriteram(*this, "spriteram"), 28 m_fgvideoram(*this, "fgvideoram"), 29 m_bgvideoram(*this, "bgvideoram") 30 { } 31 32 void vulgus(machine_config &config); 33 34 private: 35 required_device<cpu_device> m_maincpu; 36 required_device<cpu_device> m_audiocpu; 37 required_device<gfxdecode_device> m_gfxdecode; 38 required_device<palette_device> m_palette; 39 40 required_shared_ptr<uint8_t> m_scroll_low; 41 required_shared_ptr<uint8_t> m_scroll_high; 42 required_shared_ptr<uint8_t> m_spriteram; 43 required_shared_ptr<uint8_t> m_fgvideoram; 44 required_shared_ptr<uint8_t> m_bgvideoram; 45 46 int m_palette_bank; 47 tilemap_t *m_fg_tilemap; 48 tilemap_t *m_bg_tilemap; 49 50 void fgvideoram_w(offs_t offset, uint8_t data); 51 void bgvideoram_w(offs_t offset, uint8_t data); 52 void c804_w(uint8_t data); 53 void palette_bank_w(uint8_t data); 54 55 TILE_GET_INFO_MEMBER(get_fg_tile_info); 56 TILE_GET_INFO_MEMBER(get_bg_tile_info); 57 58 virtual void video_start() override; 59 void vulgus_palette(palette_device &palette) const; 60 61 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 62 void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); 63 64 INTERRUPT_GEN_MEMBER(vblank_irq); 65 66 void main_map(address_map &map); 67 void sound_map(address_map &map); 68 }; 69 70 #endif // MAME_INCLUDES_VULGUS_H 71