Add disk ROM and DOS image to boot

This commit is contained in:
Brad Grantham 2017-01-07 23:03:36 -08:00
parent bcf103aca2
commit e8e2cb43b9

View File

@ -5,11 +5,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Emscripten-Generated Code</title>
<style>
@font-face {
font-family:"Print Char 21";
src: url("printchar21.ttf")
}
body {
font-family: arial;
margin: 0;
@ -91,7 +86,7 @@
#output {
width: 100%;
/* height: 300px; */
height: 200px;
margin: 0 auto;
margin-top: 10px;
border-left: 0px;
@ -101,7 +96,7 @@
display: block;
background-color: black;
color: white;
font-family: 'Print Char 21', Courier, monospace;
font-family: 'Lucida Console', Monaco, monospace;
outline: none;
}
</style>
@ -1216,10 +1211,10 @@
</div>
<!--div class="emscripten_border">
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="100"></canvas>
</div-->
<textarea id="output" rows="28"></textarea>
<div class="emscripten_border">
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<textarea id="output" rows="8"></textarea>
<script type='text/javascript'>
var statusElement = document.getElementById('status');
@ -1227,8 +1222,7 @@
var spinnerElement = document.getElementById('spinner');
var Module = {
// arguments: ['-fast', 'apple2e.rom'],
arguments: ['apple2e.rom'],
arguments: ['-fast', '-diskII', 'diskII.c600.c67f.bin', 'LodeRunner.dsk', 'none', 'apple2e.rom'],
preRun: [],
postRun: [],
print: (function() {
@ -1262,7 +1256,7 @@
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
// application robust, you may want to override this behavior before shipping!
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
/* canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); */
canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
return canvas;
})(),
@ -1292,15 +1286,6 @@
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
document.getElementById('output').addEventListener('keydown', function (e){
console.log("key is " + e.which);
Module.enqueue_console_keydown(e.which);
}, false);
document.getElementById('output').addEventListener('keyup', function (e){
console.log("key is " + e.which);
Module.enqueue_console_keyup(e.which);
}, false);
Module.setStatus('Downloading...');
window.onerror = function(event) {
// TODO: do not warn on ok events like simulating an infinite loop or exitStatus
@ -1311,6 +1296,25 @@
};
};
</script>
<script async type="text/javascript" src="apple2e.js"></script>
<script>
(function() {
var memoryInitializer = 'apple2e.html.mem';
if (typeof Module['locateFile'] === 'function') {
memoryInitializer = Module['locateFile'](memoryInitializer);
} else if (Module['memoryInitializerPrefixURL']) {
memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer;
}
var xhr = Module['memoryInitializerRequest'] = new XMLHttpRequest();
xhr.open('GET', memoryInitializer, true);
xhr.responseType = 'arraybuffer';
xhr.send(null);
})();
var script = document.createElement('script');
script.src = "apple2e.js";
document.body.appendChild(script);
</script>
</body>
</html>