Fifo: Rewrite SyncGpu

The new implementation has 3 options:
 SyncGpuMaxDistance
 SyncGpuMinDistance
 SyncGpuOverclock

The MaxDistance controlls how many CPU cycles the CPU is allowed to be in front
of the GPU. Too low values will slow down extremly, too high values are as
unsynchronized and half of the games will crash.
The -MinDistance (negative) set how many cycles the GPU is allowed to be in
front of the CPU. As we are used to emulate an infinitiv fast GPU, this may be
set to any high (negative) number.

The last parameter is to hack a faster (>1.0) or slower(<1.0) GPU. As we don't
emulate GPU timing very well (eg skip the timings of the pixel stage completely),
an overclock factor of ~0.5 is often much more accurate than 1.0
This commit is contained in:
degasus
2015-06-03 23:21:46 +02:00
parent 5a0daef7f0
commit d31bed8b79
12 changed files with 126 additions and 110 deletions

View File

@ -56,9 +56,6 @@ struct SCPFifoStruct
volatile u32 bFF_LoWatermark;
volatile u32 bFF_HiWatermark;
// for GP watchdog hack
volatile u32 isGpuReadingData;
};
class VideoBackend
@ -99,7 +96,7 @@ public:
virtual void Video_GatherPipeBursted() = 0;
virtual void Video_Sync() = 0;
virtual int Video_Sync(int ticks) = 0;
// Registers MMIO handlers for the CommandProcessor registers.
virtual void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) = 0;
@ -148,7 +145,7 @@ class VideoBackendHardware : public VideoBackend
void Video_GatherPipeBursted() override;
void Video_Sync() override;
int Video_Sync(int ticks) override;
void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) override;