Updated calcRemainingTime() to compensate for large time anomalies (usually caused by external debuggers)

This commit is contained in:
Jeff Parsons 2016-08-24 17:06:01 -07:00
commit a08fcab276
4 changed files with 120 additions and 113 deletions

View file

@ -2465,7 +2465,7 @@ if (DEBUGGER) {
sLine += (nSequence != null? '=' + nSequence.toString() : "");
} else {
var nCycles = this.cpu.getCycles();
sLine += "cycles=" + nCycles.toString() + " cs=" + str.toHex(this.cpu.counts.nChecksum);
sLine += "cycles=" + nCycles.toString() + " cs=" + str.toHex(this.cpu.nChecksum);
}
}
return sLine;
@ -3719,8 +3719,8 @@ if (DEBUGGER) {
Debugger8080.prototype.doInfo = function(asArgs)
{
if (DEBUG) {
this.println("msPerYield: " + this.cpu.counts.msPerYield);
this.println("nCyclesPerYield: " + this.cpu.counts.nCyclesPerYield);
this.println("msPerYield: " + this.cpu.msPerYield);
this.println("nCyclesPerYield: " + this.cpu.nCyclesPerYield);
return true;
}
return false;
@ -3971,13 +3971,13 @@ if (DEBUGGER) {
if (asArgs[3] !== undefined) nCycles = +asArgs[3]; // warning: decimal instead of hex conversion
switch (asArgs[2]) {
case "int":
this.cpu.counts.nCyclesChecksumInterval = nCycles;
this.cpu.nCyclesChecksumInterval = nCycles;
break;
case "start":
this.cpu.counts.nCyclesChecksumStart = nCycles;
this.cpu.nCyclesChecksumStart = nCycles;
break;
case "stop":
this.cpu.counts.nCyclesChecksumStop = nCycles;
this.cpu.nCyclesChecksumStop = nCycles;
break;
default:
this.println("unknown cs option");