-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
276 lines (272 loc) · 15 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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>DCPU-16 Character Painter</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="inc/style.css">
</head>
<body>
<div id="wrapper">
<div class="full"><h1>DCPU-16 Character editor</h1></div>
<!--[if lt IE 7]><div class="full svg-warning"><table><tr><td><img src="inc/alert.png" style="padding:5px;" /></td><td style="vertical-align:middle; padding:0 10px 0 0">Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</td></tr></table></div><![endif]-->
<div class="full svg-warning"><table><tr><td><img src="inc/alert.png" style="padding:5px;" /></td><td style="vertical-align:middle; padding:0 10px 0 0">WARNING! This site makes use of SVG images to function, and it appears that you do not have a broswer that supports inline SVG elements. It's suggested that you <a href="http://browsehappy.com/" rel="external">upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true" rel="external">install Google Chrome Frame</a> to experience this site.</td></tr></table></div>
<div class="clearfix"><div class="col" style="text-align:center; width:400px;">
<svg id="charmap" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="400">
<rect id="18" x="0" y="0" width="50" height="50" />
<rect id="17" x="0" y="50" width="50" height="50" />
<rect id="16" x="0" y="100" width="50" height="50" />
<rect id="15" x="0" y="150" width="50" height="50" />
<rect id="14" x="0" y="200" width="50" height="50" />
<rect id="13" x="0" y="250" width="50" height="50" />
<rect id="12" x="0" y="300" width="50" height="50" />
<rect id="11" x="0" y="350" width="50" height="50" />
<rect id="28" x="50" y="0" width="50" height="50" />
<rect id="27" x="50" y="50" width="50" height="50" />
<rect id="26" x="50" y="100" width="50" height="50" />
<rect id="25" x="50" y="150" width="50" height="50" />
<rect id="24" x="50" y="200" width="50" height="50" />
<rect id="23" x="50" y="250" width="50" height="50" />
<rect id="22" x="50" y="300" width="50" height="50" />
<rect id="21" x="50" y="350" width="50" height="50" />
<rect id="38" x="100" y="0" width="50" height="50" />
<rect id="37" x="100" y="50" width="50" height="50" />
<rect id="36" x="100" y="100" width="50" height="50" />
<rect id="35" x="100" y="150" width="50" height="50" />
<rect id="34" x="100" y="200" width="50" height="50" />
<rect id="33" x="100" y="250" width="50" height="50" />
<rect id="32" x="100" y="300" width="50" height="50" />
<rect id="31" x="100" y="350" width="50" height="50" />
<rect id="48" x="150" y="0" width="50" height="50" />
<rect id="47" x="150" y="50" width="50" height="50" />
<rect id="46" x="150" y="100" width="50" height="50" />
<rect id="45" x="150" y="150" width="50" height="50" />
<rect id="44" x="150" y="200" width="50" height="50" />
<rect id="43" x="150" y="250" width="50" height="50" />
<rect id="42" x="150" y="300" width="50" height="50" />
<rect id="41" x="150" y="350" width="50" height="50" />
</svg>
</div>
<div class="col" style="width:540px;">
<table class="output">
<tr><th>Binary:</th><td><span class="code"><span id="b11">0</span><span id="b12">0</span><span id="b13">0</span><span id="b14">0</span> <span id="b15">0</span><span id="b16">0</span><span id="b17">0</span><span id="b18">0</span> <span id="b21">0</span><span id="b22">0</span><span id="b23">0</span><span id="b24">0</span> <span id="b25">0</span><span id="b26">0</span><span id="b27">0</span><span id="b28">0</span> <span id="b31">0</span><span id="b32">0</span><span id="b33">0</span><span id="b34">0</span> <span id="b35">0</span><span id="b36">0</span><span id="b37">0</span><span id="b38">0</span> <span id="b41">0</span><span id="b42">0</span><span id="b43">0</span><span id="b44">0</span> <span id="b45">0</span><span id="b46">0</span><span id="b47">0</span><span id="b48">0</span></span></td></tr>
<tr><th>Hex:</th><td><span class="code">0x<span id="h11">0</span><span id="h12">0</span><span id="h21">0</span><span id="h22">0</span> 0x<span id="h31">0</span><span id="h32">0</span><span id="h41">0</span><span id="h42">0</span></span></td></tr>
</table>
<p>This is a visual character creator for the DCPU-16, a fictitious, virtual CPU used in the upcoming <a href="http://0x10c.com" rel="external">0x10<sup>c</sup> game</a> by <a href="https://twitter.com/#!/notch" rel="external">Notch</a>. The DCPU-16 has a default <a href="http://0x10cwiki.com/wiki/Video_RAM" rel="external">video memory</a> address space, and an address space for defining the shape of the characters drawn on the screen. There is a default alphabet defined (like <a href="#7e097e00" title="0x7e09 0x7e00">this letter 'A'</a>), but written programs can redefine them to create custom characters, and in the future there may be the option for sprite sheets and more advanced control of the individual pixels of the screen.</p>
<p>Link to this character: <span class="code" id="share_link"></span></p>
<div style="padding:5px 0; background-color:rgba(255,255,255,0.4);">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style" style="width:160px; margin:0 auto;">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f621f1b17bbce83"></script>
<!-- AddThis Button END -->
</div>
</div></div>
<div class="full">
<p>To use, draw the character you wish to represent in the grid above (gray is off, orange is on. Click a square to toggle its state. Click and drag to "paint" with that state). Then take the hexadecimal output (two "words" in DCPU-16 assembly) and put them the proper location to be accessed for video RAM use (address <span class="code">0x8180</span> is character 0, <span class="code">0x8182</span> is character 1, all the way to <span class="code">0x8280</span>.)</p>
<p>Sample code (generates character drawn above; try it out on <a href="http://www.0x10co.de/" rel="external">0x10co.de</a>):</p>
<p><strong>Customize:</strong> Glyph slot: <select id="glyphslot" style="margin-right:1em;">
<option value="0">00</option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">0a</option>
<option value="11">0b</option>
<option value="12">0c</option>
<option value="13">0d</option>
<option value="14">0e</option>
<option value="15">0f</option>
<option value="16">10</option>
<option value="17">11</option>
<option value="18">12</option>
<option value="19">13</option>
<option value="20">14</option>
<option value="21">15</option>
<option value="22">16</option>
<option value="23">17</option>
<option value="24">18</option>
<option value="25">19</option>
<option value="26">1a</option>
<option value="27">1b</option>
<option value="28">1c</option>
<option value="29">1d</option>
<option value="30">1e</option>
<option value="31">1f</option>
<option value="32">20 ( )</option>
<option value="33">21 ()!)</option>
<option value="34">22 (")</option>
<option value="35">23 (#)</option>
<option value="36">24 ($)</option>
<option value="37">25 (%)</option>
<option value="38">26 (&)</option>
<option value="39">27 (')</option>
<option value="40">28 "("</option>
<option value="41">29 ")"</option>
<option value="42">2a (*)</option>
<option value="43">2b (+)</option>
<option value="44">2c (,)</option>
<option value="45">2d (-)</option>
<option value="46">2e (.)</option>
<option value="47">2f (/)</option>
<option value="48">30 (0)</option>
<option value="49">31 (1)</option>
<option value="50">32 (2)</option>
<option value="51">33 (3)</option>
<option value="52">34 (4)</option>
<option value="53">35 (5)</option>
<option value="54">36 (6)</option>
<option value="55">37 (7)</option>
<option value="56">38 (8)</option>
<option value="57">39 (9)</option>
<option value="58">3a (:)</option>
<option value="59">3b (;)</option>
<option value="60">3c (<)</option>
<option value="61">3d (=)</option>
<option value="62">3e (>)</option>
<option value="63">3f (?)</option>
<option value="64">40 (@)</option>
<option value="65">41 (A)</option>
<option value="66">42 (B)</option>
<option value="67">43 (C)</option>
<option value="68">44 (D)</option>
<option value="69">45 (E)</option>
<option value="70">46 (F)</option>
<option value="71">47 (G)</option>
<option value="72">48 (H)</option>
<option value="73">49 (I)</option>
<option value="74">4a (J)</option>
<option value="75">4b (K)</option>
<option value="76">4c (L)</option>
<option value="77">4d (M)</option>
<option value="78">4e (N)</option>
<option value="79">4f (O)</option>
<option value="80">50 (P)</option>
<option value="81">51 (Q)</option>
<option value="82">52 (R)</option>
<option value="83">53 (S)</option>
<option value="84">54 (T)</option>
<option value="85">55 (U)</option>
<option value="86">56 (V)</option>
<option value="87">57 (W)</option>
<option value="88">58 (X)</option>
<option value="89">59 (Y)</option>
<option value="90">5a (Z)</option>
<option value="91">5b ([)</option>
<option value="92">5c (\)</option>
<option value="93">5d (])</option>
<option value="94">5e (^)</option>
<option value="95">5f (_)</option>
<option value="96">60 (`)</option>
<option value="97">61 (a)</option>
<option value="98">62 (b)</option>
<option value="99">63 (c)</option>
<option value="100">64 (d)</option>
<option value="101">65 (e)</option>
<option value="102">66 (f)</option>
<option value="103">67 (g)</option>
<option value="104">68 (h)</option>
<option value="105">69 (i)</option>
<option value="106">6a (j)</option>
<option value="107">6b (k)</option>
<option value="108">6c (l)</option>
<option value="109">6d (m)</option>
<option value="110">6e (n)</option>
<option value="111">6f (o)</option>
<option value="112">70 (p)</option>
<option value="113">71 (q)</option>
<option value="114">72 (r)</option>
<option value="115">73 (s)</option>
<option value="116">74 (t)</option>
<option value="117">75 (u)</option>
<option value="118">76 (v)</option>
<option value="119">77 (w)</option>
<option value="120">78 (x)</option>
<option value="121">79 (y)</option>
<option value="122">7a (z)</option>
<option value="123">7b ({)</option>
<option value="124">7c (|)</option>
<option value="125">7d (})</option>
<option value="126">7e (~)</option>
<option value="127">7f (◊)</option>
</select>
Foreground color: <select id="fgcolor" style="margin-right:1em;">
<option value="0">Black</option>
<option value="1">Blue</option>
<option value="2" selected>Green</option>
<option value="3">Cyan</option>
<option value="4">Red</option>
<option value="5">Magenta</option>
<option value="6">Yellow</option>
<option value="7">White</option>
<option value="8">Gray</option>
<option value="9">Bright Blue</option>
<option value="10">Bright Green</option>
<option value="11">Bright Cyan</option>
<option value="12">Bright Red</option>
<option value="13">Bright Magenta</option>
<option value="14">Bright Yellow</option>
<option value="15">Bright White</option>
</select>
Background color: <select id="bgcolor">
<option value="0" selected>Black</option>
<option value="1">Blue</option>
<option value="2">Green</option>
<option value="3">Cyan</option>
<option value="4">Red</option>
<option value="5">Magenta</option>
<option value="6">Yellow</option>
<option value="7">White</option>
<option value="8">Gray</option>
<option value="9">Bright Blue</option>
<option value="10">Bright Green</option>
<option value="11">Bright Cyan</option>
<option value="12">Bright Red</option>
<option value="13">Bright Magenta</option>
<option value="14">Bright Yellow</option>
<option value="15">Bright White</option>
</select>
</p>
<pre class="source assembly"><span class="comment">; Create custom character in slot <span class="slotname">00</span></span>
<span class="opcode">set</span> [0x<span id="charmem1">8180</span>], 0x<span id="code1">0354</span>
<span class="opcode">set</span> [0x<span id="charmem2">8181</span>], 0x<span id="code2">a403</span>
<span class="opcode">set</span> [0x8000], 0x<span id="charcol">f1</span><span class="charslot">00</span> <span class="comment">; Character <span class="slotname">00</span>, <span id="fgname">White</span> foreground, <span id="bgname">blue</span> background</span>
</pre>
<p><em>Note that this feature is not part of the DCPU-16 official specification yet!</em> It has been ascertained that this functionality will be available <a href="http://0x10cwiki.com/wiki/Video_RAM#Leaked_.jar_specification" rel="external">due to leaked JAR files</a>, but may change quickly. This page will strive to keep up with the official specification, when it's officially released.</p>
<hr />
<p class="footer">Built by <a href="http://midnightdesign.ws">MidnightLightning</a> <a href="#122a86c2" title="0x122a 0x86c2">☇</a></p>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1815995-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="inc/jquery-1.7.1.min.js"><\/script>')</script>
<script src="inc/plugins.js"></script>
<script src="inc/script.js"></script>
</body>
</html>