summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/taito_en.h
blob: c30930bd5111cf34649f3965c85d42c5e083d5fd (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
#include "cpu/m68000/m68000.h"
#include "sound/es5506.h"
#include "machine/n68681.h"

class taito_en_device : public device_t

{
public:
	taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	~taito_en_device() {}

	DECLARE_READ16_MEMBER( en_68000_share_r );
	DECLARE_WRITE16_MEMBER( en_68000_share_w );
	DECLARE_WRITE16_MEMBER( en_es5505_bank_w );
	DECLARE_WRITE16_MEMBER( en_volume_w );

	//todo: hook up cpu/es5510
	DECLARE_READ16_MEMBER( es5510_dsp_r );
	DECLARE_WRITE16_MEMBER( es5510_dsp_w );
	
	DECLARE_WRITE_LINE_MEMBER(duart_irq_handler);

protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset();

private:
	// internal state

	//todo: hook up cpu/es5510
	UINT16   m_es5510_dsp_ram[0x200];
	UINT32   m_es5510_gpr[0xc0];
	UINT32   m_es5510_dram[1<<24];
	UINT32   m_es5510_dol_latch;
	UINT32   m_es5510_dil_latch;
	UINT32   m_es5510_dadr_latch;
	UINT32   m_es5510_gpr_latch;
	UINT8    m_es5510_ram_sel;

	UINT32   *m_snd_shared_ram;
	
	duartn68681_device *m_duart68681;

};

extern const device_type TAITO_EN;

MACHINE_CONFIG_EXTERN( taito_en_sound );

#define MCFG_TAITO_EN_ADD(_tag) \
	MCFG_DEVICE_ADD(_tag, TAITO_EN, 0)