-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (82 loc) · 1.73 KB
/
index.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet">
<style>
:root {
--terminal-color: white;
}
canvas {
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
image-rendering: pixelated;
}
.page {
width: 512px;
margin-left: auto;
margin-right: auto;
}
.screen {
width: 200%;
height: 512px;
margin-left: -50%;
border: 1px solid white;
padding: 5px;
margin-bottom: 20px;
}
.container {
display: flex;
flex-direction: row;
}
body {
font-family: 'VT323', monospace;
font-size: 20px;
line-height: 22px;
color: white;
background-color: black;
}
h2 {
font-size: 50px;
text-align: center;
}
.pc {
background-color: white;
color: black;
}
.label {
font-size: 30px;
}
button, select {
font-family: 'VT323', monospace;
font-size: 30px;
width: 100px;
border: 3px solid white;
color: white;
background-color: black;
outline: none;
margin-bottom: 10px;
}
select {
width: 200px;
}
button:active {
color: black;
background-color: white;
}
</style>
<div class='page'>
<h2>CHIP-8</h2>
<p>A WebAssembly CHIP-8 emulator written using Rust. Select a ROM and hit 'start'!</p>
<p>For WIPEOFF, the default ROM, press W to start the game, then Q / E to move the paddle.
Other ROMs may be buggy!</p>
<span class='label'>ROM:</span>
<select id='roms'>
</select>
<button id='run'>Start</button>
<button id='reset'>Reset</button>
<div class='screen'>
<canvas id='canvas' width='64' height='32'
style='transform: scale(16); transform-origin: top left'></canvas>
</div>
<div class='container'>
</div>
</div>
<script type="module" src='index.js'></script>
<script src='https://code.jquery.com/jquery-3.2.1.min.js'></script>