summaryrefslogtreecommitdiffstats
path: root/src/mame/includes/galaxia.h
blob: 8e930eb1a00a8088a8433af3cc1ae0cb11e90465 (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
// license:BSD-3-Clause
// copyright-holders:David Haywood, hap
/***************************************************************************

    Zaccaria Galaxia HW

****************************************************************************/
#ifndef MAME_INCLUDES_GALAXIA_H
#define MAME_INCLUDES_GALAXIA_H

#pragma once

#include "includes/cvs.h"
#include "tilemap.h"

class galaxia_state : public cvs_state
{
public:
	galaxia_state(const machine_config &mconfig, device_type type, const char *tag)
		: cvs_state(mconfig, type, tag)
	{ }

	void astrowar(machine_config &config);
	void galaxia(machine_config &config);

	void init_common();

protected:
	virtual void video_start() override;

private:
	tilemap_t *m_bg_tilemap = nullptr;
	bitmap_ind16 m_temp_bitmap;
	void galaxia_video_w(offs_t offset, uint8_t data);
	void galaxia_scroll_w(uint8_t data);
	void galaxia_ctrlport_w(uint8_t data);
	void galaxia_dataport_w(uint8_t data);
	uint8_t galaxia_collision_r();
	uint8_t galaxia_collision_clear();
	TILE_GET_INFO_MEMBER(get_galaxia_bg_tile_info);
	TILE_GET_INFO_MEMBER(get_astrowar_bg_tile_info);
	void galaxia_palette(palette_device &palette) const;
	DECLARE_VIDEO_START(astrowar);
	void astrowar_palette(palette_device &palette) const;
	uint32_t screen_update_galaxia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	uint32_t screen_update_astrowar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE_LINE_MEMBER(vblank_irq);
	void astrowar_mem_map(address_map &map);
	void galaxia_data_map(address_map &map);
	void galaxia_io_map(address_map &map);
	void galaxia_mem_map(address_map &map);
};

#endif // MAME_INCLUDES_GALAXIA_H