Make FIFO watermark tightness configurable instead of hardcoding it.

To change it, right click the affected game in the iso list, select Properties, and enter some constant for "Watermark tightness". Reasonable values range from 20 to 200.

FIFO seems unoverflowable on my computer no matter what I set this value to, so test whether tuning the value helps you ;P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5907 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-07-18 15:47:28 +00:00
parent e8ed50854a
commit 378d3aaa52
6 changed files with 38 additions and 4 deletions

View File

@ -495,7 +495,7 @@ void Write16(const u16 _Value, const u32 _Address)
case FIFO_HI_WATERMARK_HI:
WriteHigh((u32 &)fifo.CPHiWatermark, _Value);
// Tune this when you see lots of FIFO overflown by GatherPipe
HiWatermark_Tighter = fifo.CPHiWatermark - 32 * 20;
HiWatermark_Tighter = fifo.CPHiWatermark - 32 * g_ActiveConfig.iFIFOWatermarkTightness;
DEBUG_LOG(COMMANDPROCESSOR,"\t write to FIFO_HI_WATERMARK_HI : %04x", _Value);
break;
@ -616,7 +616,7 @@ void STACKALIGN GatherPipeBursted()
}
_assert_msg_(COMMANDPROCESSOR, fifo.CPReadWriteDistance <= fifo.CPEnd - fifo.CPBase,
"FIFO is overflown by GatherPipe !\nCPU thread is too fast, lower the HiWatermark may help.");
"FIFO is overflown by GatherPipe !\nCPU thread is too fast, try changing the watermark tightness in the game properties.");
// check if we are in sync
_assert_msg_(COMMANDPROCESSOR, fifo.CPWritePointer == *(g_VideoInitialize.Fifo_CPUWritePointer), "FIFOs linked but out of sync");