~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/audio/norautp.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/************************************************************************
 
2
 * norautp Sound System Analog emulation
 
3
 * Sept 2009, Derrick Renaud
 
4
 ************************************************************************/
 
5
 
 
6
#include "driver.h"
 
7
#include "norautp.h"
 
8
 
 
9
 
 
10
/* Discrete Sound Input Nodes */
 
11
/* defined in norautp.h */
 
12
 
 
13
 
 
14
static const discrete_555_desc desc_norautp_555 =
 
15
{
 
16
        DISC_555_OUT_ENERGY | DISC_555_OUT_AC,
 
17
        5,                              // B+ voltage of 555
 
18
        DEFAULT_555_VALUES
 
19
};
 
20
 
 
21
 
 
22
#define NORAUTP_SOUND_CIRCUIT(_name, _r1, _r2, _c1, _c2, _c3, _c4)                      \
 
23
static const discrete_comp_adder_table desc_##_name##_caps =                \
 
24
{                                                                           \
 
25
        DISC_COMP_P_CAPACITOR, _c4, 3,                                          \
 
26
        {                                                                       \
 
27
                _c3, _c2, _c1                                                       \
 
28
        }                                                                       \
 
29
};                                                                          \
 
30
                                                                            \
 
31
DISCRETE_SOUND_START( _name )                                               \
 
32
        /************************************************                       \
 
33
     * Input register mapping                                               \
 
34
     ************************************************/                      \
 
35
        DISCRETE_INPUT_LOGIC(NORAUTP_SND_EN)                                    \
 
36
        DISCRETE_INPUT_DATA (NORAUTP_FREQ_DATA)                                 \
 
37
                                                                            \
 
38
        /************************************************                       \
 
39
     * Tone Generator                                                       \
 
40
     ************************************************/                      \
 
41
        DISCRETE_COMP_ADDER(NODE_20, NORAUTP_FREQ_DATA, &desc_##_name##_caps)   \
 
42
        DISCRETE_555_ASTABLE(NODE_21,                                           \
 
43
                                                 NORAUTP_SND_EN,                                        /* RESET */     \
 
44
                                                 _r2, _r1, NODE_20, &desc_norautp_555)              \
 
45
                                                                            \
 
46
        DISCRETE_OUTPUT(NODE_21, 65000.0/3.8)                                   \
 
47
DISCRETE_SOUND_END
 
48
 
 
49
 
 
50
/* Noraut Poker */
 
51
/* Parts List - Resistors */
 
52
#define NORAUTP_R1              RES_K(120)
 
53
#define NORAUTP_R2              RES_K(2.2)
 
54
 
 
55
/* Parts List - Capacitors */
 
56
#define NORAUTP_C1              CAP_U(.01)
 
57
#define NORAUTP_C2              CAP_U(.022)
 
58
#define NORAUTP_C3              CAP_U(.047)
 
59
#define NORAUTP_C4              CAP_U(.01)
 
60
 
 
61
NORAUTP_SOUND_CIRCUIT(norautp,
 
62
        NORAUTP_R1, NORAUTP_R2,
 
63
        NORAUTP_C1, NORAUTP_C2, NORAUTP_C3, NORAUTP_C4)
 
64
 
 
65
 
 
66
/* Noraut old Draw Poker Hi-Lo */
 
67
/* Parts List - Resistors */
 
68
#define DPHL_R1         RES_K(120)
 
69
#define DPHL_R2         RES_K(1)
 
70
 
 
71
/* Parts List - Capacitors */
 
72
#define DPHL_C1         CAP_U(.01)
 
73
#define DPHL_C2         CAP_U(.022)
 
74
#define DPHL_C3         CAP_U(.05)
 
75
#define DPHL_C4         CAP_U(.01)
 
76
 
 
77
NORAUTP_SOUND_CIRCUIT(dphl,
 
78
        DPHL_R1, DPHL_R2,
 
79
        DPHL_C1, DPHL_C2, DPHL_C3, DPHL_C4)