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

    Super Contra / Thunder Cross

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

class thunderx_state : public driver_device
{
public:
	thunderx_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag) ,
		m_ram(*this, "ram"){ }

	/* memory pointers */
	required_shared_ptr<UINT8> m_ram;
	UINT8      m_pmcram[0x800];
//  UINT8 *    m_paletteram;    // currently this uses generic palette handling

	/* video-related */
	int        m_layer_colorbase[3];
	int        m_sprite_colorbase;

	/* misc */
	int        m_priority;
	UINT8      m_1f98_data;
	int        m_palette_selected;
	int        m_rambank;
	int        m_pmcbank;

	/* devices */
	cpu_device *m_maincpu;
	cpu_device *m_audiocpu;
	device_t *m_k007232;
	device_t *m_k052109;
	device_t *m_k051960;
	DECLARE_READ8_MEMBER(scontra_bankedram_r);
	DECLARE_WRITE8_MEMBER(scontra_bankedram_w);
	DECLARE_READ8_MEMBER(thunderx_bankedram_r);
	DECLARE_WRITE8_MEMBER(thunderx_bankedram_w);
	DECLARE_READ8_MEMBER(thunderx_1f98_r);
	DECLARE_WRITE8_MEMBER(thunderx_1f98_w);
	DECLARE_WRITE8_MEMBER(scontra_bankswitch_w);
	DECLARE_WRITE8_MEMBER(thunderx_videobank_w);
	DECLARE_WRITE8_MEMBER(thunderx_sh_irqtrigger_w);
	DECLARE_READ8_MEMBER(k052109_051960_r);
	DECLARE_WRITE8_MEMBER(k052109_051960_w);
	DECLARE_WRITE8_MEMBER(scontra_snd_bankswitch_w);
	virtual void video_start();
	DECLARE_MACHINE_START(scontra);
	DECLARE_MACHINE_RESET(scontra);
	DECLARE_MACHINE_START(thunderx);
	DECLARE_MACHINE_RESET(thunderx);
	UINT32 screen_update_scontra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};


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

extern void thunderx_tile_callback(running_machine &machine, int layer,int bank,int *code,int *color,int *flags,int *priority);
extern void thunderx_sprite_callback(running_machine &machine, int *code,int *color,int *priority_mask,int *shadow);