1 // license:BSD-3-Clause
2 // copyright-holders:Zsolt Vasvari
3 #ifndef MAME_INCLUDES_FUNKYBEE_H
4 #define MAME_INCLUDES_FUNKYBEE_H
5 
6 #pragma once
7 
8 #include "machine/watchdog.h"
9 #include "emupal.h"
10 #include "tilemap.h"
11 
12 
13 class funkybee_state : public driver_device
14 {
15 public:
funkybee_state(const machine_config & mconfig,device_type type,const char * tag)16 	funkybee_state(const machine_config &mconfig, device_type type, const char *tag) :
17 		driver_device(mconfig, type, tag),
18 		m_videoram(*this, "videoram"),
19 		m_colorram(*this, "colorram"),
20 		m_maincpu(*this, "maincpu"),
21 		m_watchdog(*this, "watchdog"),
22 		m_gfxdecode(*this, "gfxdecode"),
23 		m_palette(*this, "palette")
24 	{ }
25 
26 	void funkybee(machine_config &config);
27 
28 private:
29 	/* memory pointers */
30 	required_shared_ptr<uint8_t> m_videoram;
31 	required_shared_ptr<uint8_t> m_colorram;
32 
33 	/* video-related */
34 	tilemap_t    *m_bg_tilemap;
35 	int        m_gfx_bank;
36 	uint8_t funkybee_input_port_0_r();
37 	DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w);
38 	DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w);
39 	void funkybee_videoram_w(offs_t offset, uint8_t data);
40 	void funkybee_colorram_w(offs_t offset, uint8_t data);
41 	DECLARE_WRITE_LINE_MEMBER(gfx_bank_w);
42 	void funkybee_scroll_w(uint8_t data);
43 	DECLARE_WRITE_LINE_MEMBER(flipscreen_w);
44 	TILE_GET_INFO_MEMBER(get_bg_tile_info);
45 	TILEMAP_MAPPER_MEMBER(funkybee_tilemap_scan);
46 	virtual void machine_start() override;
47 	virtual void video_start() override;
48 	void funkybee_palette(palette_device &palette) const;
49 	uint32_t screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
50 	void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
51 	void draw_columns( bitmap_ind16 &bitmap, const rectangle &cliprect );
52 	required_device<cpu_device> m_maincpu;
53 	required_device<watchdog_timer_device> m_watchdog;
54 	required_device<gfxdecode_device> m_gfxdecode;
55 	required_device<palette_device> m_palette;
56 	void funkybee_map(address_map &map);
57 	void io_map(address_map &map);
58 };
59 
60 #endif // MAME_INCLUDES_FUNKYBEE_H
61