mirror of https://github.com/PCSX2/pcsx2.git
Vif: Clean up some old (incorrect) code.
This commit is contained in:
parent
8ec4e40ae1
commit
89991594de
|
@ -139,24 +139,12 @@ _vifT int nVifUnpack(const u8* data) {
|
||||||
// to read back from it mid-transfer. Since so few games actually use partial transfers
|
// to read back from it mid-transfer. Since so few games actually use partial transfers
|
||||||
// of VIF unpacks, this code should not be any bottleneck.
|
// of VIF unpacks, this code should not be any bottleneck.
|
||||||
|
|
||||||
// We can optimize the calculation either way as some games have big partial chunks (Guitar Hero).
|
|
||||||
// Skipping writes are easy, filling is a bit more complex, so for now until we can
|
|
||||||
// be sure its right (if it happens) it just prints debug stuff and processes the old way.
|
|
||||||
if (!isFill) {
|
if (!isFill) {
|
||||||
vifRegs.num -= (size / vSize);
|
vifRegs.num -= (size / vSize);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int guessedsize = (size / vSize);
|
int dataSize = (size / vSize);
|
||||||
guessedsize = vifRegs.num - (((guessedsize / vifRegs.cycle.cl) * (vifRegs.cycle.wl - vifRegs.cycle.cl)) + guessedsize);
|
vifRegs.num = vifRegs.num - (((dataSize / vifRegs.cycle.cl) * (vifRegs.cycle.wl - vifRegs.cycle.cl)) + dataSize);
|
||||||
|
|
||||||
while (size >= vSize) {
|
|
||||||
--vifRegs.num;
|
|
||||||
++vif.cl;
|
|
||||||
|
|
||||||
if (vif.cl <= vifRegs.cycle.cl) size -= vSize;
|
|
||||||
else if (vif.cl == vifRegs.cycle.wl) vif.cl = 0;
|
|
||||||
}
|
|
||||||
DevCon.Warning("Fill!! Partial num left = %x, guessed %x", vifRegs.num, guessedsize);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue