~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to mess/src/emu/sound/sn76477.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
    Texas Instruments SN76477 emulator
4
 
 
5
 
    SN76477 pin layout. There is a corresponding interface variable with the
6
 
    same name. The only exception is noise_clock which must be programmatically
7
 
    set.  The other pins have programmatic equivalents as well.
8
 
    The name of the function is SN76477_<pinname>_w.
9
 
    All capacitor functions can also specify a fixed voltage on the cap.
10
 
    The name of this function is SN76477_<pinname>_voltage_w
11
 
 
12
 
                      +-------------------+
13
 
          envelope_1  | 1      | |      28|  envelope_2
14
 
                      | 2 GND   -       27|  mixer_c
15
 
         noise_clock  | 3               26|  mixer_a
16
 
     noise_clock_res  | 4               25|  mixer_b
17
 
    noise_filter_res  | 5               24|  one_shot_res
18
 
    noise_filter_cap  | 6               23|  one_shot_cap
19
 
           decay_res  | 7               22|  vco
20
 
    attack_decay_cap  | 8               21|  slf_cap
21
 
              enable o| 9               20|  slf_res
22
 
          attack_res  |10               19|  pitch_voltage
23
 
       amplitude_res  |11               18|  vco_res
24
 
        feedback_res  |12               17|  vco_cap
25
 
                      |13 OUTPUT        16|  vco_voltage
26
 
                      |14 Vcc   +5V OUT 15|
27
 
                      +-------------------+
28
 
 
29
 
    All resistor values in Ohms
30
 
    All capacitor values in Farads
31
 
    Use RES_K, RES_M and CAP_U, CAP_N, CAP_P macros in rescap.h to convert
32
 
    magnitudes, eg. 220k = RES_K(220), 47nF = CAP_N(47)
33
 
 
34
 
 *****************************************************************************/
35
 
 
36
 
#pragma once
37
 
 
38
 
#ifndef __SN76477_H__
39
 
#define __SN76477_H__
40
 
 
41
 
#include "devlegcy.h"
42
 
#include "machine/rescap.h"
43
 
 
44
 
 
45
 
 
46
 
/*****************************************************************************
47
 
 *
48
 
 *  Interface definition
49
 
 *
50
 
 *****************************************************************************/
51
 
 
52
 
typedef struct _sn76477_interface sn76477_interface;
53
 
struct _sn76477_interface
54
 
{
55
 
        double noise_clock_res;
56
 
        double noise_filter_res;
57
 
        double noise_filter_cap;
58
 
        double decay_res;
59
 
        double attack_decay_cap;
60
 
        double attack_res;
61
 
        double amplitude_res;
62
 
        double feedback_res;
63
 
        double vco_voltage;
64
 
        double vco_cap;
65
 
        double vco_res;
66
 
        double pitch_voltage;
67
 
        double slf_res;
68
 
        double slf_cap;
69
 
        double one_shot_cap;
70
 
        double one_shot_res;
71
 
        UINT32 vco;
72
 
        UINT32 mixer_a;
73
 
        UINT32 mixer_b;
74
 
        UINT32 mixer_c;
75
 
        UINT32 envelope_1;
76
 
        UINT32 envelope_2;
77
 
        UINT32 enable;
78
 
};
79
 
 
80
 
 
81
 
 
82
 
/*****************************************************************************
83
 
 *
84
 
 *  Functions to set a pin's value
85
 
 *
86
 
 *****************************************************************************/
87
 
 
88
 
/* these functions take 0 or 1 as a logic input */
89
 
void sn76477_enable_w(device_t *device, UINT32 data);           /* active LO, 0 = enabled, 1 = disabled */
90
 
void sn76477_mixer_a_w(device_t *device, UINT32 data);
91
 
void sn76477_mixer_b_w(device_t *device, UINT32 data);
92
 
void sn76477_mixer_c_w(device_t *device, UINT32 data);
93
 
void sn76477_envelope_1_w(device_t *device, UINT32 data);
94
 
void sn76477_envelope_2_w(device_t *device, UINT32 data);
95
 
void sn76477_vco_w(device_t *device, UINT32 data);                      /* 0 = external, 1 = controlled by SLF */
96
 
void sn76477_noise_clock_w(device_t *device, UINT32 data);  /* noise clock write, if noise_clock_res = 0 */
97
 
 
98
 
/* these functions take a resistor value in Ohms */
99
 
void sn76477_one_shot_res_w(device_t *device, double data);
100
 
void sn76477_slf_res_w(device_t *device, double data);
101
 
void sn76477_vco_res_w(device_t *device, double data);
102
 
void sn76477_noise_clock_res_w(device_t *device, double data);  /* = 0 if the noise gen is clocked via noise_clock */
103
 
void sn76477_noise_filter_res_w(device_t *device, double data);
104
 
void sn76477_decay_res_w(device_t *device, double data);
105
 
void sn76477_attack_res_w(device_t *device, double data);
106
 
void sn76477_amplitude_res_w(device_t *device, double data);
107
 
void sn76477_feedback_res_w(device_t *device, double data);
108
 
 
109
 
/* these functions take a capacitor value in Farads or the voltage on it in Volts */
110
 
#define SN76477_EXTERNAL_VOLTAGE_DISCONNECT   (-1.0)    /* indicates that the voltage is internally computed,
111
 
                                                           can be used in all the functions that take a
112
 
                                                           voltage on a capacitor */
113
 
void sn76477_one_shot_cap_w(device_t *device, double data);
114
 
void sn76477_one_shot_cap_voltage_w(device_t *device, double data);
115
 
void sn76477_slf_cap_w(device_t *device, double data);
116
 
void sn76477_slf_cap_voltage_w(device_t *device, double data);
117
 
void sn76477_vco_cap_w(device_t *device, double data);
118
 
void sn76477_vco_cap_voltage_w(device_t *device, double data);
119
 
void sn76477_noise_filter_cap_w(device_t *device, double data);
120
 
void sn76477_noise_filter_cap_voltage_w(device_t *device, double data);
121
 
void sn76477_attack_decay_cap_w(device_t *device, double data);
122
 
void sn76477_attack_decay_cap_voltage_w(device_t *device, double data);
123
 
 
124
 
/* these functions take a voltage value in Volts */
125
 
void sn76477_vco_voltage_w(device_t *device, double data);
126
 
void sn76477_pitch_voltage_w(device_t *device, double data);
127
 
 
128
 
DECLARE_LEGACY_SOUND_DEVICE(SN76477, sn76477);
129
 
 
130
 
#endif/* __SN76477_H__ */