1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 /*************************************************************************** 4 5 Blue Print 6 7 ***************************************************************************/ 8 #ifndef MAME_INCLUDES_BLUEPRNT_H 9 #define MAME_INCLUDES_BLUEPRNT_H 10 11 #pragma once 12 13 #include "machine/gen_latch.h" 14 #include "emupal.h" 15 #include "tilemap.h" 16 17 class blueprnt_state : public driver_device 18 { 19 public: blueprnt_state(const machine_config & mconfig,device_type type,const char * tag)20 blueprnt_state(const machine_config &mconfig, device_type type, const char *tag) : 21 driver_device(mconfig, type, tag), 22 m_maincpu(*this, "maincpu"), 23 m_audiocpu(*this, "audiocpu"), 24 m_gfxdecode(*this, "gfxdecode"), 25 m_palette(*this, "palette"), 26 m_soundlatch(*this, "soundlatch"), 27 m_videoram(*this, "videoram"), 28 m_scrollram(*this, "scrollram"), 29 m_spriteram(*this, "spriteram"), 30 m_colorram(*this, "colorram") 31 { } 32 33 /* device/memory pointers */ 34 required_device<cpu_device> m_maincpu; 35 required_device<cpu_device> m_audiocpu; 36 required_device<gfxdecode_device> m_gfxdecode; 37 required_device<palette_device> m_palette; 38 required_device<generic_latch_8_device> m_soundlatch; 39 required_shared_ptr<uint8_t> m_videoram; 40 required_shared_ptr<uint8_t> m_scrollram; 41 required_shared_ptr<uint8_t> m_spriteram; 42 required_shared_ptr<uint8_t> m_colorram; 43 44 /* video-related */ 45 tilemap_t *m_bg_tilemap; 46 int m_gfx_bank; 47 48 /* misc */ 49 int m_dipsw; 50 51 uint8_t blueprnt_sh_dipsw_r(); 52 uint8_t grasspin_sh_dipsw_r(); 53 void blueprnt_sound_command_w(uint8_t data); 54 void blueprnt_coin_counter_w(uint8_t data); 55 void blueprnt_videoram_w(offs_t offset, uint8_t data); 56 void blueprnt_colorram_w(offs_t offset, uint8_t data); 57 void blueprnt_flipscreen_w(uint8_t data); 58 void dipsw_w(uint8_t data); 59 TILE_GET_INFO_MEMBER(get_bg_tile_info); 60 virtual void machine_start() override; 61 virtual void machine_reset() override; 62 DECLARE_VIDEO_START(blueprnt); 63 void blueprnt_palette(palette_device &palette) const; 64 uint32_t screen_update_blueprnt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 65 void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 66 void blueprnt(machine_config &config); 67 void grasspin(machine_config &config); 68 void blueprnt_map(address_map &map); 69 void grasspin_map(address_map &map); 70 void sound_io(address_map &map); 71 void sound_map(address_map &map); 72 }; 73 74 #endif // MAME_INCLUDES_BLUEPRNT_H 75