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:
Jeff 2016-10-27 17:59:20 -07:00 • committed by Jeff Parsons
commit 88b485d094
4 changed files with 179 additions and 61 deletions

View file

@ -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,