Tweaks; timebase supports TBU.
This commit is contained in:
parent
672ecdf252
commit
3658e710d2
|
@ -555,7 +555,14 @@ XEEMITTER(mfspr, 0x7C0002A6, XFX)(PPCHIRBuilder& f, InstrData& i) {
|
|||
// CTR
|
||||
v = f.LoadCTR();
|
||||
break;
|
||||
// 268 + 269 = TB + TBU
|
||||
case 268:
|
||||
// TB
|
||||
v = f.LoadClock();
|
||||
break;
|
||||
case 269:
|
||||
// TBU
|
||||
v = f.Shr(f.LoadClock(), 32);
|
||||
break;
|
||||
default:
|
||||
XEINSTRNOTIMPLEMENTED();
|
||||
return 1;
|
||||
|
@ -566,8 +573,14 @@ XEEMITTER(mfspr, 0x7C0002A6, XFX)(PPCHIRBuilder& f, InstrData& i) {
|
|||
|
||||
XEEMITTER(mftb, 0x7C0002E6, XFX)(PPCHIRBuilder& f, InstrData& i) {
|
||||
Value* time = f.LoadClock();
|
||||
const uint32_t n = ((i.XFX.spr & 0x1F) << 5) | ((i.XFX.spr >> 5) & 0x1F);
|
||||
if (n == 268) {
|
||||
// TB - full bits.
|
||||
} else {
|
||||
// TBU - upper bits only.
|
||||
time = f.Shr(time, 32);
|
||||
}
|
||||
f.StoreGPR(i.XFX.RT, time);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ X_RESULT XXMPApp::XMPGetStatusEx(uint32_t unk, uint32_t unk_ptr,
|
|||
uint32_t disabled_ptr) {
|
||||
// Some stupid games will hammer this on a thread - induce a delay
|
||||
// here to keep from starving real threads.
|
||||
Sleep(1);
|
||||
Sleep(10);
|
||||
|
||||
XELOGD("XMPGetStatusEx(%.8X, %.8X, %.8X)", unk, unk_ptr, disabled_ptr);
|
||||
|
||||
|
|
|
@ -246,6 +246,7 @@ SHIM_CALL XexGetProcedureAddress_shim(PPCContext* ppc_state,
|
|||
out_function_ptr);
|
||||
|
||||
X_STATUS result = X_STATUS_INVALID_HANDLE;
|
||||
SHIM_SET_MEM_32(out_function_ptr, 0xDEADF00D);
|
||||
|
||||
XModule* module = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue