lagcounter added to savestate
This commit is contained in:
parent
ae0e3a5db4
commit
2c5a0a443a
|
@ -1,5 +1,6 @@
|
|||
---version 2.0.2 released---
|
||||
|
||||
06-aug-2008 - zeromus - add lagcounter and lagflag to savestate
|
||||
06-aug-2008 - zeromus - SF case 2040448 (View Slots bug - does not include new savestate naming)
|
||||
06-aug-2008 - zeromus - restore the debugger snap functionality
|
||||
06-aug-2008 - zeromus - add memory.readbyterange to emulua
|
||||
|
|
|
@ -523,7 +523,6 @@ void UpdateAutosave(void);
|
|||
///Skip may be passed in, if FRAMESKIP is #defined, to cause this to emulate more than one frame
|
||||
void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int skip)
|
||||
{
|
||||
//lagFlag = true;
|
||||
int r,ssize;
|
||||
|
||||
JustFrameAdvanced = false;
|
||||
|
@ -558,7 +557,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
|
|||
|
||||
FCEU_LuaFrameBoundary();
|
||||
FCEU_UpdateInput();
|
||||
lagFlag = true;
|
||||
lagFlag = 1;
|
||||
if(geniestage!=1) FCEU_ApplyPeriodicCheats();
|
||||
r=FCEUPPU_Loop(skip);
|
||||
|
||||
|
@ -643,7 +642,6 @@ void hand(X6502 *X, int type, unsigned int A)
|
|||
int suppressAddPowerCommand=0; // hack... yeah, I know...
|
||||
void PowerNES(void)
|
||||
{
|
||||
|
||||
if(!suppressAddPowerCommand)
|
||||
FCEUMOV_AddCommand(FCEUNPCMD_POWER);
|
||||
if(!GameInfo) return;
|
||||
|
@ -674,9 +672,9 @@ void PowerNES(void)
|
|||
if(GameInfo->type==GIT_VSUNI)
|
||||
FCEU_VSUniPower();
|
||||
|
||||
|
||||
|
||||
timestampbase=0;
|
||||
LagCounterReset();
|
||||
|
||||
X6502_Power();
|
||||
FCEU_PowerCheats();
|
||||
// clear back baffer
|
||||
|
|
|
@ -74,7 +74,7 @@ extern INPUTCFC *FCEU_InitBarcodeWorld(void);
|
|||
//global lag variables
|
||||
unsigned int lagCounter;
|
||||
bool lagCounterDisplay;
|
||||
bool lagFlag;
|
||||
char lagFlag;
|
||||
//-------------
|
||||
|
||||
static uint8 joy_readbit[2];
|
||||
|
@ -101,7 +101,7 @@ FCPORT portFC;
|
|||
|
||||
static DECLFR(JPRead)
|
||||
{
|
||||
lagFlag = false;
|
||||
lagFlag = 0;
|
||||
uint8 ret=0;
|
||||
|
||||
ret|=joyports[A&1].driver->Read(A&1);
|
||||
|
@ -297,7 +297,7 @@ void FCEU_UpdateInput(void)
|
|||
|
||||
static DECLFR(VSUNIRead0)
|
||||
{
|
||||
lagFlag = false;
|
||||
lagFlag = 0;
|
||||
uint8 ret=0;
|
||||
|
||||
ret|=(joyports[0].driver->Read(0))&1;
|
||||
|
@ -310,7 +310,7 @@ static DECLFR(VSUNIRead0)
|
|||
|
||||
static DECLFR(VSUNIRead1)
|
||||
{
|
||||
lagFlag = false;
|
||||
lagFlag = 0;
|
||||
uint8 ret=0;
|
||||
|
||||
ret|=(joyports[1].driver->Read(1))&1;
|
||||
|
@ -466,6 +466,8 @@ SFORMAT FCEUCTRL_STATEINFO[]={
|
|||
{ &LastStrobe, 1, "LSTS"},
|
||||
{ &ZD[0].bogo, 1, "ZBG0"},
|
||||
{ &ZD[1].bogo, 1, "ZBG1"},
|
||||
{ &lagFlag, 1, "LAGF"},
|
||||
{ &lagCounter, 4, "LAGC"},
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -574,7 +576,6 @@ static void CommandSoundAdjust(void);
|
|||
static void CommandUsePreset(void);
|
||||
static void BackgroundDisplayToggle(void);
|
||||
static void ObjectDisplayToggle(void);
|
||||
static void LagCounterReset(void);
|
||||
static void LagCounterToggle(void);
|
||||
static void ViewSlots(void);
|
||||
static void LaunchMemoryWatch(void);
|
||||
|
@ -853,7 +854,7 @@ static void ObjectDisplayToggle(void)
|
|||
FCEUI_SetRenderPlanes(spr,bg);
|
||||
}
|
||||
|
||||
static void LagCounterReset(void)
|
||||
void LagCounterReset()
|
||||
{
|
||||
lagCounter = 0;
|
||||
}
|
||||
|
|
|
@ -280,7 +280,8 @@ extern struct EMUCMDTABLE FCEUI_CommandTable[];
|
|||
|
||||
extern unsigned int lagCounter;
|
||||
extern bool lagCounterDisplay;
|
||||
extern bool lagFlag;
|
||||
extern char lagFlag;
|
||||
void LagCounterReset();
|
||||
|
||||
#endif //_INPUT_H_
|
||||
|
||||
|
|
|
@ -763,6 +763,7 @@ void FCEUI_SaveMovie(const char *fname, EMOVIE_FLAG flags)
|
|||
openRecordingMovie(fname);
|
||||
|
||||
currFrameCounter = 0;
|
||||
LagCounterReset();
|
||||
|
||||
currMovieData = MovieData();
|
||||
currMovieData.guid.newGuid();
|
||||
|
|
Loading…
Reference in New Issue