Starting work on v1.34.3
This commit is contained in:
parent
4d24a0ce6d
commit
40c588a069
295 changed files with 14755 additions and 268 deletions
|
|
@ -14,11 +14,11 @@
|
|||
<xsl:variable name="CSSCLASS">pcjs</xsl:variable>
|
||||
<xsl:variable name="APPCLASS">pcx86</xsl:variable>
|
||||
<xsl:variable name="APPNAME">PCx86</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.34.2</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.34.3</xsl:variable>
|
||||
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
|
||||
|
||||
<xsl:template name="componentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.34.2/components.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.34.3/components.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="componentScripts">
|
||||
|
|
|
|||
|
|
@ -819,7 +819,7 @@ a.P("no return addresses found")}break;case "l":if("ln"==g[0]){cB(a,g[1],!0);bre
|
|||
fb)ye=1610481663,fb=null;else if("on"==fb)md=!0,fb=null;else if("off"==fb)md=!1,fb=null;else{"keys"==fb&&(fb="key");"kbd"==fb&&(fb="keyboard");for(ld in Rb)if(fb==ld){ye=Rb[ld];md=!!(a.ic&ye);break}if(!ye){a.P("unknown message category: "+fb);break a}}ye&&("on"==g[2]?(a.ic|=ye,md=!0):"off"==g[2]&&(a.ic&=~ye,md=!1))}var gC=0,$g="";for(ld in Rb)if(!fb||fb==ld){var hC=!!(a.ic&Rb[ld]);if(null===md||md==hC)$g&&($g+=","),++gC%10||($g+="\n\t"),"key"==ld&&(ld="keys"),$g+=ld}void 0===fb&&a.P("message commands:\n\tm [category] [on|off]\tturn categories on/off");
|
||||
a.P((null!==md?md?"messages on: ":"messages off: ":"message categories:\n\t")+($g||"none"));jy(a)}break;case "o":var Cm=g[1],iC=g[2];if(Cm&&"?"!=Cm){var Dm=Zx(a,Cm,"port #"),Em=Zx(a,iC);void 0!==Dm&&void 0!==Em&&(Sc(a.ka,Dm,1,Em),a.P(sa(Dm)+": "+r(Em)))}else a.P("output commands:"),a.P("\to [p] [b]\twrite byte [b] to port [p]"),a.P("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){fB(a,b.substr(5));break}var Rt="pr"==g[0]?1:0,tf=1+Rt;if(a.J)a.P("step in progress");
|
||||
else{var ej,St=!1,Hb=hy(a,A(a.H),a.H.Z.U);do switch(ej=!1,a.Ia(Hb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:Ky(a,Hb,1);ej=!0;break;case 204:case 206:a.J=tf;Ky(a,Hb,1);break;case 205:case 224:case 225:case 226:a.J=tf;Ky(a,Hb,Hb.Hb?4:2);break;case 232:a.J=tf;Ky(a,Hb,Hb.Hb?5:3);break;case 154:a.J=tf;Ky(a,Hb,Hb.Hb?7:5);break;case 255:var Tt=a.jb(Hb)&14591;if(4351==Tt||6399==Tt)a.J=tf,Xz(a,Hb);break;case 243:case 242:Ky(a,Hb,1);St=ej=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:St&&
|
||||
(a.J=tf,Ky(a,Hb,1))}while(ej);a.J?(a.Gd(a.B,Hb,!0),Nz(a)||(a.pa&&a.pa.ld(),a.J=0)):hB(a,Rt?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();break}Pz(a,g);break;case "t":hB(a,g[0],g[1]);break;case "u":Qz(a,g[1],g[2],8);break;case "v":if("var"==g[0]){bB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.34.2 ("+a.H.ca+",RELEASE,NOPREFETCH"+(Nb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Ma());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ah;void 0!==g[3]&&(ah=+g[3]);
|
||||
(a.J=tf,Ky(a,Hb,1))}while(ej);a.J?(a.Gd(a.B,Hb,!0),Nz(a)||(a.pa&&a.pa.ld(),a.J=0)):hB(a,Rt?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();break}Pz(a,g);break;case "t":hB(a,g[0],g[1]);break;case "u":Qz(a,g[1],g[2],8);break;case "v":if("var"==g[0]){bB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.34.3 ("+a.H.ca+",RELEASE,NOPREFETCH"+(Nb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Ma());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ah;void 0!==g[3]&&(ah=+g[3]);
|
||||
switch(g[2]){case "int":a.H.T.Se=ah;break;case "start":a.H.T.wf=ah;break;case "stop":a.H.T.Ue=ah;break;default:a.P("unknown cs option");break a}void 0!==ah&&Ad(a.H);a.P("checksums "+(a.H.ea.He?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ed(a.H,+g[2])||a.P("warning: using 1x multiplier, previous target not reached"));a.P("target speed: "+(a.H.T.oe.toFixed(2)+"Mhz")+" ("+a.H.T.Kd+"x)");break;default:a.P("unknown option: "+g[1])}else a.P("execution options:"),a.P("\tcs int #\tset checksum cycle interval to #"),
|
||||
a.P("\tcs start #\tset checksum cycle start count to #"),a.P("\tcs stop #\tset checksum cycle stop count to #"),a.P("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){fB(a,b.substr(1));break}var Fm="commands:",Gm;for(Gm in jB)Fm+="\n"+Aa(Gm,7)+jB[Gm];Ig(a)||(Fm+="\nnote: frequency/history disabled if no exec breakpoints");a.P(Fm);break;default:a.P("unknown command: "+b),d=!1}}}catch(Vt){a.P("debugger error: "+(Vt.stack||Vt.message)),d=!1}return d}
|
||||
function ly(a,b,c){b=a.Cg(b,c);for(var d in b)if(!Wz(a,b[+d]))return!1;return!0}
|
||||
|
|
@ -852,23 +852,23 @@ ny,[119,R|S|X,lB|4096]],[[155,R|V|4096,W|V|4096],ny,[98,R|V|X],[96,R|V|X],[95,R|
|
|||
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},xy={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
|
||||
TASK_IOPM:100};$a(function(){for(var a=zb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=vb(c),d=new gy(d);yb(d,c)}});
|
||||
function BB(a,b,c){mb.call(this,"Computer",a,67108864);this.ea.Yb=!1;CB(this,b);this.N=yd(this,"autoPower",a);this.C=0;this.aa=a.busWidth||a.buswidth;this.A=DB;this.L=null;this.I=this.Z=!1;this.da=yd(this,"url")||"";this.ha=(Math.random()+.1).toString(36).substr(2,12);this.B=EB(this);if(this.H=ub("CPU",this.id)){this.ba=ub("Debugger",this.id);this.G=[];for(b=null;b=Wb(this,"Video",b);)this.G.push(b);this.ka=new lc({id:this.xe+".bus",busWidth:this.aa},this.H,this.ba);var d,e=sb(this.id);if((this.D=
|
||||
ub("Panel",this.id))&&this.D.Ie)for(b=0;b<e.length;b++)d=e[b],d.Fa=this.D.Fa,d.P=this.D.P,d.Ie=this.D.Ie;this.P("PCx86 v1.34.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.uc&&d.uc(this,this.ka,this.H,this.ba);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.K=d:this.A=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.I=!0,this.A=DB),this.A&&(this.M=new Wf(this,
|
||||
"1.34.2"),this.M.load()?b=null:delete this.M);!b&&this.A&&(b=FB(this))&&(this.I=!0);if(b){var g=this;Ka(b,null,!0,function(a,b,c){c?(g.K=null,g.I=!1,g.Fa("Unable to load machine state from server (error "+c+(b?": "+Ba(b):"")+")")):(g.L=b,g.Z=!0);Ib(g)})}else Ib(this);this.na.power||(this.N=!0);!c&&this.N&&GB(this,this.Lf)}else gb("Unable to find CPU component")}ba(BB,mb);
|
||||
ub("Panel",this.id))&&this.D.Ie)for(b=0;b<e.length;b++)d=e[b],d.Fa=this.D.Fa,d.P=this.D.P,d.Ie=this.D.Ie;this.P("PCx86 v1.34.3\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.uc&&d.uc(this,this.ka,this.H,this.ba);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.K=d:this.A=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.I=!0,this.A=DB),this.A&&(this.M=new Wf(this,
|
||||
"1.34.3"),this.M.load()?b=null:delete this.M);!b&&this.A&&(b=FB(this))&&(this.I=!0);if(b){var g=this;Ka(b,null,!0,function(a,b,c){c?(g.K=null,g.I=!1,g.Fa("Unable to load machine state from server (error "+c+(b?": "+Ba(b):"")+")")):(g.L=b,g.Z=!0);Ib(g)})}else Ib(this);this.na.power||(this.N=!0);!c&&this.N&&GB(this,this.Lf)}else gb("Unable to find CPU component")}ba(BB,mb);
|
||||
function CB(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){gb(d.message+" ("+c+")")}}a.J=b}function yd(a,b,c){var d=b.toLowerCase(),d=Ua(b)||Ua(d);void 0===d&&a.J&&(d=a.J[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function GB(a,b,c){for(var d=sb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Gb(f)){Gb(f,function(){GB(a,b,c)});return}}b.call(a,c)}
|
||||
function HB(a,b){var c=new Wf(a,"1.34.2",IB);if(c.load()&&JB(c)){var d=c.get(KB),e=b?b.get(KB):"unknown";d!=e&&(a.Fa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=BB.prototype;
|
||||
l.Lf=function(a){void 0===a&&(a=this.A||(this.L?LB:DB));if(!this.C){this.C++;var b=!1,c=!1;this.Y=!1;var d=this.M||new Wf(this,"1.34.2");if(a==MB)b=!0;else if(a>DB){if(d.load(this.L)){this.F=new Wf(this,"1.34.2",NB);this.F.load()&&(OB(this,d),a=PB,QB(this.F));this.F.set(KB,Ea());RB(this.F);var e=this.A&&!this.I;if(a==LB||qb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=JB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
function HB(a,b){var c=new Wf(a,"1.34.3",IB);if(c.load()&&JB(c)){var d=c.get(KB),e=b?b.get(KB):"unknown";d!=e&&(a.Fa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=BB.prototype;
|
||||
l.Lf=function(a){void 0===a&&(a=this.A||(this.L?LB:DB));if(!this.C){this.C++;var b=!1,c=!1;this.Y=!1;var d=this.M||new Wf(this,"1.34.3");if(a==MB)b=!0;else if(a>DB){if(d.load(this.L)){this.F=new Wf(this,"1.34.3",NB);this.F.load()&&(OB(this,d),a=PB,QB(this.F));this.F.set(KB,Ea());RB(this.F);var e=this.A&&!this.I;if(a==LB||qb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=JB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.Fa("Error: "+g),"unable to verify user"==g&&(Ra(SB,""),this.B=null)):this.P(f+": "+g),QB(d),d.load()?(c=JB(d),e=!0):c=!1))}e&&HB(this,c?d:null)}else a==PB&&d.clear()}else HB(this);delete this.L;delete this.M}e=sb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.H&&(c=TB(this,g,d,b,c));b=[d,a,c];a!=MB?GB(this,this.mj,b):this.mj(b)}};
|
||||
function TB(a,b,c,d,e){if(!b.ea.Yb){b.ea.Yb=!0;if(b.Xb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Xb(f,d)&&f&&(gb("Unable to restore state for "+b.type),a.V&&!a.Z?(c.clear(),a.A=DB,window&&window.location.reload()):a.Y=!0,b.Xb(null),e=!1)}if(!d&&b.xj)for(a=b.xj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.mj=function(a){var b=a[0],c=0>a[1];a=a[2];this.ga=!0;this.ea.Yb=!0;var d=this.na.power;d&&(d.textContent="Shutdown");this.H&&(TB(this,this.H,b,c,a),this.H.lf());this.Y&&(OB(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0};
|
||||
function OB(a,b){if(qb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.2"};d.url=a.da;d.user=c;d.type="bug";d.data=b;Ka("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function iB(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Wf(a,"1.34.2"),g=new Wf(a,"1.34.2",IB),h=Ea();g.set(KB,h);f.set(KB,h);f.set(UB,"1.34.2");f.set(VB,window?window.location.href:null);f.set(WB,Ma());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=sb(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Yb&&(m.Wb&&(d=m.Wb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ea.Yb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&XB(a,
|
||||
function OB(a,b){if(qb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.3"};d.url=a.da;d.user=c;d.type="bug";d.data=b;Ka("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function iB(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Wf(a,"1.34.3"),g=new Wf(a,"1.34.3",IB),h=Ea();g.set(KB,h);f.set(KB,h);f.set(UB,"1.34.3");f.set(VB,window?window.location.href:null);f.set(WB,Ma());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=sb(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Yb&&(m.Wb&&(d=m.Wb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ea.Yb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&XB(a,
|
||||
a.B,f.toString()),RB(g)&&RB(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==YB),d&&f.clear(h)):e=f.toString());c&&(a.ea.Yb=!1,b=a.na.power)&&(b.textContent="Power");a.C=0;return e}l.reset=function(){this.ka&&this.ka.reset&&(Lb(this,"Resetting "+this.ka.type),this.ka.reset());for(var a=sb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ka&&c.reset&&(Lb(this,"Resetting "+c.type),c.reset())}};
|
||||
l.start=function(a,b){for(var c=sb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};l.stop=function(a,b){for(var c=sb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.Cb=function(a,b,c){var d=this;switch(b){case "power":return this.na[b]=c,c.onclick=function(){d.C||(d.ea.Yb?iB(d,!1,!0):GB(d,d.Lf))},!0;case "reset":return this.na[b]=c,c.onclick=function(){if(d.ea.Yb&&!d.C)if(d.A&&!d.K){var a=qb("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");iB(d,a,!0);!a&&d.V?window&&window.location.reload():(a||(d.O=!0),d.Lf(DB),d.O=!1)}else d.reset(),d.H&&d.H.lf()},!0;case "save":if(wa(La(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.na[b]=c,c.onclick=function(){var a=EB(d,!0);if(a){var b=!!(d.A&&!d.K||d.V),c=iB(d,b);b?XB(d,a,c):d.Fa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function EB(a,b){var c=a.B;c||((c=Pa(SB),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=jC(a,c))||a.Fa("The user ID is invalid.")):b&&a.Fa("Browser local storage is not available"));return c}
|
||||
function jC(a,b){a.B=null;b=Ka(La()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ra(SB,b.data),a.B=b.data)}catch(d){gb(d.message+" ("+c+")")}return a.B}function FB(a){var b=null;a.B&&(b=La()+"/api/v1/user?req=load&user="+a.B+"&state="+kC(a,"1.34.2"));return b}
|
||||
function XB(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=kC(a,"1.34.2");d.data=c;b=Ka(La()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Fa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Fa(c),Ra(SB,""),a.B=null)}}
|
||||
function jC(a,b){a.B=null;b=Ka(La()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ra(SB,b.data),a.B=b.data)}catch(d){gb(d.message+" ("+c+")")}return a.B}function FB(a){var b=null;a.B&&(b=La()+"/api/v1/user?req=load&user="+a.B+"&state="+kC(a,"1.34.3"));return b}
|
||||
function XB(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=kC(a,"1.34.3");d.data=c;b=Ka(La()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Fa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Fa(c),Ra(SB,""),a.B=null)}}
|
||||
function Wb(a,b,c){a=sb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.ld=function(a){if(this.G.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.G[0];d.D&&d.D.focus();!a&&window&&window.scrollTo(b,c)}};
|
||||
function Md(a,b){a.H&&(a=a.H,a.tj&&(b||!a.ea.wb||a.ea.kj)&&(Hg(a,"EAX",a.D),Hg(a,"EBX",a.G),Hg(a,"ECX",a.I),Hg(a,"EDX",a.L),Hg(a,"ESP",z(a)),Hg(a,"EBP",a.M),Hg(a,"ESI",a.K),Hg(a,"EDI",a.J),Hg(a,"CS",a.Z.U),Hg(a,"DS",a.Ca.U),Hg(a,"SS",a.Y.U),Hg(a,"ES",a.oa.U),Hg(a,"EIP",A(a)),b=qe(a),Hg(a,"PS",b),Hg(a,"V",b&2048),Hg(a,"D",b&1024),Hg(a,"I",b&512),Hg(a,"T",b&256),Hg(a,"S",b&128),Hg(a,"Z",b&64),Hg(a,"A",b&16),Hg(a,"P",b&4),Hg(a,"C",b&1),80386==a.ca&&(Hg(a,"FS",a.Ga.U),Hg(a,"GS",a.Ha.U),Hg(a,"CR0",a.qa),
|
||||
Hg(a,"CR2",a.Cd),Hg(a,"CR3",a.Wc))),b=a.na.speed)&&(b.textContent=a.ea.wb&&a.T.Wd?a.T.Wd.toFixed(2)+"Mhz":"Stopped")}
|
||||
|
|
@ -885,10 +885,10 @@ a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2")
|
|||
function oC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ka(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
"");a=a.replace(d[0],g);oC(a,b,c)}})}else c(a,null)}
|
||||
function pC(a,b,c,d){function e(a){if(void 0===h){var b=g&&zb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=xa(a))}function f(a){e("Error: "+a);k&&(--lC||hb(!0));k=!1}var g,h,k=!0;lC++;pb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
|
||||
(c="/versions/pcx86/1.34.2/components.xsl");m=function(d,h){h?mC(c,null,null,!1,e,function(d,k){k?(ob(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--lC||hb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--lC||hb(!0)):f("invalid machine element: "+
|
||||
(c="/versions/pcx86/1.34.3/components.xsl");m=function(d,h){h?mC(c,null,null,!1,e,function(d,k){k?(ob(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--lC||hb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--lC||hb(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mC(b,a,d,!0,e,m):nC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function qC(a,b,c,d){hb(!1);return pC(a,b,c,d)}window.embedPC=qC;window.embedPCx86=qC;window.findMachineComponent=function(a,b){return ub(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Bb[a]){for(var c=!0,d=Bb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p<f;p++){var v=b[p];if('"'==v||"'"==v)m&&v!=m?k+=v:(m?m=null:m=v,k&&(h.push(k),k=""));else{if(!m){if("\r"==v||"\n"==v)v=";";if(" "==v||"\t"==v||";"==v){k&&(h.push(k),k="");";"==v&&h.length&&(g.push(h),h=[]);continue}}k+=v}}k&&h.push(k);h.length&&g.push(h);d[e]=g;Ab(a)||(c=!1)}return c};window.enableEvents=hb;window.sendEvent=kb;
|
||||
function rC(a,b,c,d){if(!c&&b){d.push(b);a=pb[d[0]];b=null;for(var e in a)if(wa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ka(b,null,!0,function(a,b){sC(b,d)}):sC(null,d)}else gb("Error ("+c+") requesting "+a)}
|
||||
function sC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=pb[f],k={},m;for(m in h){var p=h[m],v=va(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=ta(m)}else"xsl"==v&&(e=m=ta(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Wa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",gb(a)):gb("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=iB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.34.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ok:g}))return!0;Ka(b,null,!0,function(c,d,e){rC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=iB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.34.3/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ok:g}))return!0;Ka(b,null,!0,function(c,d,e){rC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();
|
||||
|
|
|
|||
|
|
@ -656,23 +656,23 @@ var Ct="Hard Drive",Ft=["XTC","ATC","COMPAQ"],Dt=[{0:[306,2],1:[375,8],2:[306,6]
|
|||
112,fu=144,mu=145,gu=240,nu=2,au=4,tu=0,uu=2,xu=0,yu=1,pu=3,zu=5,Au=8,Cu=10,Nt=12,Eu=15,vu=224,wu=228,Bt=0,ru=4,Gu=20,At=0,Ot=1,Ht=2,Lt=4,Mt=8,Gt=32,st={800:Z.prototype.El,801:Z.prototype.Fl,802:Z.prototype.Dl},rt={496:Z.prototype.dk,497:Z.prototype.Lk,498:Z.prototype.Nk,499:Z.prototype.Ok,500:Z.prototype.Jk,501:Z.prototype.Ik,502:Z.prototype.Kk,503:Z.prototype.Pk},ut={800:Z.prototype.Tm,801:Z.prototype.Wm,802:Z.prototype.Vm,803:Z.prototype.Um,807:Z.prototype.lh,811:Z.prototype.lh,815:Z.prototype.lh},
|
||||
tt={496:Z.prototype.dm,497:Z.prototype.im,498:Z.prototype.gm,499:Z.prototype.hm,500:Z.prototype.cm,501:Z.prototype.bm,502:Z.prototype.em,503:Z.prototype.am,1014:Z.prototype.fm};Ma(function(){for(var a=eb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=bb(c),d=new Z(d);db(d,c)}});
|
||||
function Iu(a,b,c){t.call(this,"Computer",a);this.ca.Pb=!1;Ju(this,b);this.M=Mc(this,"autoPower",a);this.C=0;this.Z=a.busWidth||a.buswidth;this.A=Ku;this.K=null;this.H=this.X=!1;this.ba=Mc(this,"url")||"";this.ga=(Math.random()+.1).toString(36).substr(2,12);this.B=Lu(this);if(this.U=ab("CPU",this.id)){this.Ea=ab("Debugger",this.id);this.G=[];for(b=null;b=vb(this,"Video",b);)this.G.push(b);this.ma=new Nb({id:this.Vd+".bus",busWidth:this.Z},this.U,this.Ea);var d,e=Ya(this.id);if((this.D=ab("Panel",
|
||||
this.id))&&this.D.Cf)for(b=0;b<e.length;b++)d=e[b],d.Aa=this.D.Aa,d.lc=this.D.lc,d.Cf=this.D.Cf;this.lc("PCx86 v1.34.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.hc&&d.hc(this,this.ma,this.U,this.Ea);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.J=d:this.A=parseInt(d,10));var f;if(a=Mc(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.H=!0,this.A=Ku),this.A&&(this.L=new Qe(this,"1.34.2"),
|
||||
this.id))&&this.D.Cf)for(b=0;b<e.length;b++)d=e[b],d.Aa=this.D.Aa,d.lc=this.D.lc,d.Cf=this.D.Cf;this.lc("PCx86 v1.34.3\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.hc&&d.hc(this,this.ma,this.U,this.Ea);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.J=d:this.A=parseInt(d,10));var f;if(a=Mc(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.H=!0,this.A=Ku),this.A&&(this.L=new Qe(this,"1.34.3"),
|
||||
this.L.load()?b=null:delete this.L);!b&&this.A&&(b=Mu(this))&&(this.H=!0);if(b){var g=this;Ba(b,null,!0,function(a,b,c){c?(g.J=null,g.H=!1,g.Aa("Unable to load machine state from server (error "+c+(b?": "+ua(b):"")+")")):(g.K=b,g.X=!0);mb(g)})}else mb(this);this.ia.power||(this.M=!0);!c&&this.M&&Nu(this,this.$e)}else r("Unable to find CPU component")}ba(Iu,t);
|
||||
function Ju(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.I=b}function Mc(a,b,c){var d=b.toLowerCase(),d=Ia(b)||Ia(d);void 0===d&&a.I&&(d=a.I[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Nu(a,b,c){for(var d=Ya(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!lb(f)){lb(f,function(){Nu(a,b,c)});return}}b.call(a,c)}
|
||||
function Ou(a,b){var c=new Qe(a,"1.34.2",Pu);if(c.load()&&Qu(c)){var d=c.get(Ru),e=b?b.get(Ru):"unknown";d!=e&&(a.Aa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=Iu.prototype;
|
||||
l.$e=function(a){void 0===a&&(a=this.A||(this.K?Su:Ku));if(!this.C){this.C++;var b=!1,c=!1;this.W=!1;var d=this.L||new Qe(this,"1.34.2");if(a==Tu)b=!0;else if(a>Ku){if(d.load(this.K)){this.F=new Qe(this,"1.34.2",Uu);this.F.load()&&(Vu(this,d),a=Wu,Xu(this.F));this.F.set(Ru,wa());Yu(this.F);var e=this.A&&!this.H;if(a==Su||Xa("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Qu(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
function Ou(a,b){var c=new Qe(a,"1.34.3",Pu);if(c.load()&&Qu(c)){var d=c.get(Ru),e=b?b.get(Ru):"unknown";d!=e&&(a.Aa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=Iu.prototype;
|
||||
l.$e=function(a){void 0===a&&(a=this.A||(this.K?Su:Ku));if(!this.C){this.C++;var b=!1,c=!1;this.W=!1;var d=this.L||new Qe(this,"1.34.3");if(a==Tu)b=!0;else if(a>Ku){if(d.load(this.K)){this.F=new Qe(this,"1.34.3",Uu);this.F.load()&&(Vu(this,d),a=Wu,Xu(this.F));this.F.set(Ru,wa());Yu(this.F);var e=this.A&&!this.H;if(a==Su||Xa("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Qu(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.Aa("Error: "+g),"unable to verify user"==g&&(Ga(Zu,""),this.B=null)):this.lc(f+": "+g),Xu(d),d.load()?(c=Qu(d),e=!0):c=!1))}e&&Ou(this,c?d:null)}else a==Wu&&d.clear()}else Ou(this);delete this.K;delete this.L}e=Ya(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.U&&(c=$u(this,g,d,b,c));b=[d,a,c];a!=Tu?Nu(this,this.ki,b):this.ki(b)}};
|
||||
function $u(a,b,c,d,e){if(!b.ca.Pb){b.ca.Pb=!0;if(b.Ob){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ob(f,d)&&f&&(r("Unable to restore state for "+b.type),a.V&&!a.X?(c.clear(),a.A=Ku,window&&window.location.reload()):a.W=!0,b.Ob(null),e=!1)}if(!d&&b.ti)for(a=b.ti.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.ki=function(a){var b=a[0],c=0>a[1];a=a[2];this.ea=!0;this.ca.Pb=!0;var d=this.ia.power;d&&(d.textContent="Shutdown");this.U&&($u(this,this.U,b,c,a),this.U.Ee());this.W&&(Vu(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0};
|
||||
function Vu(a,b){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.2"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function av(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Qe(a,"1.34.2"),g=new Qe(a,"1.34.2",Pu),h=wa();g.set(Ru,h);f.set(Ru,h);f.set(bv,"1.34.2");f.set(cv,window?window.location.href:null);f.set(dv,window?window.navigator.userAgent:"");a.U&&a.U.Nb&&(c&&Qc(a.U),d=a.U.Nb(b,c),"object"===typeof d&&f.set(a.U.id,d),c&&(a.U.ca.Pb=!1,!1===d&&(e=null)));for(var h=Ya(a.id),k=0;k<h.length;k++){var m=h[k];m.ca.Pb&&(m.Nb&&(d=m.Nb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ca.Pb=!1,!1===d&&(e=
|
||||
function Vu(a,b){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.34.3"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function av(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Qe(a,"1.34.3"),g=new Qe(a,"1.34.3",Pu),h=wa();g.set(Ru,h);f.set(Ru,h);f.set(bv,"1.34.3");f.set(cv,window?window.location.href:null);f.set(dv,window?window.navigator.userAgent:"");a.U&&a.U.Nb&&(c&&Qc(a.U),d=a.U.Nb(b,c),"object"===typeof d&&f.set(a.U.id,d),c&&(a.U.ca.Pb=!1,!1===d&&(e=null)));for(var h=Ya(a.id),k=0;k<h.length;k++){var m=h[k];m.ca.Pb&&(m.Nb&&(d=m.Nb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ca.Pb=!1,!1===d&&(e=
|
||||
null)))}e&&(c?(h=d=!1,b?(a.B&&ev(a,a.B,f.toString()),Yu(g)&&Yu(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==fv),d&&f.clear(h)):e=f.toString());c&&(a.ca.Pb=!1,b=a.ia.power)&&(b.textContent="Power");a.C=0;return e}l.reset=function(){this.ma&&this.ma.reset&&this.ma.reset();for(var a=Ya(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ma&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=Ya(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
l.stop=function(a,b){for(var c=Ya(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.wb=function(a,b,c){var d=this;switch(b){case "power":return this.ia[b]=c,c.onclick=function(){d.C||(d.ca.Pb?av(d,!1,!0):Nu(d,d.$e))},!0;case "reset":return this.ia[b]=c,c.onclick=function(){if(d.ca.Pb&&!d.C)if(d.A&&!d.J){var a=Xa("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");av(d,a,!0);!a&&d.V?window&&window.location.reload():(a||(d.N=!0),d.$e(Ku),d.N=!1)}else d.reset(),d.U&&d.U.Ee()},!0;case "save":if(ra(Ca(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ia[b]=c,c.onclick=function(){var a=Lu(d,!0);if(a){var b=!!(d.A&&!d.J||d.V),c=av(d,b);b?ev(d,a,c):d.Aa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Lu(a,b){var c=a.B;c||((c=Fa(Zu),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=gv(a,c))||a.Aa("The user ID is invalid.")):b&&a.Aa("Browser local storage is not available"));return c}
|
||||
function gv(a,b){a.B=null;b=Ba(Ca()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ga(Zu,b.data),a.B=b.data)}catch(d){r(d.message+" ("+c+")")}return a.B}function Mu(a){var b=null;a.B&&(b=Ca()+"/api/v1/user?req=load&user="+a.B+"&state="+hv(a,"1.34.2"));return b}
|
||||
function ev(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=hv(a,"1.34.2");d.data=c;b=Ba(Ca()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Aa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Aa(c),Ga(Zu,""),a.B=null)}}
|
||||
function gv(a,b){a.B=null;b=Ba(Ca()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ga(Zu,b.data),a.B=b.data)}catch(d){r(d.message+" ("+c+")")}return a.B}function Mu(a){var b=null;a.B&&(b=Ca()+"/api/v1/user?req=load&user="+a.B+"&state="+hv(a,"1.34.3"));return b}
|
||||
function ev(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=hv(a,"1.34.3");d.data=c;b=Ba(Ca()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Aa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Aa(c),Ga(Zu,""),a.B=null)}}
|
||||
function vb(a,b,c){a=Ya(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function Zc(a,b){if(a.G.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.G[0];a.D&&a.D.focus();!b&&window&&window.scrollTo(c,d)}}
|
||||
function $c(a,b){a.U&&(a=a.U,a.pi&&(b||!a.ca.Ib||a.ca.ii)&&(wf(a,"EAX",a.F),wf(a,"EBX",a.G),wf(a,"ECX",a.H),wf(a,"EDX",a.K),wf(a,"ESP",C(a)),wf(a,"EBP",a.L),wf(a,"ESI",a.J),wf(a,"EDI",a.I),wf(a,"CS",a.ga.ha),wf(a,"DS",a.Ca.ha),wf(a,"SS",a.W.ha),wf(a,"ES",a.ua.ha),wf(a,"EIP",E(a)),b=Ad(a),wf(a,"PS",b),wf(a,"V",b&2048),wf(a,"D",b&1024),wf(a,"I",b&512),wf(a,"T",b&256),wf(a,"S",b&128),wf(a,"Z",b&64),wf(a,"A",b&16),wf(a,"P",b&4),wf(a,"C",b&1),80386==a.aa&&(wf(a,"FS",a.qb.ha),wf(a,"GS",a.rb.ha),wf(a,"CR0",
|
||||
a.pa),wf(a,"CR2",a.Wd),wf(a,"CR3",a.md))),b=a.ia.speed)&&(b.textContent=a.ca.Ib&&a.R.vd?a.R.vd.toFixed(2)+"Mhz":"Stopped")}
|
||||
|
|
@ -689,10 +689,10 @@ a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2")
|
|||
function lv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ba(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
"");a=a.replace(d[0],g);lv(a,b,c)}})}else c(a,null)}
|
||||
function mv(a,b,c,d){function e(a){if(void 0===h){var b=g&&eb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);k&&(--iv||Qa(!0));k=!1}var g,h,k=!0;iv++;Wa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));q.appendChild(y)}c||
|
||||
(c="/versions/pcx86/1.34.2/components.xsl");m=function(d,h){h?jv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--iv||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--iv||Qa(!0)):f("invalid machine element: "+
|
||||
(c="/versions/pcx86/1.34.3/components.xsl");m=function(d,h){h?jv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--iv||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--iv||Qa(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?jv(b,a,d,!0,e,m):kv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(w){f(w.message)}return k}function nv(a,b,c,d){Qa(!1);return mv(a,b,c,d)}window.embedPC=nv;window.embedPCx86=nv;window.findMachineComponent=function(a,b){return ab(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!gb[a]){for(var c=!0,d=gb,e=a,f=b.length,g=[],h=[],k="",m=null,q=0;q<f;q++){var y=b[q];if('"'==y||"'"==y)m&&y!=m?k+=y:(m?m=null:m=y,k&&(h.push(k),k=""));else{if(!m){if("\r"==y||"\n"==y)y=";";if(" "==y||"\t"==y||";"==y){k&&(h.push(k),k="");";"==y&&h.length&&(g.push(h),h=[]);continue}}k+=y}}k&&h.push(k);h.length&&g.push(h);d[e]=g;fb(a)||(c=!1)}return c};window.enableEvents=Qa;window.sendEvent=Sa;
|
||||
function ov(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ra(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ba(b,null,!0,function(a,b){pv(b,d)}):pv(null,d)}else r("Error ("+c+") requesting "+a)}
|
||||
function pv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=Wa[f],k={},m;for(m in h){var q=h[m],y=qa(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var w=d[2];w&&(h[w]||(q=q.replace(d[0],"")))}d=m=pa(m)}else"xsl"==y&&(e=m=pa(m));k[m]=q}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",r(a)):r("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=av(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.34.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Hj:g}))return!0;Ba(b,null,!0,function(c,d,e){ov(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=av(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.34.3/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Hj:g}))return!0;Ba(b,null,!0,function(c,d,e){ov(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue