Frameskip / VU skip should work a lot better now (some vars weren't being initialized correctly).

Fixed Devel/Debug build compilation errors with cottonvibes' new VUmicro code.  PrecompiledHeader.h must be a top-level include.  It can't be nested inside other .h files.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@699 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
jake.stine@gmail.com 2009-02-05 10:43:53 +00:00 committed by Gregory Hainaut
parent ec088c0737
commit 4673a23e55
7 changed files with 16 additions and 13 deletions

View File

@ -214,7 +214,7 @@ static __forceinline void vSyncInfoCalc( vSyncTimingInfo* info, u32 framesPerSec
u32 UpdateVSyncRate()
{
const char *limiterMsg = "Framelimiter rate updated (UpdateVSyncRate): %d.%d fps\n";
const char *limiterMsg = "Framelimiter rate updated (UpdateVSyncRate): %d.%d fps";
// fixme - According to some docs, progressive-scan modes actually refresh slower than
// interlaced modes. But I can't fathom how, since the refresh rate is a function of
@ -244,7 +244,8 @@ u32 UpdateVSyncRate()
if( m_iTicks != ticks )
{
m_iTicks = ticks;
SysPrintf( limiterMsg, Config.CustomFps, 0 );
gsOnModeChanged( vSyncInfo.Framerate, m_iTicks );
Console::Status( limiterMsg, params Config.CustomFps, 0 );
}
}
else
@ -253,7 +254,8 @@ u32 UpdateVSyncRate()
if( m_iTicks != ticks )
{
m_iTicks = ticks;
SysPrintf( limiterMsg, vSyncInfo.Framerate/50, (vSyncInfo.Framerate*2)%100 );
gsOnModeChanged( vSyncInfo.Framerate, m_iTicks );
Console::Status( limiterMsg, params vSyncInfo.Framerate/50, (vSyncInfo.Framerate*2)%100 );
}
}

View File

@ -146,7 +146,7 @@ void _gs_ChangeTimings( u32 framerate, u32 iTicks )
}
}
static void gsOnModeChanged( u32 framerate, u32 newTickrate )
void gsOnModeChanged( u32 framerate, u32 newTickrate )
{
if( mtgsThread != NULL )
mtgsThread->SendSimplePacket( GS_RINGTYPE_MODECHANGE, framerate, newTickrate, 0 );
@ -169,7 +169,7 @@ void gsSetVideoRegionType( u32 isPal )
Config.PsxType &= ~1;
}
u32 newTickrate = UpdateVSyncRate();
UpdateVSyncRate();
}
@ -550,7 +550,7 @@ __forceinline void gsFrameSkip( bool forceskip )
{
if( !FramesToSkip )
{
//SysPrintf( "- Skipping some VUs!\n" );
Console::Status( "- Skipping some VUs!" );
GSsetFrameSkip( 1 );
FramesToRender = noSkipFrames;
@ -566,7 +566,7 @@ __forceinline void gsFrameSkip( bool forceskip )
// Otherwise we could start compounding the issue and skips would be too long.
if( g_vu1SkipCount > 0 )
{
//SysPrintf("- Already Assigned a Skipcount.. %d\n", g_vu1SkipCount );
Console::Status("- Already Assigned a Skipcount.. %d", params g_vu1SkipCount );
return;
}
@ -590,7 +590,7 @@ __forceinline void gsFrameSkip( bool forceskip )
if( (m_justSkipped && (sSlowDeltaTime > m_iSlowTicks)) ||
(sSlowDeltaTime > m_iSlowTicks*2) )
{
//SysPrintf( "Frameskip Initiated! Lateness: %d\n", (int)( (sSlowDeltaTime*100) / m_iSlowTicks ) );
Console::Status( "Frameskip Initiated! Lateness: %d", params (int)( (sSlowDeltaTime*100) / m_iSlowTicks ) );
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_VUSKIP )
{
@ -637,7 +637,7 @@ __forceinline void gsFrameSkip( bool forceskip )
if( sSlowDeltaTime > (m_iSlowTicks + ((s64)GetTickFrequency() / 4)) )
{
//SysPrintf( "Frameskip couldn't skip enough -- had to lose some time!\n" );
Console::Status( "Frameskip couldn't skip enough -- had to lose some time!" );
m_iSlowStart = iEnd - m_iSlowTicks;
}

View File

@ -258,6 +258,7 @@ extern void gsInit();
extern s32 gsOpen();
extern void gsClose();
extern void gsReset();
extern void gsOnModeChanged( u32 framerate, u32 newTickrate );
extern void gsSetVideoRegionType( u32 isPal );
extern void gsResetFrameSkip();
extern void gsSyncLimiterLostTime( s32 deltaTime );

View File

@ -46,11 +46,10 @@ using namespace std;
#endif
// forces the compiler to treat a non-volatile value as volatile.
// This allows us to delacre the vars as non-volatile and only use
// This allows us to declare the vars as non-volatile and only use
// them as volatile when appropriate (more optimized).
#define volatize(x) (*reinterpret_cast<volatile uint*>(&(x))) // for writepos
//#define volatize_c(x) (*(volatile u32*)&(x)) // for readpos
#define volatize(x) (*reinterpret_cast<volatile uint*>(&(x)))
/////////////////////////////////////////////////////////////////////////////
// BEGIN -- MTGS GIFtag Parse Implementation

View File

@ -18,6 +18,7 @@
// Mega VU(micro) recompiler! - author: cottonvibes(@gmail.com)
#include "PrecompiledHeader.h"
#include "megaVU.h"
#ifdef PCSX2_MEGAVU

View File

@ -17,7 +17,6 @@
*/
#pragma once
#include "PrecompiledHeader.h"
#include "Common.h"
#include "VU.h"
#include "megaVU_Tables.h"

View File

@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "PrecompiledHeader.h"
#include "megaVU.h"
#ifdef PCSX2_MEGAVU_lulz