1 // license:BSD-3-Clause 2 // copyright-holders:Takahiro Nogi 3 #ifndef MAME_INCLUDES_SSOZUMO_H 4 #define MAME_INCLUDES_SSOZUMO_H 5 6 #pragma once 7 8 #include "emupal.h" 9 #include "tilemap.h" 10 11 class ssozumo_state : public driver_device 12 { 13 public: ssozumo_state(const machine_config & mconfig,device_type type,const char * tag)14 ssozumo_state(const machine_config &mconfig, device_type type, const char *tag) : 15 driver_device(mconfig, type, tag), 16 m_maincpu(*this, "maincpu"), 17 m_audiocpu(*this, "audiocpu"), 18 m_gfxdecode(*this, "gfxdecode"), 19 m_palette(*this, "palette"), 20 m_spriteram(*this, "spriteram"), 21 m_paletteram(*this, "paletteram"), 22 m_videoram(*this, "videoram"), 23 m_colorram(*this, "colorram"), 24 m_videoram2(*this, "videoram2"), 25 m_colorram2(*this, "colorram2") 26 { } 27 28 void ssozumo(machine_config &config); 29 30 DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); 31 32 protected: 33 virtual void machine_start() override; 34 virtual void video_start() override; 35 36 private: 37 void sound_nmi_mask_w(uint8_t data); 38 void videoram_w(offs_t offset, uint8_t data); 39 void colorram_w(offs_t offset, uint8_t data); 40 void videoram2_w(offs_t offset, uint8_t data); 41 void colorram2_w(offs_t offset, uint8_t data); 42 void paletteram_w(offs_t offset, uint8_t data); 43 void scroll_w(uint8_t data); 44 void flipscreen_w(uint8_t data); 45 46 INTERRUPT_GEN_MEMBER(sound_timer_irq); 47 48 TILE_GET_INFO_MEMBER(get_bg_tile_info); 49 TILE_GET_INFO_MEMBER(get_fg_tile_info); 50 51 void ssozumo_palette(palette_device &palette) const; 52 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 53 54 void ssozumo_map(address_map &map); 55 void ssozumo_sound_map(address_map &map); 56 57 required_device<cpu_device> m_maincpu; 58 required_device<cpu_device> m_audiocpu; 59 required_device<gfxdecode_device> m_gfxdecode; 60 required_device<palette_device> m_palette; 61 62 required_shared_ptr<uint8_t> m_spriteram; 63 required_shared_ptr<uint8_t> m_paletteram; 64 required_shared_ptr<uint8_t> m_videoram; 65 required_shared_ptr<uint8_t> m_colorram; 66 required_shared_ptr<uint8_t> m_videoram2; 67 required_shared_ptr<uint8_t> m_colorram2; 68 69 tilemap_t *m_bg_tilemap; 70 tilemap_t *m_fg_tilemap; 71 uint8_t m_sound_nmi_mask; 72 uint8_t m_color_bank; 73 74 void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); 75 }; 76 77 #endif // MAME_INCLUDES_SSOZUMO_H 78