-
Notifications
You must be signed in to change notification settings - Fork 113
/
example_vicejs.html
65 lines (58 loc) · 3.79 KB
/
example_vicejs.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
63
64
65
<!--
The Emularity: An Example C64 Loader
For use with The Emularity, downloadable at http://www.emularity.com/
SIMPLE STEPS for trying an emulated computer using ViceJS 3.2
("Comaland" for the C64).
* 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 files that comprise the compiled ViceJS emulator:
https://archive.org/download/emularity_engine_v1/vice-resid.js.gz
* Download a copy of Comaland 100% from
https://archive.org/download/comaland_100/image{1..4}.d64
* Visit your example_vicejs.html file with a modern
Javascript-capable browser.
* For more information about the Vice Emscripten port, please see
https://github.com/rjanicek/vice.js/ (for Vice 2.4), or Sgeo's
repository for Vice 3.2 (once he publishes it, hint hint).
-->
<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 VICELoader(VICELoader.emulatorJS("emulators/vicejs/vice-resid.js"),
VICELoader.nativeResolution(768, 544),
VICELoader.extraArgs(["-soundfragsize", "4",
"-soundrate", "48000",
"-soundsync", "2",
"-soundbufsize", "150",
"-residsamp", "0",
"-joydev1", "4"]),
VICELoader.mountFile("image1.d64",
VICELoader.fetchFile("Disc 1",
"examples/comaland_100/image1.d64")),
VICELoader.mountFile("image2.d64",
VICELoader.fetchFile("Disc 2",
"examples/comaland_100/image2.d64")),
VICELoader.mountFile("image3.d64",
VICELoader.fetchFile("Disc 3",
"examples/comaland_100/image3.d64")),
VICELoader.mountFile("image4.d64",
VICELoader.fetchFile("Disc 4",
"examples/comaland_100/image4.d64")),
VICELoader.fliplist([["image1.d64", "image2.d64", "image3.d64", "image4.d64"]]),
VICELoader.autoLoad("image1.d64")))
emulator.start({ waitAfterDownloading: true });
</script>
</body>
</html>