summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes/gamate.h
blob: ea7f3de5c954e885c0080ce2c89a1c772d23c330 (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
/*****************************************************************************
 *
 * includes/gamate.h
 *
 ****************************************************************************/

#ifndef GAMATE_H_
#define GAMATE_H_

#include "cpu/m6502/m6502.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"

struct GAMATE_CHANNEL
{
	GAMATE_CHANNEL() :
//      on(0),
//      waveform(0),
		volume(0),
		pos(0),
		size(0)
//      count(0)
	{
	}

	int on;
	int /*waveform,*/ volume;
	int pos;
	int size;
//  int count;
};


// ======================> gamate_sound_device

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

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

	// sound stream update overrides
	virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);

public:
	DECLARE_WRITE8_MEMBER( device_w );

private:

	sound_stream *m_mixer_channel;
	GAMATE_CHANNEL m_channels[3];
	UINT8 reg[14];
};

extern const device_type GAMATE_SND;

#endif /* GAMATE_H_ */