rf5c68: update stream before writing to wave ram

This commit is contained in:
hap 2021-04-02 17:03:41 +02:00
parent 7065e73b8d
commit 1cc65ff1c9
2 changed files with 8 additions and 10 deletions

View File

@ -458,7 +458,8 @@ void multipcm_device::write(offs_t offset, uint8_t data)
}
}
/* MAME/M1 access functions */
/* MAME access functions */
DEFINE_DEVICE_TYPE(MULTIPCM, multipcm_device, "ymw258f", "Yamaha YMW-258-F")
@ -641,8 +642,7 @@ void multipcm_device::device_clock_changed()
}
//-----------------------------------------------------
// convert_to_stream_sample - clamp a 32-bit value to
// 16 bits and convert to a stream_buffer::sample_t
// dump_sample - dump current sample to WAV file
//-----------------------------------------------------
#if MULTIPCM_LOG_SAMPLES

View File

@ -211,10 +211,8 @@ void rf5c68_device::sound_stream_update(sound_stream &stream, std::vector<read_s
// TODO: RF5C164 only?
u8 rf5c68_device::rf5c68_r(offs_t offset)
{
u8 shift;
m_stream->update();
shift = (offset & 1) ? 11 + 8 : 11;
u8 shift = (offset & 1) ? 11 + 8 : 11;
// printf("%08x\n",(m_chan[(offset & 0x0e) >> 1].addr));
@ -224,7 +222,6 @@ u8 rf5c68_device::rf5c68_r(offs_t offset)
void rf5c68_device::rf5c68_w(offs_t offset, u8 data)
{
pcm_channel &chan = m_chan[m_cbank];
int i;
/* force the stream to update first */
m_stream->update();
@ -271,7 +268,7 @@ void rf5c68_device::rf5c68_w(offs_t offset, u8 data)
break;
case 0x08: /* channel on/off reg */
for (i = 0; i < 8; i++)
for (int i = 0; i < 8; i++)
{
m_chan[i].enable = (~data >> i) & 1;
if (!m_chan[i].enable)
@ -298,5 +295,6 @@ u8 rf5c68_device::rf5c68_mem_r(offs_t offset)
void rf5c68_device::rf5c68_mem_w(offs_t offset, u8 data)
{
m_stream->update();
m_cache.write_byte(m_wbank | offset, data);
}