add MSR to RegisterView and throw in some missing break;s (thanks lpfaint :p)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4432 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c741ddd082
commit
1bf3c00683
|
@ -26,7 +26,7 @@ extern const char* GetGPRName(unsigned int index);
|
||||||
extern const char* GetFPRName(unsigned int index);
|
extern const char* GetFPRName(unsigned int index);
|
||||||
|
|
||||||
static const char *special_reg_names[] = {
|
static const char *special_reg_names[] = {
|
||||||
"PC", "LR", "CTR", "CR", "FPSCR", "SRR0", "SRR1", "Exceptions", "Int Mask", "Int Cause",
|
"PC", "LR", "CTR", "CR", "FPSCR", "MSR", "SRR0", "SRR1", "Exceptions", "Int Mask", "Int Cause",
|
||||||
};
|
};
|
||||||
|
|
||||||
static u32 GetSpecialRegValue(int reg) {
|
static u32 GetSpecialRegValue(int reg) {
|
||||||
|
@ -36,11 +36,12 @@ static u32 GetSpecialRegValue(int reg) {
|
||||||
case 2: return PowerPC::ppcState.spr[SPR_CTR];
|
case 2: return PowerPC::ppcState.spr[SPR_CTR];
|
||||||
case 3: return GetCR();
|
case 3: return GetCR();
|
||||||
case 4: return PowerPC::ppcState.fpscr;
|
case 4: return PowerPC::ppcState.fpscr;
|
||||||
case 5: return PowerPC::ppcState.spr[SPR_SRR0];
|
case 5: return PowerPC::ppcState.msr;
|
||||||
case 6: return PowerPC::ppcState.spr[SPR_SRR1];
|
case 6: return PowerPC::ppcState.spr[SPR_SRR0];
|
||||||
case 7: return PowerPC::ppcState.Exceptions;
|
case 7: return PowerPC::ppcState.spr[SPR_SRR1];
|
||||||
case 8: return ProcessorInterface::GetMask();
|
case 8: return PowerPC::ppcState.Exceptions;
|
||||||
case 9: return ProcessorInterface::GetCause();
|
case 9: return ProcessorInterface::GetMask();
|
||||||
|
case 10: return ProcessorInterface::GetCause();
|
||||||
default: return 0;
|
default: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,18 +71,19 @@ wxString CRegTable::GetValue(int row, int col)
|
||||||
|
|
||||||
static void SetSpecialRegValue(int reg, u32 value) {
|
static void SetSpecialRegValue(int reg, u32 value) {
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
case 0: PowerPC::ppcState.pc = value;
|
case 0: PowerPC::ppcState.pc = value; break;
|
||||||
case 1: PowerPC::ppcState.spr[SPR_LR] = value;
|
case 1: PowerPC::ppcState.spr[SPR_LR] = value; break;
|
||||||
case 2: PowerPC::ppcState.spr[SPR_CTR] = value;
|
case 2: PowerPC::ppcState.spr[SPR_CTR] = value; break;
|
||||||
case 3: SetCR(value);
|
case 3: SetCR(value); break;
|
||||||
case 4: PowerPC::ppcState.fpscr = value;
|
case 4: PowerPC::ppcState.fpscr = value; break;
|
||||||
case 5: PowerPC::ppcState.spr[SPR_SRR0] = value;
|
case 5: PowerPC::ppcState.msr = value; break;
|
||||||
case 6: PowerPC::ppcState.spr[SPR_SRR1] = value;
|
case 6: PowerPC::ppcState.spr[SPR_SRR0] = value; break;
|
||||||
case 7: PowerPC::ppcState.Exceptions = value;
|
case 7: PowerPC::ppcState.spr[SPR_SRR1] = value; break;
|
||||||
|
case 8: PowerPC::ppcState.Exceptions = value; break;
|
||||||
// Should we just change the value, or use ProcessorInterface::SetInterrupt() to make the system aware?
|
// Should we just change the value, or use ProcessorInterface::SetInterrupt() to make the system aware?
|
||||||
// case 8: return ProcessorInterface::GetMask();
|
// case 9: return ProcessorInterface::GetMask();
|
||||||
// case 9: return ProcessorInterface::GetCause();
|
// case 10: return ProcessorInterface::GetCause();
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +122,7 @@ void CRegTable::UpdateCachedRegs()
|
||||||
m_CachedFRegHasChanged[i][1] = (m_CachedFRegs[i][1] != rPS1(i));
|
m_CachedFRegHasChanged[i][1] = (m_CachedFRegs[i][1] != rPS1(i));
|
||||||
m_CachedFRegs[i][1] = rPS1(i);
|
m_CachedFRegs[i][1] = rPS1(i);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 6; ++i)
|
for (int i = 0; i < NUM_SPECIALS; ++i)
|
||||||
{
|
{
|
||||||
m_CachedSpecialRegHasChanged[i] = (m_CachedSpecialRegs[i] != GetSpecialRegValue(i));
|
m_CachedSpecialRegHasChanged[i] = (m_CachedSpecialRegs[i] != GetSpecialRegValue(i));
|
||||||
m_CachedSpecialRegs[i] = GetSpecialRegValue(i);
|
m_CachedSpecialRegs[i] = GetSpecialRegValue(i);
|
||||||
|
|
|
@ -31,14 +31,17 @@
|
||||||
// CTR
|
// CTR
|
||||||
// CR0-7
|
// CR0-7
|
||||||
// FPSCR
|
// FPSCR
|
||||||
|
// MSR
|
||||||
// SRR0
|
// SRR0
|
||||||
// SRR1
|
// SRR1
|
||||||
// Exceptions
|
// Exceptions
|
||||||
|
// Interrupt Mask (PI)
|
||||||
|
// Interrupt Cause(PI)
|
||||||
|
|
||||||
class CRegTable : public wxGridTableBase
|
class CRegTable : public wxGridTableBase
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
NUM_SPECIALS = 10,
|
NUM_SPECIALS = 11,
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue