Added a small disc access delay to fix the missing music in Super Monkey Ball 2.

This commit is contained in:
skidau 2013-09-27 20:35:27 +10:00 committed by Pierre Bourdon
parent 76e3a6dbd5
commit e19fb50ae8
1 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,10 @@
#include "../Movie.h"
// Disc transfer rate measured in bytes per second
static const u32 DISC_TRANSFER_RATE_GC = 4 * 1024 * 1024;
static const u32 DISC_TRANSFER_RATE_GC = 5 * 1024 * 1024;
// Disc access time measured in milliseconds
static const u32 DISC_ACCESS_TIME_MS = 1;
namespace DVDInterface
{
@ -492,7 +495,8 @@ void Write32(const u32 _iValue, const u32 _iAddress)
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed)
{
u64 ticksUntilTC = m_DILENGTH.Length *
(SystemTimers::GetTicksPerSecond() / (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 1 : DISC_TRANSFER_RATE_GC));
(SystemTimers::GetTicksPerSecond() / (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 1 : DISC_TRANSFER_RATE_GC)) +
(SystemTimers::GetTicksPerSecond() * DISC_ACCESS_TIME_MS / 1000);
CoreTiming::ScheduleEvent((int)ticksUntilTC, tc);
}
else