1 // license:BSD-3-Clause
2 // copyright-holders:Allard van der Bas
3 #ifndef MAME_INCLUDES_WIPING_H
4 #define MAME_INCLUDES_WIPING_H
5 
6 #pragma once
7 
8 #include "emupal.h"
9 
10 class wiping_state : public driver_device
11 {
12 public:
wiping_state(const machine_config & mconfig,device_type type,const char * tag)13 	wiping_state(const machine_config &mconfig, device_type type, const char *tag) :
14 		driver_device(mconfig, type, tag),
15 		m_maincpu(*this, "maincpu"),
16 		m_audiocpu(*this, "audiocpu"),
17 		m_gfxdecode(*this, "gfxdecode"),
18 		m_palette(*this, "palette"),
19 		m_videoram(*this, "videoram"),
20 		m_colorram(*this, "colorram"),
21 		m_spriteram(*this, "spriteram")
22 	{ }
23 
24 	void wiping(machine_config &config);
25 
26 private:
27 	required_device<cpu_device> m_maincpu;
28 	required_device<cpu_device> m_audiocpu;
29 	required_device<gfxdecode_device> m_gfxdecode;
30 	required_device<palette_device> m_palette;
31 
32 	required_shared_ptr<uint8_t> m_videoram;
33 	required_shared_ptr<uint8_t> m_colorram;
34 	required_shared_ptr<uint8_t> m_spriteram;
35 
36 	int m_flipscreen;
37 	uint8_t *m_soundregs;  // if 0-ed
38 	uint8_t m_main_irq_mask;
39 	uint8_t m_sound_irq_mask;
40 
41 	uint8_t ports_r(offs_t offset);
42 	DECLARE_WRITE_LINE_MEMBER(main_irq_mask_w);
43 	DECLARE_WRITE_LINE_MEMBER(sound_irq_mask_w);
44 	DECLARE_WRITE_LINE_MEMBER(flipscreen_w);
45 
46 	void wiping_palette(palette_device &palette) const;
47 	virtual void machine_start() override;
48 
49 	uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
50 
51 	INTERRUPT_GEN_MEMBER(vblank_irq);
52 	INTERRUPT_GEN_MEMBER(sound_timer_irq);
53 
54 	void main_map(address_map &map);
55 	void sound_map(address_map &map);
56 };
57 
58 #endif // MAME_INCLUDES_WIPING_H
59