-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
93 lines (86 loc) · 5.67 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
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CHIP-8</title>
<link rel="stylesheet" href="./dist/styles/style.css">
</head>
<body class="font-mono debug-screens">
<div class="flex flex-col">
<!-- Left - Register Debug -->
<div class="hidden">
</div>
<!-- Center - Display and Inputs -->
<div class="flex flex-col items-center mt-10 px-2">
<div>
<div class="border-2 border-r-gray-300 border-b-gray-300 rounded-lg">
<canvas class="bg-gray-100 w-[256px] h-[128px]" width="512" height="256" id="canvas"></canvas>
</div>
<div class="text-xs text-gray-600 px-1">
<p>Average Clock speed: <span id="herz">60</span> hz</p>
</div>
</div>
<div class="grid grid-cols-4 gap-2 mt-4">
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-1">1</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-2">2</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-3">3</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-12">C</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-4">4</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-5">5</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-6">6</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-13">D</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-7">7</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-8">8</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-9">9</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-14">E</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-10">A</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-0">0</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-11">B</button>
<button class="text-2xl border-2 rounded-lg font-medium w-16 h-16 inactive" id="button-15">F</button>
</div>
<div class="active hidden"></div>
</div>
<!-- Right - General Stats and ROM -->
<div class="mt-8">
<div class="hidden">
<!-- <button onclick="toggle()">Toggle</button> -->
</div>
<div class="flex flex-col items-center">
<div class="space-y-6 border-2 border-dashed px-2 mx-2 py-4">
<p class="text-sm text-gray-800">Select a ROM, upload one yourself, or enter the <a class="underline" href="https://github.com/kripod/chip8-roms" target="_blank">URL of a ROM</a></p>
<div class="flex flex-col items-start space-y-5">
<div class="flex flex-col">
<label class="ml-1 text-sm text-gray-600" for="rom-select">Select ROM</label>
<select class="cursor-pointer appearance-none w-32 px-2 py-1 text-sm text-gray-600 bg-gray-100 rounded-lg border-2 border-r-gray-300 border-b-gray-300" name="rom-select" id="rom-select">
<option value="breakout">Breakout</option>
<option value="maze">Clock</option>
</select>
</div>
<div class="flex flex-col">
<label class="ml-1 text-sm text-gray-600" for="rom-upload">Upload ROM</label>
<label class="cursor-pointer appearance-none w-32 px-2 py-1 text-sm text-gray-600 bg-gray-100 rounded-lg border-2 border-r-gray-300 border-b-gray-300" for="rom-upload">Choose File</label>
<!-- Hidden file upload, label is used as a fake button -->
<input class="hidden" type="file" name="" id="rom-upload" onchange="loader.loadUploadedROM()">
</div>
<div class="flex flex-col">
<label class="ml-1 text-sm text-gray-600" for="rom-url">Use URL</label>
<div class="flex">
<input type="text" id="rom-url" class="appearance-none px-2 py-1 text-sm text-gray-600 rounded-l-lg border-2 border-r-1">
<button class="appearance-none px-2 py-1 text-sm text-gray-600 bg-gray-100 rounded-r-lg border-2 border-l-0 border-r-gray-300 border-b-gray-300">Confirm</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./scripts/display.js"></script>
<script src="./scripts/keyboard.js"></script>
<script src="./scripts/cpu.js"></script>
<script src="./scripts/loader.js"></script>
<script src="./scripts/debugger.js"></script>
<script src="./scripts/main.js"></script>
</body>
</html>