mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
dmx.cpp, midiverb.cpp, fatman.cpp: Added _device suffix to devices. (#13334)
This commit is contained in:
parent
24cb8859ed
commit
db93342cc9
@ -76,10 +76,10 @@ Audio inputs are emulated using MAME's sample playback mechanism.
|
||||
|
||||
// Emulation of the MIDIverb DSP circuit, built out of discrete logic
|
||||
// components.
|
||||
class midiverb_dsp : public device_t, public device_sound_interface
|
||||
class midiverb_dsp_device : public device_t, public device_sound_interface
|
||||
{
|
||||
public:
|
||||
midiverb_dsp(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
midiverb_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
|
||||
void program_select_w(u8 data);
|
||||
|
||||
@ -106,9 +106,9 @@ private:
|
||||
static constexpr const float DAC_MAX_V = 4.8F;
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(MIDIVERB_DSP, midiverb_dsp, "midiverb_dsp", "MIDIverb discrete DSP");
|
||||
DEFINE_DEVICE_TYPE(MIDIVERB_DSP, midiverb_dsp_device, "midiverb_dsp", "MIDIverb discrete DSP");
|
||||
|
||||
midiverb_dsp::midiverb_dsp(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
midiverb_dsp_device::midiverb_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, MIDIVERB_DSP, tag, owner, clock)
|
||||
, device_sound_interface(mconfig, *this)
|
||||
, m_microcode(*this, ":dsp_microcode")
|
||||
@ -116,7 +116,7 @@ midiverb_dsp::midiverb_dsp(const machine_config &mconfig, const char *tag, devic
|
||||
{
|
||||
}
|
||||
|
||||
void midiverb_dsp::program_select_w(u8 data)
|
||||
void midiverb_dsp_device::program_select_w(u8 data)
|
||||
{
|
||||
const u8 new_program = data & 0x3f;
|
||||
if (m_program == new_program)
|
||||
@ -127,7 +127,7 @@ void midiverb_dsp::program_select_w(u8 data)
|
||||
LOGMASKED(LOG_PROGRAM_CHANGE, "DSP: Program changed to: %d\n", m_program);
|
||||
}
|
||||
|
||||
void midiverb_dsp::device_start()
|
||||
void midiverb_dsp_device::device_start()
|
||||
{
|
||||
// The actual sample rate works out to 23,437.5 KHz. But stream_alloc takes
|
||||
// a u32, and .value() will round it down to 23,437 KHz.
|
||||
@ -146,7 +146,7 @@ void midiverb_dsp::device_start()
|
||||
LOGMASKED(LOG_DSP_EXECUTION, __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
void midiverb_dsp::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
void midiverb_dsp_device::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
{
|
||||
static constexpr const u8 MAX_PC = 0x7f;
|
||||
static constexpr const int DEBUG_SAMPLES = 2;
|
||||
@ -264,7 +264,7 @@ void midiverb_dsp::sound_stream_update(sound_stream &stream, const std::vector<r
|
||||
LOGMASKED(LOG_DSP_EXECUTION, "\n");
|
||||
}
|
||||
|
||||
u16 midiverb_dsp::analog_to_digital(float sample) const
|
||||
u16 midiverb_dsp_device::analog_to_digital(float sample) const
|
||||
{
|
||||
// Analog-to-digital conversion is done with a 12-bit DAC+SAR.
|
||||
// Note that samples in the stream are treated as voltages (see
|
||||
@ -279,7 +279,7 @@ u16 midiverb_dsp::analog_to_digital(float sample) const
|
||||
return static_cast<u16>(quantized);
|
||||
}
|
||||
|
||||
float midiverb_dsp::digital_to_analog(u16 sample) const
|
||||
float midiverb_dsp_device::digital_to_analog(u16 sample) const
|
||||
{
|
||||
// Digital-to-analog conversion uses the 12-bit DAC and 1 extra bit
|
||||
// (LSB), for a total of 13 bits. The extra bit is implemented by
|
||||
@ -342,7 +342,7 @@ private:
|
||||
required_ioport m_mix;
|
||||
required_ioport m_input_level;
|
||||
required_device<samples_device> m_audio_in;
|
||||
required_device<midiverb_dsp> m_dsp;
|
||||
required_device<midiverb_dsp_device> m_dsp;
|
||||
required_device<mixer_device> m_left_out;
|
||||
required_device<mixer_device> m_right_out;
|
||||
|
||||
@ -580,7 +580,7 @@ void midiverb_state::midiverb(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_IO, &midiverb_state::external_memory_map);
|
||||
|
||||
m_maincpu->port_out_cb<1>().set(FUNC(midiverb_state::digit_select_w)).mask(0x03); // P1.0-P1.1
|
||||
m_maincpu->port_out_cb<1>().append(m_dsp, FUNC(midiverb_dsp::program_select_w)).rshift(2); // P1.2-P1.7
|
||||
m_maincpu->port_out_cb<1>().append(m_dsp, FUNC(midiverb_dsp_device::program_select_w)).rshift(2); // P1.2-P1.7
|
||||
m_maincpu->port_in_cb<3>().set(FUNC(midiverb_state::midi_rxd_r)).mask(0x01); // P3.0
|
||||
m_maincpu->port_in_cb<3>().append_ioport("buttons").lshift(2).mask(0x3c); // P3.2-P3.5
|
||||
|
||||
|
@ -173,11 +173,11 @@ struct dmx_voice_card_config
|
||||
// voices), and the multiplying DAC form a VCA. The gain control circuit sets
|
||||
// the reference current into the DAC, and the DAC multiplies that with the
|
||||
// digital value to produce and output current.
|
||||
class dmx_voice_card_vca : public device_t, public device_sound_interface
|
||||
class dmx_voice_card_vca_device : public device_t, public device_sound_interface
|
||||
{
|
||||
public:
|
||||
dmx_voice_card_vca(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config) ATTR_COLD;
|
||||
dmx_voice_card_vca(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
dmx_voice_card_vca_device(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config) ATTR_COLD;
|
||||
dmx_voice_card_vca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
|
||||
void start(int trigger_mode);
|
||||
void decay();
|
||||
@ -209,9 +209,9 @@ private:
|
||||
attotime m_decay_start_time;
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(DMX_VOICE_CARD_VCA, dmx_voice_card_vca, "dmx_voice_card_vca", "DMX Voice Card VCA");
|
||||
DEFINE_DEVICE_TYPE(DMX_VOICE_CARD_VCA, dmx_voice_card_vca_device, "dmx_voice_card_vca", "DMX Voice Card VCA");
|
||||
|
||||
dmx_voice_card_vca::dmx_voice_card_vca(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config)
|
||||
dmx_voice_card_vca_device::dmx_voice_card_vca_device(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config)
|
||||
: device_t(mconfig, DMX_VOICE_CARD_VCA, tag, owner, 0)
|
||||
, device_sound_interface(mconfig, *this)
|
||||
, m_gain_control(!config.pitch_control)
|
||||
@ -219,14 +219,14 @@ dmx_voice_card_vca::dmx_voice_card_vca(const machine_config &mconfig, const char
|
||||
init_gain_and_decay_variations(config);
|
||||
}
|
||||
|
||||
dmx_voice_card_vca::dmx_voice_card_vca(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dmx_voice_card_vca_device::dmx_voice_card_vca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, DMX_VOICE_CARD_VCA, tag, owner, clock)
|
||||
, device_sound_interface(mconfig, *this)
|
||||
, m_gain_control(false)
|
||||
{
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::start(int trigger_mode)
|
||||
void dmx_voice_card_vca_device::start(int trigger_mode)
|
||||
{
|
||||
assert(trigger_mode >= 1 && trigger_mode <= 3);
|
||||
|
||||
@ -250,7 +250,7 @@ void dmx_voice_card_vca::start(int trigger_mode)
|
||||
m_selected_gain, m_selected_rc_inv);
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::decay()
|
||||
void dmx_voice_card_vca_device::decay()
|
||||
{
|
||||
assert(has_decay());
|
||||
if (!has_decay())
|
||||
@ -261,7 +261,7 @@ void dmx_voice_card_vca::decay()
|
||||
m_decay_start_time = machine().time();
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::device_start()
|
||||
void dmx_voice_card_vca_device::device_start()
|
||||
{
|
||||
m_stream = stream_alloc(1, 1, machine().sample_rate());
|
||||
|
||||
@ -272,7 +272,7 @@ void dmx_voice_card_vca::device_start()
|
||||
save_item(NAME(m_decay_start_time));
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::device_reset()
|
||||
void dmx_voice_card_vca_device::device_reset()
|
||||
{
|
||||
m_selected_gain = 1;
|
||||
m_decaying = false;
|
||||
@ -280,7 +280,7 @@ void dmx_voice_card_vca::device_reset()
|
||||
m_selected_rc_inv = 1;
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
void dmx_voice_card_vca_device::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
{
|
||||
// Gain lower than MIN_GAIN will be treated as 0.
|
||||
static constexpr const float MIN_GAIN = 0.0001F;
|
||||
@ -324,7 +324,7 @@ void dmx_voice_card_vca::sound_stream_update(sound_stream &stream, const std::ve
|
||||
tag(), gain, in.get(0), in.get(n - 1));
|
||||
}
|
||||
|
||||
void dmx_voice_card_vca::init_gain_and_decay_variations(const dmx_voice_card_config &config)
|
||||
void dmx_voice_card_vca_device::init_gain_and_decay_variations(const dmx_voice_card_config &config)
|
||||
{
|
||||
static constexpr const float VD = 0.6; // Diode drop.
|
||||
static constexpr const float R8 = RES_K(2.7);
|
||||
@ -382,14 +382,14 @@ void dmx_voice_card_vca::init_gain_and_decay_variations(const dmx_voice_card_con
|
||||
// Emulates the original DMX voice cards, including the cymbal card. Later
|
||||
// DMX models shipped with the "Mark II" voice cards for the Tom voices.
|
||||
// The Mark II cards are not yet emulated.
|
||||
class dmx_voice_card : public device_t, public device_sound_interface
|
||||
class dmx_voice_card_device : public device_t, public device_sound_interface
|
||||
{
|
||||
public:
|
||||
// Default value of pitch adjustment trimpot.
|
||||
static constexpr const s32 T1_DEFAULT_PERCENT = 50;
|
||||
|
||||
dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config, required_memory_region *sample_rom) ATTR_COLD;
|
||||
dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
dmx_voice_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config, required_memory_region *sample_rom) ATTR_COLD;
|
||||
dmx_voice_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
|
||||
void trigger(bool tr0, bool tr1);
|
||||
void set_pitch_adj(s32 t1_percent); // Valid values: 0-100.
|
||||
@ -414,7 +414,7 @@ private:
|
||||
|
||||
required_device<timer_device> m_timer; // 555, U5.
|
||||
required_device<dac76_device> m_dac; // AM6070, U8. Compatible with DAC76.
|
||||
required_device<dmx_voice_card_vca> m_vca;
|
||||
required_device<dmx_voice_card_vca_device> m_vca;
|
||||
required_device_array<filter_biquad_device, 3> m_filters;
|
||||
|
||||
// Configuration. Do not include in save state.
|
||||
@ -430,9 +430,9 @@ private:
|
||||
u8 m_trigger_mode = 0; // Valid modes: 1-3. 0 OK after reset.
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(DMX_VOICE_CARD, dmx_voice_card, "dmx_voice_card", "DMX Voice Card");
|
||||
DEFINE_DEVICE_TYPE(DMX_VOICE_CARD, dmx_voice_card_device, "dmx_voice_card", "DMX Voice Card");
|
||||
|
||||
dmx_voice_card::dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config, required_memory_region *sample_rom)
|
||||
dmx_voice_card_device::dmx_voice_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config, required_memory_region *sample_rom)
|
||||
: device_t(mconfig, DMX_VOICE_CARD, tag, owner, 0)
|
||||
, device_sound_interface(mconfig, *this)
|
||||
, m_timer(*this, "555_u5")
|
||||
@ -445,7 +445,7 @@ dmx_voice_card::dmx_voice_card(const machine_config &mconfig, const char *tag, d
|
||||
init_pitch();
|
||||
}
|
||||
|
||||
dmx_voice_card::dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
dmx_voice_card_device::dmx_voice_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, DMX_VOICE_CARD, tag, owner, clock)
|
||||
, device_sound_interface(mconfig, *this)
|
||||
, m_timer(*this, "555_u5")
|
||||
@ -457,7 +457,7 @@ dmx_voice_card::dmx_voice_card(const machine_config &mconfig, const char *tag, d
|
||||
{
|
||||
}
|
||||
|
||||
void dmx_voice_card::trigger(bool tr0, bool tr1)
|
||||
void dmx_voice_card_device::trigger(bool tr0, bool tr1)
|
||||
{
|
||||
assert(tr0 || tr1);
|
||||
if (tr1 && tr0)
|
||||
@ -479,19 +479,19 @@ void dmx_voice_card::trigger(bool tr0, bool tr1)
|
||||
LOGMASKED(LOG_SOUND, "Trigger: (%d, %d) %d %f\n", tr0, tr1, m_trigger_mode);
|
||||
}
|
||||
|
||||
void dmx_voice_card::set_pitch_adj(s32 t1_percent)
|
||||
void dmx_voice_card_device::set_pitch_adj(s32 t1_percent)
|
||||
{
|
||||
m_stream->update();
|
||||
m_t1_percent = t1_percent;
|
||||
compute_pitch_variations();
|
||||
}
|
||||
|
||||
void dmx_voice_card::device_add_mconfig(machine_config &config)
|
||||
void dmx_voice_card_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
static constexpr const double SK_R3 = RES_M(999.99);
|
||||
static constexpr const double SK_R4 = RES_R(0.001);
|
||||
|
||||
TIMER(config, m_timer).configure_generic(FUNC(dmx_voice_card::clock_callback));
|
||||
TIMER(config, m_timer).configure_generic(FUNC(dmx_voice_card_device::clock_callback));
|
||||
DAC76(config, m_dac, 0U);
|
||||
DMX_VOICE_CARD_VCA(config, m_vca, m_config);
|
||||
|
||||
@ -513,7 +513,7 @@ void dmx_voice_card::device_add_mconfig(machine_config &config)
|
||||
m_filters[2]->add_route(ALL_OUTPUTS, *this, 1.0);
|
||||
}
|
||||
|
||||
void dmx_voice_card::device_start()
|
||||
void dmx_voice_card_device::device_start()
|
||||
{
|
||||
m_stream = stream_alloc(1, 1, machine().sample_rate());
|
||||
|
||||
@ -522,25 +522,25 @@ void dmx_voice_card::device_start()
|
||||
save_item(NAME(m_trigger_mode));
|
||||
}
|
||||
|
||||
void dmx_voice_card::device_reset()
|
||||
void dmx_voice_card_device::device_reset()
|
||||
{
|
||||
m_trigger_mode = 0;
|
||||
reset_counter();
|
||||
compute_pitch_variations();
|
||||
}
|
||||
|
||||
void dmx_voice_card::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
void dmx_voice_card_device::sound_stream_update(sound_stream &stream, const std::vector<read_stream_view> &inputs, std::vector<write_stream_view> &outputs)
|
||||
{
|
||||
outputs[0] = inputs[0];
|
||||
}
|
||||
|
||||
void dmx_voice_card::reset_counter()
|
||||
void dmx_voice_card_device::reset_counter()
|
||||
{
|
||||
m_counter = 0;
|
||||
m_counting = false;
|
||||
}
|
||||
|
||||
void dmx_voice_card::init_pitch()
|
||||
void dmx_voice_card_device::init_pitch()
|
||||
{
|
||||
// Precompute all variations of CV (pin 5 of 555 timer).
|
||||
|
||||
@ -582,7 +582,7 @@ void dmx_voice_card::init_pitch()
|
||||
m_sample_t.resize(m_cv.size());
|
||||
}
|
||||
|
||||
void dmx_voice_card::compute_pitch_variations()
|
||||
void dmx_voice_card_device::compute_pitch_variations()
|
||||
{
|
||||
static constexpr const float R3 = RES_K(1);
|
||||
static constexpr const float R4 = RES_K(10);
|
||||
@ -645,7 +645,7 @@ void dmx_voice_card::compute_pitch_variations()
|
||||
select_pitch();
|
||||
}
|
||||
|
||||
void dmx_voice_card::select_pitch()
|
||||
void dmx_voice_card_device::select_pitch()
|
||||
{
|
||||
attotime sampling_t;
|
||||
if (m_config.pitch_control)
|
||||
@ -661,7 +661,7 @@ void dmx_voice_card::select_pitch()
|
||||
1.0 / sampling_t.as_double());
|
||||
}
|
||||
|
||||
bool dmx_voice_card::is_decay_enabled() const
|
||||
bool dmx_voice_card_device::is_decay_enabled() const
|
||||
{
|
||||
switch (m_config.decay)
|
||||
{
|
||||
@ -675,7 +675,7 @@ bool dmx_voice_card::is_decay_enabled() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool dmx_voice_card::is_early_decay_enabled() const
|
||||
bool dmx_voice_card_device::is_early_decay_enabled() const
|
||||
{
|
||||
switch (m_config.early_decay)
|
||||
{
|
||||
@ -687,7 +687,7 @@ bool dmx_voice_card::is_early_decay_enabled() const
|
||||
return false;
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dmx_voice_card::clock_callback)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dmx_voice_card_device::clock_callback)
|
||||
{
|
||||
if (!m_counting)
|
||||
return;
|
||||
@ -970,7 +970,7 @@ private:
|
||||
output_finder<> m_metronome_mix;
|
||||
output_finder<> m_metronome;
|
||||
|
||||
required_device_array<dmx_voice_card, 8> m_voices;
|
||||
required_device_array<dmx_voice_card_device, 8> m_voices;
|
||||
required_device<mixer_device> m_left_mixer;
|
||||
required_device<mixer_device> m_right_mixer;
|
||||
required_device<speaker_device> m_left_speaker;
|
||||
@ -1575,35 +1575,35 @@ INPUT_PORTS_START(dmx)
|
||||
// as "PITCH ADJ."
|
||||
|
||||
PORT_START("pitch_adj_1")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "BASS pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "BASS pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_BASS)
|
||||
|
||||
PORT_START("pitch_adj_2")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "SNARE pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "SNARE pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_SNARE)
|
||||
|
||||
PORT_START("pitch_adj_3")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "HI-HAT pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "HI-HAT pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_HIHAT)
|
||||
|
||||
PORT_START("pitch_adj_4")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "TOM1 pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "TOM1 pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_SMALL_TOMS)
|
||||
|
||||
PORT_START("pitch_adj_5")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "TOM2 pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "TOM2 pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_LARGE_TOMS)
|
||||
|
||||
PORT_START("pitch_adj_6")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "CYMBAL pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "CYMBAL pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_CYMBAL)
|
||||
|
||||
PORT_START("pitch_adj_7")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "PERC1 pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "PERC1 pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_PERC1)
|
||||
|
||||
PORT_START("pitch_adj_8")
|
||||
PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "PERC2 pitch")
|
||||
PORT_ADJUSTER(dmx_voice_card_device::T1_DEFAULT_PERCENT, "PERC2 pitch")
|
||||
PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_PERC2)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
@ -72,10 +72,10 @@ until a restart or reset (F3).
|
||||
// Emulates a (DC) RC circuit with a variable resistance. Useful for emulating
|
||||
// envelope generators. This is not a simulation, just uses the standard RC
|
||||
// equations to return voltage at a specific time.
|
||||
class fatman_rc_network_state : public device_t
|
||||
class fatman_rc_network_state_device : public device_t
|
||||
{
|
||||
public:
|
||||
fatman_rc_network_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
fatman_rc_network_state_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD;
|
||||
|
||||
void set_c(float c);
|
||||
void reset(float v_target, float r, const attotime &t);
|
||||
@ -93,14 +93,14 @@ private:
|
||||
attotime m_start_t;
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE(FATMAN_RC_NETWORK_STATE, fatman_rc_network_state, "fatman_rc_network_state", "Fatman EG RC network");
|
||||
DEFINE_DEVICE_TYPE(FATMAN_RC_NETWORK_STATE, fatman_rc_network_state_device, "fatman_rc_network_state", "Fatman EG RC network");
|
||||
|
||||
fatman_rc_network_state::fatman_rc_network_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
fatman_rc_network_state_device::fatman_rc_network_state_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, FATMAN_RC_NETWORK_STATE, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
void fatman_rc_network_state::device_start()
|
||||
void fatman_rc_network_state_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_c));
|
||||
save_item(NAME(m_r));
|
||||
@ -109,12 +109,12 @@ void fatman_rc_network_state::device_start()
|
||||
save_item(NAME(m_start_t));
|
||||
}
|
||||
|
||||
void fatman_rc_network_state::set_c(float c)
|
||||
void fatman_rc_network_state_device::set_c(float c)
|
||||
{
|
||||
m_c = c;
|
||||
}
|
||||
|
||||
void fatman_rc_network_state::reset(float v_target, float r, const attotime &t)
|
||||
void fatman_rc_network_state_device::reset(float v_target, float r, const attotime &t)
|
||||
{
|
||||
m_v_start = get_v(t);
|
||||
m_v_end = v_target;
|
||||
@ -122,7 +122,7 @@ void fatman_rc_network_state::reset(float v_target, float r, const attotime &t)
|
||||
m_start_t = t;
|
||||
}
|
||||
|
||||
float fatman_rc_network_state::get_v(const attotime &t) const
|
||||
float fatman_rc_network_state_device::get_v(const attotime &t) const
|
||||
{
|
||||
assert(t >= m_start_t);
|
||||
const attotime delta_t = t - m_start_t;
|
||||
@ -187,8 +187,8 @@ private:
|
||||
void external_memory_map(address_map &map) ATTR_COLD;
|
||||
|
||||
required_device<mcs51_cpu_device> m_maincpu;
|
||||
required_device<fatman_rc_network_state> m_vca_adsr_state;
|
||||
required_device<fatman_rc_network_state> m_vcf_ar_state;
|
||||
required_device<fatman_rc_network_state_device> m_vca_adsr_state;
|
||||
required_device<fatman_rc_network_state_device> m_vcf_ar_state;
|
||||
required_device<pwm_display_device> m_midi_led_pwm; // D2
|
||||
output_finder<> m_gate_led; // D13
|
||||
required_ioport m_dsw_io;
|
||||
|
Loading…
Reference in New Issue
Block a user