-
Notifications
You must be signed in to change notification settings - Fork 112
/
example_minivmacii.html
62 lines (51 loc) · 2.72 KB
/
example_minivmacii.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!--
The Emularity: An Example Computer Loader
For use with The Emularity, downloadable at http://www.emularity.com/
SIMPLE STEPS for trying an emulated computer ("System 7.0.1" for the
Macintosh II).
* 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 Neko Project II emulator from
https://yksoft1.github.io/emularity/minivmac/minivmacII.js
https://yksoft1.github.io/emularity/minivmac/minivmacII.wasm
* Download BIOS and configuration from
https://yksoft1.github.io/emularity/minivmac/macii.zip
* Download the System 7.0.1 disk image from:
https://yksoft1.github.io/emularity/minivmac/test7.zip
then extract the "test7.dsk" disk image file
* Place BIOS, configuration file and disk image 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.min.js"></script>
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new NP2Loader(NP2Loader.nativeResolution(640, 480),
NP2Loader.scale(2),
NP2Loader.emulatorJS("emulators/minivmacII.js"),
NP2Loader.emulatorWASM("emulators/minivmacII.wasm"),
NP2Loader.mountZip("minivmac",
NP2Loader.fetchFile("Mac ROM files",
"examples/macii.zip")),
NP2Loader.mountFile("test7.dsk",
NP2Loader.fetchFile("Disk Image",
"examples/test7.dsk")),
NP2Loader.extraArgs(["/emulator/test7.dsk"]),
));
emulator.start({ waitAfterDownloading: true });
</script>
</body>
</html>