set GXSTAT busy flag immediately when writing a command to the GXFIFO.
there was a slim chance that a game could send a couple commands and read GXSTAT.busy as zero immediately after. the new timings made that happen in NSMB (not in the USA ROM, oddly), such that the game was reading the clip matrix while matrix commands were running, and getting the first few values wrong. fixes #295 and probably others in the same vein.
This commit is contained in:
parent
ca955d1bac
commit
12c35093aa
|
@ -1551,6 +1551,8 @@ void CmdFIFOWrite(CmdFIFOEntry& entry)
|
|||
CmdFIFO->Write(entry);
|
||||
}
|
||||
|
||||
GXStat |= (1<<27);
|
||||
|
||||
if (entry.Command == 0x11 || entry.Command == 0x12)
|
||||
{
|
||||
GXStat |= (1<<14); // push/pop matrix
|
||||
|
@ -1666,7 +1668,7 @@ void ExecuteCommand()
|
|||
|
||||
if (ExecParamCount >= CmdNumParams[entry.Command])
|
||||
{
|
||||
/*printf("0x%02X, ", entry.Command);
|
||||
/*printf("[GXS:%08X] 0x%02X, ", GXStat, entry.Command);
|
||||
for (int k = 0; k < ExecParamCount; k++) printf("0x%08X, ", ExecParams[k]);
|
||||
printf("\n");*/
|
||||
|
||||
|
@ -2184,10 +2186,6 @@ void ExecuteCommand()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (CycleCount > 0 || !CmdPIPE->IsEmpty() ||
|
||||
VertexPipeline || NormalPipeline || PolygonPipeline)
|
||||
GXStat |= (1<<27);
|
||||
}
|
||||
|
||||
s32 CyclesToRunFor()
|
||||
|
|
Loading…
Reference in New Issue