Merge the last set of changes from the gh-pages branch
This commit is contained in:
parent
af4bc7c8bb
commit
d8f0e64329
30 changed files with 338 additions and 315 deletions
|
|
@ -195,21 +195,6 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
if (control) this.cmp.setBinding(null, CPUPDP11.BUTTONS[i], control);
|
||||
}
|
||||
|
||||
/*
|
||||
* We've already saved the parmsCPU 'autoStart' setting, but there may be a machine (or URL) override.
|
||||
*/
|
||||
var sAutoStart = cmp.getMachineParm('autoStart');
|
||||
if (sAutoStart != null) {
|
||||
this.flags.autoStart = (sAutoStart == "true"? true : (sAutoStart == "false"? false : !!sAutoStart));
|
||||
}
|
||||
|
||||
/*
|
||||
* Start running automatically on power-up, assuming there's no Debugger and no "Run" button.
|
||||
*/
|
||||
if ((!DEBUGGER || !this.dbg) && this.bindings["run"] === undefined) {
|
||||
this.flags.autoStart = true;
|
||||
}
|
||||
|
||||
this.setReady();
|
||||
};
|
||||
|
||||
|
|
@ -272,6 +257,21 @@ CPUPDP11.prototype.restore = function(data)
|
|||
*/
|
||||
CPUPDP11.prototype.powerUp = function(data, fRepower)
|
||||
{
|
||||
/*
|
||||
* We've already saved the parmsCPU 'autoStart' setting, but there may be a machine (or URL) override.
|
||||
*/
|
||||
var sAutoStart = this.cmp.getMachineParm('autoStart');
|
||||
if (sAutoStart != null) {
|
||||
this.flags.autoStart = (sAutoStart == "true"? true : (sAutoStart == "false"? false : !!sAutoStart));
|
||||
}
|
||||
else if (this.flags.autoStart == null) {
|
||||
/*
|
||||
* If there's no explicit parmsCPU setting either, then we will autoStart if there's no Debugger and
|
||||
* no "Run" button.
|
||||
*/
|
||||
this.flags.autoStart = ((!DEBUGGER || !this.dbg) && this.bindings["run"] === undefined);
|
||||
}
|
||||
|
||||
if (!fRepower) {
|
||||
this.finish();
|
||||
if (!data || !this.restore) {
|
||||
|
|
@ -298,6 +298,11 @@ CPUPDP11.prototype.powerUp = function(data, fRepower)
|
|||
*/
|
||||
this.println("No debugger detected");
|
||||
}
|
||||
if (this.flags.autoStart) {
|
||||
this.println("CPU will auto-start");
|
||||
} else {
|
||||
this.println("CPU will not be auto-started, click Run to start");
|
||||
}
|
||||
}
|
||||
/*
|
||||
* The Computer component (which is responsible for all powerDown and powerUp notifications)
|
||||
|
|
@ -1184,6 +1189,7 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus)
|
|||
if (fUpdateFocus) this.cmp.setFocus(true);
|
||||
this.cmp.start(this.msStartRun, this.getCycles());
|
||||
}
|
||||
if (!this.dbg) this.status("Started");
|
||||
setTimeout(this.onRunTimeout, 0);
|
||||
return true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue