1 // license:BSD-3-Clause 2 // copyright-holders:Mathis Rosenhauer 3 /************************************************************************* 4 5 Hole Land 6 7 *************************************************************************/ 8 #ifndef MAME_INCLUDES_HOLELAND_H 9 #define MAME_INCLUDES_HOLELAND_H 10 11 #pragma once 12 13 #include "machine/74259.h" 14 #include "emupal.h" 15 #include "tilemap.h" 16 17 class holeland_state : public driver_device 18 { 19 public: holeland_state(const machine_config & mconfig,device_type type,const char * tag)20 holeland_state(const machine_config &mconfig, device_type type, const char *tag) : 21 driver_device(mconfig, type, tag), 22 m_maincpu(*this, "maincpu"), 23 m_gfxdecode(*this, "gfxdecode"), 24 m_palette(*this, "palette"), 25 m_latch(*this, "latch"), 26 m_videoram(*this, "videoram"), 27 m_colorram(*this, "colorram"), 28 m_spriteram(*this, "spriteram") 29 { } 30 31 void crzrally(machine_config &config); 32 void holeland(machine_config &config); 33 34 private: 35 /* devices */ 36 required_device<cpu_device> m_maincpu; 37 required_device<gfxdecode_device> m_gfxdecode; 38 required_device<palette_device> m_palette; 39 required_device<ls259_device> m_latch; 40 41 /* memory pointers */ 42 required_shared_ptr<uint8_t> m_videoram; 43 required_shared_ptr<uint8_t> m_colorram; 44 required_shared_ptr<uint8_t> m_spriteram; 45 46 /* video-related */ 47 tilemap_t *m_bg_tilemap; 48 int m_palette_offset; 49 50 DECLARE_WRITE_LINE_MEMBER(coin_counter_w); 51 52 void videoram_w(offs_t offset, uint8_t data); 53 void colorram_w(offs_t offset, uint8_t data); 54 void pal_offs_w(uint8_t data); 55 void scroll_w(uint8_t data); 56 DECLARE_WRITE_LINE_MEMBER(flipscreen_x_w); 57 DECLARE_WRITE_LINE_MEMBER(flipscreen_y_w); 58 59 TILE_GET_INFO_MEMBER(holeland_get_tile_info); 60 TILE_GET_INFO_MEMBER(crzrally_get_tile_info); 61 62 DECLARE_VIDEO_START(holeland); 63 DECLARE_VIDEO_START(crzrally); 64 65 uint32_t screen_update_holeland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 66 uint32_t screen_update_crzrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 67 void holeland_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 68 void crzrally_draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ); 69 void crzrally_map(address_map &map); 70 void holeland_map(address_map &map); 71 void io_map(address_map &map); 72 }; 73 74 #endif // MAME_INCLUDES_HOLELAND_H 75