OPZ: fix EGShift emulation
1. the TX81Z has operators in reverse order 2. don't early out if EGShift is not 0
This commit is contained in:
parent
6e19f5d719
commit
5974e8c045
|
|
@ -480,7 +480,7 @@ if (m_choffs == 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// early out if the envelope is effectively off
|
// 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;
|
return 0;
|
||||||
|
|
||||||
// get the absolute value of the sin, as attenuation, as a 4.8 fixed point value
|
// get the absolute value of the sin, as attenuation, as a 4.8 fixed point value
|
||||||
|
|
|
||||||
|
|
@ -472,9 +472,8 @@ void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata
|
||||||
if (reverb != 0)
|
if (reverb != 0)
|
||||||
cache.eg_rate[EG_REVERB] = std::min<uint32_t>(effective_rate(reverb * 4 + 2, ksrval), cache.eg_rate[EG_REVERB]);
|
cache.eg_rate[EG_REVERB] = std::min<uint32_t>(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"
|
// set the envelope shift; TX81Z manual says operator 1 (actually operator 4) shift is fixed at "off"
|
||||||
// TODO: change 0 to 3? operators are in reverse order in TX81Z
|
cache.eg_shift = ((opoffs & 0x18) == 0x18) ? 0 : op_eg_shift(opoffs);
|
||||||
cache.eg_shift = ((opoffs & 0x18) == 0) ? 0 : op_eg_shift(opoffs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue