Fixes Issue 1997

This also makes the CP FIFO hack obsolete.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4821 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx 2010-01-13 09:03:55 +00:00
parent 1e2f7c89c3
commit ecdcffc7cf
3 changed files with 7 additions and 10 deletions

View file

@ -717,7 +717,9 @@ void UpdateParameters()
case 0: // NTSC
case 2: // PAL-M
TargetRefreshRate = NTSC_FIELD_RATE;
TicksPerFrame = SystemTimers::GetTicksPerSecond() / NTSC_FIELD_RATE;
// AyuanX: Some games are pretty sensitive to this value
// So we have to make it run a little faster to prevent potential time out
TicksPerFrame = SystemTimers::GetTicksPerSecond() / (NTSC_FIELD_RATE + 1);
s_lineCount = m_DisplayControlRegister.NIN ? NTSC_LINE_COUNT : (NTSC_LINE_COUNT+1)/2;
//s_upperFieldBegin = NTSC_UPPER_BEGIN;
//s_lowerFieldBegin = NTSC_LOWER_BEGIN;
@ -725,7 +727,9 @@ void UpdateParameters()
case 1: // PAL
TargetRefreshRate = PAL_FIELD_RATE;
TicksPerFrame = SystemTimers::GetTicksPerSecond() / PAL_FIELD_RATE;
// AyuanX: Some games are pretty sensitive to this value
// So we have to make it run a little faster to prevent potential time out
TicksPerFrame = SystemTimers::GetTicksPerSecond() / (PAL_FIELD_RATE + 1);
s_lineCount = m_DisplayControlRegister.NIN ? PAL_LINE_COUNT : (PAL_LINE_COUNT+1)/2;
//s_upperFieldBegin = PAL_UPPER_BEGIN;
//s_lowerFieldBegin = PAL_LOWER_BEGIN;

View file

@ -408,11 +408,6 @@ void Write16(const u16 _Value, const u32 _Address)
{
// Clear old BP and initiate new BP
Common::AtomicStore(fifo.bFF_Breakpoint, 0);
// AyuanX: The following is a hack for dual core
// There is definitely some initialization problem with Dolphin (not found exact location yet)
// Which prevents Metroid Prime 2 from first time booting (If you boot some other GC game first then MP2 can boot)
// But somehow this instant BP hack can make MP2 boot even at first time
if (g_VideoInitialize.bOnThread) UpdateInterrupts(true);
}
INFO_LOG(COMMANDPROCESSOR,"\t write to CTRL_REGISTER : %04x", _Value);

View file

@ -169,9 +169,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
)
{
Common::AtomicStore(_fifo.bFF_Breakpoint, 1);
// Replaced by instant BP hack
// TODO: figure out why the correct trigger method doesn't work for MP2
//CommandProcessor::UpdateInterruptsFromVideoPlugin(true);
CommandProcessor::UpdateInterruptsFromVideoPlugin(true);
break;
}
distToSend = 32;