Files
emularity/example_computer.html
T
2015-04-15 12:26:59 -07:00

53 lines
3.5 KiB
HTML

<!-- The Emularity: An Example Computer Loader -->
<!-- For use with The Emularity, downloadable at http://www.emularity.com/ -->
<!-- SIMPLE STEPS to trying an emulated computer ("Beagle Bag" for the Apple IIe) -->
<!-- * Check out this repository in your browser-accessible directory;
this file as well as es6-promise.js, browserfs.js and loader.js are
required. The logo and images directories are optional, but the
splash screen looks quite a lot better when they're available. -->
<!-- * Use "git annex get <file>" to download emulators/jsmess/messnapple2e.js.gz;
if you don't have git-annex you can download it from IA manually
(https://archive.org/download/emularity_engine_jsmess/messnapple2e.js.gz) -->
<!-- * Download the Apple 2e BIOS from -->
<!-- https://archive.org/download/jsmess_bios_v2/apple2e.zip -->
<!-- * Download the MAME config file for the Apple 2e from -->
<!-- https://archive.org/download/jsmess_config_v2/apple2e.cfg
<!-- * Download the Beagle Bag from: -->
<!-- https://archive.org/download/a2_Beagle_Bag_1982_Beagle_Bros/Beagle_Bag_1982_Beagle_Bros.do -->
<!-- * Place apple2e.zip and Beagle_Bag_1982_Beagle_Bros.do in an "examples" subdirectory. -->
<!-- * Visit your example_computer.html file with a modern Javascript-capable browser. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>example computer program</title>
</head>
<body>
<canvas id="canvas" style="width: 50%; height: 50%; display: block; margin: 0 auto;"/>
<script type="text/javascript" src="es6-promise.js"></script>
<script type="text/javascript" src="browserfs.js"></script>
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new JSMESSLoader(JSMESSLoader.driver("apple2e"),
JSMESSLoader.nativeResolution(560, 384),
JSMESSLoader.emulatorJS("emulators/jsmess/messnapple2e.js"),
JSMESSLoader.mountFile("apple2e.zip",
JSMESSLoader.fetchFile("Bios",
"examples/apple2e.zip")),
JSMESSLoader.mountFile("Beagle_Bag_1982_Beagle_Bros.do",
JSMESSLoader.fetchFile("Game",
"examples/Beagle_Bag_1982_Beagle_Bros.do")),
JSMESSLoader.mountFile("apple2e.cfg",
JSMESSLoader.fetchFile("Config",
"examples/apple2e.cfg")),
JSMESSLoader.peripheral("flop1", "Beagle_Bag_1982_Beagle_Bros.do"),
JSMESSLoader.extraArgs(["-sl6", "diskii", "-sl4", '""'])))
emulator.setScale(3).start({ waitAfterDownloading: true });
</script>
</body>
</html>