1 // license:BSD-3-Clause
2 // copyright-holders:Bryan McPhail
3 /*************************************************************************
4 
5     Funky Jet
6 
7 *************************************************************************/
8 
9 #include "cpu/h6280/h6280.h"
10 #include "video/decospr.h"
11 #include "video/deco16ic.h"
12 #include "machine/deco146.h"
13 
14 
15 class funkyjet_state : public driver_device
16 {
17 public:
funkyjet_state(const machine_config & mconfig,device_type type,const char * tag)18 	funkyjet_state(const machine_config &mconfig, device_type type, const char *tag)
19 		: driver_device(mconfig, type, tag)
20 		, m_spriteram(*this, "spriteram")
21 		, m_pf_rowscroll(*this, "pf%u_rowscroll", 1)
22 		, m_maincpu(*this, "maincpu")
23 		, m_audiocpu(*this, "audiocpu")
24 		, m_deco146(*this, "ioprot")
25 		, m_sprgen(*this, "spritegen")
26 		, m_deco_tilegen(*this, "tilegen")
27 	{ }
28 
29 	void funkyjet(machine_config &config);
30 
31 	void init_funkyjet();
32 
33 private:
34 	/* memory pointers */
35 	required_shared_ptr<uint16_t> m_spriteram;
36 	required_shared_ptr_array<uint16_t, 2> m_pf_rowscroll;
37 
38 	/* devices */
39 	required_device<cpu_device> m_maincpu;
40 	required_device<h6280_device> m_audiocpu;
41 	required_device<deco146_device> m_deco146;
42 	required_device<decospr_device> m_sprgen;
43 	required_device<deco16ic_device> m_deco_tilegen;
44 
45 	uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
46 
47 	uint16_t funkyjet_protection_region_0_146_r(offs_t offset);
48 	void funkyjet_protection_region_0_146_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
49 	void funkyjet_map(address_map &map);
50 	void sound_map(address_map &map);
51 };
52