Reload disc info as needed, gets some "codebreaker" ELF which switches to the normal boot sequence after a while closer to working.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3095 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 2010-05-28 12:13:51 +00:00
parent 3adb826607
commit 2c4101b78b
4 changed files with 18 additions and 13 deletions

View File

@ -331,6 +331,11 @@ static __forceinline void _reloadElfInfo(wxString elfpath)
// Now's a good time to reload the ELF info...
ScopedLock locker( Mutex_NewDiskCB );
if (elfpath == LastELF)
return;
LastELF = elfpath;
wxString fname = elfpath.AfterLast('\\');
if (!fname)
fname = elfpath.AfterLast('/');
@ -374,20 +379,17 @@ void cdvdReloadElfInfo(wxString elfoverride)
wxString elfpath;
u32 discType = GetPS2ElfName(elfpath);
if (ElfCRC == 0)
switch (discType)
{
switch (discType)
{
case 2: // Is a PS2 disc.
_reloadElfInfo(elfpath);
break;
case 1: // Is a PS1 disc.
if (ENABLE_LOADING_PS1_GAMES) _reloadElfInfo(elfpath);
break;
default: // Isn't a disc we recognise.
break;
}
}
case 2: // Is a PS2 disc.
_reloadElfInfo(elfpath);
break;
case 1: // Is a PS1 disc.
if (ENABLE_LOADING_PS1_GAMES) _reloadElfInfo(elfpath);
break;
default: // Isn't a disc we recognise.
break;
}
}
static __forceinline s32 StrToS32(const wxString& str, int base = 10)

View File

@ -23,6 +23,7 @@ using namespace std;
u32 ElfCRC;
u32 ElfEntry;
wxString LastELF;
#if 0
// fixme: ELF command line option system.

View File

@ -165,5 +165,6 @@ extern int GetPS2ElfName( wxString& dest );
extern u32 ElfCRC;
extern u32 ElfEntry;
extern wxString LastELF;
#endif

View File

@ -92,6 +92,7 @@ void cpuReset()
ElfCRC = 0;
DiscID = L"";
ElfEntry = -1;
LastELF = L"";
}
__releaseinline void cpuException(u32 code, u32 bd)