44
55 esqpump.cpp - Ensoniq 5505/5506 to 5510 interface.
66
7+ Modeled specifically after the routing of and for use with
8+ the VFX family of keyboards.
9+
710 By Christian Brunschen
811
912***************************************************************************/
@@ -26,7 +29,12 @@ esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconf
2629
2730void esq_5505_5510_pump_device::device_start ()
2831{
29- m_stream = stream_alloc (8 , 2 , clock (), STREAM_SYNCHRONOUS);
32+ // The VFX only has a single pait of stereo outputs, 'Main'; these will be channels 0 and 1,
33+ // and will be routed to the 'speaker' output device.
34+ // VFX-SD and later have a separate 'Aux' stereo output that bypasses ESP effect processing;
35+ // these will be channels 2 and 3 and can be routed to a separate 'aux' output device.
36+ // On the VFX, those will simply remain silent.
37+ m_stream = stream_alloc (8 , 4 , clock (), STREAM_SYNCHRONOUS);
3038
3139#if PUMP_DETECT_SILENCE
3240 silent_for = 500 ;
@@ -58,11 +66,11 @@ void esq_5505_5510_pump_device::sound_stream_update(sound_stream &stream)
5866#define SAMPLE_SHIFT 4
5967 constexpr sound_stream::sample_t input_scale = 32768.0 / (1 << SAMPLE_SHIFT);
6068
61- // anything for the 'aux ' output?
62- sound_stream:: sample_t l = stream.get (0 , 0 ) * (1.0 / (1 << SAMPLE_SHIFT));
63- sound_stream:: sample_t r = stream.get (1 , 0 ) * (1.0 / (1 << SAMPLE_SHIFT));
69+ // Push the 'Aux ' output samples directly into the output stream
70+ stream. put ( 2 , 0 , stream.get (0 , 0 ) * (1.0 / (1 << SAMPLE_SHIFT) ));
71+ stream. put ( 3 , 0 , stream.get (1 , 0 ) * (1.0 / (1 << SAMPLE_SHIFT) ));
6472
65- // push the samples into the ESP
73+ // Push the 'FX1', 'FX2' and 'DRY' samples into the ESP
6674 m_esp->ser_w (0 , s32 (stream.get (2 , 0 ) * input_scale));
6775 m_esp->ser_w (1 , s32 (stream.get (3 , 0 ) * input_scale));
6876 m_esp->ser_w (2 , s32 (stream.get (4 , 0 ) * input_scale));
@@ -83,11 +91,9 @@ void esq_5505_5510_pump_device::sound_stream_update(sound_stream &stream)
8391 }
8492#endif
8593
86- // read the processed result from the ESP and add to the saved AUX data
87- sound_stream::sample_t ll = sound_stream::sample_t (m_esp->ser_r (6 )) * (1.0 / 32768.0 );
88- sound_stream::sample_t rr = sound_stream::sample_t (m_esp->ser_r (7 )) * (1.0 / 32768.0 );
89- l += ll;
90- r += rr;
94+ // Read the processed result from the ESP.
95+ sound_stream::sample_t l = sound_stream::sample_t (m_esp->ser_r (6 )) * (1.0 / 32768.0 );
96+ sound_stream::sample_t r = sound_stream::sample_t (m_esp->ser_r (7 )) * (1.0 / 32768.0 );
9197
9298#if !PUMP_FAKE_ESP_PROCESSING && PUMP_REPLACE_ESP_PROGRAM
9399 // if we're processing the fake program through the ESP, the result should just be that of adding the inputs
@@ -102,7 +108,7 @@ void esq_5505_5510_pump_device::sound_stream_update(sound_stream &stream)
102108 ei = (ei + 1 ) % 0x4000 ;
103109#endif
104110
105- // write the combined data to the output
111+ // Write the Processed samples to the output
106112 stream.put (0 , 0 , l);
107113 stream.put (1 , 0 , r);
108114
0 commit comments