1 // license:BSD-3-Clause 2 // copyright-holders:Tomasz Slanina 3 4 /************************************************************************* 5 6 Kusayakyuu 7 8 *************************************************************************/ 9 #ifndef MAME_INCLUDES_KSAYAKYU_H 10 #define MAME_INCLUDES_KSAYAKYU_H 11 12 #pragma once 13 14 #include "machine/gen_latch.h" 15 #include "emupal.h" 16 #include "tilemap.h" 17 18 class ksayakyu_state : public driver_device 19 { 20 public: ksayakyu_state(const machine_config & mconfig,device_type type,const char * tag)21 ksayakyu_state(const machine_config &mconfig, device_type type, const char *tag) : 22 driver_device(mconfig, type, tag), 23 m_videoram(*this, "videoram"), 24 m_spriteram(*this, "spriteram"), 25 m_maincpu(*this, "maincpu"), 26 m_gfxdecode(*this, "gfxdecode"), 27 m_palette(*this, "palette"), 28 m_soundlatch(*this, "soundlatch") 29 { } 30 31 void ksayakyu(machine_config &config); 32 33 protected: 34 virtual void machine_start() override; 35 virtual void machine_reset() override; 36 virtual void video_start() override; 37 38 private: 39 /* memory pointers */ 40 required_shared_ptr<uint8_t> m_videoram; 41 required_shared_ptr<uint8_t> m_spriteram; 42 43 /* video-related */ 44 tilemap_t *m_tilemap; 45 tilemap_t *m_textmap; 46 int m_video_ctrl; 47 int m_flipscreen; 48 49 /* misc */ 50 int m_sound_status; 51 void bank_select_w(uint8_t data); 52 void latch_w(uint8_t data); 53 uint8_t sound_status_r(); 54 void tomaincpu_w(uint8_t data); 55 uint8_t int_ack_r(); 56 void ksayakyu_videoram_w(offs_t offset, uint8_t data); 57 void ksayakyu_videoctrl_w(uint8_t data); 58 void dummy1_w(uint8_t data); 59 void dummy2_w(uint8_t data); 60 void dummy3_w(uint8_t data); 61 TILE_GET_INFO_MEMBER(get_ksayakyu_tile_info); 62 TILE_GET_INFO_MEMBER(get_text_tile_info); 63 void ksayakyu_palette(palette_device &palette) const; 64 uint32_t screen_update_ksayakyu(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 65 void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 66 required_device<cpu_device> m_maincpu; 67 required_device<gfxdecode_device> m_gfxdecode; 68 required_device<palette_device> m_palette; 69 required_device<generic_latch_8_device> m_soundlatch; 70 void maincpu_map(address_map &map); 71 void soundcpu_map(address_map &map); 72 }; 73 74 #endif // MAME_INCLUDES_KSAYAKYU_H 75