/[pcsx2_0.9.7]/trunk/pcsx2/VUops.cpp
ViewVC logotype

Diff of /trunk/pcsx2/VUops.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/VUops.cpp	2010/09/07 11:08:22	62
+++ trunk/pcsx2/VUops.cpp	2010/11/12 01:10:22	273
@@ -1578,9 +1578,12 @@
 
 __fi u32* GET_VU_MEM(VURegs* VU, u32 addr)		// non-static, also used by sVU for now.
 {
-	if( VU == &vuRegs[1] ) return (u32*)(vuRegs[1].Mem+(addr&0x3fff));
-	if( addr & 0x4000 ) return (u32*)(vuRegs[1].VF+(addr&0x3f0)); // get VF and VI regs (they're mapped to 0x4xx0 in VU0 mem!)
-	return (u32*)(vuRegs[0].Mem+(addr&0x0fff)); // for addr 0x0000 to 0x4000 just wrap around
+	if (VU == &vuRegs[1])
+		return (u32*)(vuRegs[1].Mem + (addr & 0x3fff));
+	else if (addr & 0x4000)
+		return (u32*)((u8*)vuRegs[1].VF + (addr & 0x3ff)); // get VF and VI regs (they're mapped to 0x4xx0 in VU0 mem!)
+	else
+		return (u32*)(vuRegs[0].Mem + (addr & 0xfff)); // for addr 0x0000 to 0x4000 just wrap around
 }
 
 static __ri void _vuLQ(VURegs * VU) {

 

  ViewVC Help
Powered by ViewVC 1.1.22