-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
292 lines (285 loc) · 11.6 KB
/
index.html
File metadata and controls
292 lines (285 loc) · 11.6 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
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<html>
<head>
<title>DogeOS - A 6502 Production via the Web</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="doge.js"></script>
<!-- Globals CONSTANTS and _Variables. Must included be first. -->
<script type="text/javascript" src="distrib/globals.js"></script>
<!-- Host (Virtual Machine / Hardware Simulation) Routines -->
<script type="text/javascript" src="distrib/host/control.js"></script>
<script type="text/javascript" src="distrib/host/devices.js"></script>
<script type="text/javascript" src="distrib/host/memory.js"></script>
<script type="text/javascript" src="distrib/host/cpu.js"></script>
<script type="text/javascript" src="distrib/host/filesystem.js"></script>
<!-- Virtual OS Routines: Make sure Kernel code is last, since it needs those above it. -->
<script type="text/javascript" src="distrib/os/interrupt.js"></script>
<script type="text/javascript" src="distrib/os/canvastext.js"></script>
<script type="text/javascript" src="distrib/os/console.js"></script>
<script type="text/javascript" src="distrib/os/deviceDriver.js"></script>
<script type="text/javascript" src="distrib/os/deviceDriverKeyboard.js"></script>
<script type="text/javascript" src="distrib/os/deviceDriverFileSys.js"></script>
<script type="text/javascript" src="distrib/os/queue.js"></script>
<script type="text/javascript" src="distrib/os/memoryManager.js"></script>
<script type="text/javascript" src="distrib/os/processManager.js"></script>
<script type="text/javascript" src="distrib/os/pcb.js"></script>
<script type="text/javascript" src="distrib/os/CPUScheduler.js"></script>
<script type="text/javascript" src="distrib/os/fileSystemManager.js"></script>
<script type="text/javascript" src="distrib/os/shell.js"></script>
<script type="text/javascript" src="distrib/os/shellCommand.js"></script>
<script type="text/javascript" src="distrib/os/userCommand.js"></script>
<script type="text/javascript" src="distrib/os/kernel.js"></script>
<!-- Other Routines -->
<script type="text/javascript" src="distrib/utils.js"></script>
<!-- Uncomment this line below to enable GLaDOS testing -->
<!-- <script type="text/javascript" src="glados-ip4.js"></script> -->
<style type="text/css">
body {
background: url('1RJQsV.png') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#console {
font-family: courier, monospace;
border-bottom: 2px solid #b31b1b;
border-top: 2px solid #b31b1b;
border-left: 2px solid #b31b1b;
border-right: 2px solid #b31b1b;
color: #fff;
width: 600px;
height: 500px;
position: absolute;
margin-left:10px;
margin-right:auto;
margin-top:20px;
font-size:14px;
}
#top-buttons {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #241E22;
height: 50px;
}
@font-face {
font-family: DogeOS;
src: url(DogeSans-Regular.otf);
}
#DogeOS {
font-family: DogeOS;
font-size:250%;
position: relative;
top: 7px;
color: #C69539;
}
#Status {
font-family: DogeOS;
font-size:150%;
position: relative;
top: 3px;
color: #C69539;
}
#DogeOSLabel {
font-family: DogeOS;
font-size:150%;
color: #C69539;
}
#rightSide {
position: absolute;
left: 625px;
width:500px;
height: 750px;
margin-top:5px;
}
#taProgramInput {
font-family: DogeOS;
display: block;
background: transparent;
width: 100%;
color: #C69539;
}
#taReadyQueue {
font-family: DogeOS;
display: block;
background: transparent;
width: 100%;
color: #C69539;
}
#memoryInfoTable {
font-family: DogeOS;
color: #C69539;
}
#taHostLog {
font-family: DogeOS;
display: block;
background: transparent;
width: 100%;
color: #C69539;
}
</style>
</head>
<body onload="onDocumentLoad()">
<div id='top-buttons'>
<img src="R5r163F.gif" style="" width="145px" height="145px">
<span id="DogeOS"> DogeOS </span>
<input type="button" id = "btnStartOS" name="brnStartOS" class="btn btn-success btn-lg" style="" value="Start" tabindex="0" onclick="TSOS.Control.hostBtnStartOS_click(this);">
<input type="button" id = "btnHaltOS" name="brnHaltOS" class="btn btn-danger btn-lg" disabled="disabled" value="Halt" tabindex="1" onclick="TSOS.Control.hostBtnHaltOS_click(this);">
<input type="button" id = "btnReset" name="brnReset" class="btn btn-warning btn-lg" disabled="disabled" value="Reset" tabindex="2" onclick="TSOS.Control.hostBtnReset_click(this);">
<input type="button" id = "btnCPUStepMode" name="btnCPUStepMode" class="btn btn-info btn-lg" style="width:225px" disabled="disabled" value="Single Step Mode [OFF]" tabindex="2" onclick="TSOS.Control.singleCPUStepMode(this);">
<input type="button" id = "btnSingleStepCPU"name="brnSingleStepCPU" class="btn btn-success btn-lg" disabled="disabled" value="Step CPU" tabindex="2" onclick="TSOS.Control.allowCPUStep(this);">
<span id="Status">Time: [<span id="timeArea">xx:xx:xx x/x/x</span>] || Status: <span id="statusArea">No Status....yet....</span></span>
</div>
<div id="console">
<canvas id="display" width="0%" height="0%" tabindex="3"></canvas>
<div id="inputArea">
<span id="DogeOSLabel"> User Input: </span>
<!--
Dom is love: A9 00 8D EC 00 A9 00 8D EC 00 A9 00 8D ED 00 A9 00 8D ED 00 A9 00 8D EE 00 A9 00 8D EF 00 AD ED 00 8D FF 00 AE FF 00 A9 00 8D FF 00 EC FF 00 D0 BA AD EC 00 8D FF 00 A9 01 6D FF 00 8D EC 00 AD EC 00 8D FF 00 AE FF 00 A9 03 8D FF 00 EC FF 00 D0 05 A9 01 8D ED 00 A9 00 8D EE 00 A9 00 8D EF 00 AD EF 00 8D FF 00 AE FF 00 A9 00 8D FF 00 EC FF 00 D0 49 AD EE 00 8D FF 00 A9 01 6D FF 00 8D EE 00 AD EE 00 8D FF 00 AE FF 00 A9 02 8D FF 00 EC FF 00 D0 05 A9 01 8D EF 00 A9 F8 8D FF 00 A2 02 AC FF 00 FF AD EE 00 A2 01 8D FF 00 AC FF 00 FF A9 00 8D FF 00 A2 01 EC FF 00 D0 A4 A9 F1 8D FF 00 A2 02 AC FF 00 FF AD EC 00 A2 01 8D FF 00 AC FF 00 FF A9 EE 8D FF 00 A2 02 AC FF 00 FF A9 00 8D FF 00 A2 01 EC FF 00 D0 33 00 00 00 20 20 00 20 6F 75 74 65 72 00 20 69 6E 6E 65 72 00 00 -->
<textarea name="taProgramInput" id="taProgramInput" rows="5">A9 A9 A2 01 EC 13 00 AC 0B 00 8D 14 00 EE 0B 00 D0 F5 00 00</textarea>
</div>
</div>
<div id="rightSide">
<!----------------------------------------------------------------------------------->
<span id="DogeOSLabel"> CPU Status: <span id="SchedulingMode">Round Robin</span></span>
<div class="panel panel-default" style="margin-bottom: 0px;">
<table id="processTable" class="table">
<tbody><tr>
<th>Instr</th>
<th>PC</th>
<th>Acc</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
</tr>
<tr>
<td id="cpu.pc">0</td>
<td id="cpu.instr">N/A</td>
<td id="cpu.acc">0</td>
<td id="cpu.xreg">0</td>
<td id="cpu.yreg">0</td>
<td id="cpu.zflag">0</td>
</tr>
</tbody>
</table>
</div>
<!----------------------------------------------------------------------------------->
<span id="DogeOSLabel"> Process Manager: </span>
<ul class="nav nav-tabs" style="" >
<li class="active" style="width:50%"><a data-toggle="tab" class="btn btn-info" href="#ReadyQueue">Ready Queue</a></li>
<li style="width:50%"><a data-toggle="tab" class="btn btn-info" href="#TerminatedSlashCompleted">Terminated / Completed</a></li>
</ul>
<div class="tab-content">
<div id="ReadyQueue" class="tab-pane fade in active" style="max-height: 170px;overflow:hidden;">
<div class="panel panel-default" style="margin-bottom: 0px;">
<table id="ReadyQueueTable" class="table">
<tbody id="ReadyQueueTableData"><tr style="font-size: 0.775em;padding: 0px;">
<th>PID</th>
<th>Loc</th>
<th>State</th>
<th>PC</th>
<th>Acc</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
<th>Base</th>
<th>Turn</th>
<th>Wait</th>
</tr>
</tbody>
</table>
</div>
</div>
<div id="TerminatedSlashCompleted" class="tab-pane fade" style="max-height: 170px;overflow:hidden;">
<div class="panel panel-default" style="margin-bottom: 0px;">
<table id="TerminatedSlashCompletedTable" class="table">
<tbody id="TerminatedSlashCompletedTableData"><tr style="font-size: 0.775em;padding: 0px;">
<th>PID</th>
<th>State</th>
<th>PC</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
<th>Base</th>
<th>Turn</th>
<th>Wait</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!----------------------------------------------------------------------------------->
<span id="DogeOSLabel"> Memory: </span>
<ul class="nav nav-tabs" style="" >
<li class="active" style="width:50%"><a data-toggle="tab" class="btn btn-info" href="#MainMemory">Main Memory</a></li>
<li style="width:50%"><a data-toggle="tab" class="btn btn-info" href="#Swap">HDD (Swap)</a></li>
</ul>
<div class="tab-content">
<div id="MainMemory" class="tab-pane fade in active" style="max-height: 150px;overflow-y: scroll;">
<table class="table tableText" id="memoryInfoTable" >
<thead>
<th>POS</th>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
</thead>
<tbody id="MemoryBody">
<tr><td style="padding: 0px;">Not Initialized</td><tr>
</tbody>
</table>
</div>
<div id="Swap" class="tab-pane fade" style="max-height: 150px;overflow-y: scroll;">
<table class="table tableText" id="memoryInfoTable" >
<thead>
<th style="font-size: 0.875em;padding: 0px 15px 0px 0px;">[T,S,B]</th>
<th style="font-size: 0.875em;padding: 0px 6px 0px 0px;">Bit</th>
<th style="font-size: 0.875em;padding: 0px 6px 0px 0px;">Head</th>
<th style="font-size: 0.875em;padding: 0px;">Data</th>
</thead>
<tbody id="HDDBody">
<tr><td style="padding: 0px;">Not Initialized</td><tr>
</tbody>
</table>
</div>
<!----------------------------------------------------------------------------------->
<span id="DogeOSLabel"> Host Log: </span>
<textarea name="taHostLog" id="taHostLog" rows="5"></textarea>
</div>
<script>
document.getElementById('display').setAttribute("height",document.getElementById('console').offsetHeight-4);
document.getElementById('display').setAttribute("width",document.getElementById('console').offsetWidth-4);
function startTime() {
var today = new Date(); // grab the latest timestamp from the browser!
var year = today.getFullYear();
var month = today.getMonth();
var day = today.getDay();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m); // make sure to check for leading zeros...wouldnt want to be incorrect!
s = checkTime(s);
document.getElementById('timeArea').innerHTML =
month + "/" + day + "/" + year + " " + h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
//should we have a zero infront of things?
if (i < 10) {i = "0" + i};
return i;
}
startTime();
</script>
<!-- load these last as they break everything! -->
<audio id="BSOD_jingle" preload="auto" style="width:0px;"><source src="BSOD.m4a" type="audio/mp4" /></audio>
<audio id="music" preload="auto" style="width:0px;"><source src="music.m4a" type="audio/mp4" /></audio>
<img id="BSOD_image" src="BSOD.jpg" style="visibility: hidden;position: absolute;">
</body>
</html>