Skip to content

Commit 37eb639

Browse files
committed
esq5505.cpp and esqpump.cpp: Route es5505 bus to a separate 'aux' stereo output.
The VFX-SD and later keyboards in the family have not only a main stereo output, but also a second 'aux' stereo output that bypasses effects processing and has separate output jacks from the keyboard. This allows some sound to be routed for separate effects processing or recording.
1 parent 4d867c7 commit 37eb639

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

src/devices/sound/esqpump.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
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

2730
void 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

src/mame/ensoniq/esq5505.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ void esq5505_state::vfxsd(machine_config &config)
854854
// but with an updated memory map that includes FDC and sequence RAM
855855
m_maincpu->set_addrmap(AS_PROGRAM, &esq5505_state::vfxsd_map);
856856

857+
SPEAKER(config, "aux", 2).front();
858+
m_pump->add_route(2, "aux", 1.0, 0);
859+
m_pump->add_route(3, "aux", 1.0, 1);
860+
857861
// On the VFX-SD, the floppy connector always has exactly one 3.5inch DD floppy drive.
858862
WD1772(config, m_fdc, 8000000);
859863
FLOPPY_CONNECTOR(config, m_floppy_connector, esq5505_state::floppy_drives, "35dd", esq5505_state::floppy_formats, true).enable_sound(true);
@@ -898,6 +902,10 @@ void esq5505_state::vfx32(machine_config &config)
898902
m_pump->add_route(0, "speaker", 1.0, 0);
899903
m_pump->add_route(1, "speaker", 1.0, 1);
900904

905+
SPEAKER(config, "aux", 2).front();
906+
m_pump->add_route(2, "aux", 1.0, 0);
907+
m_pump->add_route(3, "aux", 1.0, 1);
908+
901909
ES5505(config, m_otis, 30.47618_MHz_XTAL / 2);
902910
m_otis->sample_rate_changed().set(FUNC(esq5505_state::es5505_clock_changed));
903911
m_otis->set_region0("waverom"); /* Bank 0 */

0 commit comments

Comments
 (0)