Workaround to avoid access violation problem in Klonoa 2 loading Volkan Inferno

Lets hope the build bot doesn't mess this up :P
This commit is contained in:
refractionpcsx2 2019-03-21 20:17:14 +00:00
parent 5c7084f8bf
commit 10ee832dc1
1 changed files with 12 additions and 2 deletions

View File

@ -119,8 +119,18 @@ int IPU_Fifo_Output::write(const u32 *value, uint size)
size -= transsize;
while (transsize > 0)
{
CopyQWC(&data[writepos], value);
writepos = (writepos + 4) & 31;
//For some reason this causes stack corruption or something
//and it loses the pointer causing access violations in Klonoa 2 - Ref
//CopyQWC(&data[writepos], value);
//Here's the workaround
data[writepos] = value[0];
writepos = (writepos + 1) & 31;
data[writepos] = value[1];
writepos = (writepos + 1) & 31;
data[writepos] = value[2];
writepos = (writepos + 1) & 31;
data[writepos] = value[3];
writepos = (writepos + 1) & 31;
value += 4;
--transsize;
}