1 // license: BSD-3-Clause
2 // copyright-holders: Bryan McPhail, David Haywood, Dirk Best
3 /***************************************************************************
4 
5     Super Burger Time
6 
7 ***************************************************************************/
8 
9 #ifndef MAME_INCLUDES_SUPBTIME_H
10 #define MAME_INCLUDES_SUPBTIME_H
11 
12 #include "cpu/m68000/m68000.h"
13 #include "cpu/h6280/h6280.h"
14 #include "machine/decocrpt.h"
15 #include "machine/gen_latch.h"
16 #include "video/decospr.h"
17 #include "video/deco16ic.h"
18 #include "sound/ym2151.h"
19 #include "sound/okim6295.h"
20 #include "screen.h"
21 #include "speaker.h"
22 
23 class supbtime_state : public driver_device
24 {
25 public:
supbtime_state(const machine_config & mconfig,device_type type,const char * tag)26 	supbtime_state(const machine_config &mconfig, device_type type, const char *tag)
27 		: driver_device(mconfig, type, tag)
28 		, m_spriteram(*this, "spriteram")
29 		, m_pf_rowscroll(*this, "pf%u_rowscroll", 1U)
30 		, m_maincpu(*this, "maincpu")
31 		, m_audiocpu(*this, "audiocpu")
32 		, m_deco_tilegen(*this, "tilegen")
33 		, m_sprgen(*this, "spritegen")
34 	{ }
35 
36 	void chinatwn(machine_config &config);
37 	void supbtime(machine_config &config);
38 	void tumblep(machine_config &config);
39 
40 	void init_tumblep();
41 
42 private:
43 	DECLARE_WRITE_LINE_MEMBER(vblank_w);
44 	uint16_t vblank_ack_r();
45 	uint32_t screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, bool use_offsets);
46 	uint32_t screen_update_chinatwn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
47 	uint32_t screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
48 	uint32_t screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
49 
50 	void chinatwn_map(address_map &map);
51 	void sound_map(address_map &map);
52 	void supbtime_map(address_map &map);
53 	void tumblep_map(address_map &map);
54 
55 	required_shared_ptr<uint16_t> m_spriteram;
56 	required_shared_ptr_array<uint16_t, 2> m_pf_rowscroll;
57 	required_device<cpu_device> m_maincpu;
58 	required_device<h6280_device> m_audiocpu;
59 	required_device<deco16ic_device> m_deco_tilegen;
60 	required_device<decospr_device> m_sprgen;
61 };
62 
63 
64 #endif
65