diff --git a/modules/pcx86/lib/computer.js b/modules/pcx86/lib/computer.js index c4cd06ace..56eef9b79 100644 --- a/modules/pcx86/lib/computer.js +++ b/modules/pcx86/lib/computer.js @@ -1425,7 +1425,9 @@ Computer.prototype.getMachineComponent = function(sType, componentPrev) } if (component.type == sType) return component; } - if (!componentLast) Component.log("Machine component type '" + sType + "' not found", "warning"); + if (!componentLast && sType != "FPU") { + Component.log("Machine component type '" + sType + "' not found", "warning"); + } return null; }; diff --git a/modules/pcx86/lib/cpu.js b/modules/pcx86/lib/cpu.js index 0b72fd934..685aed82f 100644 --- a/modules/pcx86/lib/cpu.js +++ b/modules/pcx86/lib/cpu.js @@ -917,6 +917,14 @@ CPU.prototype.calcRemainingTime = function() this.calcSpeed(nCycles, msElapsed); if (msRemainsThisRun < 0 || this.aCounts.mhz < this.aCounts.mhzTarget) { + /* + * Try "throwing out" the effects of large anomalies, by moving the overall run start time up; + * ordinarily, this should only happen when the someone is using an external Debugger or some other + * tool or feature that is interfering with our overall execution. + */ + if (msRemainsThisRun < -1000) { + this.aCounts.msStartRun -= msRemainsThisRun; + } /* * If the last burst took MORE time than we allotted (ie, it's taking more than 1 second to simulate * nCyclesPerSecond), all we can do is yield for as little time as possible (ie, 0ms) and hope that the