More tweaks to the on-going tension between giving machine elements focus (especially problematic when there are multiple machines) and preventing the page from being yanked around
This commit is contained in:
parent
fa87224856
commit
9ecb9e948f
15 changed files with 123 additions and 120 deletions
|
|
@ -48,7 +48,7 @@
|
|||
<p class="common-reference"></p>
|
||||
<p class="common-copyright">
|
||||
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> © 2012-2016 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
|
||||
<span class="common-copyright"><a href="http://github.com/jeffpar/pcjs">PCjs</a> released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
|
||||
<span class="common-copyright"><a href="http://github.com/jeffpar/pcjs">PCjs</a> machines released under <a href="http://gnu.org/licenses/gpl.html">GPLv3</a></span>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function xb(a,b,c){a.I=b;a.A=a.j=0;c&&((a.A=c.A)&&ic(a,hc,!1),(a.j=c.j)&&gc(a,hc
|
|||
var lc=[],fc=[G.prototype.Y,G.prototype.hb,G.prototype.fa,G.prototype.wa],hc=[G.prototype.O,G.prototype.ja,G.prototype.ca,G.prototype.ma];if(qb)var ec=[G.prototype.M,G.prototype.ha,G.prototype.ba,G.prototype.la],dc=[G.prototype.P,G.prototype.gb,G.prototype.ea,G.prototype.na];
|
||||
function mc(a,b){z.call(this,"CPU",a,mc,1);var c=a.multiplier||1;this.Y=a.cycles||b;this.Sa=c;this.ha=Math.round(this.Y/1E4)/100;this.eb=this.ha*this.Sa;this.C.za=!1;this.C.Vb=!1;this.C.vb=a.autoStart;this.C.yc=!1;this.C.jb=!1;this.xb=this.O=0;this.yb=a.csStart;this.lb=a.csInterval;this.mb=a.csStop;this.w=[];this.Ha=this.fb.bind(this);F(this)}A(mc);var nc=["power","reset"];l=mc.prototype;
|
||||
l.Ra=function(a,b,c,d){this.A=a;this.u=b;this.I=d;for(b=0;b<nc.length;b++)(c=this.N[nc[b]])&&this.A.qa(null,nc[b],c);this.F=ub(a,"ChipSet");a=Ac(a,"autoStart");null!=a&&(this.C.vb="true"==a?!0:"false"==a?!1:!!a);F(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
|
||||
l.Ga=function(a,b){if(!b){if(a&&this.restore){Bc(this);if(!this.restore(a))return!1;Cc(this)}else this.reset();this.I?(a=this.I,a.g("Type ? for help with PC8080 Debugger commands"),a.La(),a.Ba&&(b=a.Ba,a.Ba=null,Dc(a,b))):this.g("No debugger detected")}Ec(this);return!0};l.Ka=function(a){return a?this.save():!0};l.vb=function(){return this.C.vb||!this.I&&void 0===this.N.run?(this.fb(!0),!0):!1};l.Bc=function(){return 0};
|
||||
l.Ga=function(a,b){if(!b){if(a&&this.restore){Bc(this);if(!this.restore(a))return!1;Cc(this)}else this.reset();this.I?(a=this.I,a.g("Type ? for help with PC8080 Debugger commands"),a.La(),a.Ba&&(b=a.Ba,a.Ba=null,Dc(a,b))):this.g("No debugger detected")}Ec(this);return!0};l.Ka=function(a){return a?this.save():!0};l.vb=function(){return this.C.vb||!this.I&&void 0===this.N.run?(this.fb(),!0):!1};l.Bc=function(){return 0};
|
||||
function Cc(a){void 0===a.yb&&(a.yb=0);void 0===a.lb&&(a.lb=-1);void 0===a.mb&&(a.mb=-1);a.C.jb=0<=a.yb&&0<a.lb;a.C.jb&&(a.xb=0,a.O=a.yb-a.M)}function Fc(a,b){if(a.C.jb){var c=!1;a.xb=a.xb+a.Bc()|0;a.O-=b;0>=a.O&&(a.O+=a.lb,c=!0);0<=a.mb&&a.mb<=Gc(a)&&(a.lb=a.mb=-1,Cc(a),a.ra(),c=!0);c&&a.g(Gc(a)+" cycles: checksum="+t(a.xb))}}
|
||||
l.qa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.N[b]=c;a=!0;break;case "run":this.N[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.C.xa)a=!0;else{var b=null,c,h=db(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.C.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.C.xa);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.C.ready?"powered yet":"ready yet"+(b.Hb?" (waiting for notification)":""))+".");a=!1}a&&(d.C.za?d.ra():d.fb())};
|
||||
a=!0;break;case "speed":this.N[b]=c;a=!0;break;case "setSpeed":this.N[b]=c,c.onclick=function(){Hc(d,d.Sa<<1,!0)},c.textContent=this.eb.toFixed(2)+"Mhz",a=!0}return a};function Ic(a,b,c){a.M+=b;c&&(a.L=a.b=0)}function Jc(a,b){var c=1;b&&1<a.Sa&&a.K&&(c=a.K/a.ha);a.wa=Math.round(1E3/30);a.fa=Math.floor(a.Y/30*c);b||(a.P=a.fa);a.ja=0}function Gc(a){return a.M+a.H+a.L-a.b}function Bc(a){a.K=0;a.Ba=0;a.M=a.H=a.L=a.b=0;Cc(a);Hc(a,1)}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ b,c){this.c||this.X(a,b,c)},u:function(a){return this.b[a]},B:function(a){return
|
|||
function wb(a,b,c){c&&a.g||(a.Va=!a.c&&b[1]||a.o,a.pd=!a.c&&b[3]||a.s);if(c||void 0===c)a.Lb=b[1]||a.o,a.X=b[3]||a.s}function ub(a,b,c){c&&a.f||(a.Ua=b[0]||a.m,a.od=b[2]||a.A);if(c||void 0===c)a.gb=b[0]||a.m,a.Ib=b[2]||a.A}function qb(a,b){b||(b=xb);ub(a,b,void 0);wb(a,b,void 0)}var xb=[],tb=[C.prototype.C,C.prototype.S,C.prototype.I,C.prototype.Z],vb=[C.prototype.v,C.prototype.N,C.prototype.H,C.prototype.W];
|
||||
if(Ta)var sb=[C.prototype.u,C.prototype.L,C.prototype.G,C.prototype.U],rb=[C.prototype.B,C.prototype.R,C.prototype.M,C.prototype.za];function yb(a,b){r.call(this,"CPU",a,yb);var c=a.multiplier||1;this.ma=a.cycles||b;this.L=c;this.Ha=Math.round(this.ma/1E4)/100;this.U=this.Ha*this.L;this.l.pa=!1;this.l.Jb=!1;this.l.Sa=a.autoStart;this.l.Cb=!1;this.l.ab=!1;this.ua=this.X=0;this.va=a.csStart;this.Z=a.csInterval;this.ja=a.csStop;this.G=[];this.Za=this.lb.bind(this);B(this)}w(yb);var zb=["power","reset"];
|
||||
k=yb.prototype;k.ra=function(a,b,c,d){this.A=a;this.j=b;this.O=d;for(b=0;b<zb.length;b++)(c=this.w[zb[b]])&&this.A.V(null,zb[b],c);this.M=Wa(a,"ChipSet");a=Ab(a,"autoStart");null!=a&&(this.l.Sa="true"==a?!0:"false"==a?!1:!!a);B(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};k.ga=function(a,b){if(!b){if(a&&this.restore){Bb(this);if(!this.restore(a))return!1;Cb(this)}else this.reset();this.ea("No debugger detected")}Db(this);return!0};
|
||||
k.ia=function(a){return a?this.save():!0};k.Sa=function(){return this.l.Sa||void 0===this.w.run?(this.lb(!0),!0):!1};k.Fb=function(){return 0};function Cb(a){void 0===a.va&&(a.va=0);void 0===a.Z&&(a.Z=-1);void 0===a.ja&&(a.ja=-1);a.l.ab=0<=a.va&&0<a.Z;a.l.ab&&(a.ua=0,a.X=a.va-a.H)}
|
||||
k.ia=function(a){return a?this.save():!0};k.Sa=function(){return this.l.Sa||void 0===this.w.run?(this.lb(),!0):!1};k.Fb=function(){return 0};function Cb(a){void 0===a.va&&(a.va=0);void 0===a.Z&&(a.Z=-1);void 0===a.ja&&(a.ja=-1);a.l.ab=0<=a.va&&0<a.Z;a.l.ab&&(a.ua=0,a.X=a.va-a.H)}
|
||||
k.V=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.l.Y)a=!0;else{var b=null,c,h=Ma(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.l.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.l.Y);c++);c==h.length&&(b=a);q("The "+b.type+" component ("+b.id+") is not "+(b.l.ready?"powered yet":"ready yet"+(b.cb?" (waiting for notification)":""))+".");a=!1}a&&(d.l.pa?Eb(d):d.lb())};a=!0;
|
||||
break;case "speed":this.w[b]=c;a=!0;break;case "setSpeed":this.w[b]=c,c.onclick=function(){Fb(d,d.L<<1,!0)},c.textContent=this.U.toFixed(2)+"Mhz",a=!0}return a};function Gb(a,b){var c=1;b&&1<a.L&&a.R&&(c=a.R/a.Ha);a.Pa=Math.round(1E3/30);a.Ba=Math.floor(a.ma/30*c);b||(a.la=a.Ba);a.Ia=0}function Hb(a){return a.H+a.N+a.W-a.a}function Bb(a){a.R=0;a.Qa=0;a.H=a.N=a.W=a.a=0;Cb(a);Fb(a,1)}
|
||||
function Fb(a,b,c){if(void 0!==b){.8>a.R/a.U&&(b=1);a.L=b;b=a.Ha*a.L;if(a.U!=b){a.U=b;b=a.U.toFixed(2)+"Mhz";var d=a.w.setSpeed;d&&(d.textContent=b);a.ea("target speed: "+b)}c&&a.A&&Ib(a.A)}a.H+=a.N;a.N=0;a.I=ja();a.S=0;Gb(a)}function Jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function Kb(a,b,c){0<=b&&b<a.G.length&&0>a.G[b][0]&&(c*=a.ma*a.L/1E3,a.G[b][0]=c+Mb(a))}function Mb(a,b){var c=a.W-=a.a;a.a=0;b&&(a.W=0);return c}
|
||||
|
|
|
|||
Loading…
Reference in a new issue