1 line
No EOL
5 KiB
HTML
1 line
No EOL
5 KiB
HTML
<!doctypehtml><html lang=en-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>c2t wavefile generator</title><style>form button,form label{background-color:#7f9ccb;padding:5px 10px;border-radius:5px;border:1px ridge #000;font-size:.8rem;height:auto}.emscripten{display:block}textarea.emscripten{font-family:monospace;width:80%}div.emscripten_border{border:1px solid #000}canvas.emscripten{border:0 none;background-color:#000}.spinner{height:50px;width:50px;margin:0 auto;-webkit-animation:rotation .8s linear infinite;-moz-animation:rotation .8s linear infinite;-o-animation:rotation .8s linear infinite;animation:rotation .8s linear infinite;border-left:10px solid #0096f0;border-right:10px solid #0096f0;border-bottom:10px solid #0096f0;border-top:10px solid #6400c8;border-radius:100%;background-color:#c864fa}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@-moz-keyframes rotation{from{-moz-transform:rotate(0)}to{-moz-transform:rotate(360deg)}}@-o-keyframes rotation{from{-o-transform:rotate(0)}to{-o-transform:rotate(360deg)}}@keyframes rotation{from{transform:rotate(0)}to{transform:rotate(360deg)}}</style></head><body><p>Convert an apple2 5.25 floppy file to wave format for uploading via the tape interface.</p><figure id=spinner style=overflow:visible><div class=spinner></div><center style=margin-top:.5em><strong>emscripten</strong></center></figure><div class=emscripten id=status>Downloading...</div><div class=emscripten><progress hidden id=progress max=100 value=0></progress></div><form enctype=multipart/form-data method=POST><label for=diskfile>Browse</label><input accept=.po,.do,.dsk id=diskfile name=diskfile style=opacity:0 type=file><br></form><br><p>Use the resulting audio as described at<a href=https://asciiexpress.net/diskserver/ >the asciiexpress diskserver</a>:</p><ol><li>Remove any floppies.</li><li>Power on your ][+ or //e.</li><li>Press CONTROL-RESET.</li><li>Connect your phone/computer headphone jack to the cassette input jack (it's next to the joystick port).</li><li>Set your phone/computer to MAX volume.</li><li>Insert a blank diskette (S6D1).</li><li><strike>Select a disk from the list to the left.</strike></li><li>At the "]" prompt type "LOAD" and press RETURN.</li><li>Press the play button.<strike>If problems with HIFI, use 8KFI.</strike></li></ol><p>Note: 8KFI is not available here yet.</p><p>Due to boooogs the audio may be erroneously reported as very long (affects Firefox 97 on Linux). It is typically under 3 minutes.</p><div id=player></div><textarea class=emscripten id=output rows=8></textarea><script>function downloadData(e,t){var n=Array.from(t).map((e=>String.fromCharCode(e))).join(""),o="data:audio/x-wav;base64,"+btoa(n),l=document.createElement("audio");l.controls=!0,l.src=o,container=document.getElementById("player"),container.innerHTML="",container.appendChild(l)}document.querySelector("#diskfile").addEventListener("change",(e=>{var t=document.getElementById("diskfile");if(t.files.length){var n=new FileReader;n.onload=function(e){var n=t.value.replace(/.*[/\\]/,"");FS.writeFile(n,new Uint8Array(e.target.result)),0!=Module.ccall("wave_convert","number",["string"],[n])&&downloadData("output.wav",FS.readFile("/output.wav"))},n.readAsArrayBuffer(t.files[0])}return!1}));var statusElement=document.getElementById("status"),progressElement=document.getElementById("progress"),spinnerElement=document.getElementById("spinner"),outputElement=document.getElementById("output"),Module={preRun:[],postRun:[],print:function(){var e=document.getElementById("output");return e&&(e.value=""),function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments).join(" ")),console.log(t),e&&(e.style="",e.value+=t+"\n",e.scrollTop=e.scrollHeight)}}(),printErr:function(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments).join(" ")),outputElement.style="",outputElement.value+=e+"\n",outputElement.scrollTop=outputElement.scrollHeight,console.error(e)},setStatus:function(e){if(Module.setStatus.last||(Module.setStatus.last={time:Date.now(),text:""}),e!==Module.setStatus.last.text){var t=e.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/),n=Date.now();t&&n-Module.setStatus.last.time<30||(Module.setStatus.last.time=n,Module.setStatus.last.text=e,t?(e=t[1],progressElement.value=100*parseInt(t[2]),progressElement.max=100*parseInt(t[4]),progressElement.hidden=!1,spinnerElement.hidden=!1):(progressElement.value=null,progressElement.max=null,progressElement.hidden=!0,e||(spinnerElement.hidden=!0)),statusElement.innerHTML=e)}},totalDependencies:0,monitorRunDependencies:function(e){this.totalDependencies=Math.max(this.totalDependencies,e),Module.setStatus(e?"Preparing... ("+(this.totalDependencies-e)+"/"+this.totalDependencies+")":"All downloads complete.")}};Module.setStatus("Downloading..."),window.onerror=function(){Module.setStatus("Exception thrown, see JavaScript console"),spinnerElement.style.display="none",Module.setStatus=function(e){e&&Module.printErr("[post-exception status] "+e)}}</script><script async src=index.js></script></body></html> |