Fixed initialization of bFlagsBuffer for VT100

This commit is contained in:
Jeff Parsons 2016-08-09 10:31:05 -07:00
commit 18b737408e
3 changed files with 11 additions and 9 deletions

View file

@ -75,9 +75,10 @@ I(this,Mb(this));Nb(this,a);this.a-=5},function(){var a=P(this);Pb(this)&&(R(thi
C(this,a),this.a-=6);this.a-=11},function(){R(this,Jb(this)&255|this.b<<8);this.a-=11},function(){this.b=Vb(this,M(this));this.a-=7},function(){R(this,this.s);C(this,48);this.a-=11},function(){this.u&128&&(C(this,Q(this)),this.a-=6);this.a-=5},function(){this.B=H(this)&65535;this.a-=5},function(){var a=P(this);this.u&128&&C(this,a);this.a-=10},function(){this.H|=512;this.a-=4},function(){var a=P(this);this.u&128&&(R(this,this.s),C(this,a),this.a-=6);this.a-=11},ac,function(){L(this,M(this));this.a-=
7},function(){R(this,this.s);C(this,56);this.a-=11}];function T(a){v.call(this,"ChipSet",a,T);var b=a.model;b&&!bc[b]&&va("Unrecognized ChipSet model: "+b);this.c=bc[b]||{};a.sound&&(this.B=null,window&&(this.B=window.AudioContext||window.webkitAudioContext),this.B&&new this.B);A(this)}x(T);
var U={V:1978.1,nc:{W:0,fd:1,ld:16,zd:32,Nd:64,Ld:128,Ba:14},ma:{W:1,Ub:1,jc:2,fc:4,gc:16,hc:32,ic:64,Ba:8},oc:{W:2,ed:3,Xd:4,gd:8,Hd:16,Id:32,Jd:64,hd:128,Ba:0},Rd:{W:3},Pd:{W:2,Bd:7},Td:{W:3,Zd:1,Sd:2,Kd:4,td:8,jd:16,Xc:32},Qd:{W:4},Ud:{W:5,md:1,nd:2,od:4,pd:8,$d:16}},V={V:100,ta:{W:66,de:1,dc:2,ec:4,Fd:8,Dd:16,tb:32,sb:64,wd:128},Tb:{W:66,INIT:0},da:{yd:{W:98},ra:{Sb:0,Rb:1,lc:2,rc:4,Xb:5,kc:6,Vd:7},Pa:16383},Wb:{W:162,INIT:0},Vb:{W:194,INIT:0}},bc={SI1978:U,VT100:V};T.prototype.R=function(){return!1};
T.prototype.ia=function(a,b,c,d){this.m=b;this.a=c;this.K=d;this.A=a;Za(b,this,this.c.Ya);$a(b,this,this.c.Za)};T.prototype.X=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ba=function(a){return a?this.save():!0};U.INIT=[[U.nc.Ba,U.ma.Ba,U.oc.Ba,0,0,0,0]];V.INIT=[[V.Tb.INIT,V.ta.dc|V.ta.ec,V.Wb.INIT,V.Vb.INIT],[0,0,0,0,Array(100)]];l=T.prototype;l.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.J("reset error")};
l.save=function(){var a=new D(this);switch(this.c.V){case U.V:F(a,0,[this.O,this.f,this.U,this.s,this.v,this.L,this.N]);break;case V.V:F(a,0,[this.F,this.i,this.H,this.G]),F(a,1,[this.o,this.b,this.l,this.u,this.h])}return a.data()};
l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.V){case U.V:return this.O=b[0],this.f=b[1],this.U=b[2],this.s=b[3],this.v=b[4],this.L=b[5],this.N=b[6],!0;case V.V:return this.F=b[0],this.i=b[2],this.H=b[3],this.G=b[4],b=a[1],this.o=b[0],this.b=b[1],this.l=b[2],this.u=b[3],this.h=b[4],!0}return!1};l.start=function(){};l.stop=function(){};function cc(a,b,c){a.f&=~b;c&&(a.f|=b)}l.Ac=function(){return this.O};l.Bc=function(){return this.f};l.Cc=function(){return this.U};
T.prototype.ia=function(a,b,c,d){this.m=b;this.a=c;this.K=d;this.A=a;Za(b,this,this.c.Ya);$a(b,this,this.c.Za)};T.prototype.X=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ba=function(a){return a?this.save():!0};U.INIT=[[U.nc.Ba,U.ma.Ba,U.oc.Ba,0,0,0,0]];
V.INIT=[[V.Tb.INIT,V.ta.dc|V.ta.ec,V.Wb.INIT,V.Vb.INIT],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11856,11824,11840,11808,11776,12E3,12E3,11857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];l=T.prototype;
l.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.J("reset error")};l.save=function(){var a=new D(this);switch(this.c.V){case U.V:F(a,0,[this.O,this.f,this.U,this.s,this.v,this.L,this.N]);break;case V.V:F(a,0,[this.F,this.i,this.H,this.G]),F(a,1,[this.o,this.b,this.l,this.u,this.h])}return a.data()};
l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.V){case U.V:return this.O=b[0],this.f=b[1],this.U=b[2],this.s=b[3],this.v=b[4],this.L=b[5],this.N=b[6],!0;case V.V:return this.F=b[0],this.i=b[1],this.H=b[2],this.G=b[3],b=a[1],this.o=b[0],this.b=b[1],this.l=b[2],this.u=b[3],this.h=b[4],!0}return!1};l.start=function(){};l.stop=function(){};function cc(a,b,c){a.f&=~b;c&&(a.f|=b)}l.Ac=function(){return this.O};l.Bc=function(){return this.f};l.Cc=function(){return this.U};
l.zc=function(){return this.s>>8-this.v&255};l.Jc=function(a,b){this.v=b};l.Lc=function(a,b){this.L=b};l.Kc=function(a,b){this.s=b<<8|this.s>>8};l.Mc=function(a,b){this.N=b};l.Nc=function(){};function dc(a){var b=0,c=0,d=~a.o;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c}
l.Dc=function(){var a=this.i,a=a&~V.ta.sb;if((zb(this.a)&64)<<1&&(a|=V.ta.sb,a!=this.i)){var b,c;b=this.l&1;switch(this.l>>1&7){case V.da.ra.Rb:this.o=this.o<<1|b;break;case V.da.ra.Xb:b=dc(this);this.h[b]=V.da.Pa;break;case V.da.ra.Sb:this.b=this.b<<1|b;break;case V.da.ra.rc:b=dc(this);c=this.b&V.da.Pa;this.h[b]=c;break;case V.da.ra.kc:b=dc(this);c=this.h[b];null==c&&(c=V.da.Pa);this.b=c;break;case V.da.ra.lc:this.b<<=1,this.u=this.b&V.da.Pa+1}}a&=~V.ta.tb;this.u&&(a|=V.ta.tb);return this.i=a};
l.Oc=function(a,b){this.F=b};l.Rc=function(a,b){this.l=b};l.Qc=function(a,b){this.H=b};l.Pc=function(a,b){this.G=b};U.Ya={0:T.prototype.Ac,1:T.prototype.Bc,2:T.prototype.Cc,3:T.prototype.zc};U.Za={2:T.prototype.Jc,3:T.prototype.Lc,4:T.prototype.Kc,5:T.prototype.Mc,6:T.prototype.Nc};V.Ya={66:T.prototype.Dc};V.Za={66:T.prototype.Oc,98:T.prototype.Rc,162:T.prototype.Qc,194:T.prototype.Pc};ta(function(){for(var a=z(document,"pc8080","chipset"),b=0;b<a.length;b++){var c=a[b],d=y(c),d=new T(d);Ia(d,c)}});