mirror of
https://github.com/pkimpel/retro-b5500.git
synced 2026-02-11 10:55:09 +00:00
86 lines
3.0 KiB
HTML
86 lines
3.0 KiB
HTML
<html>
|
|
<head>
|
|
<title>B5500 Distribution & Display Processor Panel</title>
|
|
<meta name="Author" content="Williams & Kimpel">
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<link id=defaultStyleSheet rel=stylesheet type="text/css" href="B5500DistributionAndDisplay.css">
|
|
|
|
<script src="B5500DDPanel.js"></script>
|
|
<script src="B5500ProcessorPanel.js"></script>
|
|
|
|
<script>
|
|
var displayRefreshPeriod = 200; // milliseconds
|
|
var lastRefresh = new Date().getTime();
|
|
var nextRefresh = 0;
|
|
var panel;
|
|
var refreshTimer = null;
|
|
var totalDelay = 0;
|
|
var totalIdle = 0;
|
|
var totalTime = 0;
|
|
|
|
var updateDisplay = function updateDisplay() {
|
|
/* Schedules itself to update the display on a periodic basis. */
|
|
var thisTime = new Date().getTime();
|
|
var delta;
|
|
var idle;
|
|
var meter = document.getElementById("idleMeter");
|
|
var that = updateDisplay.that;
|
|
|
|
panel.X.update(Math.random()*0x8000000000);
|
|
panel.A.update((Math.random()/65536+Math.random())*0x1000000000000);
|
|
panel.B.update(Math.random()*0x1000000000000);
|
|
panel.P.update(Math.random()*0x1000000000000);
|
|
panel.J.update(Math.random()*0x10);
|
|
panel.Q.update(Math.random()*0x200000);
|
|
panel.R.update(Math.random()*0x200);
|
|
panel.AROF.update(thisTime%2);
|
|
panel.BROF.update(thisTime%4>>1);
|
|
panel.G.update(Math.random()*0x08);
|
|
panel.H.update(Math.random()*0x08);
|
|
panel.Y.update(Math.random()*0x40);
|
|
panel.Z.update(Math.random()*0x40);
|
|
panel.M.update(Math.random()*0x8000);
|
|
panel.K.update(Math.random()*0x08);
|
|
panel.V.update(Math.random()*0x08);
|
|
panel.N.update(Math.random()*0x10);
|
|
panel.S.update(Math.random()*0x8000);
|
|
panel.PROF.update(thisTime%7);
|
|
panel.T.update(Math.random()*0x1000);
|
|
panel.TROF.update(thisTime%8>>2);
|
|
panel.C.update(Math.random()*0x8000);
|
|
panel.I.update(Math.random()*0x200);
|
|
panel.E.update(Math.random()*0x40);
|
|
panel.TM.update(Math.random()*0x200);
|
|
panel.F.update(Math.random()*0x8000);
|
|
|
|
// Schedule ourself for the next period
|
|
nextRefresh += displayRefreshPeriod;
|
|
delta = nextRefresh-thisTime;
|
|
refreshTimer = setTimeout(updateDisplay, (delta < 0 ? (delta=0) : delta));
|
|
totalTime = (totalTime*99 + displayRefreshPeriod)/100;
|
|
totalDelay = (totalDelay*99 + delta)/100;
|
|
idle = nextRefresh-new Date().getTime();
|
|
totalIdle = (totalIdle*99 + (idle < 0 ? 0 : idle))/100;
|
|
meter.value = (totalIdle/totalTime*100).toFixed(1) + "%";
|
|
};
|
|
|
|
window.onload = function() {
|
|
window.resizeTo(750, 600);
|
|
window.moveTo(screen.availWidth-750, screen.availHeight-600);
|
|
document.title = "B5500 Processor A";
|
|
panel = new B5500ProcessorPanel(window);
|
|
updateDisplay.that = this;
|
|
nextRefresh = new Date().getTime();
|
|
updateDisplay();
|
|
};
|
|
</script>
|
|
</head>
|
|
|
|
<body class="panelBody">
|
|
<div style="text-align:right">
|
|
Idle: <input id=idleMeter type=text size=5 style="text-align:right">
|
|
</div>
|
|
</body>
|
|
</html>
|