mirror of
https://github.com/pkimpel/retro-b5500.git
synced 2026-05-01 14:06:50 +00:00
1. Commit version 0.03 of emulator and tools: this version successfully performs a hardware load from the disk and initiates the MCP.
2. Redesign B5500Console.html to support the Power On, Power Off, Halt, and Load buttons, along with a primitive mechanism to drive the Normal/Control lights. 3. Implement relative URLs for the <script> elements. This is a work in progress. 4. Commit Nigel's fix for the annoying problem with Firefox where typing "/" on the SPO brings up a QuickFind dialog. 5. Commit Mark XIII DCMCP transcription as of 2013-03-20. 6. Move B5500ColdLoader and KERNEL.DISK under webUI directory tree.
This commit is contained in:
@@ -7,107 +7,122 @@
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<link id=defaultStyleSheet rel=stylesheet type="text/css" href="B5500Console.css">
|
||||
|
||||
<script src="/B5500/B5500DummyUnit.js"></script>
|
||||
<script src="/B5500/B5500SPOUnit.js"></script>
|
||||
<script src="/B5500/B5500DiskUnit.js"></script>
|
||||
<script src="./B5500DummyUnit.js"></script>
|
||||
<script src="./B5500SPOUnit.js"></script>
|
||||
<script src="./B5500DiskUnit.js"></script>
|
||||
|
||||
<script src="/B5500EMU/B5500SystemConfiguration.js"></script>
|
||||
<script src="/B5500EMU/B5500CentralControl.js"></script>
|
||||
<script src="/B5500EMU/B5500Processor.js"></script>
|
||||
<script src="/B5500EMU/B5500IOUnit.js"></script>
|
||||
<script src="../emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="../emulator/B5500CentralControl.js"></script>
|
||||
<script src="../emulator/B5500Processor.js"></script>
|
||||
<script src="../emulator/B5500IOUnit.js"></script>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var aControl;
|
||||
var aNormal;
|
||||
var bControl;
|
||||
var bNormal;
|
||||
var boundBlinkenlicht;
|
||||
var cc = new B5500CentralControl();
|
||||
var paPanel;
|
||||
var paState = 0;
|
||||
var paTimer = null;
|
||||
var pbState = 0;
|
||||
var pbTimer = null;
|
||||
var timer;
|
||||
var timerInterval = 50; // milliseconds
|
||||
|
||||
var PAStateChange = function() {
|
||||
var aNormal = document.getElementById("ANormalBtn");
|
||||
var aControl = document.getElementById("AControlBtn");
|
||||
var delay = Math.random();
|
||||
function $$(id) {
|
||||
return document.getElementById(id)
|
||||
}
|
||||
|
||||
if (paState || !pbState) { // PA will go to Normal State onlyl if PB is already in Normal State
|
||||
paState = 0;
|
||||
aNormal.className = "yellowButton";
|
||||
aControl.className = "yellowButton yellowLit";
|
||||
delay = Math.log(delay+1)*250;
|
||||
} else {
|
||||
paState = 1;
|
||||
aNormal.className = "yellowButton yellowLit";
|
||||
aControl.className = "yellowButton";
|
||||
delay = Math.log(2-delay)*delay*250;
|
||||
}
|
||||
paTimer = setTimeout(PAStateChange, delay);
|
||||
};
|
||||
function bindMethod(f, context) {
|
||||
return function() {f.apply(context, arguments)};
|
||||
}
|
||||
|
||||
var PBStateChange = function() {
|
||||
var bNormal = document.getElementById("BNormalBtn");
|
||||
var delay = Math.random();
|
||||
|
||||
if (pbState) {
|
||||
pbState = 0;
|
||||
bNormal.className = "yellowButton";
|
||||
delay = Math.log(delay+1)*1000;
|
||||
} else {
|
||||
pbState = 1;
|
||||
bNormal.className = "yellowButton yellowLit";
|
||||
delay = Math.log(2-delay)*delay*delay*1000;
|
||||
}
|
||||
pbTimer = setTimeout(PBStateChange, delay);
|
||||
};
|
||||
|
||||
var PowerOnBtn_Click = function() {
|
||||
document.getElementById("PowerOnBtn").className = "whiteButton whiteLit";
|
||||
document.getElementById("AControlBtn").className = "yellowButton yellowLit";
|
||||
paState = pbState = 0;
|
||||
paTimer = setTimeout(PAStateChange, 3000);
|
||||
pbTimer = setTimeout(PBStateChange, 10000);
|
||||
function PowerOnBtn_Click(ev) {
|
||||
$$("PowerOnBtn").className = "whiteButton whiteLit";
|
||||
$$("AControlBtn").className = "yellowButton yellowLit";
|
||||
cc.powerOn();
|
||||
/******
|
||||
if (!paPanel) {
|
||||
paPanel = window.open("B5500ProcessorPanel.html", "PAPanel", "resizable=yes,scrollbars=yes,width=1,height=1");
|
||||
}
|
||||
*****/
|
||||
$$("LoadBtn").disabled = false;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
var PowerOffBtn_Click = function() {
|
||||
paState = pbSate = 0;
|
||||
document.getElementById("PowerOnBtn").className = "whiteButton";
|
||||
document.getElementById("ANormalBtn").className = "yellowButton";
|
||||
document.getElementById("AControlBtn").className = "yellowButton";
|
||||
document.getElementById("BNormalBtn").className = "yellowButton";
|
||||
function PowerOffBtn_Click(ev) {
|
||||
$$("PowerOnBtn").className = "whiteButton";
|
||||
$$("ANormalBtn").className = "yellowButton";
|
||||
$$("AControlBtn").className = "yellowButton";
|
||||
$$("BNormalBtn").className = "yellowButton";
|
||||
cc.powerOff();
|
||||
/*****
|
||||
if (paPanel) {
|
||||
paPanel.close();
|
||||
paPanel = null;
|
||||
}
|
||||
*****/
|
||||
if (paTimer) {
|
||||
clearTimeout(paTimer);
|
||||
paTimer = null;
|
||||
}
|
||||
if (pbTimer) {
|
||||
clearTimeout(pbTimer);
|
||||
pbTimer = null;
|
||||
$$("HaltBtn").disabled = true;
|
||||
$$("LoadBtn").disabled = true;
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
function HaltBtn_Click(ev) {
|
||||
cc.halt();
|
||||
$$("HaltBtn").disabled = true;
|
||||
$$("LoadBtn").disabled = false;
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
function LoadBtn_Click(ev) {
|
||||
cc.load();
|
||||
$$("HaltBtn").disabled = false;
|
||||
$$("LoadBtn").disabled = true;
|
||||
boundBlinkenlicht();
|
||||
}
|
||||
|
||||
function dasBlinkenlicht() {
|
||||
var pa = cc.PA;
|
||||
var pb = cc.PB;
|
||||
|
||||
if (pa) {
|
||||
if (!pa.busy) {
|
||||
aControl.className = "yellowButton";
|
||||
aNormal.className = "yellowButton";
|
||||
} else if (pa.NCSF) {
|
||||
aControl.className = "yellowButton";
|
||||
aNormal.className = "yellowButton yellowLit";
|
||||
} else {
|
||||
aNormal.className = "yellowButton";
|
||||
if (pa === cc.P1) {
|
||||
aControl.className = "yellowButton yellowLit";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pb) {
|
||||
if (!pb.busy) {
|
||||
bControl.className = "yellowButton";
|
||||
bNormal.className = "yellowButton";
|
||||
} else if (pb.NCSF) {
|
||||
bControl.className = "yellowButton";
|
||||
bNormal.className = "yellowButton yellowLit";
|
||||
} else {
|
||||
bNormal.className = "yellowButton";
|
||||
if (pb === cc.P1) {
|
||||
bControl.className = "yellowButton yellowLit";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
timer = setTimeout(boundBlinkenlicht, timerInterval);
|
||||
}
|
||||
|
||||
/***** window.onload() outer block *****/
|
||||
|
||||
document.getElementById("PowerOnBtn").onclick = function() {
|
||||
return PowerOnBtn_Click();
|
||||
};
|
||||
$$("PowerOnBtn").addEventListener("click", PowerOnBtn_Click);
|
||||
$$("PowerOffBtn").addEventListener("click", PowerOffBtn_Click);
|
||||
$$("HaltBtn").addEventListener("click", HaltBtn_Click);
|
||||
$$("LoadBtn").addEventListener("click", LoadBtn_Click);
|
||||
|
||||
document.getElementById("PowerOffBtn").onclick = function() {
|
||||
return PowerOffBtn_Click();
|
||||
};
|
||||
aControl = $$("AControlBtn");
|
||||
aNormal = $$("ANormalBtn");
|
||||
bControl = $$("BControlBtn");
|
||||
bNormal = $$("BNormalBtn");
|
||||
boundBlinkenlicht = bindMethod(dasBlinkenlicht, this);
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
@@ -115,11 +130,11 @@ window.onload = function() {
|
||||
<body>
|
||||
|
||||
<div id=consoleDiv>
|
||||
<button id=HaltBtn class=blackButton>HALT</button>
|
||||
<button id=HaltBtn class=blackButton DISABLED>HALT</button>
|
||||
|
||||
<button id=NotReadyBtn class=yellowButton>NOT READY</button>
|
||||
<button id=LoadSelectBtn class=blackButton>LOAD SELECT</button>
|
||||
<button id=LoadBtn class=blackButton>LOAD</button>
|
||||
<button id=LoadBtn class=blackButton DISABLED>LOAD</button>
|
||||
|
||||
<button id=MemoryCheckBtn class=yellowButton>MEMORY CHECK</button>
|
||||
<button id=ANormalBtn class=yellowButton>A NORMAL</button>
|
||||
|
||||
@@ -23,25 +23,25 @@ function B5500SPOUnit(mnemonic, unitIndex, designate, statusChange, signal) {
|
||||
|
||||
this.maxScrollLines = 500; // Maximum amount of printer scrollback
|
||||
this.charPeriod = 100; // Printer speed, milliseconds per character
|
||||
|
||||
|
||||
this.mnemonic = mnemonic; // Unit mnemonic
|
||||
this.unitIndex = unitIndex; // Ready-mask bit number
|
||||
this.designate = designate; // IOD unit designate number
|
||||
this.statusChange = statusChange; // external function to call for ready-status change
|
||||
this.signal = signal; // external function to call for special signals (e.g,. SPO input request)
|
||||
|
||||
|
||||
this.clear();
|
||||
|
||||
|
||||
this.backspaceChar.that = this; // Store object context for these functions
|
||||
this.printChar.that = this;
|
||||
this.outputChar.that = this;
|
||||
this.outputChar.that = this;
|
||||
|
||||
this.window = window.open("", "SPOWin");
|
||||
if (this.window) {
|
||||
this.window.close(); // destroy the previously-existing window
|
||||
this.window = null;
|
||||
}
|
||||
this.window = window.open("/B5500/B5500SPOUnit.html", "SPOWin", "scrollbars,resizable,width=600,height=500");
|
||||
this.window = window.open("./B5500SPOUnit.html", "SPOWin", "scrollbars,resizable,width=600,height=500");
|
||||
this.window.onload = function() {
|
||||
that.spoOnload();
|
||||
};
|
||||
@@ -53,7 +53,7 @@ B5500SPOUnit.prototype.spoLocal = 1;
|
||||
B5500SPOUnit.prototype.spoRemote = 2;
|
||||
B5500SPOUnit.prototype.spoInput = 3;
|
||||
B5500SPOUnit.prototype.spoOutput = 4;
|
||||
|
||||
|
||||
B5500SPOUnit.prototype.keyFilter = [ // Filter keyCode values to valid B5500 ones
|
||||
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, // 00-0F
|
||||
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, // 10-1F
|
||||
@@ -88,7 +88,7 @@ B5500SPOUnit.prototype.clear = function() {
|
||||
this.spoLocalRequested = false; // LOCAL button pressed while active
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.hasClass = function(e, name) {
|
||||
/* returns true if element "e" has class "name" in its class list */
|
||||
var classes = e.className;
|
||||
@@ -148,7 +148,7 @@ B5500SPOUnit.prototype.setLocal = function() {
|
||||
this.addClass(this.$$("SPOLocalBtn"), "yellowLit");
|
||||
this.removeClass(this.$$("SPORemoteBtn"), "yellowLit");
|
||||
this.statusChange(0);
|
||||
|
||||
|
||||
// Set up to echo characters from the keyboard
|
||||
this.buffer = null;
|
||||
this.bufLength = 0;
|
||||
@@ -173,11 +173,11 @@ B5500SPOUnit.prototype.setRemote = function() {
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.appendEmptyLine = function() {
|
||||
/* Removes excess lines already printed, then appends a new <pre> element
|
||||
/* Removes excess lines already printed, then appends a new <pre> element
|
||||
to the <iframe>, creating an empty text node inside the new element */
|
||||
var count = this.paper.childNodes.length;
|
||||
var line = document.createElement("pre");
|
||||
|
||||
|
||||
while (count-- > this.maxScrollLines) {
|
||||
this.paper.removeChild(this.paper.firstChild);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ B5500SPOUnit.prototype.appendEmptyLine = function() {
|
||||
this.paper.appendChild(line);
|
||||
line.scrollIntoView();
|
||||
};
|
||||
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.backspaceChar = function backspaceChar() {
|
||||
/* Handles backspace for SPO input */
|
||||
@@ -194,7 +194,7 @@ B5500SPOUnit.prototype.backspaceChar = function backspaceChar() {
|
||||
|
||||
if (that.bufLength > 0) {
|
||||
that.bufIndex--;
|
||||
}
|
||||
}
|
||||
if (that.printCol > 0) {
|
||||
that.printCol--;
|
||||
}
|
||||
@@ -218,13 +218,13 @@ B5500SPOUnit.prototype.printChar = function printChar(c) {
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.outputChar = function outputChar() {
|
||||
/* Outputs one character from the buffer to the SPO. If more characters remain
|
||||
/* Outputs one character from the buffer to the SPO. If more characters remain
|
||||
to be printed, schedules itself 100 ms later to print the next one, otherwise
|
||||
calls finished(). If the column counter exceeds 72, a CR/LF pair is output.
|
||||
A CR/LF pair is also output at the end of the message. Note the use of the local
|
||||
function property "that" (initialized in the constructor), which supplies the
|
||||
necessary SPOUnit object context across setTimeout() calls */
|
||||
var that = outputChar.that; // retrieve our object context
|
||||
var that = outputChar.that; // retrieve our object context
|
||||
var nextTime = that.nextCharTime + that.charPeriod;
|
||||
var delay = nextTime - new Date().getTime();
|
||||
|
||||
@@ -235,16 +235,16 @@ B5500SPOUnit.prototype.outputChar = function outputChar() {
|
||||
that.bufIndex++;
|
||||
that.printCol++;
|
||||
setTimeout(that.outputChar, delay);
|
||||
} else { // set up for the final CR/LF
|
||||
} else { // set up for the final CR/LF
|
||||
that.printCol = 72;
|
||||
setTimeout(that.outputChar, delay);
|
||||
}
|
||||
} else if (that.printCol == 72) { // delay to fake the output of a new-line
|
||||
} else if (that.printCol == 72) { // delay to fake the output of a new-line
|
||||
that.printCol++;
|
||||
setTimeout(that.outputChar, delay+that.charPeriod);
|
||||
} else { // actually output the CR/LF
|
||||
} else { // actually output the CR/LF
|
||||
that.appendEmptyLine();
|
||||
if (that.bufIndex < that.bufLength) {
|
||||
if (that.bufIndex < that.bufLength) {
|
||||
that.printCol = 0; // more characters to print after the CR/LF
|
||||
setTimeout(that.outputChar, delay);
|
||||
} else { // message text is exhausted
|
||||
@@ -257,11 +257,11 @@ B5500SPOUnit.prototype.outputChar = function outputChar() {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.terminateInput = function() {
|
||||
/* Handles the End of Message event. Turns off then Input Request lamp, then
|
||||
calls outputChar(), which will find bufIndex==bufLength, output a new-line,
|
||||
calls outputChar(), which will find bufIndex==bufLength, output a new-line,
|
||||
set the state to Remote, and call finish() for us. Slick, eh? */
|
||||
|
||||
if (this.spoState == this.spoInput) {
|
||||
@@ -271,10 +271,10 @@ B5500SPOUnit.prototype.terminateInput = function() {
|
||||
this.outputChar();
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.cancelInput = function() {
|
||||
/* Handles the Error message event. This is identical to terminateInput(),
|
||||
/* Handles the Error message event. This is identical to terminateInput(),
|
||||
but it also sets a parity error so the input message will be rejected */
|
||||
|
||||
if (this.spoState = this.spoInput) {
|
||||
@@ -285,9 +285,9 @@ B5500SPOUnit.prototype.cancelInput = function() {
|
||||
this.outputChar();
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.keyPress = function(ev) {
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.keyPress = function(ev) {
|
||||
/* Handles keyboard character events. Depending on the state of the unit,
|
||||
either buffers the character for transmission to the I/O Unit, simply echos
|
||||
it to the printer, or ignores it altogether */
|
||||
@@ -332,7 +332,7 @@ B5500SPOUnit.prototype.keyPress = function(ev) {
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.keyDown = function(ev) {
|
||||
/* Handles key-down events to capture ESC, BS, and Enter keystrokes */
|
||||
@@ -394,7 +394,7 @@ B5500SPOUnit.prototype.keyDown = function(ev) {
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.printText = function(msg, finish) {
|
||||
/* Utility function to convert a string to a Typed Array buffer and queue
|
||||
it for printing. This is intended only for printing an initialization message
|
||||
it for printing. This is intended only for printing an initialization message
|
||||
in Local state */
|
||||
var buf = new Uint8Array(msg.length);
|
||||
var length = msg.length;
|
||||
@@ -425,7 +425,7 @@ B5500SPOUnit.prototype.spoOnload = function() {
|
||||
"PRE {margin: 0; font-size: 10pt; font-family: Lucida Sans Typewriter, Courier New, Courier, monospace}" +
|
||||
"</style>";
|
||||
|
||||
this.window.resizeTo(this.window.outerWidth+this.$$("SPODiv").scrollWidth-this.window.innerWidth+8,
|
||||
this.window.resizeTo(this.window.outerWidth+this.$$("SPODiv").scrollWidth-this.window.innerWidth+8,
|
||||
this.window.outerHeight+this.$$("SPODiv").scrollHeight-this.window.innerHeight+8);
|
||||
this.window.moveTo(0/*screen.availWidth-this.window.outerWidth-8*/, screen.availHeight-this.window.outerHeight-8);
|
||||
this.window.focus();
|
||||
@@ -459,10 +459,12 @@ B5500SPOUnit.prototype.spoOnload = function() {
|
||||
};
|
||||
|
||||
this.window.onkeypress = function(ev) {
|
||||
if (ev.keyCode == 191) ev.preventDefault();
|
||||
that.keyPress(ev);
|
||||
};
|
||||
|
||||
this.window.onkeydown = function(ev) {
|
||||
if (ev.keyCode == 191) ev.preventDefault();
|
||||
that.keyDown(ev);
|
||||
};
|
||||
|
||||
@@ -479,11 +481,11 @@ B5500SPOUnit.prototype.spoOnload = function() {
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.read = function(finish, buffer, length, mode, control) {
|
||||
/* Initiates a read operation on the unit */
|
||||
|
||||
|
||||
this.errorMask = 0;
|
||||
switch (this.spoState) {
|
||||
case this.spoRemote:
|
||||
this.spoState = this.spoInput;
|
||||
this.spoState = this.spoInput;
|
||||
this.addClass(this.$$("SPOInputRequestBtn"), "yellowLit");
|
||||
this.buffer = buffer;
|
||||
this.bufLength = length;
|
||||
@@ -540,34 +542,34 @@ B5500SPOUnit.prototype.write = function(finish, buffer, length, mode, control) {
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.erase = function(finish, length) {
|
||||
/* Initiates an erase operation on the unit */
|
||||
|
||||
|
||||
finish(0x04, 0); // report unit not ready
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.rewind = function(finish) {
|
||||
/* Initiates a rewind operation on the unit */
|
||||
|
||||
|
||||
finish(0x04, 0); // report unit not ready
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.readCheck = function(finish, length, control) {
|
||||
/* Initiates a read check operation on the unit */
|
||||
|
||||
|
||||
finish(0x04, 0); // report unit not ready
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.readInterrogate = function(finish, control) {
|
||||
/* Initiates a read interrogate operation on the unit */
|
||||
|
||||
|
||||
finish(0x04, 0); // report unit not ready
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
B5500SPOUnit.prototype.writeInterrogate = function (finish, control) {
|
||||
/* Initiates a write interrogate operation on the unit */
|
||||
|
||||
|
||||
finish(0x04, 0); // report unit not ready
|
||||
};
|
||||
|
||||
2009
webUI/tools/B5500ColdLoader.html
Normal file
2009
webUI/tools/B5500ColdLoader.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,23 +7,24 @@
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<link id=defaultStyleSheet rel=stylesheet type="text/css" href="B5500SyllableDebugger.css">
|
||||
|
||||
<script src="/B5500/B5500DummyUnit.js"></script>
|
||||
<script src="/B5500/B5500SPOUnit.js"></script>
|
||||
<script src="/B5500/B5500DiskUnit.js"></script>
|
||||
<script src="/B5500/webUI/B5500DummyUnit.js"></script>
|
||||
<script src="/B5500/webUI/B5500SPOUnit.js"></script>
|
||||
<script src="/B5500/webUI/B5500DiskUnit.js"></script>
|
||||
|
||||
<script src="/B5500EMU/B5500SystemConfiguration.js"></script>
|
||||
<script src="/B5500EMU/B5500CentralControl.js"></script>
|
||||
<script src="/B5500EMU/B5500Processor.js"></script>
|
||||
<script src="/B5500EMU/B5500IOUnit.js"></script>
|
||||
<script src="/B5500/emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="/B5500/emulator/B5500CentralControl.js"></script>
|
||||
<script src="/B5500/emulator/B5500Processor.js"></script>
|
||||
<script src="/B5500/emulator/B5500IOUnit.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const timerCycles = 1000; // Number of instructions per pseudo-timer interrupt
|
||||
var runningCycles = 1000; // Number of instructions per run-mode interval
|
||||
|
||||
var cc;
|
||||
var injected = false; // true if syllable manually injected into T
|
||||
var memAddr = 0x40; // @100
|
||||
var running = false; // true if in run mode
|
||||
var runSilently = false; // true if system state is not to be refreshed after each step
|
||||
var stopAddress = 0; // run-until-address stop point
|
||||
|
||||
@@ -647,6 +648,15 @@ function displaySystemState() {
|
||||
//window.focus();
|
||||
}
|
||||
|
||||
function establishSilence(beQuiet) {
|
||||
/* Maintains synchronization between the global "runSilently" flag, the
|
||||
RunSilently checkbox, and cc.inhCCI03F */
|
||||
|
||||
runSilently = beQuiet;
|
||||
cc.inhCCI03F = !(beQuiet && running);
|
||||
$$("RunSilently").checked = beQuiet;
|
||||
}
|
||||
|
||||
function goIt(ev) {
|
||||
/* Branches to the location specified by the C and L registers: loads
|
||||
P and T to set up for the execution of the instruction at that syllable
|
||||
@@ -689,7 +699,7 @@ function runIt(ev) {
|
||||
/* Steps through instructions continuously until the C register matches the
|
||||
StopAddr address. StopAddr can be changed while running. Setting it to zero
|
||||
(or blank) will halt the continuous stepping */
|
||||
var count = timerCycles;
|
||||
var count = runningCycles;
|
||||
var runBtn = $$("RunBtn");
|
||||
var saveStopAddress = stopAddress;
|
||||
var stopAddr = $$("StopAddr");
|
||||
@@ -708,9 +718,7 @@ function runIt(ev) {
|
||||
}
|
||||
***************************/
|
||||
if (--count <= 0) {
|
||||
count = timerCycles;
|
||||
cc.CCI03F = 1; // set timer interrupt
|
||||
cc.signalInterrupt();
|
||||
count = runningCycles;
|
||||
break; // exit loop to pick up events
|
||||
}
|
||||
} while (runSilently && stopAddress && cc.P1.C != stopAddress);
|
||||
@@ -724,11 +732,15 @@ function runIt(ev) {
|
||||
stopAddress = 0; // bad address
|
||||
stopAddr.style.backgroundColor = "red";
|
||||
runBtn.value = "Run";
|
||||
running = false;
|
||||
cc.inhCCI03F = true;
|
||||
} else {
|
||||
stopAddress = saveStopAddress;
|
||||
stopAddr.style.backgroundColor = "";
|
||||
stopAddr.value = padOctal(stopAddress, stopAddr.maxLength);
|
||||
runBtn.value = "Run";
|
||||
running = false;
|
||||
cc.inhCCI03F = true;
|
||||
if (runSilently) {
|
||||
displaySystemState();
|
||||
}
|
||||
@@ -743,6 +755,8 @@ function runIt(ev) {
|
||||
injected = false;
|
||||
stopAddr.style.backgroundColor = "green";
|
||||
runBtn.value = "Stop";
|
||||
running = true;
|
||||
cc.inhCCI03F = !runSilently;
|
||||
syllabicate();
|
||||
}
|
||||
}
|
||||
@@ -817,7 +831,7 @@ function tos_onChange(ev, bicID, valueID, origID) {
|
||||
function runSilently_onClick(ev) {
|
||||
/* Handle the onchange event for the RunSilently checkbox */
|
||||
|
||||
runSilently = ev.target.checked;
|
||||
establishSilence(ev.target.checked);
|
||||
}
|
||||
|
||||
function fileLoader_onLoad(ev) {
|
||||
@@ -851,6 +865,10 @@ function fileSelector_onChange(ev) {
|
||||
reader.readAsArrayBuffer(f);
|
||||
}
|
||||
|
||||
function hardwareLoad_onClick(ev) {
|
||||
/* Handle the "Hardware Load" button click */
|
||||
}
|
||||
|
||||
function checkBrowser() {
|
||||
/* Checks whether this browser can support the necessary stuff */
|
||||
var missing = "";
|
||||
@@ -1025,6 +1043,7 @@ function initialize() {
|
||||
};
|
||||
|
||||
$$("FileSelector").addEventListener("change", fileSelector_onChange, false);
|
||||
$$("HardwareLoad").addEventListener("click", hardwareLoad_onClick, false);
|
||||
$$("GoBtn").addEventListener("click", goIt, false);
|
||||
$$("StepBtn").addEventListener("click", stepIt, false);
|
||||
$$("RunBtn").addEventListener("click", runIt, false);
|
||||
@@ -1032,7 +1051,6 @@ function initialize() {
|
||||
|
||||
cc = new B5500CentralControl();
|
||||
cc.powerOn();
|
||||
cc.clear();
|
||||
|
||||
cc.P1.S = 0x40; // stack at @100
|
||||
cc.P1.R = 0x005; // PRT at @500 (R has addr div 64)
|
||||
@@ -1047,7 +1065,7 @@ function initialize() {
|
||||
|
||||
displaySystemState();
|
||||
displayOctal("StopAddr", stopAddress, 5);
|
||||
$$("RunSilently").checked = runSilently;
|
||||
establishSilence(runSilently);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
@@ -1071,6 +1089,8 @@ window.onload = function() {
|
||||
<h3>B5500 Syllable Debugger</h3>
|
||||
<p>
|
||||
<input id=FileSelector type=file size=60>
|
||||
|
||||
<input id=HardwareLoad type=button value="Hardware Load">
|
||||
</p>
|
||||
|
||||
<table id=RegisterBank1 class="normal border">
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<link id=defaultStyleSheet rel=stylesheet type="text/css" href="B5500DistributionAndDisplay.css">
|
||||
|
||||
<script src="/B5500/B5500DummyUnit.js"></script>
|
||||
<script src="/B5500/B5500SPOUnit.js"></script>
|
||||
<script src="/B5500/B5500DiskUnit.js"></script>
|
||||
<script src="./B5500DummyUnit.js"></script>
|
||||
<script src="./B5500SPOUnit.js"></script>
|
||||
<script src="./B5500DiskUnit.js"></script>
|
||||
|
||||
<script src="/B5500EMU/emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500CentralControl.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500Processor.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500IOUnit.js"></script>
|
||||
<script src="../emulator/emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="../emulator/emulator/B5500CentralControl.js"></script>
|
||||
<script src="../emulator/emulator/B5500Processor.js"></script>
|
||||
<script src="../emulator/emulator/B5500IOUnit.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<link id=defaultStyleSheet rel=stylesheet type="text/css" href="B5500DistributionAndDisplay.css">
|
||||
|
||||
<script src="/B5500/B5500DummyUnit.js"></script>
|
||||
<script src="/B5500/B5500SPOUnit.js"></script>
|
||||
<script src="/B5500/B5500DiskUnit.js"></script>
|
||||
<script src="./B5500DummyUnit.js"></script>
|
||||
<script src="./B5500SPOUnit.js"></script>
|
||||
<script src="./B5500DiskUnit.js"></script>
|
||||
|
||||
<script src="/B5500EMU/emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500CentralControl.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500Processor.js"></script>
|
||||
<script src="/B5500EMU/emulator/B5500IOUnit.js"></script>
|
||||
<script src="../emulator/emulator/B5500SystemConfiguration.js"></script>
|
||||
<script src="../emulator/emulator/B5500CentralControl.js"></script>
|
||||
<script src="../emulator/emulator/B5500Processor.js"></script>
|
||||
<script src="../emulator/emulator/B5500IOUnit.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
BIN
webUI/tools/tests/KERNEL.DISK
Normal file
BIN
webUI/tools/tests/KERNEL.DISK
Normal file
Binary file not shown.
Reference in New Issue
Block a user