Bumped version to 1.30 in honor of the PDP11 module that's being integrated, along with my first attempt to use a newer version of the Closure Compiler (ie, the JavaScript version), as well as giving Gulp a try -- although Gulp leaves just as bad a taste in my mouth as Grunt did
This commit is contained in:
parent
bbaf0d141f
commit
3bd02c7e19
298 changed files with 16473 additions and 3885 deletions
|
|
@ -110,7 +110,7 @@ function Computer8080(parmsComputer, parmsMachine, fSuspended) {
|
|||
|
||||
Component.call(this, "Computer", parmsComputer, Computer8080, Messages8080.COMPUTER);
|
||||
|
||||
this.flags.fPowered = false;
|
||||
this.flags.powered = false;
|
||||
|
||||
this.setMachineParms(parmsMachine);
|
||||
|
||||
|
|
@ -626,9 +626,9 @@ Computer8080.prototype.powerOn = function(resume)
|
|||
*/
|
||||
Computer8080.prototype.powerRestore = function(component, stateComputer, fRepower, fRestore)
|
||||
{
|
||||
if (!component.flags.fPowered) {
|
||||
if (!component.flags.powered) {
|
||||
|
||||
component.flags.fPowered = true;
|
||||
component.flags.powered = true;
|
||||
|
||||
if (component.powerUp) {
|
||||
|
||||
|
|
@ -731,12 +731,12 @@ Computer8080.prototype.donePowerOn = function(aParms)
|
|||
var fRepower = (aParms[1] < 0);
|
||||
var fRestore = aParms[2];
|
||||
|
||||
if (DEBUG && this.flags.fPowered && this.messageEnabled()) {
|
||||
if (DEBUG && this.flags.powered && this.messageEnabled()) {
|
||||
this.printMessage("Computer8080.donePowerOn(): redundant");
|
||||
}
|
||||
|
||||
this.fInitialized = true;
|
||||
this.flags.fPowered = true;
|
||||
this.flags.powered = true;
|
||||
var controlPower = this.bindings["power"];
|
||||
if (controlPower) controlPower.textContent = "Shutdown";
|
||||
|
||||
|
|
@ -777,22 +777,22 @@ Computer8080.prototype.donePowerOn = function(aParms)
|
|||
*/
|
||||
Computer8080.prototype.checkPower = function()
|
||||
{
|
||||
if (this.flags.fPowered) return true;
|
||||
if (this.flags.powered) return true;
|
||||
|
||||
var component = null, iComponent;
|
||||
var aComponents = Component.getComponents(this.id);
|
||||
for (iComponent = 0; iComponent < aComponents.length; iComponent++) {
|
||||
component = aComponents[iComponent];
|
||||
if (component !== this && !component.flags.fReady) break;
|
||||
if (component !== this && !component.flags.ready) break;
|
||||
}
|
||||
if (iComponent == aComponents.length) {
|
||||
for (iComponent = 0; iComponent < aComponents.length; iComponent++) {
|
||||
component = aComponents[iComponent];
|
||||
if (component !== this && !component.flags.fPowered) break;
|
||||
if (component !== this && !component.flags.powered) break;
|
||||
}
|
||||
}
|
||||
if (iComponent == aComponents.length) component = this;
|
||||
var s = "The " + component.type + " component (" + component.id + ") is not " + (!component.flags.fReady? "ready yet" + (component.fnReady? " (waiting for notification)" : "") : "powered yet") + ".";
|
||||
var s = "The " + component.type + " component (" + component.id + ") is not " + (!component.flags.ready? "ready yet" + (component.fnReady? " (waiting for notification)" : "") : "powered yet") + ".";
|
||||
web.alertUser(s);
|
||||
return false;
|
||||
};
|
||||
|
|
@ -874,7 +874,7 @@ Computer8080.prototype.powerOff = function(fSave, fShutdown)
|
|||
data = this.cpu.powerDown(fSave, fShutdown);
|
||||
if (typeof data === "object") stateComputer.set(this.cpu.id, data);
|
||||
if (fShutdown) {
|
||||
this.cpu.flags.fPowered = false;
|
||||
this.cpu.flags.powered = false;
|
||||
if (data === false) sState = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -882,13 +882,13 @@ Computer8080.prototype.powerOff = function(fSave, fShutdown)
|
|||
var aComponents = Component.getComponents(this.id);
|
||||
for (var iComponent = 0; iComponent < aComponents.length; iComponent++) {
|
||||
var component = aComponents[iComponent];
|
||||
if (component.flags.fPowered) {
|
||||
if (component.flags.powered) {
|
||||
if (component.powerDown) {
|
||||
data = component.powerDown(fSave, fShutdown);
|
||||
if (typeof data === "object") stateComputer.set(component.id, data);
|
||||
}
|
||||
if (fShutdown) {
|
||||
component.flags.fPowered = false;
|
||||
component.flags.powered = false;
|
||||
if (data === false) sState = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -941,7 +941,7 @@ Computer8080.prototype.powerOff = function(fSave, fShutdown)
|
|||
}
|
||||
|
||||
if (fShutdown) {
|
||||
this.flags.fPowered = false;
|
||||
this.flags.powered = false;
|
||||
var controlPower = this.bindings["power"];
|
||||
if (controlPower) controlPower.textContent = "Power";
|
||||
}
|
||||
|
|
@ -1312,7 +1312,7 @@ Computer8080.prototype.storeServerState = function(sUserID, sState, fSync)
|
|||
Computer8080.prototype.onPower = function()
|
||||
{
|
||||
if (!this.nPowerChange) {
|
||||
if (!this.flags.fPowered) {
|
||||
if (!this.flags.powered) {
|
||||
this.wait(this.powerOn);
|
||||
} else {
|
||||
this.powerOff(false, true);
|
||||
|
|
@ -1333,7 +1333,7 @@ Computer8080.prototype.onReset = function()
|
|||
* I'm going to start with the presumption that it makes little sense for an "unpowered" computer to be "reset";
|
||||
* ditto if the power state is currently being changed.
|
||||
*/
|
||||
if (!this.flags.fPowered || this.nPowerChange) return;
|
||||
if (!this.flags.powered || this.nPowerChange) return;
|
||||
|
||||
/*
|
||||
* If this is a "resumable" machine (and it's not using a predefined state), then we overload the reset
|
||||
|
|
@ -1521,7 +1521,7 @@ Computer8080.init = function()
|
|||
var computer = new Computer8080(parmsComputer, parmsMachine, true);
|
||||
|
||||
if (DEBUG && computer.messageEnabled()) {
|
||||
computer.printMessage("onInit(" + computer.flags.fPowered + ")");
|
||||
computer.printMessage("onInit(" + computer.flags.powered + ")");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1558,7 +1558,7 @@ Computer8080.show = function()
|
|||
if (computer) {
|
||||
|
||||
if (DEBUG && computer.messageEnabled()) {
|
||||
computer.printMessage("onShow(" + computer.fInitialized + "," + computer.flags.fPowered + ")");
|
||||
computer.printMessage("onShow(" + computer.fInitialized + "," + computer.flags.powered + ")");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1566,7 +1566,7 @@ Computer8080.show = function()
|
|||
* AFTER the the initial 'onload' event, and at that point in time, fInitialized will not be set yet.
|
||||
* So, practically speaking, the first show() callback isn't all that useful.
|
||||
*/
|
||||
if (computer.fInitialized && !computer.flags.fPowered) {
|
||||
if (computer.fInitialized && !computer.flags.powered) {
|
||||
/**
|
||||
* Repower the computer, notifying every component to continue running as-is.
|
||||
*/
|
||||
|
|
@ -1612,10 +1612,10 @@ Computer8080.exit = function()
|
|||
if (computer) {
|
||||
|
||||
if (DEBUG && computer.messageEnabled()) {
|
||||
computer.printMessage("onExit(" + computer.flags.fPowered + ")");
|
||||
computer.printMessage("onExit(" + computer.flags.powered + ")");
|
||||
}
|
||||
|
||||
if (computer.flags.fPowered) {
|
||||
if (computer.flags.powered) {
|
||||
/**
|
||||
* Power off the computer, giving every component an opportunity to save its state,
|
||||
* but only if 'resume' has been set AND there is no valid resume path (because if a valid resume
|
||||
|
|
|
|||
Loading…
Reference in a new issue