Started working on save/restore support for the PDP-11; still a lot of state left to capture, but the basics seem to be working
This commit is contained in:
parent
1cbcb5b0e2
commit
ee45dbd8cf
7 changed files with 679 additions and 612 deletions
|
|
@ -613,11 +613,15 @@ class ComputerPDP11 extends Component {
|
|||
{
|
||||
if (!component.flags.powered) {
|
||||
|
||||
/*
|
||||
* TODO: If all components called super.powerUp(), the powered flag would be set automatically.
|
||||
*/
|
||||
this.assert(component.powerUp);
|
||||
component.flags.powered = true;
|
||||
|
||||
if (component.powerUp) {
|
||||
var data = null;
|
||||
|
||||
var data = null;
|
||||
try {
|
||||
if (fRestore) {
|
||||
data = stateComputer.get(component.id);
|
||||
if (!data) {
|
||||
|
|
@ -690,14 +694,17 @@ class ComputerPDP11 extends Component {
|
|||
*/
|
||||
fRestore = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fRepower && component.comment) {
|
||||
var asComments = component.comment.split("|");
|
||||
for (var i = 0; i < asComments.length; i++) {
|
||||
component.status(asComments[i]);
|
||||
if (!fRepower && component.comment) {
|
||||
var asComments = component.comment.split("|");
|
||||
for (var i = 0; i < asComments.length; i++) {
|
||||
component.status(asComments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
Component.error("Error restoring state for " + component.type + " (" + err.message + ")");
|
||||
}
|
||||
}
|
||||
return fRestore;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue