summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/6522via.cpp11
-rw-r--r--src/devices/machine/8364_paula.cpp6
-rw-r--r--src/devices/machine/8364_paula.h2
-rw-r--r--src/devices/machine/acorn_vidc.cpp2
-rw-r--r--src/devices/machine/alpha_8921.cpp212
-rw-r--r--src/devices/machine/alpha_8921.h67
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.cpp9
-rw-r--r--src/devices/machine/laserdsc.cpp6
-rw-r--r--src/devices/machine/laserdsc.h2
-rw-r--r--src/devices/machine/netlist.cpp60
-rw-r--r--src/devices/machine/netlist.h23
-rw-r--r--src/devices/machine/s2636.cpp6
-rw-r--r--src/devices/machine/s2636.h2
-rw-r--r--src/devices/machine/sensorboard.cpp9
-rw-r--r--src/devices/machine/spg2xx_audio.cpp4
-rw-r--r--src/devices/machine/spg2xx_audio.h2
16 files changed, 353 insertions, 70 deletions
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp
index 37c7237db52..06f557c4355 100644
--- a/src/devices/machine/6522via.cpp
+++ b/src/devices/machine/6522via.cpp
@@ -587,17 +587,6 @@ u8 via6522_device::read(offs_t offset)
{
LOGINT("PB INT ");
CLR_PB_INT();
-
- if (m_out_cb2 && (CB2_PULSE_OUTPUT(m_pcr) || CB2_AUTO_HS(m_pcr)))
- {
- m_out_cb2 = 0;
- m_cb2_handler(m_out_cb2);
- }
-
- if (CB2_PULSE_OUTPUT(m_pcr))
- {
- m_cb2_timer->adjust(clocks_to_attotime(1));
- }
}
break;
diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp
index a340b5a523c..1e10ca55b3e 100644
--- a/src/devices/machine/8364_paula.cpp
+++ b/src/devices/machine/8364_paula.cpp
@@ -58,7 +58,7 @@ void paula_8364_device::device_start()
}
// create the stream
- m_stream = machine().sound().stream_alloc(*this, 0, 4, clock() / CLOCK_DIVIDER);
+ m_stream = stream_alloc_legacy(0, 4, clock() / CLOCK_DIVIDER);
}
//-------------------------------------------------
@@ -159,10 +159,10 @@ void paula_8364_device::dma_reload(audio_channel *chan)
}
//-------------------------------------------------
-// sound_stream_update - handle a stream update
+// sound_stream_update_legacy - handle a stream update
//-------------------------------------------------
-void paula_8364_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
{
int channum, sampoffs = 0;
diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h
index 0a7016c4496..a2ac2feab26 100644
--- a/src/devices/machine/8364_paula.h
+++ b/src/devices/machine/8364_paula.h
@@ -68,7 +68,7 @@ protected:
virtual void device_start() override;
// sound stream update overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
private:
enum
diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp
index 65487e2b63a..36733555e7d 100644
--- a/src/devices/machine/acorn_vidc.cpp
+++ b/src/devices/machine/acorn_vidc.cpp
@@ -416,7 +416,7 @@ inline void acorn_vidc10_device::refresh_stereo_image(u8 channel)
m_lspeaker->set_input_gain(channel,left_gain[m_stereo_image[channel]]*m_sound_input_gain);
m_rspeaker->set_input_gain(channel,right_gain[m_stereo_image[channel]]*m_sound_input_gain);
- //printf("%d %f %f\n",channel,m_lspeaker->input_gain(channel),m_rspeaker->input_gain(channel));
+ //printf("%d %f %f\n",channel,m_lspeaker->input(channel).gain(),m_rspeaker->input(channel).gain());
}
diff --git a/src/devices/machine/alpha_8921.cpp b/src/devices/machine/alpha_8921.cpp
new file mode 100644
index 00000000000..bf57902b31e
--- /dev/null
+++ b/src/devices/machine/alpha_8921.cpp
@@ -0,0 +1,212 @@
+// license:BSD-3-Clause
+// copyright-holders:cam900
+/***************************************************************************
+
+ Alpha denshi ALPHA-8921 emulation
+
+ Also known as
+ SNK PRO-CT0
+ SNK-9201
+
+ This chip is sprite ROM data serializer, or optional security device.
+ used in some later 80s Alpha Denshi hardware(ex: Gang Wars),
+ Some early Neogeo MVS motherboards, AES cartridges.
+ also integrated in NEO-ZMC2, NEO-CMC.
+
+ reference: https://wiki.neogeodev.org/index.php?title=PRO-CT0
+
+***************************************************************************/
+
+#include "emu.h"
+#include "alpha_8921.h"
+#include <algorithm>
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(ALPHA_8921, alpha_8921_device, "alpha_8921", "Alpha denshi ALPHA-8921")
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// alpha_8921_device - constructor
+//-------------------------------------------------
+
+alpha_8921_device::alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, ALPHA_8921, tag, owner, clock)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void alpha_8921_device::device_start()
+{
+ // save states
+ save_item(NAME(m_clk));
+ save_item(NAME(m_load));
+ save_item(NAME(m_even));
+ save_item(NAME(m_h));
+ save_item(NAME(m_c));
+ save_item(NAME(m_gad));
+ save_item(NAME(m_gbd));
+ save_item(NAME(m_dota));
+ save_item(NAME(m_dotb));
+ save_item(NAME(m_sr));
+ save_item(NAME(m_old_sr));
+ save_item(NAME(m_old_even));
+ save_item(NAME(m_old_h));
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void alpha_8921_device::device_reset()
+{
+ // force update outputs
+ m_old_sr = ~m_sr;
+ m_old_even = !m_even;
+ m_old_h = !m_h;
+ update_output();
+}
+
+
+//**************************************************************************
+// READ/WRITE HANDLERS
+//**************************************************************************
+
+//-------------------------------------------------
+// clk_w - Change clock pin status
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(alpha_8921_device::clk_w)
+{
+ if (m_clk != state)
+ {
+ m_clk = state;
+ if (!m_clk) // falling edge
+ {
+ if (m_load)
+ m_sr = m_c;
+ else if (m_h)
+ m_sr = (BIT(m_sr, 24, 6) << 26) | (BIT(m_sr, 16, 6) << 18) | (BIT(m_sr, 8, 6) << 10) | (BIT(m_sr, 0, 6) << 2);
+ else
+ m_sr = ((BIT(m_sr, 26, 6)) << 24) | ((BIT(m_sr, 18, 6)) << 16) | ((BIT(m_sr, 10, 6)) << 8) | (BIT(m_sr, 2, 6));
+ }
+ }
+}
+
+//-------------------------------------------------
+// load_w - Change LOAD pin status
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(alpha_8921_device::load_w)
+{
+ m_load = state;
+}
+
+//-------------------------------------------------
+// even_w - Change EVEN pin status
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(alpha_8921_device::even_w)
+{
+ m_even = state;
+}
+
+//-------------------------------------------------
+// h_w - Change H pin status
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(alpha_8921_device::h_w)
+{
+ m_h = state;
+}
+
+//-------------------------------------------------
+// c_w - Change C data
+//-------------------------------------------------
+
+void alpha_8921_device::c_w(u32 data)
+{
+ m_c = data;
+}
+
+//-------------------------------------------------
+// update_output - Update output results
+//-------------------------------------------------
+
+void alpha_8921_device::update_output()
+{
+ if ((m_old_sr != m_sr) || (m_old_even != m_even) || (m_old_h != m_h))
+ {
+ if (m_h)
+ {
+ m_gbd = bitswap<4>(m_sr, 30, 22, 14, 6);
+ m_gad = bitswap<4>(m_sr, 31, 23, 15, 7);
+ }
+ else
+ {
+ m_gbd = bitswap<4>(m_sr, 25, 17, 9, 1);
+ m_gad = bitswap<4>(m_sr, 24, 16, 8, 0);
+ }
+ if (m_even)
+ std::swap<u8>(m_gad, m_gbd);
+
+ m_dota = m_gad ? true : false;
+ m_dotb = m_gbd ? true : false;
+ m_old_sr = m_sr;
+ m_old_even = m_even;
+ m_old_h = m_h;
+ }
+}
+
+//-------------------------------------------------
+// gad_r - Read GAD data
+//-------------------------------------------------
+
+u8 alpha_8921_device::gad_r()
+{
+ update_output();
+ return m_gad & 0xf;
+}
+
+//-------------------------------------------------
+// gbd_r - Read GBD data
+//-------------------------------------------------
+
+u8 alpha_8921_device::gbd_r()
+{
+ update_output();
+ return m_gbd & 0xf;
+}
+
+//-------------------------------------------------
+// dota_r - Read DOTA pin data (GAD isn't 0)
+//-------------------------------------------------
+
+READ_LINE_MEMBER(alpha_8921_device::dota_r)
+{
+ update_output();
+ return m_dota;
+}
+
+//-------------------------------------------------
+// dotb_r - Read DOTB pin data (GBD isn't 0)
+//-------------------------------------------------
+
+READ_LINE_MEMBER(alpha_8921_device::dotb_r)
+{
+ update_output();
+ return m_dotb;
+}
diff --git a/src/devices/machine/alpha_8921.h b/src/devices/machine/alpha_8921.h
new file mode 100644
index 00000000000..88ecd850eb9
--- /dev/null
+++ b/src/devices/machine/alpha_8921.h
@@ -0,0 +1,67 @@
+// license:BSD-3-Clause
+// copyright-holders:cam900
+/***************************************************************************
+
+ Alpha denshi ALPHA-8921 emulation
+
+***************************************************************************/
+
+#ifndef MAME_MACHINE_ALPHA_8921_H
+#define MAME_MACHINE_ALPHA_8921_H
+
+#pragma once
+
+
+// ======================> alpha_8921_device
+
+class alpha_8921_device : public device_t
+{
+public:
+ // construction/destruction
+ alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // inputs
+ DECLARE_WRITE_LINE_MEMBER(clk_w);
+ DECLARE_WRITE_LINE_MEMBER(load_w);
+ DECLARE_WRITE_LINE_MEMBER(even_w);
+ DECLARE_WRITE_LINE_MEMBER(h_w);
+ void c_w(u32 data);
+
+ // outputs
+ u8 gad_r();
+ u8 gbd_r();
+ DECLARE_READ_LINE_MEMBER(dota_r);
+ DECLARE_READ_LINE_MEMBER(dotb_r);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ // inputs
+ bool m_clk = false; // CLK pin
+ bool m_load = false; // LOAD pin
+ bool m_even = false; // EVEN pin
+ bool m_h = false; // H pin
+ u32 m_c = 0; // C data (32 bit)
+
+ // outputs
+ u8 m_gad = 0; // GAD data (4 bit)
+ u8 m_gbd = 0; // GBD data (4 bit)
+ bool m_dota = false; // DOTA pin
+ bool m_dotb = false; // DOTB pin
+
+ // internal status
+ u32 m_sr = 0;
+ u32 m_old_sr = ~0;
+ bool m_old_even = true;
+ bool m_old_h = true;
+ void update_output();
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(ALPHA_8921, alpha_8921_device)
+
+#endif // MAME_MACHINE_ALPHA_8921_H
diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp
index ac0c99f480e..2548929027c 100644
--- a/src/devices/machine/generalplus_gpl16250soc.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc.cpp
@@ -203,7 +203,7 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(int channel)
// note, these patch the code copied to SRAM so the 'PROGRAM ROM' check fails (it passes otherwise)
- //address_space& mem = this->space(AS_PROGRAM);
+ address_space& mem = this->space(AS_PROGRAM);
//if (mem.read_word(0x4368c) == 0x4846)
// mem.write_word(0x4368c, 0x4840); // cars 2 force service mode
@@ -218,6 +218,13 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(int channel)
//if (mem.read_word(0x4d8d4) == 0x4840)
// mem.write_word(0x4d8d4, 0x4841); // golden tee IRQ? wait hack
+ //if (mem.read_word(0x3510f) == 0x4845)
+ // mem.write_word(0x3510f, 0x4840); // camp rock force service mode
+
+ if (mem.read_word(0x4abe7) == 0x4840)
+ mem.write_word(0x4abe7, 0x4841); // camp rock IRQ? wait hack
+
+
// clear params after operation
m_dma_params[0][channel] = m_dma_params[0][channel] & 0x00f7;
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index 8176ac14f29..ef3df359859 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -308,11 +308,11 @@ void laserdisc_device::device_timer(emu_timer &timer, device_timer_id id, int pa
//-------------------------------------------------
-// sound_stream_update - audio streamer for
+// sound_stream_update_legacy - audio streamer for
// laserdiscs
//-------------------------------------------------
-void laserdisc_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void laserdisc_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
{
// compute AND values based on the squelch
int16_t leftand = (m_audiosquelch & 1) ? 0x0000 : 0xffff;
@@ -762,7 +762,7 @@ void laserdisc_device::init_audio()
m_audio_callback.resolve();
// allocate a stream
- m_stream = stream_alloc(0, 2, 48000);
+ m_stream = stream_alloc_legacy(0, 2, 48000);
// allocate audio buffers
m_audiomaxsamples = ((uint64_t)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million;
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index e2877a4a216..8ca3abad222 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -220,7 +220,7 @@ protected:
virtual void device_validity_check(validity_checker &valid) const override;
// device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
// subclass helpers
void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); }
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 10208d8e357..988c21c33e1 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -263,7 +263,7 @@ plib::istream_uptr netlist_data_memregions_t::stream(const pstring &name)
// sound_in
// ----------------------------------------------------------------------------------------
-using sound_in_type = netlist::interface::NETLIB_NAME(buffered_param_setter)<stream_sample_t *>;
+using sound_in_type = netlist::interface::NETLIB_NAME(buffered_param_setter)<netlist_mame_sound_input_buffer>;
class NETLIB_NAME(sound_in) : public sound_in_type
{
@@ -820,17 +820,15 @@ void netlist_mame_stream_output_device::device_reset()
#endif
}
-void netlist_mame_stream_output_device::sound_update_fill(std::size_t samples, stream_sample_t *target)
+void netlist_mame_stream_output_device::sound_update_fill(write_stream_view &target)
{
- if (samples < m_buffer.size())
- osd_printf_warning("sound %s: samples %d less bufsize %d\n", name(), samples, m_buffer.size());
+ if (target.samples() < m_buffer.size())
+ osd_printf_warning("sound %s: samples %d less bufsize %d\n", name(), target.samples(), m_buffer.size());
- std::copy(m_buffer.begin(), m_buffer.end(), target);
- std::size_t pos = m_buffer.size();
- while (pos < samples)
- {
- target[pos++] = m_cur;
- }
+ int sampindex;
+ for (sampindex = 0; sampindex < m_buffer.size(); sampindex++)
+ target.put(sampindex, m_buffer[sampindex]);
+ target.fill(m_cur, sampindex);
}
@@ -868,19 +866,10 @@ void netlist_mame_stream_output_device::process(netlist::netlist_time_ext tim, n
// throw emu_fatalerror("sound %s: pos %d exceeded bufsize %d\n", name().c_str(), pos, m_bufsize);
while (m_buffer.size() < pos )
{
- m_buffer.push_back(static_cast<stream_sample_t>(m_cur));
+ m_buffer.push_back(static_cast<stream_buffer::sample_t>(m_cur));
}
- // clamp to avoid spikes, but not too hard, as downstream processing, volume
- // controls, etc may bring values above 32767 back down in range; some clamping
- // is still useful, however, as the mixing is done with integral values
- if (plib::abs(val) < 32767.0*256.0)
- m_cur = val;
- else if (val > 0.0)
- m_cur = 32767.0*256.0;
- else
- m_cur = -32767.0*256.0;
-
+ m_cur = val;
}
@@ -1409,8 +1398,10 @@ void netlist_mame_sound_device::device_start()
if (e.first < 0 || e.first >= m_in.size())
fatalerror("illegal input channel number %d", e.first);
}
+ m_inbuffer.resize(m_in.size());
+
/* initialize the stream(s) */
- m_stream = machine().sound().stream_alloc(*this, m_in.size(), m_out.size(), m_sound_clock);
+ m_stream = stream_alloc(m_in.size(), m_out.size(), m_sound_clock, STREAM_DISABLE_INPUT_RESAMPLING);
LOGDEVCALLS("sound device_start exit\n");
}
@@ -1453,26 +1444,25 @@ void netlist_mame_sound_device::update_to_current_time()
LOGTIMING("%s : %f us before machine time\n", this->name(), (cur - mtime).as_double() * 1000000.0);
}
-void netlist_mame_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void netlist_mame_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- const auto mtime = machine().time();
- if (mtime < m_last_update_to_current_time)
- LOGTIMING("machine.time() decreased 1\n");
- m_last_update_to_current_time = mtime;
- LOGDEBUG("samples %d\n", samples);
-
for (auto &e : m_in)
{
- auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(m_attotime_per_clock).as_raw()));
- e.second->buffer_reset(sample_time, samples, &inputs[e.first]);
+ auto clock_period = inputs[e.first].sample_period();
+ auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw()));
+ m_inbuffer[e.first] = netlist_mame_sound_input_buffer(inputs[e.first]);
+ e.second->buffer_reset(sample_time, m_inbuffer[e.first].samples(), &m_inbuffer[e.first]);
}
- m_cur_time += (samples * m_attotime_per_clock);
+ int samples = outputs[0].samples();
+ LOGDEBUG("samples %d\n", samples);
- auto nl_target_time = std::min(nltime_from_attotime(mtime), nltime_from_attotime(m_cur_time));
+ // end_time() is the time at the END of the last sample we're generating
+ // however, the sample value is the value at the START of that last sample,
+ // so subtract one sample period so that we only process up to the minimum
+ auto nl_target_time = nltime_from_attotime(outputs[0].end_time() - outputs[0].sample_period());
auto nltime(netlist().exec().time());
-
if (nltime < nl_target_time)
{
netlist().exec().process_queue(nl_target_time - nltime);
@@ -1480,7 +1470,7 @@ void netlist_mame_sound_device::sound_stream_update(sound_stream &stream, stream
for (auto &e : m_out)
{
- e.second->sound_update_fill(samples, outputs[e.first]);
+ e.second->sound_update_fill(outputs[e.first]);
e.second->buffer_reset(nl_target_time);
}
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index b7a78c0bd77..8b9e156adba 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -229,6 +229,22 @@ private:
};
// ----------------------------------------------------------------------------------------
+// netlist_mame_sound_input_buffer
+// ----------------------------------------------------------------------------------------
+
+class netlist_mame_sound_input_buffer : public read_stream_view
+{
+public:
+ netlist_mame_sound_input_buffer() :
+ read_stream_view() { }
+
+ netlist_mame_sound_input_buffer(read_stream_view const &src) :
+ read_stream_view(src) { }
+
+ stream_buffer::sample_t operator[](std::size_t index) { return get(index); }
+};
+
+// ----------------------------------------------------------------------------------------
// netlist_mame_sound_device
// ----------------------------------------------------------------------------------------
@@ -266,13 +282,14 @@ protected:
// device_t overrides
virtual void device_start() override;
// device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
virtual void device_validity_check(validity_checker &valid) const override;
//virtual void device_reset() override;
private:
std::map<int, netlist_mame_stream_output_device *> m_out;
std::map<std::size_t, nld_sound_in *> m_in;
+ std::vector<netlist_mame_sound_input_buffer> m_inbuffer;
sound_stream *m_stream;
attotime m_cur_time;
uint32_t m_sound_clock;
@@ -593,7 +610,7 @@ public:
m_buffer.clear();
}
- void sound_update_fill(std::size_t samples, stream_sample_t *target);
+ void sound_update_fill(write_stream_view &target);
void set_sample_time(netlist::netlist_time t) { m_sample_time = t; }
@@ -608,7 +625,7 @@ private:
uint32_t m_channel;
const char * m_out_name;
- std::vector<stream_sample_t> m_buffer;
+ std::vector<stream_buffer::sample_t> m_buffer;
double m_cur;
netlist::netlist_time m_sample_time;
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp
index ddc46adf81c..bdf95dc69d0 100644
--- a/src/devices/machine/s2636.cpp
+++ b/src/devices/machine/s2636.cpp
@@ -203,7 +203,7 @@ void s2636_device::device_start()
save_item(NAME(m_intreq));
save_item(NAME(m_intack));
- m_stream = machine().sound().stream_alloc(*this, 0, 1, machine().sample_rate());
+ m_stream = stream_alloc_legacy(0, 1, machine().sample_rate());
save_item(NAME(m_sample_cnt));
save_item(NAME(m_sound_lvl));
@@ -447,10 +447,10 @@ void s2636_device::write_intack(int state)
//-------------------------------------------------
-// sound_stream_update - generate audio output
+// sound_stream_update_legacy - generate audio output
//-------------------------------------------------
-void s2636_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void s2636_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
{
stream_sample_t *buffer = outputs[0];
while (samples--)
diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h
index bc82ed68903..b5e41b83499 100644
--- a/src/devices/machine/s2636.h
+++ b/src/devices/machine/s2636.h
@@ -58,7 +58,7 @@ protected:
virtual void device_start() override;
// sound stream update overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
private:
enum
diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp
index e3e168d6e16..0a5767aef3e 100644
--- a/src/devices/machine/sensorboard.cpp
+++ b/src/devices/machine/sensorboard.cpp
@@ -49,9 +49,10 @@ To prevent the possibility of a piece/sensor having opposite states (iow: piece
selected but sensor deactivated, the button is not clicked when dropping a piece
at the same position it was before.
-Hold CTRL while clicking to activate the piece but ignore the sensor beneath it.
-Hold SHIFT while clicking to activate the sensor but ignore the piece (sidenote:
-it will invert the sensor state for magnet boards).
+Hold CTRL while clicking to activate the piece but ignore the sensor beneath it,
+on magnet boards this only applies during piece capture. Hold SHIFT while clicking
+to activate the sensor but ignore the piece, on magnet boards it will invert the
+sensor state instead.
*/
@@ -261,7 +262,7 @@ u8 sensorboard_device::read_sensor(u8 x, u8 y)
if (m_magnets)
{
u8 piece = read_piece(x, y);
- u8 state = (piece != 0 && pos != m_handpos && pos != m_droppos) ? 1 : 0;
+ u8 state = (piece != 0 && pos != m_handpos && (m_inp_ui->read() & 2 || pos != m_droppos)) ? 1 : 0;
// piece recognition: return piece id
if (m_inductive)
diff --git a/src/devices/machine/spg2xx_audio.cpp b/src/devices/machine/spg2xx_audio.cpp
index f1ffd871f28..07d01e88be5 100644
--- a/src/devices/machine/spg2xx_audio.cpp
+++ b/src/devices/machine/spg2xx_audio.cpp
@@ -76,7 +76,7 @@ void spg2xx_audio_device::device_start()
m_audio_beat = timer_alloc(TIMER_BEAT);
m_audio_beat->adjust(attotime::never);
- m_stream = stream_alloc(0, 2, 281250/4);
+ m_stream = stream_alloc_legacy(0, 2, 281250/4);
m_channel_debug = -1;
@@ -887,7 +887,7 @@ void spg2xx_audio_device::audio_w(offs_t offset, uint16_t data)
}
}
-void spg2xx_audio_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void spg2xx_audio_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
{
stream_sample_t *out_l = outputs[0];
stream_sample_t *out_r = outputs[1];
diff --git a/src/devices/machine/spg2xx_audio.h b/src/devices/machine/spg2xx_audio.h
index 30b001edfb2..59d7635198d 100644
--- a/src/devices/machine/spg2xx_audio.h
+++ b/src/devices/machine/spg2xx_audio.h
@@ -33,7 +33,7 @@ public:
protected:
// sound stream update overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
void audio_beat_tick();
void audio_rampdown_tick(const uint32_t channel);