From 3f27730f457d150a25b503d3463c07fb2c7cb2c2 Mon Sep 17 00:00:00 2001 From: "refraction@gmail.com" Date: Sun, 24 Feb 2013 14:37:30 +0000 Subject: [PATCH] Fixed up my changes from r5569. Change it so it only reverses the order during the bios writes to VU memory. FFXII is fine again, games still not have the unknown op problems, also TOCA 3 no longer has the illegal opcode errors. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5571 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Memory.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index e7fe6a6db7..4f820b1011 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -524,8 +524,12 @@ template static void __fc vuMicroWrite64(u32 addr, const mem64_t* dat VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; u64 tempdata; - tempdata = (data[0] >> 32) | (data[0] << 32); //VU stores it in a different order - + + if(cpuRegs.pc == 0x8000dff0) + tempdata = (data[0] >> 32) | (data[0] << 32); //BIOS writes them in the wrong order apparently... + else + tempdata = data[0]; + if (vunum && THREAD_VU1) { vu1Thread.WriteMicroMem(addr, &tempdata, sizeof(u64)); return; @@ -539,17 +543,14 @@ template static void __fc vuMicroWrite64(u32 addr, const mem64_t* dat template static void __fc vuMicroWrite128(u32 addr, const mem128_t* data) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - mem128_t tempdata; - tempdata.lo = (data->lo >> 32) | (data->lo << 32); //VU stores it in a different order - tempdata.hi = (data->hi >> 32) | (data->hi << 32); //VU stores it in a different order if (vunum && THREAD_VU1) { - vu1Thread.WriteMicroMem(addr, &tempdata, sizeof(u128)); + vu1Thread.WriteMicroMem(addr, (void*)data, sizeof(u128)); return; } - if ((u128&)vu->Micro[addr]!=tempdata) { //Hmm, is that right? + if ((u128&)vu->Micro[addr]!=*data) { //Hmm, is that right? ClearVuFunc(addr, 16); - CopyQWC(&vu->Micro[addr],&tempdata); + CopyQWC(&vu->Micro[addr],data); } }