summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/ymz770.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/ymz770.cpp')
-rw-r--r--src/devices/sound/ymz770.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp
index b19c21514e5..f175cac853d 100644
--- a/src/devices/sound/ymz770.cpp
+++ b/src/devices/sound/ymz770.cpp
@@ -2,17 +2,17 @@
// copyright-holders:Olivier Galibert, R. Belmont, MetalliC
/***************************************************************************
- Yamaha YMZ770C "AMMS-A" and YMZ774 "AMMS2C"
+ Yamaha YMZ770B "AMMSL", YMZ770C "AMMS-A" and YMZ774 "AMMS2C"
Emulation by R. Belmont and MetalliC
AMM decode by Olivier Galibert
-----
TODO:
-- What does channel ATBL mean?
- Simple Access mode. SACs is register / data lists same as SEQ. in 770C, when both /SEL and /CS pins goes low - will be run SAC with number set at data bus.
can not be used in CV1K (/SEL pin is NC, internally pulled to VCC), probably not used in PGM2 too.
770:
+- Configurable clock (currently hardcoded at 16kHz)
- sequencer timers implemented but seems unused, presumably because of design flaws or bugs, likely due to lack of automatic adding of sequencer # to register offset.
in result sequences uses very long chains of 32-sample wait commands instead, wasting a lot of ROM space.
- sequencer triggers not implemented, not sure how they works (Deathsmiles ending tune starts sequence with TGST = 01h, likely a bug and don't affect tune playback)
@@ -23,7 +23,7 @@ TODO:
- sequencer off trigger (not used in games)
known SPUs in this series:
- YMZ770B AMMSL Capcom medal hardware (alien.cpp), sample format is not AMM, in other parts looks like 770C
+ YMZ770B AMMSL Capcom medal hardware (alien.cpp)
YMZ770C AMMS-A Cave CV1000
YMZ771 SSGS3
YMZ773 AMMS2 Cron corp. video slots
@@ -182,12 +182,9 @@ void ymz770_device::device_reset()
// our sound stream
//-------------------------------------------------
-void ymz770_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void ymz770_device::sound_stream_update(sound_stream &stream)
{
- auto &outL = outputs[0];
- auto &outR = outputs[1];
-
- for (int i = 0; i < outL.samples(); i++)
+ for (int i = 0; i < stream.samples(); i++)
{
sequencer();
@@ -236,7 +233,7 @@ retry:
{
// next block
int sample_rate, channel_count;
- if (!channel.decoder->decode_buffer(channel.pptr, m_rom.bytes()*8, channel.output_data, channel.output_remaining, sample_rate, channel_count) || channel.output_remaining == 0)
+ if (!channel.decoder->decode_buffer(channel.pptr, m_rom.bytes()*8, channel.output_data, channel.output_remaining, sample_rate, channel_count, channel.atbl) || channel.output_remaining == 0)
{
channel.is_playing = !channel.last_block; // detect infinite retry loop
channel.last_block = true;
@@ -280,8 +277,8 @@ retry:
}
if (m_mute)
mixr = mixl = 0;
- outL.put_int(i, mixl, 32768);
- outR.put_int(i, mixr, 32768);
+ stream.put_int(0, i, mixl, 32768);
+ stream.put_int(1, i, mixr, 32768);
}
}