Implemented missing lswx and stswx instructions. Tested with Wii PES 2008 (PAL), which now works (OpenGL devs please take a look at this game).
Changed the scope of some variables introduced in my previous commit (r6132). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6147 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ad6ddfa18c
commit
3058a926cf
|
@ -630,13 +630,7 @@ void VideoThrottle()
|
||||||
u32 Speed = VPS * 100 / VideoInterface::TargetRefreshRate;
|
u32 Speed = VPS * 100 / VideoInterface::TargetRefreshRate;
|
||||||
|
|
||||||
// Settings are shown the same for both extended and summary info
|
// Settings are shown the same for both extended and summary info
|
||||||
std::string SSettings = StringFromFormat("%s %s",
|
std::string SSettings = StringFromFormat("%s %s", cpu_core_base->GetName(), _CoreParameter.bCPUThread ? "DC" : "SC");
|
||||||
#ifdef _M_IX86
|
|
||||||
_CoreParameter.iCPUCore ? jit->GetName() : "Int32",
|
|
||||||
#else
|
|
||||||
_CoreParameter.iCPUCore ? jit->GetName() : "Int64",
|
|
||||||
#endif
|
|
||||||
_CoreParameter.bCPUThread ? "DC" : "SC");
|
|
||||||
|
|
||||||
// Use extended or summary information. The summary information does not print the ticks data,
|
// Use extended or summary information. The summary information does not print the ticks data,
|
||||||
// that's more of a debugging interest, it can always be optional of course if someone is interested.
|
// that's more of a debugging interest, it can always be optional of course if someone is interested.
|
||||||
|
|
|
@ -261,7 +261,11 @@ void Interpreter::ClearCache()
|
||||||
|
|
||||||
const char *Interpreter::GetName()
|
const char *Interpreter::GetName()
|
||||||
{
|
{
|
||||||
return "Interpreter";
|
#ifdef _M_X64
|
||||||
|
return "Interpreter64";
|
||||||
|
#else
|
||||||
|
return "Interpreter32";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Interpreter *Interpreter::getInstance()
|
Interpreter *Interpreter::getInstance()
|
||||||
|
|
|
@ -521,12 +521,40 @@ void Interpreter::lhzx(UGeckoInstruction _inst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: is this right?
|
||||||
|
// FIXME: Should rollback if a DSI occurs
|
||||||
void Interpreter::lswx(UGeckoInstruction _inst)
|
void Interpreter::lswx(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
static bool bFirst = true;
|
u32 EA = Helper_Get_EA_X(_inst);
|
||||||
if (bFirst)
|
u32 n = rSPR(SPR_XER) & 0x7F;
|
||||||
PanicAlert("lswx - Instruction unimplemented");
|
int r = _inst.RD;
|
||||||
bFirst = false;
|
int i = 0;
|
||||||
|
|
||||||
|
if (n > 0)
|
||||||
|
{
|
||||||
|
m_GPR[r] = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
u32 TempValue = Memory::Read_U8(EA) << (24 - i);
|
||||||
|
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
||||||
|
{
|
||||||
|
PanicAlert("DSI exception in lswx.");
|
||||||
|
NOTICE_LOG(POWERPC, "DSI exception in lswx");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_GPR[r] |= TempValue;
|
||||||
|
|
||||||
|
EA++;
|
||||||
|
n--;
|
||||||
|
i += 8;
|
||||||
|
if (i == 32)
|
||||||
|
{
|
||||||
|
i = 0;
|
||||||
|
r = (r + 1) & 31;
|
||||||
|
m_GPR[r] = 0;
|
||||||
|
}
|
||||||
|
} while (n > 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::lwbrx(UGeckoInstruction _inst)
|
void Interpreter::lwbrx(UGeckoInstruction _inst)
|
||||||
|
@ -722,12 +750,27 @@ void Interpreter::stswi(UGeckoInstruction _inst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: is this right? is it DSI interruptible?
|
||||||
void Interpreter::stswx(UGeckoInstruction _inst)
|
void Interpreter::stswx(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
static bool bFirst = true;
|
u32 EA = Helper_Get_EA_X(_inst);
|
||||||
if (bFirst)
|
u32 n = rSPR(SPR_XER) & 0x7F;
|
||||||
PanicAlert("stswx - Instruction unimplemented");
|
int r = _inst.RS;
|
||||||
bFirst = false;
|
int i = 0;
|
||||||
|
|
||||||
|
while (n > 0)
|
||||||
|
{
|
||||||
|
Memory::Write_U8((m_GPR[r] >> (24 - i)) & 0xFF, EA);
|
||||||
|
|
||||||
|
EA++;
|
||||||
|
n--;
|
||||||
|
i += 8;
|
||||||
|
if (i == 32)
|
||||||
|
{
|
||||||
|
i = 0;
|
||||||
|
r++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::stwbrx(UGeckoInstruction _inst)
|
void Interpreter::stwbrx(UGeckoInstruction _inst)
|
||||||
|
|
|
@ -362,11 +362,10 @@ static GekkoOPTemplate table63_2[] =
|
||||||
namespace InterpreterTables
|
namespace InterpreterTables
|
||||||
{
|
{
|
||||||
|
|
||||||
bool initialized = false;
|
|
||||||
|
|
||||||
void InitTables()
|
void InitTables()
|
||||||
{
|
{
|
||||||
// once initialized, tables are read-only
|
// once initialized, tables are read-only
|
||||||
|
static bool initialized = false;
|
||||||
if (initialized)
|
if (initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -392,11 +392,10 @@ void CompileInstruction(PPCAnalyst::CodeOp & op)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool initialized = false;
|
|
||||||
|
|
||||||
void InitTables()
|
void InitTables()
|
||||||
{
|
{
|
||||||
// once initialized, tables are read-only
|
// once initialized, tables are read-only
|
||||||
|
static bool initialized = false;
|
||||||
if (initialized)
|
if (initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -395,11 +395,10 @@ void CompileInstruction(PPCAnalyst::CodeOp & op)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool initialized = false;
|
|
||||||
|
|
||||||
void InitTables()
|
void InitTables()
|
||||||
{
|
{
|
||||||
// once initialized, tables are read-only
|
// once initialized, tables are read-only
|
||||||
|
static bool initialized = false;
|
||||||
if (initialized)
|
if (initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue