From 891c0011bb410efb503e9395df4bd1954dc71307 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 18 Aug 2014 21:26:03 +0200 Subject: [PATCH] Added back manual frameskip due to forum request --- core/hw/pvr/Renderer_if.cpp | 3 --- core/hw/pvr/ta_ctx.cpp | 10 ++++++++++ core/hw/sh4/dyna/decoder.cpp | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp index 3d79d967d..9c7494eea 100644 --- a/core/hw/pvr/Renderer_if.cpp +++ b/core/hw/pvr/Renderer_if.cpp @@ -71,9 +71,6 @@ int max_idx,max_mvo,max_op,max_pt,max_tr,max_vtx,max_modt, ovrn; TA_context* _pvrrc; void SetREP(TA_context* cntx); -int frameskip=0; -bool FrameSkipping=false; // global switch to enable/disable frameskip - bool rend_single_frame() { //wait render start only if no frame pending diff --git a/core/hw/pvr/ta_ctx.cpp b/core/hw/pvr/ta_ctx.cpp index c01164281..cee1c7835 100644 --- a/core/hw/pvr/ta_ctx.cpp +++ b/core/hw/pvr/ta_ctx.cpp @@ -4,6 +4,9 @@ extern u32 fskip; extern u32 FrameCount; +int frameskip=0; +bool FrameSkipping=false; // global switch to enable/disable frameskip + TA_context* ta_ctx; tad_context ta_tad; @@ -75,6 +78,13 @@ bool QueueRender(TA_context* ctx) { verify(ctx != 0); + if (FrameSkipping && frameskip) { + frameskip=1-frameskip; + tactx_Recycle(ctx); + fskip++; + return false; + } + if (rqueue) { tactx_Recycle(ctx); fskip++; diff --git a/core/hw/sh4/dyna/decoder.cpp b/core/hw/sh4/dyna/decoder.cpp index 5dbcfb2a7..925b96bb9 100644 --- a/core/hw/sh4/dyna/decoder.cpp +++ b/core/hw/sh4/dyna/decoder.cpp @@ -1169,7 +1169,7 @@ _end: //Small-n-simple idle loop detector :p if (state.info.has_readm && !state.info.has_writem && !state.info.has_fpu && blk->guest_opcodes<6) { - if ((blk->BlockType==BET_Cond_0 || blk->BlockType==BET_Cond_1) && blk->BranchBlock<=blk->addr) + if (blk->BlockType==BET_Cond_0 || blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr) { blk->guest_cycles*=3; }