diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index a2c4475..8478c09 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 3ecdbfa..7f45012 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 550bcbf..e6ceae9 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/core/cart_hw/megasd.c b/core/cart_hw/megasd.c index a30cc43..989c2a5 100644 --- a/core/cart_hw/megasd.c +++ b/core/cart_hw/megasd.c @@ -487,6 +487,16 @@ static void megasd_ctrl_write_word(unsigned int address, unsigned int data) cdd.status = CD_PLAY; scd.regs[0x36>>1].byte.h = 0x00; + /* check if fade out is still in progress */ + if (megasd_hw.fadeoutSamplesCount > 0) + { + /* reset fade out */ + megasd_hw.fadeoutSamplesCount = 0; + + /* restore initial volume */ + cdd.fader[0] = cdd.fader[1] = megasd_hw.fadeoutStartVolume; + } + /* initialize remaining samples count */ megasd_hw.playbackSamplesCount = (cdd.toc.tracks[index].end - cdd.toc.tracks[index].start) * 588; @@ -673,6 +683,16 @@ static void megasd_ctrl_write_word(unsigned int address, unsigned int data) cdd.status = CD_PLAY; scd.regs[0x36>>1].byte.h = 0x00; + /* check if fade out is still in progress */ + if (megasd_hw.fadeoutSamplesCount > 0) + { + /* reset fade out */ + megasd_hw.fadeoutSamplesCount = 0; + + /* restore initial volume */ + cdd.fader[0] = cdd.fader[1] = megasd_hw.fadeoutStartVolume; + } + /* get playback end sector from command buffer (32-bit value in big-endian format) */ #ifndef LSB_FIRST megasd_hw.playbackEndSector = *(unsigned int *)(megasd_hw.buffer + 4) - 150;