aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_unai
diff options
context:
space:
mode:
authornotaz2011-08-12 02:37:23 +0300
committernotaz2011-08-13 00:56:40 +0300
commitc006d9e3d7b4c7f0fda6c27062e362cfc7515630 (patch)
treeaa9054fec960971128bd1cb185d324f8750084c9 /plugins/gpu_unai
parent1db5bc1ed7f992d7c2686f5359e53301eba2b2ca (diff)
downloadpcsx_rearmed-c006d9e3d7b4c7f0fda6c27062e362cfc7515630.tar.gz
pcsx_rearmed-c006d9e3d7b4c7f0fda6c27062e362cfc7515630.tar.bz2
pcsx_rearmed-c006d9e3d7b4c7f0fda6c27062e362cfc7515630.zip
gpu_unai: redo frameskip
the previous code wasn't that functional
Diffstat (limited to 'plugins/gpu_unai')
-rw-r--r--plugins/gpu_unai/gpu.cpp21
-rw-r--r--plugins/gpu_unai/gpu_command.h8
2 files changed, 19 insertions, 10 deletions
diff --git a/plugins/gpu_unai/gpu.cpp b/plugins/gpu_unai/gpu.cpp
index ea98364..fefc277 100644
--- a/plugins/gpu_unai/gpu.cpp
+++ b/plugins/gpu_unai/gpu.cpp
@@ -29,6 +29,7 @@ int linesInterlace = 0; /* internal lines interlace */
int linesInterlace_user = 0; /* Lines interlace */
bool isSkip = false; /* skip frame (info coming from GPU) */
+bool wasSkip = false;
bool skipFrame = false; /* skip frame (according to frame skip) */
bool alt_fps = false; /* Alternative FPS algorithm */
bool show_fps = false; /* Show FPS statistics */
@@ -551,6 +552,11 @@ void GPU_writeStatus(u32 data)
DisplayArea[0] = (data & 0x000003FF); //(short)(data & 0x3ff);
DisplayArea[1] = ((data & 0x0007FC00)>>10); //(data & 0x000FFC00) >> 10; //(short)((data>>10)&0x1ff);
fb_dirty = true;
+ wasSkip = isSkip;
+ if (isSkip)
+ isSkip = false;
+ else
+ isSkip = skipFrame;
break;
case 0x07:
DisplayArea[4] = data & 0x000003FF; //(short)(data & 0x3ff);
@@ -884,15 +890,18 @@ void GPU_updateLace(void)
if (!fb_dirty || (GPU_GP1&0x08800000))
return;
- if (!isSkip) {
+ if (!wasSkip) {
blit();
-
fb_dirty = false;
- if (cbs->fskip_advice)
- isSkip = true;
+ skCount = 0;
}
- else
- isSkip = false;
+ else {
+ skCount++;
+ if (skCount >= 8)
+ wasSkip = isSkip = 0;
+ }
+
+ skipFrame = cbs->fskip_advice;
}
long GPUopen(unsigned long *, char *, char *)
diff --git a/plugins/gpu_unai/gpu_command.h b/plugins/gpu_unai/gpu_command.h
index 2dc7f5b..a5b61b6 100644
--- a/plugins/gpu_unai/gpu_command.h
+++ b/plugins/gpu_unai/gpu_command.h
@@ -400,7 +400,7 @@ void gpuSendPacketFunction(const int PRIM)
TextureWindow[2] = TextureMask[(temp >> 0) & 0x1F];
TextureWindow[3] = TextureMask[(temp >> 5) & 0x1F];
gpuSetTexture(GPU_GP1);
- isSkip = false;
+ //isSkip = false;
DO_LOG(("TextureWindow(0x%x)\n",PRIM));
}
break;
@@ -409,7 +409,7 @@ void gpuSendPacketFunction(const int PRIM)
const u32 temp = PacketBuffer.U4[0];
DrawingArea[0] = temp & 0x3FF;
DrawingArea[1] = (temp >> 10) & 0x3FF;
- isSkip = false;
+ //isSkip = false;
DO_LOG(("DrawingArea_Pos(0x%x)\n",PRIM));
}
break;
@@ -418,7 +418,7 @@ void gpuSendPacketFunction(const int PRIM)
const u32 temp = PacketBuffer.U4[0];
DrawingArea[2] = (temp & 0x3FF) + 1;
DrawingArea[3] = ((temp >> 10) & 0x3FF) + 1;
- isSkip = false;
+ //isSkip = false;
DO_LOG(("DrawingArea_Size(0x%x)\n",PRIM));
}
break;
@@ -427,7 +427,7 @@ void gpuSendPacketFunction(const int PRIM)
const u32 temp = PacketBuffer.U4[0];
DrawingOffset[0] = ((long)temp<<(32-11))>>(32-11);
DrawingOffset[1] = ((long)temp<<(32-22))>>(32-11);
- isSkip = false;
+ //isSkip = false;
DO_LOG(("DrawingOffset(0x%x)\n",PRIM));
}
break;