Cleaned up the run loop, less complicated now, and video updates can drive themselves thanks to the new CPU timer functions

This commit is contained in:
Jeff Parsons 2016-08-23 22:41:45 -07:00
commit 244f0dba32
7 changed files with 451 additions and 495 deletions

View file

@ -1471,17 +1471,17 @@ Computer8080.prototype.updateStatus = function(fForce)
};
/**
* updateVideo(n)
* updateVideo(fForced)
*
* Any high-frequency updates should be performed here (avoid updating DOM elements).
*
* @this {Computer8080}
* @param {number} n (where 0 <= n < VIDEO_UPDATES_PER_SECOND for a normal update, or -1 for a forced update)
* @param {boolean} [fForced]
*/
Computer8080.prototype.updateVideo = function(n)
Computer8080.prototype.updateVideo = function(fForced)
{
for (var i = 0; i < this.aVideo.length; i++) {
this.aVideo[i].updateScreen(n);
this.aVideo[i].updateScreen(fForced);
}
};