summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/ddragon.h
blob: d5d9237a03a48ec63ce056b46633be4427e7b32a (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
/*************************************************************************

    Double Dragon & Double Dragon II (but also China Gate)

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


typedef struct _ddragon_state ddragon_state;
struct _ddragon_state
{
	/* memory pointers */
	UINT8 *        rambase;
	UINT8 *        bgvideoram;
	UINT8 *        fgvideoram;
	UINT8 *        spriteram;
	UINT8 *        scrollx_lo;
	UINT8 *        scrolly_lo;
	UINT8 *        darktowr_mcu_ports;
//  UINT8 *        paletteram;  // currently this uses generic palette handling
//  UINT8 *        paletteram_2;    // currently this uses generic palette handling
	size_t         spriteram_size;	// FIXME: this appears in chinagat.c, but is it really used?

	/* video-related */
	tilemap        *fg_tilemap, *bg_tilemap;
	UINT8          technos_video_hw;
	UINT8          scrollx_hi;
	UINT8          scrolly_hi;

	/* misc */
	UINT8          dd_sub_cpu_busy;
	UINT8          sprite_irq, sound_irq, ym_irq, adpcm_sound_irq;
	UINT32         adpcm_pos[2], adpcm_end[2];
	UINT8          adpcm_idle[2];
	int            adpcm_data[2];

	/* for Sai Yu Gou Ma Roku */
	int            adpcm_addr;
	int            i8748_P1;
	int            i8748_P2;
	int            pcm_shift;
	int            pcm_nibble;
	int            mcu_command;
#if 0
	int            m5205_clk;
#endif

	/* devices */
	const device_config *maincpu;
	const device_config *snd_cpu;
	const device_config *sub_cpu;
	const device_config *adpcm_1;
	const device_config *adpcm_2;
};


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

WRITE8_HANDLER( ddragon_bgvideoram_w );
WRITE8_HANDLER( ddragon_fgvideoram_w );

VIDEO_START( chinagat );
VIDEO_START( ddragon );
VIDEO_UPDATE( ddragon );