diff --git a/src/devices/sound/2612intf.cpp b/src/devices/sound/2612intf.cpp index 7350d04a624..21ca436a004 100644 --- a/src/devices/sound/2612intf.cpp +++ b/src/devices/sound/2612intf.cpp @@ -42,7 +42,7 @@ void ym2612_device::device_timer(emu_timer &timer, device_timer_id id, int param void ym2612_device::timer_handler(int c,int count,int clock) { - if( count == 0 ) + if( count == 0 || clock == 0 ) { /* Reset FM Timer */ m_timer[c]->enable(false); } diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp index 1509ab8d8b8..a00bd45d522 100644 --- a/src/devices/sound/rf5c68.cpp +++ b/src/devices/sound/rf5c68.cpp @@ -65,6 +65,15 @@ void rf5c68_device::device_start() save_item(NAME(m_enable)); } +//------------------------------------------------- +// device_clock_changed +//------------------------------------------------- + +void rf5c68_device::device_clock_changed() +{ + m_stream->set_sample_rate(clock() / 384); +} + //------------------------------------------------- // memory_space_config - return a description of // any address spaces owned by this device diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h index f0c202e0e04..7d3fc2ba600 100644 --- a/src/devices/sound/rf5c68.h +++ b/src/devices/sound/rf5c68.h @@ -46,6 +46,7 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_clock_changed() override; // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp index 5e9cea25ac7..76f86eb5b61 100644 --- a/src/mame/drivers/vgmplay.cpp +++ b/src/mame/drivers/vgmplay.cpp @@ -1515,7 +1515,9 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state, load_file) if (r32(0x10) & 0x40000000) logerror("Warning: file requests an unsupported 2nd YM2413\n"); - m_ym2612->set_unscaled_clock((version >= 0x110 ? r32(0x2c) : r32(0x10)) & ~0x40000000); + m_ym2612->set_unscaled_clock((version >= 0x110 ? r32(0x2c) : r32(0x10)) & ~0xc0000000); + if (version >= 0x110 && (r32(0x2c) & 0x80000000)) + logerror("Warning: file requests an unsupported YM3438\n"); if (version >= 0x110 && (r32(0x2c) & 0x40000000)) logerror("Warning: file requests an unsupported 2nd YM2612\n");