* SDL: actually fixed instructions counting

This commit is contained in:
ansstuff 2013-05-26 16:33:43 +00:00
parent 78b47b938a
commit 015e559e47
3 changed files with 3 additions and 3 deletions

View File

@ -740,9 +740,6 @@ void DebugCycle()
uint16 A = 0; uint16 A = 0;
int size; int size;
// since this function is called once for every instruction, we can use it for keeping statistics
IncrementInstructionsCounters();
if (scanline == 240) if (scanline == 240)
{ {
vblankScanLines = (PAL?int((double)timestamp / ((double)341 / (double)3.2)):timestamp / 114); //114 approximates the number of timestamps per scanline during vblank. Approx 2508. NTSC: (341 / 3.0) PAL: (341 / 3.2). Uses (3.? * cpu_cycles) / 341.0, and assumes 1 cpu cycle. vblankScanLines = (PAL?int((double)timestamp / ((double)341 / (double)3.2)):timestamp / 114); //114 approximates the number of timestamps per scanline during vblank. Approx 2508. NTSC: (341 / 3.0) PAL: (341 / 3.2). Uses (3.? * cpu_cycles) / 341.0, and assumes 1 cpu cycle.

View File

@ -110,6 +110,7 @@ extern void ResetDebugStatisticsCounters();
extern void ResetCyclesCounter(); extern void ResetCyclesCounter();
extern void ResetInstructionsCounter(); extern void ResetInstructionsCounter();
extern void ResetDebugStatisticsDeltaCounters(); extern void ResetDebugStatisticsDeltaCounters();
extern void IncrementInstructionsCounters();
//------------- //-------------
//internal variables that debuggers will want access to //internal variables that debuggers will want access to

View File

@ -483,6 +483,8 @@ extern int test; test++;
//will probably cause a major speed decrease on low-end systems //will probably cause a major speed decrease on low-end systems
DEBUG( DebugCycle() ); DEBUG( DebugCycle() );
IncrementInstructionsCounters();
_PI=_P; _PI=_P;
b1=RdMem(_PC); b1=RdMem(_PC);