summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/gladiatr.h
blob: 4087132757a901d6114315d5b13922a538016965 (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
75
76
77
78
79
80
81
82
83
84
85
86
#include "sound/msm5205.h"

class gladiatr_state : public driver_device
{
public:
	gladiatr_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
			m_nvram(*this, "nvram") ,
		m_spriteram(*this, "spriteram"),
		m_videoram(*this, "videoram"),
		m_colorram(*this, "colorram"),
		m_textram(*this, "textram"),
		m_maincpu(*this, "maincpu"),
		m_audiocpu(*this, "audiocpu"),
		m_subcpu(*this, "sub"),
		m_msm(*this, "msm"),
		m_gfxdecode(*this, "gfxdecode"),
		m_palette(*this, "palette") { }

	required_shared_ptr<UINT8>  m_nvram;
	required_shared_ptr<UINT8> m_spriteram;
	required_shared_ptr<UINT8> m_videoram;
	required_shared_ptr<UINT8> m_colorram;
	required_shared_ptr<UINT8> m_textram;

	int m_data1;
	int m_data2;
	int m_flag1;
	int m_flag2;
	int m_video_attributes;
	int m_fg_scrollx;
	int m_fg_scrolly;
	int m_bg_scrollx;
	int m_bg_scrolly;
	int m_sprite_bank;
	int m_sprite_buffer;
	tilemap_t *m_fg_tilemap;
	tilemap_t *m_bg_tilemap;
	int m_fg_tile_bank;
	int m_bg_tile_bank;

	DECLARE_WRITE8_MEMBER(gladiatr_videoram_w);
	DECLARE_WRITE8_MEMBER(gladiatr_colorram_w);
	DECLARE_WRITE8_MEMBER(gladiatr_textram_w);
	DECLARE_WRITE8_MEMBER(gladiatr_paletteram_w);
	DECLARE_WRITE8_MEMBER(gladiatr_spritebuffer_w);
	DECLARE_WRITE8_MEMBER(gladiatr_spritebank_w);
	DECLARE_WRITE8_MEMBER(ppking_video_registers_w);
	DECLARE_WRITE8_MEMBER(gladiatr_video_registers_w);
	DECLARE_WRITE8_MEMBER(gladiatr_bankswitch_w);
	DECLARE_WRITE8_MEMBER(glad_cpu_sound_command_w);
	DECLARE_READ8_MEMBER(glad_cpu_sound_command_r);
	DECLARE_WRITE8_MEMBER(gladiatr_flipscreen_w);
	DECLARE_WRITE8_MEMBER(gladiatr_irq_patch_w);
	DECLARE_WRITE8_MEMBER(qx0_w);
	DECLARE_WRITE8_MEMBER(qx1_w);
	DECLARE_WRITE8_MEMBER(qx2_w);
	DECLARE_WRITE8_MEMBER(qx3_w);
	DECLARE_READ8_MEMBER(qx2_r);
	DECLARE_READ8_MEMBER(qx3_r);
	DECLARE_READ8_MEMBER(qx0_r);
	DECLARE_READ8_MEMBER(qx1_r);
	DECLARE_READ8_MEMBER(f6a3_r);
	DECLARE_WRITE8_MEMBER(gladiator_int_control_w);
	DECLARE_WRITE8_MEMBER(glad_adpcm_w);
	DECLARE_READ8_MEMBER(f1_r);
	DECLARE_DRIVER_INIT(gladiatr);
	DECLARE_DRIVER_INIT(ppking);
	TILE_GET_INFO_MEMBER(bg_get_tile_info);
	TILE_GET_INFO_MEMBER(fg_get_tile_info);
	DECLARE_MACHINE_RESET(ppking);
	DECLARE_VIDEO_START(ppking);
	DECLARE_MACHINE_RESET(gladiator);
	DECLARE_VIDEO_START(gladiatr);
	UINT32 screen_update_ppking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	UINT32 screen_update_gladiatr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
	void swap_block(UINT8 *src1,UINT8 *src2,int len);
	DECLARE_WRITE_LINE_MEMBER(gladiator_ym_irq);
	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;
};