mirror of https://github.com/PCSX2/pcsx2.git
VIF: Fix MPG bug incrementing addresses properly when using MTVU
Also handle wrapping
This commit is contained in:
parent
4d79754f78
commit
7b7278bc85
|
@ -262,8 +262,18 @@ static __fi void _vifCode_MPG(int idx, u32 addr, const u32 *data, int size) {
|
||||||
vifExecQueue(idx);
|
vifExecQueue(idx);
|
||||||
|
|
||||||
if (idx && THREAD_VU1) {
|
if (idx && THREAD_VU1) {
|
||||||
vu1Thread.WriteMicroMem(addr, (u8*)data, size*4);
|
if ((addr + size * 4) > vuMemSize)
|
||||||
vifX.tag.addr = size * 4;
|
{
|
||||||
|
vu1Thread.WriteMicroMem(addr, (u8*)data, vuMemSize - addr);
|
||||||
|
size -= (vuMemSize - addr) / 4;
|
||||||
|
vu1Thread.WriteMicroMem(0, (u8*)data, size * 4);
|
||||||
|
vifX.tag.addr = size * 4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vu1Thread.WriteMicroMem(addr, (u8*)data, size * 4);
|
||||||
|
vifX.tag.addr += size * 4;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue