diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index 6866958..910331b 100644 Binary files a/builds/genesis_plus_gx_libretro.dll and b/builds/genesis_plus_gx_libretro.dll differ diff --git a/builds/genplus_cube.dol b/builds/genplus_cube.dol index 0fe70eb..93bd1d6 100644 Binary files a/builds/genplus_cube.dol and b/builds/genplus_cube.dol differ diff --git a/builds/genplus_wii.dol b/builds/genplus_wii.dol index 038bf82..48e0d5e 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/core/sound/ym2413.c b/core/sound/ym2413.c index ad453fa..7ba73ce 100644 --- a/core/sound/ym2413.c +++ b/core/sound/ym2413.c @@ -25,7 +25,8 @@ to do: */ -/** EkeEke (2011): removed multiple chips support, cleaned code & added FM board interface for Genesis Plus GX **/ +/** EkeEke (2011/xx/xx): removed multiple chips support, cleaned code & added FM board interface for Genesis Plus GX **/ +/** EkeEke (2021/04/23): fixed synchronization of carrier/modulator phase reset after channel Key ON (fixes Master System BIOS music) **/ #include "shared.h" @@ -543,10 +544,6 @@ INLINE void advance(void) switch(op->state) { case EG_DMP: /* dump phase */ - /*dump phase is performed by both operators in each channel*/ - /*when CARRIER envelope gets down to zero level, - ** phases in BOTH opearators are reset (at the same time ?) - */ if ( !(ym2413.eg_cnt & ((1<eg_sh_dp)-1) ) ) { op->volume += eg_inc[op->eg_sel_dp + ((ym2413.eg_cnt>>op->eg_sh_dp)&7)]; @@ -555,8 +552,13 @@ INLINE void advance(void) { op->volume = MAX_ATT_INDEX; op->state = EG_ATT; - /* restart Phase Generator */ - op->phase = 0; + + /*dump phase is performed by both operators in each channel*/ + /*when CARRIER envelope gets down to zero level, + *phases in BOTH operators are reset (at the same time ?) + */ + if (i&1) + CH->SLOT[0].phase = CH->SLOT[1].phase = 0; } } break;