1 // license:BSD-3-Clause
2 // copyright-holders:Nicola Salmoria
3 #ifndef MAME_INCLUDES_BOSCO_H
4 #define MAME_INCLUDES_BOSCO_H
5 
6 #pragma once
7 
8 #include "galaga.h"
9 #include "tilemap.h"
10 
11 class bosco_state : public galaga_state
12 {
13 public:
bosco_state(const machine_config & mconfig,device_type type,const char * tag)14 	bosco_state(const machine_config &mconfig, device_type type, const char *tag)
15 		: galaga_state(mconfig, type, tag)
16 		, m_bosco_radarattr(*this, "bosco_radarattr")
17 		, m_bosco_starcontrol(*this, "starcontrol")
18 	{
19 	}
20 
21 	required_shared_ptr<uint8_t> m_bosco_radarattr;
22 
23 	required_shared_ptr<uint8_t> m_bosco_starcontrol;
24 
25 	uint8_t *m_bosco_radarx;
26 	uint8_t *m_bosco_radary;
27 
28 	uint8_t m_bosco_starclr;
29 
30 	uint8_t *m_spriteram;
31 	uint8_t *m_spriteram2;
32 	uint32_t m_spriteram_size;
33 	TILEMAP_MAPPER_MEMBER(fg_tilemap_scan);
34 	TILE_GET_INFO_MEMBER(bg_get_tile_info);
35 	TILE_GET_INFO_MEMBER(fg_get_tile_info);
36 	DECLARE_VIDEO_START(bosco);
37 	void bosco_palette(palette_device &palette) const;
38 	uint32_t screen_update_bosco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
39 	DECLARE_WRITE_LINE_MEMBER(screen_vblank_bosco);
40 
41 	inline void get_tile_info_bosco(tile_data &tileinfo,int tile_index,int ram_offs);
42 	void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
43 	void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
44 	void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
45 	void bosco_videoram_w(offs_t offset, uint8_t data);
46 	void bosco_scrollx_w(uint8_t data);
47 	void bosco_scrolly_w(uint8_t data);
48 	void bosco_starclr_w(uint8_t data);
49 	void bosco(machine_config &config);
50 	void bosco_map(address_map &map);
51 };
52 
53 #endif // MAME_INCLUDES_BOSCO_H
54