From 0a4fc6df1c2ee1d0f4c8a54b044ade38e269b2ca Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 23 Aug 2016 22:45:15 -0700 Subject: [PATCH] Removed unneeded Video DEBUG code --- modules/pc8080/lib/video.js | 19 ------------------- versions/pc8080/1.24.1/pc8080-dbg.js | 6 +++--- versions/pc8080/1.24.1/pc8080.js | 8 ++++---- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/modules/pc8080/lib/video.js b/modules/pc8080/lib/video.js index 19c99fd29..c3fe6e242 100644 --- a/modules/pc8080/lib/video.js +++ b/modules/pc8080/lib/video.js @@ -249,8 +249,6 @@ function Video8080(parmsVideo, canvas, context, textarea, container) } this.ledBindings = {}; - - if (DEBUG) this.nCyclesPrev = 0; } Component.subclass(Video8080); @@ -1145,16 +1143,6 @@ Video8080.prototype.updateVT100 = function(fForced) this.assert(font < 0 || iCell === this.nCellCache); - if (MAXDEBUG && !fForced) { - var nSeconds = Date.now() / 1000; - if ((nSeconds|0) != (this.nUpdateSeconds|0)) { - this.nUpdateNumber = 0; - } - this.nUpdateNumber++; - this.nUpdateSeconds = nSeconds; - this.printMessage("updateVT100(): update #" + this.nUpdateNumber + " at " +this.nUpdateSeconds + " corner=" + str.toHexByte(this.aCellCache[1]) + " cycles=" + this.nCyclesPrev + " delta=" + this.nCyclesDelta); - } - if (!fForced && this.fSkipSingleCellUpdate && cUpdated == 1) { /* * We're going to blow off this update, since it comes on the heels of a smooth-scroll that *may* @@ -1257,13 +1245,6 @@ Video8080.prototype.updateScreen = function(fForced) this.nUpdates++; } - if (DEBUG && !fForced) { - var nCycles = this.cpu.getCycles(); - this.nCyclesDelta = nCycles - this.nCyclesPrev; - this.nCyclesPrev = nCycles; - if (MAXDEBUG) this.printMessage("updateScreen(false): clean=" + fClean + ", update=" + fUpdate + ", cycles=" + this.nCyclesPrev + ", delta=" + this.nCyclesDelta); - } - if (!fUpdate) { return; } diff --git a/versions/pc8080/1.24.1/pc8080-dbg.js b/versions/pc8080/1.24.1/pc8080-dbg.js index 029dfdc6d..3ebb3c1db 100644 --- a/versions/pc8080/1.24.1/pc8080-dbg.js +++ b/versions/pc8080/1.24.1/pc8080-dbg.js @@ -125,9 +125,9 @@ function le(a,b,c,d){var e=8>=a.vc?8:16,f=8>4)*c)}return k}fe.prototype.Ea=function(){return!0};fe.prototype.la=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.Wb[b]=c,!0;switch(b){case "fullScreen":return this.M[b]=c,this.j&&this.j.ib?c.onclick=function(){d.ib()}:c.parentNode.removeChild(c),!0}return!1}; fe.prototype.ib=function(){var a=!1;if(this.j){if(this.j.ib){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.ba/this.R;b>c&&(a=Math.round(c/b*100)+"%")}this.Cc?(this.O.style.width=a,this.O.style.width=a,this.O.style.display="block",this.O.style.margin="auto"):(this.j.style.width=a,this.j.style.height="auto");this.j.style.backgroundColor="black";this.j.ib();a=!0}this.qa&&this.qa.focus()}return a}; function ie(a,b){!b&&a.j&&(a.Cc?a.O.style.width=a.O.style.height="":a.j.style.width=a.j.style.height="");jb(a,"notifyFullScreen("+b+")")}function ke(a,b){a.Ec=b;a.pa=!1;if(void 0===a.H||a.H.length!=a.Ec)a.H=Array(a.Ec)}function me(a,b,c,d,e){d=a.A?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.ya&&(208<=c&&236>c?e=a.ua+0:28<=c&&72>c&&(e=a.ua+1));a=a.ha[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} -function Mc(a,b){var c=!0;if(!b){a.bb&&(120==a.bb?a.Gc&1?(Gd(a.b,2),c=!1):Gd(a.b,1):Gd(a.b,4));var d;if(d=c&&a.pa&&a.X){d=a.w;for(var e=a.X,f=!0,h=a.Ua>>>d.oa;0>=1);;){var u=Cb(a.w,p++);if(127==(u&127)){var r=Cb(a.w,p++);d=r&96;c=(r&15)<<8|Cb(a.w, -p);c+=r&16?8192:16384;break}if(l>4)*u.ja,A=void 0,Q=void 0,aa=void 0,Y=void 0,ua=u.na,Eb=u.ja;B?(A=x*r.na,Q=e*r.ja,aa=r.na,Y=r.ja):(A=x*r.wc,Q=e*r.xc,aa=r.wc,Y=r.xc);u.na>r.na&&(A*=2,aa*=2);u.ja>r.ja&&(0==q&&(y+=r.ja),Eb=r.ja);B?B.drawImage(u.canvas,X,y,ua,Eb,A,Q, -aa,Y):(A+=0,Q+=0,r.F.drawImage(u.canvas,X,y,ua,Eb,A,Q,aa,Y))}g++}h++}e++}}a.pa=!0;!b&&a.xb&&1==g&&(a.H[k]=-1,g=0);a.xb=!1;(g||b)&&a.wb&&a.F.drawImage(a.N,0,a.hb,a.L,a.ca-a.ja,0,0,a.Td,a.Ud)}else{f=a.Ua;h=f+a.X;l=k=g=0;c=a.L;q=0;d=a.ca;p=e=0;x=a.ab;r=(1<>8|(B&255)<<8);k>u&r,me(a,a.Dc,k++,l,y),u+=x;k>q&&(q=k);l=e&&(e=l+1)}f+=2;g++;if(k>=a.L&&(k=0,l++,l>a.ca))break}a.pa= +function Mc(a,b){var c=!0;if(!b){a.bb&&(120==a.bb?a.Gc&1?(Gd(a.b,2),c=!1):Gd(a.b,1):Gd(a.b,4));if(c&&a.pa&&a.X){for(var d=a.w,e=a.X,f=!0,h=a.Ua>>>d.oa;0>=1);;){var u=Cb(a.w,p++);if(127==(u&127)){var r=Cb(a.w,p++),d=r&96,c=(r&15)<<8|Cb(a.w,p),c=c+ +(r&16?8192:16384);break}if(l>4)*u.ja,A=void 0,Q=void 0,aa=void 0,Y=void 0,ua=u.na,Eb=u.ja;B?(A=x*r.na,Q=e*r.ja,aa=r.na,Y=r.ja):(A=x*r.wc,Q=e*r.xc,aa=r.wc,Y=r.xc);u.na>r.na&&(A*=2,aa*=2);u.ja>r.ja&&(0==q&&(y+=r.ja),Eb=r.ja);B?B.drawImage(u.canvas,X,y,ua,Eb,A,Q,aa,Y): +(A+=0,Q+=0,r.F.drawImage(u.canvas,X,y,ua,Eb,A,Q,aa,Y))}g++}h++}e++}}a.pa=!0;!b&&a.xb&&1==g&&(a.H[k]=-1,g=0);a.xb=!1;(g||b)&&a.wb&&a.F.drawImage(a.N,0,a.hb,a.L,a.ca-a.ja,0,0,a.Td,a.Ud)}else{f=a.Ua;h=f+a.X;l=k=g=0;c=a.L;q=0;d=a.ca;p=e=0;x=a.ab;r=(1<>8|(B&255)<<8);k>u&r,me(a,a.Dc,k++,l,y),u+=x;k>q&&(q=k);l=e&&(e=l+1)}f+=2;g++;if(k>=a.L&&(k=0,l++,l>a.ca))break}a.pa= !0;cMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=ta().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= (a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Va.aspect);f&&.3<=f&&3.33>=f&&(La("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Aa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var h=e.getContext("2d"),d=new fe(d,e,h,f,c);hb(d,c)}}); diff --git a/versions/pc8080/1.24.1/pc8080.js b/versions/pc8080/1.24.1/pc8080.js index 75d6f17a0..4d9a58b10 100644 --- a/versions/pc8080/1.24.1/pc8080.js +++ b/versions/pc8080/1.24.1/pc8080.js @@ -117,10 +117,10 @@ function Jc(a,b,c,d){var e=8>=a.Cb?8:16,f=8>4)*c)}return l}Dc.prototype.ca=function(){return!0};Dc.prototype.S=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.kb[b]=c,!0;switch(b){case "fullScreen":return this.B[b]=c,this.b&&this.b.ya?c.onclick=function(){d.ya()}:c.parentNode.removeChild(c),!0}return!1}; Dc.prototype.ya=function(){var a=!1;if(this.b){if(this.b.ya){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.C/this.v;b>c&&(a=Math.round(c/b*100)+"%")}this.Hb?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.ya();a=!0}this.T&&this.T.focus()}return a}; function Gc(a,b){!b&&a.b&&(a.Hb?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Ic(a,b){a.Nb=b;a.O=!1;if(void 0===a.i||a.i.length!=a.Nb)a.i=Array(a.Nb)}function Kc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.Z&&(208<=c&&236>c?e=a.V+0:28<=c&&72>c&&(e=a.V+1));a=a.J[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} -function Mb(a,b){var c=!0;if(!b){a.Sa&&(120==a.Sa?a.Qb&1?(gc(a.a,2),c=!1):gc(a.a,1):gc(a.a,4));var d;if(d=c&&a.O&&a.A){d=a.o;for(var e=a.A,f=!0,h=a.xa>>>d.c;0>=1);;){var u=bb(a.o,x++);if(127==(u&127)){var y=bb(a.o,x++);d=y&96;c=(y&15)<<8|bb(a.o,x); -c+=y&16?8192:16384;break}if(n>4)*u.P,R=void 0,ka=void 0,Ca=void 0,db=void 0,zc=u.R,Jb=u.P;v?(R=B*y.R,ka=e*y.P,Ca=y.R,db=y.P):(R=B*y.Db,ka=e*y.Eb,Ca=y.Db,db=y.Eb);u.R>y.R&&(R*=2,Ca*=2);u.P>y.P&&(0==t&&(H+=y.P),Jb=y.P);v?v.drawImage(u.canvas,V,H,zc,Jb,R,ka,Ca,db):(R+=0, -ka+=0,y.f.drawImage(u.canvas,V,H,zc,Jb,R,ka,Ca,db))}g++}h++}e++}}a.O=!0;!b&&a.ib&&1==g&&(a.i[l]=-1,g=0);a.ib=!1;(g||b)&&a.hb&&a.f.drawImage(a.s,0,a.gb,a.m,a.G-a.P,0,0,a.Oc,a.Pc)}else{f=a.xa;h=f+a.A;n=l=g=0;c=a.m;t=0;d=a.G;x=e=0;B=a.Ra;y=(1<>>v.c;v=V!=v.f?v.b[H].Xb(V,u):v.b[H++].eb(V,u)|v.b[H&v.s].eb(0,u+1)<<8;if(a.O&&v===a.i[g])l+=a.Pb;else{a.i[g]=v;(u=x)&&(v=v>>8|(v&255)<<8);l>u&y,Kc(a,a.Mb,l++,n,H),u+= -B;l>t&&(t=l);n=e&&(e=n+1)}f+=2;g++;if(l>=a.m&&(l=0,n++,n>a.G))break}a.O=!0;c>>d.c;0>=1);;){var u=bb(a.o,x++);if(127==(u&127)){var y=bb(a.o,x++),d=y&96,c=(y&15)<<8|bb(a.o,x),c=c+(y&16? +8192:16384);break}if(n>4)*u.P,R=void 0,ka=void 0,Ca=void 0,db=void 0,zc=u.R,Jb=u.P;v?(R=B*y.R,ka=e*y.P,Ca=y.R,db=y.P):(R=B*y.Db,ka=e*y.Eb,Ca=y.Db,db=y.Eb);u.R>y.R&&(R*=2,Ca*=2);u.P>y.P&&(0==t&&(H+=y.P),Jb=y.P);v?v.drawImage(u.canvas,V,H,zc,Jb,R,ka,Ca,db):(R+=0,ka+=0, +y.f.drawImage(u.canvas,V,H,zc,Jb,R,ka,Ca,db))}g++}h++}e++}}a.O=!0;!b&&a.ib&&1==g&&(a.i[l]=-1,g=0);a.ib=!1;(g||b)&&a.hb&&a.f.drawImage(a.s,0,a.gb,a.m,a.G-a.P,0,0,a.Oc,a.Pc)}else{f=a.xa;h=f+a.A;n=l=g=0;c=a.m;t=0;d=a.G;x=e=0;B=a.Ra;y=(1<>>v.c;v=V!=v.f?v.b[H].Xb(V,u):v.b[H++].eb(V,u)|v.b[H&v.s].eb(0,u+1)<<8;if(a.O&&v===a.i[g])l+=a.Pb;else{a.i[g]=v;(u=x)&&(v=v>>8|(v&255)<<8);l>u&y,Kc(a,a.Mb,l++,n,H),u+=B;l>t&& +(t=l);n=e&&(e=n+1)}f+=2;g++;if(l>=a.m&&(l=0,n++,n>a.G))break}a.O=!0;cMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a, b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Fa.aspect);f&&.3<=f&&3.33>=f&&(xa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");sa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var h=e.getContext("2d"),d=new Dc(d,e,h,f,c);Pa(d,c)}}); function Lc(a){this.H=+a.adapter;switch(this.H){case 0:this.I=0;this.O=2;break;default:p("Unrecognized serial adapter #"+this.H);return}this.b=this.c=null;this.J=a.tabSize;this.G=a.charBOL;this.f=0;this.A=!1;q.call(this,"SerialPort",a,Lc);var b=a.binding;if("console"==b)this.c="";else{var c;a=Mc;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.B[b])&&this.S(null,a,b))}this.g="";this.i=this.m=null;this.exports={connect:this.Rb,receiveData:this.pb}}w(Lc);