Added a variety of checks and automatic repairs to DiskDump, aimed primarily at issues I've come across with pre-DOS 2.0 diskettes (eg, diskettes without BPBs, like 160Kb diskettes from DOS 1.0 and 320Kb diskettes from DOS 1.1)
This commit is contained in:
parent
4132668bb2
commit
88b485d094
4 changed files with 179 additions and 61 deletions
|
|
@ -33,8 +33,9 @@ function G(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.g
|
|||
z.prototype={constructor:z,parent:null,toString:function(){return this.name?this.name:this.id||this.type},T:function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.gb=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||
this.Ya=function(a){this.l(a,this.bb)}),!0;default:return!1}},log:function(){},l:function(){},status:function(a){this.l(this.bb+": "+a)},Ya:function(a,b,c){c=c||this.type;b||u((c?c+": ":"")+a)},X:function(a){this.C.error||(this.C.ready=!1!==a,this.C.ready&&(a=this.ab,this.ab=null,a&&a()))}};function H(a,b){if(a.u){a===a.u?b|=0:b=b||a.la;var c=a.u.la&b;return!!b&&c===b||!!(c&a.u.Ne)}return!1}
|
||||
function I(a,b){if(a.C.eb)return a.C.Ja=!1,a.C.eb=!1;if(a.C.error)return a.l(a.toString()+" error"),!1;a.C.Ja=b;return a.C.Ja}function J(a,b){a.C.Ja&&(b?a.C.eb=!0:void 0===b&&a.l(a.toString()+" busy"));return a.C.Ja}function K(a,b){b&&(a.C.ready?b():a.ab=b);return a.C.ready}function ua(a,b){a.C.error=!0;a.Ya(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});function va(a){z.call(this,"C1PPanel",a);this.C.M=!1}B(va);
|
||||
va.prototype.T=function(a,b,c,d){return this.J&&this.J.T(a,b,c,d)||this.s&&this.s.T(a,b,c,d)||this.b&&this.b.T(a,b,c,d)||this.u&&this.u.T(a,b,c,d)?!0:z.prototype.T.call(this,a,b,c,d)};va.prototype.ia=function(a,b){a&&!this.C.M&&(this.C.M=!0,this.J=b,this.s=L(b,"cpu"),this.b=L(b,"keyboard"),this.u=L(b,"debugger"),wa())};function wa(){for(var a=!1,b=G(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],e=E(d),g=ta(e.id);g||(a=!0,g=new va(e));F(g,d);a&&g.X()}}x(wa);
|
||||
Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||
function va(a){z.call(this,"C1PPanel",a);this.C.M=!1}B(va);va.prototype.T=function(a,b,c,d){return this.J&&this.J.T(a,b,c,d)||this.s&&this.s.T(a,b,c,d)||this.b&&this.b.T(a,b,c,d)||this.u&&this.u.T(a,b,c,d)?!0:z.prototype.T.call(this,a,b,c,d)};va.prototype.ia=function(a,b){a&&!this.C.M&&(this.C.M=!0,this.J=b,this.s=L(b,"cpu"),this.b=L(b,"keyboard"),this.u=L(b,"debugger"),wa())};
|
||||
function wa(){for(var a=!1,b=G(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],e=E(d),g=ta(e.id);g||(a=!0,g=new va(e));F(g,d);a&&g.X()}}x(wa);
|
||||
function xa(a){z.call(this,"C1PCPU",a);ya(this);this.C.M=!1;this.C.na=!1;this.Sa=a.autoStart;this.Qa=0;this.Lb=1;this.cb=2;this.speed=this.Qa;this.Ha=30;this.Ga=5;this.La=8;this.Ra=["Slow","Fast","Max"];this.ib=["(1Mhz)","(up to "+this.La+"Mhz)","(unlimited)"];this.P=[];this.K=[];this.oa=65536;this.pa=0;this.da=65536;this.ea=0;this.Pa=32;this.$a=2;this.Kb=1;this.o=[this.uc,this.Od,this.Fe,this.m,this.m,this.Qd,this.kc,this.m,this.Td,this.Nd,this.jc,this.m,this.m,this.Kd,this.hc,this.m,this.tc,this.Pd,
|
||||
this.m,this.m,this.m,this.Rd,this.lc,this.m,this.xc,this.Md,this.m,this.m,this.m,this.Ld,this.ic,this.m,this.ld,this.dc,this.m,this.m,this.qc,this.fc,this.Zd,this.m,this.Vd,this.cc,this.Yd,this.m,this.pc,this.$b,this.Wd,this.m,this.rc,this.ec,this.m,this.m,this.m,this.gc,this.$d,this.m,this.pe,this.bc,this.m,this.m,this.m,this.ac,this.Xd,this.m,this.fe,this.Zc,this.m,this.m,this.m,this.ad,this.Hd,this.m,this.Sd,this.Yc,this.Gd,this.m,this.kd,this.Vc,this.Ed,this.m,this.vc,this.$c,this.m,this.m,this.m,
|
||||
this.bd,this.Id,this.m,this.zc,this.Xc,this.m,this.m,this.m,this.Wc,this.Fd,this.m,this.ge,this.vb,this.m,this.m,this.m,this.xb,this.de,this.m,this.Ud,this.ub,this.ce,this.m,this.jd,this.rb,this.ae,this.m,this.wc,this.wb,this.m,this.m,this.m,this.yb,this.ee,this.m,this.re,this.tb,this.m,this.m,this.m,this.sb,this.be,this.m,this.m,this.ve,this.m,this.m,this.De,this.xe,this.Ae,this.m,this.Uc,this.m,this.Je,this.m,this.Ce,this.se,this.ze,this.m,this.mc,this.we,this.m,this.m,this.Ee,this.ye,this.Be,this.m,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")
|
|||
function I(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var f=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)f.test(a[b].className)&&c.push(a[b]);return c}
|
||||
B.prototype={constructor:B,parent:null,toString:function(){return this.name?this.name:this.id||this.type},J:function(a,b,c){switch(b){case "clear":return this.A[b]||(this.A[b]=c,c.onclick=function(a){return function(){a.A.print&&(a.A.print.value="")}}(this)),!0;case "print":return this.A[b]||(this.ya=this.A[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||
this.ua=function(a){this.F(a,this.wa)}),!0;default:return!1}},log:function(){},F:function(){},status:function(a){this.F(this.wa+": "+a)},ua:function(a,b,c){c=c||this.type;b||t((c?c+": ":"")+a)},N:function(a){this.u.error||(this.u.ready=!1!==a,this.u.ready&&(a=this.va,this.va=null,a&&a()))}};function oa(a,b){if(a.u.xa)return a.u.ta=!1,a.u.xa=!1;if(a.u.error)return a.F(a.toString()+" error"),!1;a.u.ta=b;return a.u.ta}function J(a,b){b&&(a.u.ready?b():a.va=b);return a.u.ready}
|
||||
function pa(a,b){a.u.error=!0;a.ua(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
|
||||
function pa(a,b){a.u.error=!0;a.ua(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b});function K(a){B.call(this,"C1PPanel",a);this.u.H=!1}D(K);
|
||||
K.prototype.J=function(a,b,c,d){return this.I&&this.I.J(a,b,c,d)||this.f&&this.f.J(a,b,c,d)||this.b&&this.b.J(a,b,c,d)?!0:B.prototype.J.call(this,a,b,c,d)};K.prototype.$=function(a,b){a&&!this.u.H&&(this.u.H=!0,this.I=b,this.f=L(b,"cpu"),this.b=L(b,"keyboard"),qa())};function qa(){for(var a=!1,b=I(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],f=G(d),g=F(f.id);g||(a=!0,g=new K(f));H(g,d);a&&g.N()}}x(qa);
|
||||
function ra(a){B.call(this,"C1PCPU",a);sa(this);this.u.H=!1;this.u.Z=!1;this.sa=a.autoStart;this.ia=0;this.Aa=2;this.speed=this.ia;this.oa=30;this.na=5;this.ea=8;this.qa=["Slow","Fast","Max"];this.ab=["(1Mhz)","(up to "+this.ea+"Mhz)","(unlimited)"];this.O=[];this.K=[];this.ja=65536;this.ka=0;this.Y=65536;this.ca=0;this.v=[this.Hb,this.$c,this.Sd,this.l,this.l,this.bd,this.xb,this.l,this.ed,this.Zc,this.wb,this.l,this.l,this.Wc,this.ub,this.l,this.Gb,this.ad,this.l,this.l,this.l,this.cd,this.yb,this.l,
|
||||
|
|
|
|||
Loading…
Reference in a new issue