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

    Atari "Stella on Steroids" hardware

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

#include "machine/atarigen.h"
#include "cpu/asap/asap.h"
#include "audio/atarijsa.h"

class beathead_state : public atarigen_state
{
public:
	beathead_state(const machine_config &mconfig, device_type type, const char *tag)
		: atarigen_state(mconfig, type, tag),
		  m_maincpu(*this, "maincpu"),
		  m_nvram(*this, "nvram") { }

	virtual void machine_start();
	virtual void machine_reset();

	virtual void video_start();

	UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

	required_device<asap_device> m_maincpu;

	required_shared_ptr<UINT32>	m_nvram;

	UINT32 *		m_videoram;
	UINT32 *		m_paletteram;

	UINT32 *		m_vram_bulk_latch;
	UINT32 *		m_palette_select;

	UINT32			m_finescroll;
	offs_t			m_vram_latch_offset;

	offs_t			m_hsyncram_offset;
	offs_t			m_hsyncram_start;
	UINT8			m_hsyncram[0x800];

	UINT32 *		m_ram_base;
	UINT32 *		m_rom_base;

	attotime		m_hblank_offset;

	UINT8			m_irq_line_state;
	UINT8			m_irq_enable[3];
	UINT8			m_irq_state[3];

	UINT8			m_eeprom_enabled;

	UINT32 *		m_speedup_data;
	UINT32 *		m_movie_speedup_data;

	// in drivers/beathead.c
	void update_interrupts();
	DECLARE_WRITE32_MEMBER( interrupt_control_w );
	DECLARE_READ32_MEMBER( interrupt_control_r );
	DECLARE_WRITE32_MEMBER( eeprom_data_w );
	DECLARE_WRITE32_MEMBER( eeprom_enable_w );
	DECLARE_READ32_MEMBER( input_2_r );
	DECLARE_READ32_MEMBER( sound_data_r );
	DECLARE_WRITE32_MEMBER( sound_data_w );
	DECLARE_WRITE32_MEMBER( sound_reset_w );
	DECLARE_WRITE32_MEMBER( coin_count_w );
	DECLARE_READ32_MEMBER( speedup_r );
	DECLARE_READ32_MEMBER( movie_speedup_r );

	// in video/beathead.c
	DECLARE_WRITE32_MEMBER( vram_transparent_w );
	DECLARE_WRITE32_MEMBER( vram_bulk_w );
	DECLARE_WRITE32_MEMBER( vram_latch_w );
	DECLARE_WRITE32_MEMBER( vram_copy_w );
	DECLARE_WRITE32_MEMBER( finescroll_w );
	DECLARE_WRITE32_MEMBER( palette_w );
	DECLARE_READ32_MEMBER( hsync_ram_r );
	DECLARE_WRITE32_MEMBER( hsync_ram_w );
};