1 // license:BSD-3-Clause
2 // copyright-holders:Mike Coates, Pierpaolo Prazzoli
3 /***************************************************************************
4 
5     Zaccaria Quasar
6 
7 ****************************************************************************/
8 #ifndef MAME_INCLUDES_QUASAR_H
9 #define MAME_INCLUDES_QUASAR_H
10 
11 #pragma once
12 
13 #include "includes/cvs.h"
14 
15 class quasar_state : public cvs_state
16 {
17 public:
quasar_state(const machine_config & mconfig,device_type type,const char * tag)18 	quasar_state(const machine_config &mconfig, device_type type, const char *tag)
19 		: cvs_state(mconfig, type, tag)
20 	{ }
21 
22 	void quasar(machine_config &config);
23 
24 protected:
25 	virtual void machine_start() override;
26 	virtual void machine_reset() override;
27 	virtual void video_start() override;
28 
29 private:
30 	void video_page_select_w(offs_t offset, uint8_t data);
31 	void io_page_select_w(offs_t offset, uint8_t data);
32 	void quasar_video_w(offs_t offset, uint8_t data);
33 	uint8_t quasar_IO_r();
34 	void quasar_bullet_w(offs_t offset, uint8_t data);
35 	void quasar_sh_command_w(uint8_t data);
36 	uint8_t quasar_sh_command_r();
37 	DECLARE_READ_LINE_MEMBER(audio_t1_r);
38 	void quasar_palette(palette_device &palette) const;
39 	uint32_t screen_update_quasar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
40 	INTERRUPT_GEN_MEMBER(quasar_interrupt);
41 
42 	void quasar_program(address_map &map);
43 	void quasar_data(address_map &map);
44 	void quasar_io(address_map &map);
45 	void sound_map(address_map &map);
46 	void sound_portmap(address_map &map);
47 
48 	std::unique_ptr<uint8_t[]>    m_effectram;
49 	uint8_t      m_effectcontrol;
50 	uint8_t      m_page;
51 	uint8_t      m_io_page;
52 };
53 
54 #endif // MAME_INCLUDES_QUASAR_H
55