Add PVR register to mfspr

PVR stores the processor/motherboard revision, the latest I could find seems to be 0x710800 which is probably a Corona.
XShell tries to retrieve this during launch to print it on the console (search "XSHELL: CPUPVR" on pastebin for some examples)
Xenia crashes because it's unimplemented, so I just made it return 0x710800. It could be worth moving this to be a constant somewhere though.

IIRC hypervisor/kernel uses this for some things too, but since we don't emulate those it's not much of a problem, but there could still be other XEXs which use it for something.
This commit is contained in:
emoose 2018-10-22 17:29:27 +01:00 committed by illusion
parent ee1b7b4e64
commit d3c3dc5cf6
1 changed files with 4 additions and 0 deletions

View File

@ -616,6 +616,10 @@ int InstrEmit_mfspr(PPCHIRBuilder& f, const InstrData& i) {
// TBU
v = f.Shr(f.LoadClock(), 32);
break;
case 287:
// PVR
v = f.LoadConstantUint64(0x710800);
break;
default:
XEINSTRNOTIMPLEMENTED();
return 1;