1. Expanded Framelimit range from 20 to 120 in case someone wants to run a little faster than full speed but still controllable not like wild OFF.

2. Fixed a bug (for Win 32bit) that reports "No possible memory base pointer found!" even when there IS valid memory base found.

3. Made Metroid Prime 2 (maybe also other games) boot
PS: 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, stop it, then MP2 can boot without problem).
So I added an instant BP hack that can make MP2 boot even at first time.
And I've tested all my games to guarantee it won't break any game that already boots before this hack.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4795 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2010-01-08 21:57:31 +00:00
parent 69fdb7ae5c
commit a3cfafcd12
9 changed files with 56 additions and 57 deletions

View File

@ -231,7 +231,7 @@ void SConfig::LoadSettings()
ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
ini.Get("Core", "FrameLimit", &m_Framelimit, 0); // auto frame limit by default
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
// Plugins
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());

View File

@ -67,7 +67,7 @@ struct SConfig
// interface language
INTERFACE_LANGUAGE m_InterfaceLanguage;
// framelimit choose
u32 m_Framelimit;
int m_Framelimit;
// other interface settings
bool m_InterfaceToolbar;
bool m_InterfaceStatusbar;

View File

@ -592,16 +592,17 @@ void ScreenShot()
// This should only be called from VI
void VideoThrottle()
{
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 1) ? SConfig::GetInstance().m_Framelimit * 5
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 1) ? SConfig::GetInstance().m_Framelimit * 10
: VideoInterface::TargetRefreshRate;
// When frame limit is NOT off
if (SConfig::GetInstance().m_Framelimit != 1)
if (SConfig::GetInstance().m_Framelimit)
{
u32 frametime = DrawnVideo * 2 * 1000 / TargetVPS;
// a full screen scan consists of 2 fields
u32 frametime = DrawnVideo * 2 * 1000 / TargetVPS;
while ((u32)Timer.GetTimeDifference() < frametime)
//Common::YieldCPU();
Common::SleepCurrentThread(1);
Common::YieldCPU();
//Common::SleepCurrentThread(1);
}
// Update info per second
@ -612,10 +613,10 @@ void VideoThrottle()
u32 FPS = Common::AtomicLoad(DrawnFrame) * 1000 / ElapseTime;
u32 VPS = DrawnVideo * 2 * 1000 / ElapseTime;
u32 Speed = VPS * 100 / TargetVPS;
u32 Speed = VPS * 100 / VideoInterface::TargetRefreshRate;
// Settings are shown the same for both extended and summary info
std::string SSettings = StringFromFormat("Core: %s %s",
std::string SSettings = StringFromFormat("%s %s",
#if defined(JITTEST) && JITTEST
#ifdef _M_IX86
_CoreParameter.bUseJIT ? "JIT32IL" : "Int32",
@ -661,7 +662,7 @@ void VideoThrottle()
#endif
// This is our final "frame counter" string
std::string SMessage = StringFromFormat(" %s | %s", SSettings.c_str(), SFPS.c_str());
std::string SMessage = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str());
// Show message
if (g_pUpdateFPSDisplay != NULL)
@ -674,8 +675,10 @@ void VideoThrottle()
Common::AtomicStore(DrawnFrame, 0);
DrawnVideo = 0;
}
DrawnVideo++;
else
{
DrawnVideo++;
}
}
// Executed from GPU thread
@ -683,7 +686,7 @@ void VideoThrottle()
// depending on the framelimit set
bool report_slow(int skipped)
{
u32 TargetFPS = (SConfig::GetInstance().m_Framelimit > 1) ? SConfig::GetInstance().m_Framelimit * 5
u32 TargetFPS = (SConfig::GetInstance().m_Framelimit > 1) ? SConfig::GetInstance().m_Framelimit * 10
: VideoInterface::TargetRefreshRate;
u32 frames = Common::AtomicLoad(DrawnFrame);
bool fps_slow = (Timer.GetTimeDifference() < (frames + skipped) * 1000 / TargetFPS) ? false : true;

View File

@ -211,7 +211,7 @@ union UVIInterruptRegister
unsigned : 1;
unsigned IR_MASK : 1; // Interrupt Enable Bit
unsigned : 2;
unsigned IR_INT : 1; // Interrupt Status (1=Active) (Write to clear)
unsigned IR_INT : 1; // Interrupt Status (1=Active) (Read to clear)
};
};
@ -547,6 +547,8 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
// RETRACE STUFF ...
case VI_PRERETRACE_HI:
_uReturnValue = m_InterruptRegister[0].Hi;
m_InterruptRegister[0].IR_INT = 0;
UpdateInterrupts();
return;
case VI_PRERETRACE_LO:
_uReturnValue = m_InterruptRegister[0].Lo;
@ -554,6 +556,8 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
case VI_POSTRETRACE_HI:
_uReturnValue = m_InterruptRegister[1].Hi;
m_InterruptRegister[1].IR_INT = 0;
UpdateInterrupts();
return;
case VI_POSTRETRACE_LO:
_uReturnValue = m_InterruptRegister[1].Lo;
@ -561,6 +565,8 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
case VI_DISPLAY_INTERRUPT_2_HI:
_uReturnValue = m_InterruptRegister[2].Hi;
m_InterruptRegister[2].IR_INT = 0;
UpdateInterrupts();
return;
case VI_DISPLAY_INTERRUPT_2_LO:
_uReturnValue = m_InterruptRegister[2].Lo;
@ -568,6 +574,8 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
case VI_DISPLAY_INTERRUPT_3_HI:
_uReturnValue = m_InterruptRegister[3].Hi;
m_InterruptRegister[3].IR_INT = 0;
UpdateInterrupts();
return;
case VI_DISPLAY_INTERRUPT_3_LO:
_uReturnValue = m_InterruptRegister[3].Lo;
@ -795,8 +803,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
// RETRACE STUFF ...
case VI_PRERETRACE_HI:
m_InterruptRegister[0].Hi = _iValue;
m_InterruptRegister[0].IR_INT = 0;
UpdateInterrupts();
break;
case VI_PRERETRACE_LO:
m_InterruptRegister[0].Lo = _iValue;
@ -804,8 +810,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
case VI_POSTRETRACE_HI:
m_InterruptRegister[1].Hi = _iValue;
m_InterruptRegister[1].IR_INT = 0;
UpdateInterrupts();
break;
case VI_POSTRETRACE_LO:
m_InterruptRegister[1].Lo = _iValue;
@ -813,8 +817,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
case VI_DISPLAY_INTERRUPT_2_HI:
m_InterruptRegister[2].Hi = _iValue;
m_InterruptRegister[2].IR_INT = 0;
UpdateInterrupts();
break;
case VI_DISPLAY_INTERRUPT_2_LO:
m_InterruptRegister[2].Lo = _iValue;
@ -822,8 +824,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
case VI_DISPLAY_INTERRUPT_3_HI:
m_InterruptRegister[3].Hi = _iValue;
m_InterruptRegister[3].IR_INT = 0;
UpdateInterrupts();
break;
case VI_DISPLAY_INTERRUPT_3_LO:
m_InterruptRegister[3].Lo = _iValue;