In the command processor when FIFO_READ_POINTER is reading Is better return fifo.CPWritePointer instead fifo.CPReadPointer.
In this way it prevents wrong fifo.CPReadWriteDistance in the future. That should fix RE0 Issue 2846 and others "Warning: GFX FIFO: Unknown Opcode (0x4d)" in dual core mode. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6485 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
91eb729aaf
commit
88916a61da
|
@ -249,15 +249,15 @@ void Read16(u16& _rReturnValue, const u32 _Address)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case FIFO_READ_POINTER_LO:
|
case FIFO_READ_POINTER_LO:
|
||||||
_rReturnValue = ReadLow (fifo.CPReadPointer);
|
//_rReturnValue = ReadLow (fifo.CPReadPointer);
|
||||||
// hack: CPU will always believe fifo is empty and on idle
|
// hack: CPU will always believe fifo is empty and on idle
|
||||||
//_rReturnValue = ReadLow (fifo.CPWritePointer);
|
_rReturnValue = ReadLow (fifo.CPWritePointer);
|
||||||
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_READ_POINTER_LO : %04x", _rReturnValue);
|
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_READ_POINTER_LO : %04x", _rReturnValue);
|
||||||
return;
|
return;
|
||||||
case FIFO_READ_POINTER_HI:
|
case FIFO_READ_POINTER_HI:
|
||||||
_rReturnValue = ReadHigh(fifo.CPReadPointer);
|
//_rReturnValue = ReadHigh(fifo.CPReadPointer);
|
||||||
// hack: CPU will always believe fifo is empty and on idle
|
// hack: CPU will always believe fifo is empty and on idle
|
||||||
//_rReturnValue = ReadHigh(fifo.CPWritePointer);
|
_rReturnValue = ReadHigh(fifo.CPWritePointer);
|
||||||
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_READ_POINTER_HI : %04x", _rReturnValue);
|
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_READ_POINTER_HI : %04x", _rReturnValue);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -196,11 +196,12 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||||
readPtr += distToSend;
|
readPtr += distToSend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::AtomicStore(_fifo.CPReadPointer, readPtr);
|
||||||
|
Common::AtomicAdd(_fifo.CPReadWriteDistance, -distToSend);
|
||||||
// Execute new instructions found in uData
|
// Execute new instructions found in uData
|
||||||
Fifo_SendFifoData(uData, distToSend);
|
Fifo_SendFifoData(uData, distToSend);
|
||||||
|
|
||||||
Common::AtomicStore(_fifo.CPReadPointer, readPtr);
|
|
||||||
Common::AtomicAdd(_fifo.CPReadWriteDistance, -distToSend);
|
|
||||||
|
|
||||||
CommandProcessor::FifoCriticalLeave();
|
CommandProcessor::FifoCriticalLeave();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue