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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with
Four-Channel Input-Selector emulation
**********************************************************************
_____ _____
Data 1 |* \_/ | 28 V+
Clock 2 | | 27 Bypass
Enable 3 | | 26 Right Input 1
Left Input 1 4 | | 25 Right Input 2
Left Input 2 5 | | 24 Right Input 3
Left Input 3 6 | | 23 Right Input 4
Left Input 4 7 | LMC1992 | 22 Right Select Out
Left Select Out 8 | | 21 Right Select In
Left Select In 9 | | 20 Right Tone In
Left Tone In 10 | | 19 Right Tone Out
Left Tone Out 11 | | 18 Right Op Amp Out
Left Op Amp Out 12 | | 17 Right Rear Out
Left Rear Out 13 | | 16 Right Front Out
Left Front Out 14 |_____________| 15 Ground
**********************************************************************/
#pragma once
#ifndef __LMC1992__
#define __LMC1992__
#include "emu.h"
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
enum
{
LMC1992_LEFT_INPUT_1 = 0,
LMC1992_LEFT_INPUT_2,
LMC1992_LEFT_INPUT_3,
LMC1992_LEFT_INPUT_4,
LMC1992_RIGHT_INPUT_1,
LMC1992_RIGHT_INPUT_2,
LMC1992_RIGHT_INPUT_3,
LMC1992_RIGHT_INPUT_4
};
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_LMC1992_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, LMC1992, 0)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> lmc1992_device
class lmc1992_device : public device_t,
public device_sound_interface
{
public:
// construction/destruction
lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_WRITE_LINE_MEMBER( clock_w );
DECLARE_WRITE_LINE_MEMBER( data_w );
DECLARE_WRITE_LINE_MEMBER( enable_w );
protected:
// device-level overrides
virtual void device_start();
// internal callbacks
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
private:
inline void execute_command(int addr, int data);
//sound_stream *m_stream[4];
int m_enable; // enable latch
int m_data; // data latch
int m_clk; // clock latch
UINT16 m_si; // serial in shift register
int m_input; // input select
int m_bass; // bass
int m_treble; // treble
int m_volume; // volume
int m_fader_rf; // right front fader
int m_fader_lf; // left front fader
int m_fader_rr; // right rear fader
int m_fader_lr; // left rear fader
};
// device type definition
extern const device_type LMC1992;
#endif
|