forked from lvandeve/logicemu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·152 lines (138 loc) · 5.53 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
<!DOCTYPE html>
<html>
<head>
<title>LogicEmu - Online Logic Simulator</title>
<meta charset="utf-8"/>
<meta name="description" content="LogicEmu - Online Logic Simulator">
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
</head>
<body>
<noscript>
Welcome to LogicEmu, an online logic circuit simulator.
<p>
This requires JavaScript to run. Here are a few options to run it:
<p>
<ul>
<li>Use a browser with enabled JS support to view LogicEmu running here, once loaded it runs locally.</li>
<li>View the source code on <a href="https://github.com/lvandeve/logicemu">github</a></li>
<li>Run LogicEmu offline: download the html and js files from github or with 'view source' here, then open index.html from disk with a browser (offline if you wish).</li>
</ul>
<p>
Even though it's called an 'online' logic simulator since it can be ran
conveniently in the browser, LogicEmu runs completely offline. Once the HTML
and JS got fetched, it doesn't make any further connections. All circuits are
already loaded since they're part of the source code. If you get LogicEmu
from github you can run it offline from your own disk.
<p>
Settings and edited circuit are stored in local storage (not a cookie), which is private
to you, not shared. Sharing has to be done manually, which you can do either
using the source code of a circuit or a base64 URL if it's small enough.
<p>
Screenshot of it running a circuit:
<p>
<img src="screenshot.png" title="LogicEmu screenshot">
<p>
Here are examples of what circuits look like in ASCII:
<font color="gray"><pre>
0"8-Bit Ripple Carry Adder"
"128" "64" "32" "16" "8" "4" "2" "1"
l l l l l l l l
^ ^ ^ ^ ^ ^ ^ ^
l<o<a e o<a e o<a e o<a e o<a e o<a e o<a e o<a e s
^ ^^^/^ ^^^/^ ^^^/^ ^^^/^ ^^^/^ ^^^/^ ^^^/^ ^^^/
a e . a e . a e . a e . a e . a e . a e . a e .
^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
s . s . s . s . s . s . s . s .
. . . . . . . .
s s s s s s s s
0"Wire Crossing from NAND"
...>A....
. ^ v
s...>A..>A>A...>l
v ^ v ^
A.. A..
^ v ^ v
s...>A..>A>A...>l
. v ^
...>A....
0"Shift Register"
1"parallel input"
s s s s s s s s
. . . . . . . .
"W"s.....+.....+.....+.....+.....+.....+.....+.... .
. v . v . v . v . v . v . v . v
.>a.. .>a.. .>a.. .>a.. .>a.. .>a.. .>a.. .>a..
. . v . v . v . v . v . v . v
. .]a>o .]a>o .]a>o .]a>o .]a>o .]a>o .]a>o
. ^ . ^ . ^ . ^ . ^ . ^ . ^
.>d.. .>d.. .>d.. .>d.. .>d.. .>d.. .>d......>l 0"serial output"
c c c c c c c
^ ^ ^ ^ ^ ^ ^
"C"s..............................................
</pre></font>
<h2>Supported Components</h2>
Components are made from letters and symbols:
<ul>
<li>-|/\ — wires</li>
<li>. — wire split, corner</li>
<li>+x* — wire crossings</li>
<li>(space) — isolator</li>
<li>": — text, label, comment</li>
<li>^>v< — gate and device inputs</li>
<li>m]w[ — inverted gate and device inputs</li>
<li>s — switch off</li>
<li>S — switch on</li>
<li>p — pushbutton off</li>
<li>P — pushbutton on</li>
<li>r — timer off</li>
<li>R — timer on</li>
<li>l — LED</li>
<li>a — AND gate</li>
<li>A — NAND gate</li>
<li>o — OR gate</li>
<li>O — NOR gate</li>
<li>e — XOR gate (parity)</li>
<li>E — XNOR gate (parity)</li>
<li>h — XOR gate (one-hot)</li>
<li>H — XNOR gate (one-hot)</li>
<li>f — constant off (fixed)</li>
<li>F — constant on (fixed)</li>
<li>c — counter gate off</li>
<li>C — counter gate on</li>
<li>cCdtjkqQy — flip-flops and latches: SR, JK, D or T, optional asynch set/reset/enable</li>
<li>I — define IC</li>
<li>i — use IC instance</li>
<li>bB — ROM/RAM, predefined bits, encoders/decoders</li>
<li>M — multiplexer (mux, demux)</li>
<li>U — arithmetic logic unit (ALU), built-in mathematical operators</li>
<li>T — terminal screen/keyboard/ASCII/decimal/counter</li>
<li>D — dot-matrix display, RGB LED</li>
<li>N — note/noise (music, speaker)</li>
<li>K — kinetic, various misc components</li>
<li>zZ — tristate buffer</li>
<li>? — random bit generator</li>
<li>J — patch panel jack</li>
<li>g — global backplane wires</li>
<li>u(n) — directed backplane wires</li>
<li>= — bus (wire bundle)</li>
<li>0123456789 — mark colors, timings, indices, bus/backplane connections, alignment, IC ID, ALU op, LSB, sign, ...</li>
<li>$ — autonumber buses</li>
<li>@ — visible isolator, casing</li>
<li># — extend device surface area</li>
<li>&%,VWXY — special compact wires/inputs/crossings</li>
</ul>
<p/>
LogicEmu. Copyright (c) 2018-2021 by Lode Vandevenne
</noscript>
</body>
</html>
<!--the version cgi params are to encourage browsers to update js file cache when new version uploaded, by changing it to new date-->
<script src="editor.js?v=20210805"></script>
<script src="logicemu.js?v=20210805"></script>
<script src="main.js?v=20210805"></script>
<script src="circuits_help.js?v=20210805"></script>
<script src="circuits_articles.js?v=20210805"></script>
<script src="circuits_main.js?v=20210805"></script>
<script src="footer.js?v=20210805"></script>