1 // license:BSD-3-Clause 2 // copyright-holders:Zsolt Vasvari 3 #ifndef MAME_INCLUDES_GOTYA_H 4 #define MAME_INCLUDES_GOTYA_H 5 6 #pragma once 7 8 #include "sound/samples.h" 9 #include "emupal.h" 10 #include "tilemap.h" 11 12 class gotya_state : public driver_device 13 { 14 public: gotya_state(const machine_config & mconfig,device_type type,const char * tag)15 gotya_state(const machine_config &mconfig, device_type type, const char *tag) : 16 driver_device(mconfig, type, tag), 17 m_scroll(*this, "scroll"), 18 m_videoram(*this, "videoram"), 19 m_colorram(*this, "colorram"), 20 m_videoram2(*this, "videoram2"), 21 m_spriteram(*this, "spriteram"), 22 m_samples(*this, "samples"), 23 m_maincpu(*this, "maincpu"), 24 m_gfxdecode(*this, "gfxdecode"), 25 m_palette(*this, "palette") 26 { } 27 28 void gotya(machine_config &config); 29 30 private: 31 /* memory pointers */ 32 required_shared_ptr<uint8_t> m_scroll; 33 required_shared_ptr<uint8_t> m_videoram; 34 required_shared_ptr<uint8_t> m_colorram; 35 required_shared_ptr<uint8_t> m_videoram2; 36 required_shared_ptr<uint8_t> m_spriteram; 37 38 /* video-related */ 39 tilemap_t *m_bg_tilemap; 40 int m_scroll_bit_8; 41 42 /* sound-related */ 43 int m_theme_playing; 44 45 /* devices */ 46 required_device<samples_device> m_samples; 47 void gotya_videoram_w(offs_t offset, uint8_t data); 48 void gotya_colorram_w(offs_t offset, uint8_t data); 49 void gotya_video_control_w(uint8_t data); 50 void gotya_soundlatch_w(uint8_t data); 51 TILE_GET_INFO_MEMBER(get_bg_tile_info); 52 TILEMAP_MAPPER_MEMBER(tilemap_scan_rows_thehand); 53 virtual void machine_start() override; 54 virtual void machine_reset() override; 55 virtual void video_start() override; 56 void gotya_palette(palette_device &palette) const; 57 uint32_t screen_update_gotya(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 58 void draw_status_row( bitmap_ind16 &bitmap, const rectangle &cliprect, int sx, int col ); 59 void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 60 void draw_status( bitmap_ind16 &bitmap, const rectangle &cliprect ); 61 required_device<cpu_device> m_maincpu; 62 required_device<gfxdecode_device> m_gfxdecode; 63 required_device<palette_device> m_palette; 64 void gotya_map(address_map &map); 65 }; 66 67 #endif // MAME_INCLUDES_GOTYA_H 68