1 // license:BSD-3-Clause 2 // copyright-holders:Chris Hardy 3 #ifndef MAME_INCLUDES_ROCNROPE_H 4 #define MAME_INCLUDES_ROCNROPE_H 5 6 #pragma once 7 8 #include "emupal.h" 9 #include "tilemap.h" 10 11 class rocnrope_state : public driver_device 12 { 13 public: rocnrope_state(const machine_config & mconfig,device_type type,const char * tag)14 rocnrope_state(const machine_config &mconfig, device_type type, const char *tag) : 15 driver_device(mconfig, type, tag), 16 m_maincpu(*this, "maincpu"), 17 m_gfxdecode(*this, "gfxdecode"), 18 m_palette(*this, "palette"), 19 m_spriteram2(*this, "spriteram2"), 20 m_spriteram(*this, "spriteram"), 21 m_colorram(*this, "colorram"), 22 m_videoram(*this, "videoram") 23 { } 24 25 void rocnrope(machine_config &config); 26 27 void init_rocnrope(); 28 29 private: 30 // devices 31 required_device<cpu_device> m_maincpu; 32 required_device<gfxdecode_device> m_gfxdecode; 33 required_device<palette_device> m_palette; 34 35 // memory pointers 36 required_shared_ptr<uint8_t> m_spriteram2; 37 required_shared_ptr<uint8_t> m_spriteram; 38 required_shared_ptr<uint8_t> m_colorram; 39 required_shared_ptr<uint8_t> m_videoram; 40 41 tilemap_t *m_bg_tilemap; 42 uint8_t m_irq_mask; 43 44 void rocnrope_interrupt_vector_w(offs_t offset, uint8_t data); 45 DECLARE_WRITE_LINE_MEMBER(irq_mask_w); 46 DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); 47 DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); 48 void rocnrope_videoram_w(offs_t offset, uint8_t data); 49 void rocnrope_colorram_w(offs_t offset, uint8_t data); 50 DECLARE_WRITE_LINE_MEMBER(flip_screen_w); 51 52 TILE_GET_INFO_MEMBER(get_bg_tile_info); 53 virtual void video_start() override; 54 void rocnrope_palette(palette_device &palette) const; 55 uint32_t screen_update_rocnrope(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 56 DECLARE_WRITE_LINE_MEMBER(vblank_irq); 57 void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); 58 void rocnrope_map(address_map &map); 59 }; 60 61 #endif // MAME_INCLUDES_ROCNROPE_H 62