summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/tehkanwc.h
blob: 9d6e1d1ce9bd971b031b80f54efa56826b2f9143 (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
65
66
67
68
69
70
71
72
73
74
#include "sound/msm5205.h"

class tehkanwc_state : public driver_device
{
public:
	enum
	{
		TIMER_RESET
	};

	tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
		m_videoram(*this, "videoram"),
		m_colorram(*this, "colorram"),
		m_videoram2(*this, "videoram2"),
		m_spriteram(*this, "spriteram"),
		m_maincpu(*this, "maincpu"),
		m_audiocpu(*this, "audiocpu"),
		m_subcpu(*this, "sub"),
		m_msm(*this, "msm"),
		m_gfxdecode(*this, "gfxdecode"),
		m_palette(*this, "palette") { }

	int m_track0[2];
	int m_track1[2];
	int m_msm_data_offs;
	int m_toggle;
	required_shared_ptr<UINT8> m_videoram;
	required_shared_ptr<UINT8> m_colorram;
	required_shared_ptr<UINT8> m_videoram2;
	UINT8 m_scroll_x[2];
	UINT8 m_led0;
	UINT8 m_led1;
	tilemap_t *m_bg_tilemap;
	tilemap_t *m_fg_tilemap;
	required_shared_ptr<UINT8> m_spriteram;
	DECLARE_WRITE8_MEMBER(sub_cpu_halt_w);
	DECLARE_READ8_MEMBER(tehkanwc_track_0_r);
	DECLARE_READ8_MEMBER(tehkanwc_track_1_r);
	DECLARE_WRITE8_MEMBER(tehkanwc_track_0_reset_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_track_1_reset_w);
	DECLARE_WRITE8_MEMBER(sound_command_w);
	DECLARE_WRITE8_MEMBER(sound_answer_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_videoram_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_colorram_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_videoram2_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_scroll_x_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_scroll_y_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_flipscreen_x_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_flipscreen_y_w);
	DECLARE_WRITE8_MEMBER(gridiron_led0_w);
	DECLARE_WRITE8_MEMBER(gridiron_led1_w);
	DECLARE_READ8_MEMBER(tehkanwc_portA_r);
	DECLARE_READ8_MEMBER(tehkanwc_portB_r);
	DECLARE_WRITE8_MEMBER(tehkanwc_portA_w);
	DECLARE_WRITE8_MEMBER(tehkanwc_portB_w);
	DECLARE_WRITE8_MEMBER(msm_reset_w);
	DECLARE_DRIVER_INIT(teedoff);
	TILE_GET_INFO_MEMBER(get_bg_tile_info);
	TILE_GET_INFO_MEMBER(get_fg_tile_info);
	virtual void video_start();
	UINT32 screen_update_tehkanwc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player);
	void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE_LINE_MEMBER(tehkanwc_adpcm_int);
	required_device<cpu_device> m_maincpu;
	required_device<cpu_device> m_audiocpu;
	required_device<cpu_device> m_subcpu;
	required_device<msm5205_device> m_msm;
	required_device<gfxdecode_device> m_gfxdecode;
	required_device<palette_device> m_palette;
protected:
	virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
};