mirror of
https://github.com/pkimpel/retro-b5500.git
synced 2026-04-29 13:23:15 +00:00
Commit DCMCP transcription and emulator WIP as of 2012-06-19.
This commit is contained in:
76
webUI/PanelTest.html
Normal file
76
webUI/PanelTest.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>B5500 Panel Prototype tests</title>
|
||||
|
||||
<style>
|
||||
BODY {
|
||||
background-color: silver}
|
||||
TD {
|
||||
font-size: 4px;
|
||||
width: 12px;
|
||||
height: 16px;
|
||||
border: 2px solid black;
|
||||
border-radius: 8px}
|
||||
</style>
|
||||
|
||||
<script src="../emulator/B5500CentralControl.js"></script>
|
||||
|
||||
<script>
|
||||
var displayRefreshPeriod = 50; // milliseconds
|
||||
var nextRefresh = 0;
|
||||
var refreshTimer = null;
|
||||
|
||||
var cc = new B5500CentralControl();
|
||||
|
||||
var updateDisplay = function() {
|
||||
/* Schedules itself to update the display on a periodic basis. */
|
||||
var bits;
|
||||
var thisTime = new Date().getTime();
|
||||
|
||||
// Schedule ourself for the next period
|
||||
nextRefresh += displayRefreshPeriod;
|
||||
if (nextRefresh < thisTime) {
|
||||
refreshTimer = setTimeout(updateDisplay, 0); // try to catch up
|
||||
} else {
|
||||
refreshTimer = setTimeout(updateDisplay, nextRefresh-thisTime);
|
||||
}
|
||||
|
||||
bits = cc.TM;
|
||||
document.getElementById("CCTM1").style.backgroundColor = (bits & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCTM2").style.backgroundColor = ((bits >>>= 1) & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCTM3").style.backgroundColor = ((bits >>>= 1) & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCTM4").style.backgroundColor = ((bits >>>= 1) & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCTM5").style.backgroundColor = ((bits >>>= 1) & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCTM6").style.backgroundColor = ((bits >>>= 1) & 1 ? "#FF9900" : "#808080");
|
||||
document.getElementById("CCI03F").style.backgroundColor = (cc.CCI03F ? "#FF9900" : "#808080");
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
document.title = "B5500 Processor A";
|
||||
cc.tock();
|
||||
nextRefresh = new Date().getTime();
|
||||
updateDisplay();
|
||||
};
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>Test Reg</legend>
|
||||
<table cellspacing=4 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td id=CCI03F>
|
||||
<td id=CCTM6>
|
||||
<td id=CCTM5>
|
||||
<td id=CCTM4>
|
||||
<td id=CCTM3>
|
||||
<td id=CCTM2>
|
||||
<td id=CCTM1>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div id=wanderer style="position:absolute; top:50px; right:10px; width:12px; height:12px; font-size:4px; border-radius:8px; border:2px solid black; background-color:#FF9900">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user