1 // license:BSD-3-Clause
2 // copyright-holders:Aaron Giles, Phil Bennett
3 /*************************************************************************
4 
5     Atari Cyberstorm hardware
6 
7 *************************************************************************/
8 #ifndef MAME_INCLUDES_CYBSTORM_H
9 #define MAME_INCLUDES_CYBSTORM_H
10 
11 #pragma once
12 
13 #include "audio/atarijsa.h"
14 #include "machine/bankdev.h"
15 #include "video/atarivad.h"
16 #include "screen.h"
17 #include "tilemap.h"
18 
19 
20 class cybstorm_state : public driver_device
21 {
22 public:
cybstorm_state(const machine_config & mconfig,device_type type,const char * tag)23 	cybstorm_state(const machine_config &mconfig, device_type type, const char *tag)
24 		: driver_device(mconfig, type, tag)
25 		, m_maincpu(*this, "maincpu")
26 		, m_jsa(*this, "jsa")
27 		, m_vad(*this, "vad")
28 		, m_vadbank(*this, "vadbank")
29 		, m_screen(*this, "screen")
30 		, m_gfxdecode(*this, "gfxdecode")
31 	{ }
32 
33 	void init_cybstorm();
34 	void cybstorm(machine_config &config);
35 
36 protected:
37 	virtual void machine_start() override;
38 	virtual void video_start() override;
39 
40 	uint32_t special_port1_r();
41 	void latch_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
42 
43 	TILE_GET_INFO_MEMBER(get_alpha_tile_info);
44 	TILE_GET_INFO_MEMBER(get_playfield_tile_info);
45 	TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
46 	TILEMAP_MAPPER_MEMBER(playfield_scan);
47 
48 	uint32_t screen_update_cybstorm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
49 
50 	void round2(machine_config &config);
51 	void main_map(address_map &map);
52 	void vadbank_map(address_map &map);
53 
54 private:
55 	required_device<cpu_device> m_maincpu;
56 	optional_device<atari_jsa_iiis_device> m_jsa;
57 	required_device<atari_vad_device> m_vad;
58 	required_device<address_map_bank_device> m_vadbank;
59 	required_device<screen_device> m_screen;
60 	required_device<gfxdecode_device> m_gfxdecode;
61 
62 	uint32_t m_latch_data;
63 	uint8_t m_alpha_tile_bank;
64 
65 	static const atari_motion_objects_config s_mob_config;
66 };
67 
68 #endif // MAME_INCLUDES_CYBSTORM_H
69