summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/2413intf.h
blob: 0edf7d1a6967d7ac01ecb7ee620728b9248e5362 (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
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
#pragma once

#ifndef __2413INTF_H__
#define __2413INTF_H__

#include "emu.h"

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

	DECLARE_WRITE8_MEMBER( write );

	DECLARE_WRITE8_MEMBER( register_port_w );
	DECLARE_WRITE8_MEMBER( data_port_w );

	void _ym2413_update_request();

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

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

private:
	// internal state
	sound_stream *  m_stream;
	void *          m_chip;
};

extern const device_type YM2413;


#endif /* __2413INTF_H__ */