I've fixed Metroid Prime 3 and 2 desync. And other games with desync because of FIFO Reset.

That happens because  FIFO_RW_DISTANCE_HI must be written first, for checking fifo.CPReadWriteDistance == 0, so some fifo resets was not managed in the right way.
I didn't test Metroid 2 desync reported in Issue 4336 but I think is the same.
About the flickering in MP2, I don't know for my is not related or yes, but you can test anyway.

Fixed Issue 3902

Well now the FIFO is 99.99% finished :)
This commit is contained in:
marcosvitali 2012-03-09 01:33:29 -03:00
parent c2e6fdf09f
commit 41652d6b1f
1 changed files with 4 additions and 4 deletions

View File

@ -388,10 +388,6 @@ void Write16(const u16 _Value, const u32 _Address)
case FIFO_RW_DISTANCE_HI:
WriteHigh((u32 &)fifo.CPReadWriteDistance, _Value);
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_HI : %04x", _Value);
break;
case FIFO_RW_DISTANCE_LO:
WriteLow((u32 &)fifo.CPReadWriteDistance, _Value & 0xFFE0);
if (fifo.CPReadWriteDistance == 0)
{
GPFifo::ResetGatherPipe();
@ -401,6 +397,10 @@ void Write16(const u16 _Value, const u32 _Address)
ResetVideoBuffer();
}
IncrementCheckContextId();
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_HI : %04x", _Value);
break;
case FIFO_RW_DISTANCE_LO:
WriteLow((u32 &)fifo.CPReadWriteDistance, _Value & 0xFFE0);
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_LO : %04x", _Value);
break;