mirror of https://github.com/PCSX2/pcsx2.git
Made a quick hackfix that should solve TlbMiss crashes in a few games, such as .Hack/GU (Issue 87). The real problem is that the VifDma1 happily overwrites past the end of VU1 memory, which spills over into the EE's recLUT tables, which causes rapid death. I fixed it by allocating an extra "cushion" of data at the end of VU1 memory.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@652 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
9a5da04452
commit
f4404bc1d1
|
@ -132,10 +132,17 @@ void vuMicroMemAlloc()
|
|||
|
||||
g_pVU1 = (VURegs*)(VU0.Mem + 0x4000);
|
||||
|
||||
VU1.Mem = (u8*)_aligned_malloc(16*1024*2, 16);
|
||||
// HACKFIX! (Air)
|
||||
// The VIFdma1 has a nasty habit of transferring data into the 4k page of memory above
|
||||
// the VU1. (oops!!) This happens to be recLUT most of the time, which causes rapid death
|
||||
// of our emulator. So we allocate some extra space here to keep VIF1 a little happier.
|
||||
|
||||
// fixme - When the VIF is fixed, change the *3 below back to an *2.
|
||||
|
||||
VU1.Mem = (u8*)_aligned_malloc(0x4000*3, 16);
|
||||
if (VU1.Mem == NULL )
|
||||
throw Exception::OutOfMemory( "vu1Init > Failed to allocate memory for the VU1micro." );
|
||||
VU1.Micro = VU1.Mem + 16*1024; //(u8*)_aligned_malloc(16*1024, 16);
|
||||
VU1.Micro = VU1.Mem + 0x4000; //(u8*)_aligned_malloc(16*1024, 16);
|
||||
}
|
||||
|
||||
if( VU0.Micro == NULL )
|
||||
|
|
|
@ -1523,9 +1523,7 @@ static int Vif1TransSTRow(u32 *data){
|
|||
case 3: pmem[8] = data[2]; pmem2[2] = data[2];
|
||||
case 2: pmem[4] = data[1]; pmem2[1] = data[1];
|
||||
case 1: pmem[0] = data[0]; pmem2[0] = data[0]; break;
|
||||
#ifdef _MSC_VER
|
||||
default: __assume(0);
|
||||
#endif
|
||||
jNO_DEFAULT;
|
||||
}
|
||||
vif1.tag.addr += ret;
|
||||
vif1.tag.size -= ret;
|
||||
|
@ -1545,9 +1543,7 @@ static int Vif1TransSTCol(u32 *data){
|
|||
case 3: pmem[8] = data[2]; pmem2[2] = data[2];
|
||||
case 2: pmem[4] = data[1]; pmem2[1] = data[1];
|
||||
case 1: pmem[0] = data[0]; pmem2[0] = data[0]; break;
|
||||
#ifdef _MSC_VER
|
||||
default: __assume(0);
|
||||
#endif
|
||||
jNO_DEFAULT;
|
||||
}
|
||||
vif1.tag.addr += ret;
|
||||
vif1.tag.size -= ret;
|
||||
|
|
Loading…
Reference in New Issue