Fixed the autoStart state of the PDP-11 test machine used for resume testing

This commit is contained in:
Jeff Parsons 2017-01-25 20:59:27 -08:00 • committed by Jeff Parsons
commit 6f83ee8beb
21 changed files with 34 additions and 63 deletions

View file

@ -252,8 +252,8 @@ h.jf=function(a){this.a=this.a&-1023|a&1022;this.h=this.h&60|(a&48)>>4;if(!(this
this.a|=37888:(a=65536-this.i&65535,d=(this.h&63)<<16|this.m,a=b.call(this,c,e,f,g,a,d,this.Oc.bind(this)))}a&&(this.a|=129,this.a&64&&N(this.c,this.Ka))}};h.Xd=function(){return this.m};h.gf=function(a){this.m=a&65534};h.$d=function(){return this.f};h.kf=function(a){this.f=a};h.ae=function(){return this.i};h.lf=function(a){this.i=a};h.Yd=function(){return this.h};h.hf=function(a){this.h=a&63;this.a=this.a&-49|(this.h&3)<<4};
var Cg="",Dg="?",Eg="??",Ig={},Ag=(Ig[63744]=[null,null,P.prototype.Zd,P.prototype.jf,"RLCS"],Ig[63746]=[null,null,P.prototype.Xd,P.prototype.gf,"RLBA"],Ig[63748]=[null,null,P.prototype.$d,P.prototype.kf,"RLDA"],Ig[63750]=[null,null,P.prototype.ae,P.prototype.lf,"RLMP"],Ig[63752]=[null,null,P.prototype.Yd,P.prototype.hf,"RLBE"],Ig);
function Jg(a,b,c){r.call(this,"Computer",a,0,33554432);this.l.S=!1;this.G=null;Kg(this,b);this.D=Kc(this,"autoPower",a,6);this.g=0;this.K=+a.busWidth||+a.buswidth;this.v=this.s=this.w=null;this.o=this.I=!1;this.i=this.h=null;this.H=this.m=this.F=!1;this.L=Kc(this,"url")||"";(Math.random()+.1).toString(36);this.b=Lg(this);if(this.c=wa("CPU",this.id)){this.C=wa("Debugger",this.id);this.u=new Nb({id:this.Na+".bus",busWidth:this.K},this.c,this.C);var d,e=y(this.id);if((this.f=wa("Panel",this.id))&&this.f.bb)for(b=
0;b<e.length;b++)d=e[b],d.B=this.f.B,d.X=this.f.X,d.bb=this.f.bb;this.X(db+" v1.32.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.ca&&d.ca(this,this.u,this.c,this.C);this.a=Kc(this,"resume",a,4,Mg);var f;b=null;if(a=Kc(this,"state")||(f=!0,a.state))this.w=b=a,f||(this.o=!0,this.a=Mg),this.a&&
(this.i=new J(this,"1.32.2"),Ng(this.i)?b=null:delete this.i);!b&&this.a&&(b=Og(this))&&(this.o=!0);if(b){var g=this;G(b,null,!0,function(a,b,c){c?(g.s=null,g.o=!1,g.B("Unable to load machine state from server (error "+c+(b?": "+Ha(b):"")+")")):(g.v=b,g.I=!0);D(g)})}else D(this);this.j.power||(this.D=!0);!c&&this.D&&Pg(this,this.vb)}else v("Unable to find CPU component")}n(Jg,r);
0;b<e.length;b++)d=e[b],d.B=this.f.B,d.X=this.f.X,d.bb=this.f.bb;this.X(db+" v1.32.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis <http://skn.noip.me/pdp11/pdp11.html>");for(b=0;b<e.length;b++)d=e[b],d.ca&&d.ca(this,this.u,this.c,this.C);this.a=Kc(this,"resume",a,4,Mg);var f;b=null;if(a=Kc(this,"state")||(f=!0,a.state))this.w=b=a,f||(this.o=!0,this.a=
Mg),this.a&&(this.i=new J(this,"1.32.2"),Ng(this.i)?b=null:delete this.i);!b&&this.a&&(b=Og(this))&&(this.o=!0);if(b){var g=this;G(b,null,!0,function(a,b,c){c?(g.s=null,g.o=!1,g.B("Unable to load machine state from server (error "+c+(b?": "+Ha(b):"")+")")):(g.v=b,g.I=!0);D(g)})}else D(this);this.j.power||(this.D=!0);!c&&this.D&&Pg(this,this.vb)}else v("Unable to find CPU component")}n(Jg,r);
function Kg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){v(d.message+" ("+c+")")}}a.G=b}function Kc(a,b,c,d,e){var f=b.toLowerCase(),f=Ra(b)||Ra(f);void 0===f&&a.G&&(f=a.G[b]);void 0===f&&c&&(f=c[b]);void 0===f&&"object"==typeof resources&&resources[b]&&(f=b);void 0===f&&(f=e);if("string"==typeof f&&d)switch(d){case 4:f=+f;isNaN(f)&&(f=e||0);break;case 6:f="true"==f}return f}
function Pg(a,b,c){for(var d=y(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!ya(f)){ya(f,function(){Pg(a,b,c)});return}}b.call(a,c)}function Qg(a,b){var c=new J(a,"1.32.2",Rg);if(Ng(c)&&Sg(c)){var d=c.get(Tg),e=b?b.get(Tg):"unknown";d!=e&&(a.B("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=Jg.prototype;
h.vb=function(a){void 0===a&&(a=this.a||(this.v?Ug:Mg));if(!this.g){this.g++;var b=!1,c=!1;this.F=!1;var d=this.i||new J(this,"1.32.2");if(a==Vg)b=!0;else if(a>Mg){if(Ng(d,this.v)){this.h=new J(this,"1.32.2",Wg);Ng(this.h)&&(Xg(this,d),a=Yg,ah(this.h));this.h.set(Tg,Ja());bh(this.h);var e=this.a&&!this.o;if(a==Ug||ua("Click OK to restore the previous "+db+" machine state, or CANCEL to reset the machine.")){if(c=Sg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Ng(d,g):("error"==f&&"no machine state"!=