-
Notifications
You must be signed in to change notification settings - Fork 113
/
example_console.html
45 lines (42 loc) · 2.67 KB
/
example_console.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
<!-- The Emularity: An Example Console Loader -->
<!-- For use with The Emularity, downloadable at http://www.emularity.com/ -->
<!-- SIMPLE STEPS to trying an emulated console ("Halo 2600" for the Atari VCS) -->
<!-- * 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 MAME a2600 emulator from
https://archive.org/download/emularity_engine_v1/mamea2600.js.gz -->
<!-- * Download the Halo 2600 demo from
https://archive.org/download/atari_2600_halo_2600/atari_2600_halo_2600.bin -->
<!-- * Place the atari_2600_halo_2600.bin file in an "examples" subdirectory. -->
<!-- * Visit your example_console.html file with a modern Javascript-capable browser. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>example console 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 JSMESSLoader(JSMESSLoader.driver("a2600"),
JSMESSLoader.nativeResolution(352, 223),
JSMAMELoader.scale(3),
JSMESSLoader.emulatorJS("emulators/jsmess/messa2600.js"),
JSMESSLoader.mountFile("atari_2600_halo_2600.bin",
JSMESSLoader.fetchFile("Game File",
"examples/atari_2600_halo_2600.bin")),
JSMESSLoader.mountFile("a2600.cfg",
JSMESSLoader.fetchFile("Config File",
"examples/a2600.cfg")),
JSMESSLoader.peripheral("cart", "atari_2600_halo_2600.bin")))
emulator.start({ waitAfterDownloading: true });
</script>
</body>
</html>