mirror of
https://github.com/db48x/emularity.git
synced 2026-07-27 19:56:37 +00:00
54 lines
2.5 KiB
HTML
54 lines
2.5 KiB
HTML
<!--
|
|
The Emularity: An Example Computer Loader
|
|
For use with The Emularity, downloadable at http://www.emularity.com/
|
|
|
|
SIMPLE STEPS for trying an emulated computer ("Doom (shareware
|
|
edition)" for the PC).
|
|
|
|
* Check out this repository in your browser-accessible directory;
|
|
this file as well as es6-promise.js, browserfs.min.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.
|
|
|
|
* Download the two files that comprise the compiled DosBox emulator:
|
|
https://archive.org/download/emularity_engine_v1/dosbox-sync.js.gz,
|
|
and https://archive.org/download/emularity_engine_v1/dosbox-sync.mem.gz.
|
|
|
|
* Download a copy of Doom from https://archive.org/download/DoomsharewareEpisode/DoomV1.9sw1995idSoftwareInc.action.zip
|
|
|
|
* Visit your example_dosbox.html file with a modern
|
|
Javascript-capable browser.
|
|
-->
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>example dos game</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.min.js"></script>
|
|
<script type="text/javascript" src="loader.js"></script>
|
|
<script type="text/javascript">
|
|
var emulator = new Emulator(document.querySelector("#canvas"),
|
|
null,
|
|
new DosBoxLoader(DosBoxLoader.emulatorJS("emulators/em-dosbox/dosbox-sync.js"),
|
|
DosBoxLoader.locateAdditionalEmulatorJS(locateAdditionalFiles),
|
|
DosBoxLoader.nativeResolution(640, 480),
|
|
DosBoxLoader.mountZip("c",
|
|
DosBoxLoader.fetchFile("Game File",
|
|
"examples/DoomV1.9sw1995idSoftwareInc.action.zip")),
|
|
DosBoxLoader.startExe("doom.exe")))
|
|
emulator.start({ waitAfterDownloading: true });
|
|
|
|
function locateAdditionalFiles(filename) {
|
|
if (filename === "dosbox.html.mem") {
|
|
return "emulators/em-dosbox/dosbox-sync.mem";
|
|
}
|
|
return "emulators/em-dosbox/"+ filename;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|