-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
145 lines (133 loc) · 7.04 KB
/
index.html
File metadata and controls
145 lines (133 loc) · 7.04 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="helper.js"></script>
<script src="chip8.js"></script>
<script src="main.js"></script>
<link rel="stylesheet" href="style.css">
<title>Chip-84</title>
</head>
<body>
<div id="container">
<!--<h1 style="width: 100%; text-align: center; font-size: 64; padding-top: 50px;">Chip-84</h1>-->
<img src="images/title.png" style="width:512px" id="title-img"></img>
<br>
<canvas id="screen" width="128", height="64"></canvas>
<br>
<label class="rom-upload" style="margin-top:20px; margin-bottom:20px;">
<input type="file" id="fileselector" name="fileselector">
Choose a ROM...
</label>
<select name="roms" id="roms" onchange="presetRom()">
<option value="schip8/ANT">ANT</option>
<option value="schip8/BLINKY">BLINKY</option>
<option value="BRIX">BRIX</option>
<option value="C2048">C2048</option>
<option value="schip8/C8SCRATC">C8SCRATC</option>
<option value="schip8/C83DTITL">C83DTITL</option>
<option value="schip8/C84JS" selected>C84JS</option>
<option value="schip8/CAR">CAR</option>
<option value="CKOSMIC">CKOSMIC</option>
<option value="INVADERS">INVADERS</option>
<option value="PONG2">PONG2</option>
<option value="schip8/SNOWDAZE">SNOWDAZE</option>
<option value="schip8/SPACEFIG">SPACEFIG</option>
<option value="schip8/SWEECOPT">SWEECOPT</option>
<option value="schip8/TRAFFIC">TRAFFIC</option>
<option value="TETRIS">TETRIS</option>
</select>
<br>
Cycles Per Frame:
<input type="range" min="1" max="100" value="20" id="cpf-slider" name="cpfRange" oninput="this.nextElementSibling.value=this.value">
<input type="number" min="1" max="3000" value="20" id="cpf-input" name="cpfInput" oninput="this.previousElementSibling.value=this.value">
<div id="text-container">
<h2>What is Chip-84?</h2>
<p>Chip-84 is a CHIP-8 and S-CHIP (Super-Chip) interpreter originally written in C for the TI-84 Plus CE calculator. Since then, it's been a task of porting it to as many platforms as possible.</p>
<p>The list of ports extends from practical platforms like SDL for Windows and Linux to completely pointless ones like an addon for Garry's Mod or a Rainmeter skin. You can think of it as the "Can it Run Doom?" project where porting a specific thing to as many devices as possible is a fun activity and a great way to learn about the hardware/software of the device it's running on.</p>
<h2>List of Ports</h2>
<ul>
<li>Chip-84 - TI-84 Plus CE (<a href="https://github.com/Chip-84/chip-84" target="_blank">Source</a>, <a href="https://github.com/Chip-84/chip-84/releases" target="_blank">Binary</a>)</li>
<li>Chip-84 SDL Edition - Windows/Linux (<a href="https://github.com/Chip-84/chip-84-sdl" target="_blank">Source</a>)</li>
<li>Chip-84 3D - Unity (<a href="https://github.com/Chip-84/chip-84-3d" target="_blank">Source</a>, <a href="https://tripleaxis.itch.io/chip-84-3d" target="_blank">Binary</a>)</li>
<li>Chip-84 DS Edition - Nintendo DS (<a href="https://github.com/Chip-84/chip-84-ds" target="_blank">Source</a>, <a href="https://github.com/Chip-84/chip-84-ds/releases" target="_blank">Binary</a>)</li>
<li>Chip-84 Rainmeter Edition - Rainmeter (<a href="https://github.com/Chip-84/chip-84-rainmeter" target="_blank">Source</a>, <a href="https://github.com/Chip-84/chip-84-rainmeter/releases" target="_blank">Binary</a>)</li>
<li>Chip-84 PSX Edition - PlayStation 1 (<a href="https://github.com/Chip-84/chip-84-psx" target="_blank">Source</a>, <a href="https://github.com/Chip-84/chip-84-psx/releases" target="_blank">Binary</a>)</li>
<li>Chip-84 Pi Edition - Raspberry Pi Zero W (<a href="https://github.com/Chip-84/chip-84-pi" target="_blank">Source</a>)</li>
<li>Chip-84 JavaScript Edition - Web (<a href="https://github.com/Chip-84/chip-84.github.io" target="_blank">Source</a>)</li>
<li>Chip-84 Scratch Edition - Scratch (<a href="https://scratch.mit.edu/projects/225072554/editor/" target="_blank">Source</a>)</li>
</ul>
<h2>Gallery</h2>
<div class="img-gallery">
<div class="img-column">
<img src="images/calc1.jpeg" onclick="openImg(this.src, 'The original Chip-84 on the TI-84 Plus CE')">
<img src="images/ds3.jpeg" onclick="openImg(this.src, 'Chip-84 on the Nintendo DS')">
<img src="images/sdl1.jpg" onclick="openImg(this.src, 'Chip-84 ported to run using SDL on Windows and Linux')">
<img src="images/calc3.gif" onclick="openImg(this.src, 'The original Chip-84 on the TI-84 Plus CE')">
</div>
<div class="img-column">
<img src="images/calc2.jpeg" onclick="openImg(this.src, 'The original Chip-84 on the TI-84 Plus CE')">
<img src="images/pi1.jpeg" onclick="openImg(this.src, 'Chip-84 running on the Raspberry Pi Zero W')">
<img src="images/ds2.jpeg" onclick="openImg(this.src, 'Chip-84 on the Nintendo DS')">
<img src="images/3d1.png" onclick="openImg(this.src, 'Chip-84 running in Unity')">
<img src="images/rainmeter1.jpg" onclick="openImg(this.src, 'Chip-84 as a Rainmeter skin')">
</div>
<div class="img-column">
<img src="images/ds1.jpeg" onclick="openImg(this.src, 'Chip-84 on the Nintendo DS')">
<img src="images/pi2.jpeg" onclick="openImg(this.src, 'Chip-84 running on the Raspberry Pi Zero W')">
<img src="images/ps1.jpg" onclick="openImg(this.src, 'Chip-84 running on the Sony PlayStation')">
<img src="images/scratch1.jpg" onclick="openImg(this.src, 'Chip-84 running in Scratch, a beginner programming tool for kids')">
<img src="images/ps12.jpg" onclick="openImg(this.src, 'Chip-84 running on a Sony PlayStation emulator called NO$PSX')">
</div>
</div>
</div>
</div>
<div id="img-viewer" style="display:none">
<div id="img-container">
<img src="" id="img-viewed">
</div>
<div id="img-viewer-x" onclick="closeImg()">✕</div>
<div id="img-viewer-cap">sdsdsdsd</div>
</div>
<script type="text/javascript">
function presetRom() {
setFileName(document.getElementById("roms").value);
var xhr = new XMLHttpRequest();
xhr.open("GET", "rom/" + document.getElementById("roms").value, true);
xhr.responseType = "arraybuffer";
xhr.onload = function(e) {
var arrayBuffer = xhr.response;
if(arrayBuffer) {
var array = new Uint8Array(arrayBuffer);
loadProgram(array);
startMainLoop();
}
};
xhr.send(null);
}
setTimeout(function() {
presetRom();
}, 1000);
function openImg(src, caption) {
var viewer = document.getElementById("img-viewer");
var viewed = document.getElementById("img-viewed");
var cap = document.getElementById("img-viewer-cap");
viewed.src = src;
viewer.style.display = "block";
var img = new Image();
img.onload = function() {
if(this.height > this.width || this.height > window.innerHeight*0.8) {
viewed.style.height = "80%";
}
}
img.src = src;
cap.innerHTML = caption;
}
function closeImg() {
var viewer = document.getElementById("img-viewer");
var viewed = document.getElementById("img-viewed");
viewed.src = "";
viewer.style.display = "none";
}
</script>
</body>
</html>