Commit 1a1c2a1e authored by ekeeke's avatar ekeeke
Browse files

[Core/Sound] fixed MAME YM2413 core EG behavior when SL = 0 (verified on...

[Core/Sound] fixed MAME YM2413 core EG behavior when SL = 0 (verified on YM2413 real hardware, cf. https://www.smspower.org/Development/YM2413ReverseEngineeringNotes2015-12-24)
parent ca484e9c
......@@ -155,6 +155,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* fixed YM2413 EG resolution bits (verified on YM2413B die)
* fixed YM2413 EG dump rate (verified on YM2413 hardware)
* fixed YM2413 EG behavior for fastest attack rates (verified on YM2413 hardware)
* fixed YM2413 EG behavior when SL=0 (verified on YM2413 hardware)
[Gamecube/Wii]
---------------
......
No preview for this file type
No preview for this file type
......@@ -34,6 +34,7 @@ to do:
/** 2021/04/24: fixed EG resolution bits (verified on YM2413B die, cf. https://www.smspower.org/Development/YM2413ReverseEngineeringNotes2015-03-20) **/
/** 2021/04/24: fixed EG dump rate (verified on YM2413 real hardware, cf. https://www.smspower.org/Development/YM2413ReverseEngineeringNotes2015-12-31) **/
/** 2021/04/25: fixed EG behavior for fastest attack rates (verified on YM2413 real hardware, cf. https://www.smspower.org/Development/YM2413ReverseEngineeringNotes2017-01-26) **/
/** 2021/04/25: fixed EG behavior when SL = 0 (verified on YM2413 real hardware, cf. https://www.smspower.org/Development/YM2413ReverseEngineeringNotes2015-12-24) **/
#include "shared.h"
......@@ -595,7 +596,7 @@ INLINE void advance(void)
else
{
op->volume = MIN_ATT_INDEX;
op->state = EG_DEC;
op->state = (op->sl == MIN_ATT_INDEX) ? EG_SUS : EG_DEC; /* decay phase should not occur in case SL = 0 */
}
/*dump phase is performed by both operators in each channel*/
......@@ -617,7 +618,7 @@ INLINE void advance(void)
if (op->volume <= MIN_ATT_INDEX)
{
op->volume = MIN_ATT_INDEX;
op->state = EG_DEC;
op->state = (op->sl == MIN_ATT_INDEX) ? EG_SUS : EG_DEC; /* decay phase should not occur in case SL = 0 */
}
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment