summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/va_eg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/va_eg.h')
-rw-r--r--src/devices/sound/va_eg.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/devices/sound/va_eg.h b/src/devices/sound/va_eg.h
index 16e19303c18..65f2d968d50 100644
--- a/src/devices/sound/va_eg.h
+++ b/src/devices/sound/va_eg.h
@@ -7,8 +7,6 @@
#pragma once
DECLARE_DEVICE_TYPE(VA_RC_EG, va_rc_eg_device)
-DECLARE_DEVICE_TYPE(CEM3310, cem3310_device)
-
// Building block for emulating envelope generators (EGs) based on a single RC
// circuit. The controlling source sets a target voltage and the device
@@ -79,69 +77,4 @@ private:
attotime m_t_end_approx;
};
-
-// Emulates a CEM3310 envelope generator.
-// The rate CVs (attack, decay, release) are usually negative voltages.
-// The sustain CV is a positive voltage, usually 0-5V.
-// The output stream contains voltages, usually 0-5V.
-//
-// The emulation is accurate for the typical configuration. The behavior for
-// less common configurations (e.g. sustain voltage above 5V, independent gate
-// and trigger signals) is not yet emulated. The longer version of the datasheet
-// has relevant info.
-class cem3310_device : public device_t, public device_sound_interface
-{
-public:
- // rx - Resistor Rx connecting pin 10 (Iin) and pin 2 (ENV Out).
- // cx - Capacitor Cx at pin 1 (Cap).
- cem3310_device(const machine_config &mconfig, const char *tag, device_t *owner, float rx, float cx) ATTR_COLD;
- cem3310_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) ATTR_COLD;
-
- void attack_w(float cv);
- void decay_w(float cv);
- void sustain_w(float cv);
- void release_w(float cv);
-
- // Assumes the trigger pin is connected to the gate pin via a capacitor.
- // Independent control of the trigger input is not yet emulated.
- void gate_w(int state);
-
-protected:
- void device_add_mconfig(machine_config &config) override ATTR_COLD;
- void device_start() override ATTR_COLD;
- void device_reset() override ATTR_COLD;
- void sound_stream_update(sound_stream &stream) override;
-
-private:
- void update_rc();
- TIMER_CALLBACK_MEMBER(attack_timer_tick);
-
- enum phase
- {
- PHASE_ATTACK = 0,
- PHASE_DECAY,
- PHASE_RELEASE
- };
-
- // Using the constant names in the datasheet.
- static inline constexpr float VP = 5.0F; // Envelope peak voltage.
- static inline constexpr float VZ = 6.5F; // Attack asymptote voltage (voltage target).
- static inline constexpr float VT = 0.026F; // Thermal voltage at room temperature.
-
- const float m_rx;
- const float m_cx;
-
- sound_stream *m_stream;
- emu_timer *m_attack_timer;
-
- required_device<va_rc_eg_device> m_rc;
-
- s8 m_phase;
- bool m_gate;
- float m_attack_cv;
- float m_decay_cv;
- float m_sustain_cv;
- float m_release_cv;
-};
-
#endif // MAME_SOUND_VA_EG_H