diff --git a/_posts/2016-02-17-saving-disks-and-machines.md b/_posts/2016-02-17-saving-disks-and-machines.md index 4dcd38380..e195c25b3 100644 --- a/_posts/2016-02-17-saving-disks-and-machines.md +++ b/_posts/2016-02-17-saving-disks-and-machines.md @@ -43,9 +43,9 @@ in your Downloads folder, so the OS X Terminal command `chmod -w PCDOS200-DISK2. Saving Machines --- -Saving the entire state of any existing IBM PC machine is also possible with a single click. You can choose to save -a machine in its initial state, or make changes to any of the machine's disks and then save it. All your changes should -be preserved. +Saving the entire state of any existing IBM PC machine is also easy now, thanks to the new **Save Machine** link. +You can choose to save a machine in its initial state, or make changes to any of the machine's disks and then save it. +All your changes should be preserved. Under the bottom-left corner of any IBM PC on the PCjs [website](/), you should now see a [**Save Machine**] link. When you click that link, PCjs will generate a large "blob" of JavaScript containing diff --git a/docs/pcjs/demos/pc-dbg.js b/docs/pcjs/demos/pc-dbg.js index 3844e8da9..35c7d7054 100644 --- a/docs/pcjs/demos/pc-dbg.js +++ b/docs/pcjs/demos/pc-dbg.js @@ -1223,14 +1223,15 @@ function yr(a,b){a.C=null;var c=za(Aa()+"/api/v1/user?req=verify&user="+b),d=c[1 function xr(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=jr(a,sr);d.data=c;b=za(Aa()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0k.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(k=window.location.pathname+k);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(k?' url="'+k+'"':""))}k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in -window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(z){k=null,a=z.message}else a="unrecognized XML: "+(255k.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(k=window.location.pathname+k);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(k?' url="'+k+'"':""))}k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g, +"")),window.ActiveXObject||"ActiveXObject"in window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(z){k=null,a=z.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");za(e,!0,null,null,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var q=k[0],r,x=/( [a-z]+=)(['"])(.*?)\2/g;r=x.exec(f);)q=0>q.indexOf(r[1])?q.replace(">",r[0]+">"):q.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);k[0]!=q&&(g=g.replace(k[0],q))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Lr(a,b,c)}})}else c(a,null)} function Mr(a,b,c,d){function e(a){if(void 0===k){var b=g&&rb(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=na(a))}function f(a){e("Error: "+a);q&&(--zr||Wa(!0));q=!1}var g,k,q=!0;zr++;ib[a]={};try{if(g=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var x=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=r:z.appendChild(document.createTextNode(r));x.appendChild(z)}c|| (c="/versions/pcjs/1.20.9/components.xsl");r=function(d,k){k?Ar(c,null,null,!1,e,function(d,q){if(q)if(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var r=k.transformNode(q);r?(g.outerHTML=r,--zr||Wa(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(r=new XSLTProcessor,r.importStylesheet(q),(r=r.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(r,g),--zr||Wa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f(d)}):f(d)};"<"!=b.charAt(0)?Ar(b,a,d,!0,e,r):Br(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(y){f(y.message)}return q}window.embedPC=function(a,b,c,d){Wa(!1);return Mr(a,b,c,d)};window.enableEvents=Wa;window.sendEvent=Xa; function Nr(a,b,c,d){if(!c&&b){d.push(b);a=ib[d[0]];b=null;for(var e in a)if(la(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?za(b,!0,null,null,Or,d):Or(0,null,0,d)}else Ca("Error ("+c+") requesting "+a)} -function Or(a,b,c,d){var e,f,g;a=d[0];c=d[1];e=d[4];e=e.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var k=ib[a],q={},r;for(r in k){var x=k[r],z=ka(r);if("xml"==z){for(z=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;f=z.exec(k[r]);){var y=f[2];y&&(k[y]||(x=x.replace(f[0],"")))}f=r=ja(r)}else"xsl"==z&&(g=r=ja(r));q[r]=x}b&&(q[r="css"]=b);d[2]&&(q[r="parms"]=d[2]);d[3]&&(q[r="state"]=d[3]);f&&g?(b=JSON.stringify(q),e=e[1]+"var resources="+b+";"+e[2]+e[3],e=e.replace(/\u00A9/g,"©"), -b="data:application/javascript,"+(Ka("Firefox")?encodeURIComponent(e):encodeURI(e)),d=document.createElement("a"),"string"==typeof d.download?(d.href=b,d.download=c+".json",document.body.appendChild(d),d.click(),document.body.removeChild(d)):window.open(b),b='Check your Downloads folder for "'+c+'.json", '+('copy it to your web server as "'+c+'.js", and then add the following to your web page:\n\n'),b+='
\n',b+="...\n",b+='