diff --git a/src/engine/platform/sound/ymfm/ymfm_fm.ipp b/src/engine/platform/sound/ymfm/ymfm_fm.ipp index 4e851737a..d532d7b2e 100644 --- a/src/engine/platform/sound/ymfm/ymfm_fm.ipp +++ b/src/engine/platform/sound/ymfm/ymfm_fm.ipp @@ -480,7 +480,7 @@ if (m_choffs == 0) #endif // early out if the envelope is effectively off - if (m_env_attenuation > EG_QUIET) + if (m_env_attenuation > EG_QUIET && m_cache.eg_shift == 0) return 0; // get the absolute value of the sin, as attenuation, as a 4.8 fixed point value diff --git a/src/engine/platform/sound/ymfm/ymfm_opz.cpp b/src/engine/platform/sound/ymfm/ymfm_opz.cpp index 6408ae33a..94123bf62 100644 --- a/src/engine/platform/sound/ymfm/ymfm_opz.cpp +++ b/src/engine/platform/sound/ymfm/ymfm_opz.cpp @@ -472,9 +472,8 @@ void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata if (reverb != 0) cache.eg_rate[EG_REVERB] = std::min(effective_rate(reverb * 4 + 2, ksrval), cache.eg_rate[EG_REVERB]); - // set the envelope shift; TX81Z manual says operator 1 shift is fixed at "off" - // TODO: change 0 to 3? operators are in reverse order in TX81Z - cache.eg_shift = ((opoffs & 0x18) == 0) ? 0 : op_eg_shift(opoffs); + // set the envelope shift; TX81Z manual says operator 1 (actually operator 4) shift is fixed at "off" + cache.eg_shift = ((opoffs & 0x18) == 0x18) ? 0 : op_eg_shift(opoffs); }