From d3c3dc5cf62c836b24c3a5111cf57b51efc61340 Mon Sep 17 00:00:00 2001 From: emoose Date: Mon, 22 Oct 2018 17:29:27 +0100 Subject: [PATCH] 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. --- src/xenia/cpu/ppc/ppc_emit_control.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/cpu/ppc/ppc_emit_control.cc b/src/xenia/cpu/ppc/ppc_emit_control.cc index 4452c55ea..3c2df28c7 100644 --- a/src/xenia/cpu/ppc/ppc_emit_control.cc +++ b/src/xenia/cpu/ppc/ppc_emit_control.cc @@ -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;