summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/circusc.h
blob: 5b790f8f7d1ed1ef5601288e6bcc203c2caa7678 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*************************************************************************

    Circus Charlie

*************************************************************************/

#include "sound/dac.h"
#include "sound/sn76496.h"

class circusc_state : public driver_device
{
public:
	circusc_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag) ,
		m_spritebank(*this, "spritebank"),
		m_scroll(*this, "scroll"),
		m_colorram(*this, "colorram"),
		m_videoram(*this, "videoram"),
		m_spriteram_2(*this, "spriteram_2"),
		m_spriteram(*this, "spriteram"),
		m_sn_1(*this, "sn1"),
		m_sn_2(*this, "sn2"){ }

	/* memory pointers */
	required_shared_ptr<UINT8> m_spritebank;
	required_shared_ptr<UINT8> m_scroll;
	required_shared_ptr<UINT8> m_colorram;
	required_shared_ptr<UINT8> m_videoram;
	required_shared_ptr<UINT8> m_spriteram_2;
	required_shared_ptr<UINT8> m_spriteram;

	/* video-related */
	tilemap_t        *m_bg_tilemap;

	/* sound-related */
	UINT8          m_sn_latch;

	/* devices */
	cpu_device *m_audiocpu;
	required_device<sn76496_new_device> m_sn_1;
	required_device<sn76496_new_device> m_sn_2;
	dac_device *m_dac;
	device_t *m_discrete;

	UINT8          m_irq_mask;
	DECLARE_READ8_MEMBER(circusc_sh_timer_r);
	DECLARE_WRITE8_MEMBER(circusc_sh_irqtrigger_w);
	DECLARE_WRITE8_MEMBER(circusc_coin_counter_w);
	DECLARE_WRITE8_MEMBER(circusc_sound_w);
	DECLARE_WRITE8_MEMBER(irq_mask_w);
	DECLARE_WRITE8_MEMBER(circusc_videoram_w);
	DECLARE_WRITE8_MEMBER(circusc_colorram_w);
	DECLARE_WRITE8_MEMBER(circusc_flipscreen_w);
	DECLARE_DRIVER_INIT(circusc);
	TILE_GET_INFO_MEMBER(get_tile_info);
};


/*----------- defined in video/circusc.c -----------*/


VIDEO_START( circusc );
PALETTE_INIT( circusc );
SCREEN_UPDATE_IND16( circusc );