1 // license:BSD-3-Clause 2 // copyright-holders:Richard Davies 3 /************************************************************************* 4 5 Exed Exes 6 7 *************************************************************************/ 8 #ifndef MAME_INCLUDES_EXEDEXES_H 9 #define MAME_INCLUDES_EXEDEXES_H 10 11 #pragma once 12 13 #include "machine/timer.h" 14 #include "video/bufsprite.h" 15 #include "emupal.h" 16 #include "tilemap.h" 17 18 class exedexes_state : public driver_device 19 { 20 public: exedexes_state(const machine_config & mconfig,device_type type,const char * tag)21 exedexes_state(const machine_config &mconfig, device_type type, const char *tag) : 22 driver_device(mconfig, type, tag), 23 m_spriteram(*this, "spriteram"), 24 m_videoram(*this, "videoram"), 25 m_colorram(*this, "colorram"), 26 m_nbg_yscroll(*this, "nbg_yscroll"), 27 m_nbg_xscroll(*this, "nbg_xscroll"), 28 m_bg_scroll(*this, "bg_scroll"), 29 m_tilerom(*this, "tilerom"), 30 m_maincpu(*this, "maincpu"), 31 m_gfxdecode(*this, "gfxdecode"), 32 m_palette(*this, "palette") 33 { } 34 35 void exedexes(machine_config &config); 36 37 private: 38 /* memory pointers */ 39 required_device<buffered_spriteram8_device> m_spriteram; 40 required_shared_ptr<u8> m_videoram; 41 required_shared_ptr<u8> m_colorram; 42 required_shared_ptr<u8> m_nbg_yscroll; 43 required_shared_ptr<u8> m_nbg_xscroll; 44 required_shared_ptr<u8> m_bg_scroll; 45 required_region_ptr<u8> m_tilerom; 46 47 /* video-related */ 48 tilemap_t *m_bg_tilemap; 49 tilemap_t *m_fg_tilemap; 50 tilemap_t *m_tx_tilemap; 51 int m_chon; 52 int m_objon; 53 int m_sc1on; 54 int m_sc2on; 55 56 void videoram_w(offs_t offset, u8 data); 57 void colorram_w(offs_t offset, u8 data); 58 void c804_w(u8 data); 59 void gfxctrl_w(u8 data); 60 TILE_GET_INFO_MEMBER(get_bg_tile_info); 61 TILE_GET_INFO_MEMBER(get_fg_tile_info); 62 TILE_GET_INFO_MEMBER(get_tx_tile_info); 63 TILEMAP_MAPPER_MEMBER(bg_tilemap_scan); 64 TILEMAP_MAPPER_MEMBER(fg_tilemap_scan); 65 virtual void machine_start() override; 66 virtual void machine_reset() override; 67 virtual void video_start() override; 68 void exedexes_palette(palette_device &palette) const; 69 u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 70 TIMER_DEVICE_CALLBACK_MEMBER(scanline); 71 void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 72 required_device<cpu_device> m_maincpu; 73 required_device<gfxdecode_device> m_gfxdecode; 74 required_device<palette_device> m_palette; 75 void exedexes_map(address_map &map); 76 void sound_map(address_map &map); 77 }; 78 79 #endif // MAME_INCLUDES_EXEDEXES_H 80