summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/k033906.h
blob: 1e526bed7c1385ab4965536e4dfe93cc56fea45b (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
/***************************************************************************

    Konami 033906

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

#pragma once

#ifndef __K033906_H__
#define __K033906_H__

#include "emu.h"



/***************************************************************************
    DEVICE CONFIGURATION MACROS
***************************************************************************/

#define MCFG_K033906_ADD(_tag, _config) \
	MCFG_DEVICE_ADD(_tag, K033906, 0) \
	MCFG_DEVICE_CONFIG(_config)


/***************************************************************************
    TYPE DEFINITIONS
***************************************************************************/


// ======================> k033906_interface

struct k033906_interface
{
	const char         *m_voodoo_tag;
};



// ======================> k033906_device

class k033906_device :  public device_t,
						public k033906_interface
{
public:
	// construction/destruction
	k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

	DECLARE_READ32_MEMBER( k033906_r );
	DECLARE_WRITE32_MEMBER( k033906_w );
	DECLARE_WRITE_LINE_MEMBER( k033906_set_reg );

protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset() { }
	virtual void device_post_load() { }
	virtual void device_clock_changed() { }

private:

	UINT32 k033906_reg_r(int reg);
	void k033906_reg_w(int reg, UINT32 data);

	/* i/o lines */
	UINT32 *     m_reg;
	UINT32 *     m_ram;

	int          m_reg_set; // 1 = access reg / 0 = access ram

	device_t *m_voodoo;
};


// device type definition
extern const device_type K033906;

#endif  /* __K033906_H__ */