mirror of
https://github.com/pkimpel/retro-b5500.git
synced 2026-02-14 04:04:29 +00:00
1. Implement new system and disk subsystem configuration mechanism. 2. Implement initial Mark-XIII Cold Start card deck for use with new configuration interfaces. 3. Deprecate use of B5500ColdLoader.html script (replaced by new configuration mechanism and Cold Start deck), but correct and enhance IndexedDB database detection, creation, and deletion in it. 4. Implement "Application Cache" support to allow emulator to run off-line in a browser. 5. Implement web-font support and update all UIs to use DejaVu Sans and DejaVu Sans Mono from downloaded .woff or .ttf font files. 6. Rework some code in Processor OPDC, DESC, and indexDescriptor routines, attempting to resolve Flag Bit errors (issue #23). This appears to result in some improvement, but we still see them occasionally under load. 7. Line Printer: - Implement new line printer driver with more realistic UI and operator controls. - Implement Algol Glyphs option to render special Algol characters in Unicode. - Implement support for optional "greenbar" shading on the "paper". 8. SPO: - Redesign SPO driver to accept input from a text <input> element instead of capturing keystrokes directly from the window or "paper" <iframe>. This was done to allow input from tablet and mobile devices that will not pop up a keyboard unless an input-like element has the focus. - Implement Unicode Algol Glyphs support on output. - Intelligently resize "paper" area when SPO window is resized. - Accept "_" as a substitute for "~" as end-of-message on input. 9. Card Punch: - Implement Unicode Algol Glyphs support on output. - Implement stacker-full annunciators in UI. 10. Card Reader: - Implement Unicode Algol Glyphs support on input. - Accept "_" as a substitute for "~" on input. 11. Disk: - Adapt B5500DiskUnit driver to new configuration mechanism. - Implement support for Model-IB (slow) disk and non-DFX disk storage configurations; support up to 20 EUs. - Implement check for DKA readiness in cc.load() if not doing card-load-select. 12. Datacom: - Rework datacom driver keystroke handling for compatibility with Google Chrome. - Correct typo (line 437) in B5500DatacomUnit reported by Peter Grootswagers (issue #28). 13. Magnetic Tape: - Implement more granular tape reel animation in B5500MagTapeDrive. - Open the tape loader window on top of its device window. 14. Correct color of NOT READY lamps in peripheral device UIs; convert <progress> bars to <meter> elements. 15. More intelligently resize peripheral UI controls when their window is resized. 16. Implement lamp test during power-on in B5500Console. 17. Illuminate NOT READY light on Console at power-on if certain minimum configuration requirements are not met. 18. Set all HTML <meta> Content-Type character sets to UTF-8 (were ISO-8859-1); correct problem with FireFox requiring the character set to be specified within the first 1024 characters of an HTML file. 19. Clean up and refactor CSS style sheets 20. Split Javascript code out from B5500Console.html to new B5500Console.js. 21. Refactor common UI routines into webUI\B5500Util.js. 22. Move images and fonts to new webUI/resources directory; rearrange files in webUI/tool, tools, tests, source directories of repo. 23. Make significant wiki updates to document the new features in this release.
280 lines
8.9 KiB
HTML
280 lines
8.9 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<title>B5500 Emulator Arithmetic Testbed</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="Author" content="Nigel Williams & Paul 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="../../emulator/B5500SystemConfiguration.js"></script>
|
|
<script src="../B5500DummyUnit.js"></script>
|
|
<script src="../B5500SPOUnit.js"></script>
|
|
<script src="../B5500DiskUnit.js"></script>
|
|
<script src="../B5500CardReader.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";
|
|
|
|
var cc;
|
|
|
|
function setText(id, text) {
|
|
/* Replaces the children of the node having id="id" with the "text" */
|
|
var e = document.getElementById(id);
|
|
var f;
|
|
|
|
if (!e) {
|
|
alert("Invalid node id \"" + id + "\"");
|
|
} else {
|
|
while (f = e.firstChild) {
|
|
e.removeChild(f);
|
|
}
|
|
e.appendChild(document.createTextNode(text));
|
|
}
|
|
}
|
|
|
|
function getOctal(id) {
|
|
/* Obtains the .value from the element "id", parses it, and returns the
|
|
result as a B5500 numeric word. If the element text contains any of "-+eE."
|
|
the text is parsed as a decimal integer or floating point number, otherwise
|
|
it is parsed as an octal value */
|
|
var e = document.getElementById(id);
|
|
var ev = 0; // exponent of parsed value
|
|
var mv; // mantissa of parsed value
|
|
var sv = 0; // sign of parsed value
|
|
var tv = 0; // sign of parsed value exponent
|
|
var text = e.value; // text of element
|
|
var v; // parsed value of element text
|
|
|
|
if (text.search(/\S/) < 0) {
|
|
text = "0";
|
|
}
|
|
if (text.search(/[-+eE.]/) < 0) {
|
|
v = parseInt(text, 8);
|
|
} else {
|
|
v = parseFloat(text);
|
|
if (!isNaN(v) && v != 0) {
|
|
if (v < 0) {
|
|
sv = 1;
|
|
v = -v;
|
|
}
|
|
while (v < 0x1000000000) {
|
|
v *= 8;
|
|
ev--;
|
|
}
|
|
while (v >= 0x8000000000) {
|
|
v /= 8;
|
|
ev++;
|
|
}
|
|
mv = Math.floor(v);
|
|
if (ev >= -13) {
|
|
while (ev < 0 && mv%8 == 0) {
|
|
mv /= 8;
|
|
ev++;
|
|
}
|
|
}
|
|
if (ev < 0) {
|
|
tv = 1;
|
|
ev = -ev;
|
|
}
|
|
v = (((sv*2) + tv)*64 + ev%64)*0x8000000000 + mv; // to B5500 format
|
|
}
|
|
}
|
|
|
|
if (isNaN(v)) {
|
|
e.style.backgroundColor = "red";
|
|
} else {
|
|
e.style.backgroundColor = "";
|
|
}
|
|
return v;
|
|
}
|
|
|
|
function putOctal(id, value) {
|
|
/* Formats the "value" as octal and set the "id".value property with the result */
|
|
var e = document.getElementById(id);
|
|
|
|
e.value = value.toString(8);
|
|
}
|
|
|
|
function putNumber(id, value) {
|
|
/* Converts the "value" as a B5500 number to a Javascript Number() object and
|
|
formats it as the text content of node "id" */
|
|
var m = value % 0x8000000000; // get the mantissa
|
|
var e = (value - m)/0x8000000000; // get the exponent and sign bits
|
|
var s = (e & 0x80) >>> 7; // get the mantissa sign
|
|
var t = (e & 0x40) >>> 6; // get the exponent sign
|
|
|
|
e = (t ? -(e & 0x3F) : (e & 0x3F)); // get signed value of exponent
|
|
setText(id, (Math.pow(8, e)*(s ? -m : m)).toPrecision(12));
|
|
}
|
|
|
|
function reg_onChange(ev) {
|
|
/* Normalizes and displays the value of a register when changed */
|
|
var e = ev.target;
|
|
var id = e.id;
|
|
var result = true;
|
|
var value;
|
|
|
|
value = getOctal(id);
|
|
if (isNaN(value)) {
|
|
e.style.backgroundColor = "red";
|
|
result = false;
|
|
} else {
|
|
e.style.backgroundColor = "";
|
|
putOctal(id, value);
|
|
putNumber(id+"Value", value);
|
|
setText(id+"Orig", value.toString(8));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function stepIt() {
|
|
/* Simple test driver for the Processor arithmetic ops */
|
|
var opcode = 0x02D; // NOOP (XX55) by default
|
|
var opList = document.getElementById("OpList")
|
|
var text;
|
|
var title;
|
|
var value;
|
|
|
|
title = opList.options[opList.selectedIndex].text
|
|
value = opList.options[opList.selectedIndex].value;
|
|
opcode = parseInt(value, 8);
|
|
|
|
value = getOctal("AReg");
|
|
if (!isNaN(value)) {
|
|
cc.P1.A = value;
|
|
cc.P1.AROF = 1;
|
|
setText("ARegOrig", value.toString(8));
|
|
value = getOctal("BReg");
|
|
if (!isNaN(value)) {
|
|
cc.P1.B = value;
|
|
cc.P1.BROF = 1;
|
|
setText("BRegOrig", value.toString(8));
|
|
|
|
cc.P1.I = 0; // reset any interrupts
|
|
cc.IAR = 0;
|
|
|
|
cc.P1.X = 0;
|
|
cc.P1.T = opcode;
|
|
cc.P1.step();
|
|
|
|
putOctal("AReg", cc.P1.A);
|
|
putNumber("ARegValue", cc.P1.A);
|
|
putOctal("BReg", cc.P1.B);
|
|
putNumber("BRegValue", cc.P1.B);
|
|
putOctal("XReg", cc.P1.X);
|
|
putNumber("XRegValue", cc.P1.X);
|
|
putOctal("IReg", cc.P1.I);
|
|
}
|
|
}
|
|
setText("Caption", title);
|
|
}
|
|
|
|
window.onload = function() {
|
|
|
|
document.getElementById("AReg").onchange = reg_onChange;
|
|
document.getElementById("BReg").onchange = reg_onChange;
|
|
|
|
cc = new B5500CentralControl();
|
|
cc.powerOn(new B5500SystemConfiguration().systemConfig);
|
|
cc.clear();
|
|
|
|
//cc.MemMod[0][0x10] = 0x00400C215415;// LITC 1, LITC 3, XCH, DUP
|
|
|
|
cc.P1.S = 0x100; // stack at @400
|
|
cc.P1.R = 0x005; // PRT at @500 (R has addr div 64)
|
|
|
|
cc.P1.C = 0x10; // execute from address @20
|
|
cc.P1.access(0x30); // P = [C]
|
|
cc.P1.T = cc.fieldIsolate(cc.P1.P, 0, 12);
|
|
cc.P1.TROF = 1;
|
|
cc.P1.L = 1; // point to the next instruction
|
|
|
|
cc.P1.NCSF = 1; // run test in normal state
|
|
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body style="position:relative">
|
|
|
|
<div style="position:absolute; background-color:#666; width:230px; height: 136px; right:0; top:0">
|
|
<div id=BurroughsLogo>
|
|
<img id=BurroughsLogoImage src="../resources/Burroughs-Logo-Neg.jpg">
|
|
</div>
|
|
<div id=B5500Logo>B 5500
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Arithmetic Testbed</h3>
|
|
|
|
<table border=1 cellpadding=4 cellspacing=0>
|
|
<thead>
|
|
<tr>
|
|
<th>Reg
|
|
<th>Current (octal)
|
|
<th>FP Value
|
|
<th>Original (octal)
|
|
<tbody>
|
|
<tr>
|
|
<td class=center>A
|
|
<td class=number>
|
|
<input id=AReg name=AReg type=text class=number size=16 maxlength=16>
|
|
<td id=ARegValue class=number>
|
|
<td id=ARegOrig class=number>
|
|
<tr>
|
|
<td class=center>B
|
|
<td class=number>
|
|
<input id=BReg name=BReg type=text class=number size=16 maxlength=16>
|
|
<td id=BRegValue class=number>
|
|
<td id=BRegOrig class=number>
|
|
<tr>
|
|
<td class=center>X
|
|
<td class=number>
|
|
<input id=XReg name=XReg type=text class=number size=13 maxlength=13>
|
|
<td id=XRegValue class=number>
|
|
<td id=XRegOrig class=number>
|
|
<tr>
|
|
<td class=center>I
|
|
<td class=number>
|
|
<input id=IReg name=IReg type=text class=number size=3 maxlength=3>
|
|
<td id=IRegValue class=number>
|
|
<td id=Caption class=center>
|
|
</table>
|
|
|
|
<p>
|
|
<!--
|
|
<input name=Add type=button value=Add onclick="return testIt(1)">
|
|
<input name=Subtract type=button value=Subtract onclick="return testIt(2)">
|
|
<input name=Multiply type=button value=Multiply onclick="return testIt(3)">
|
|
<input name=Divide type=button value=Divide onclick="return testIt(4)">
|
|
<input name=IntDiv type=button value="Int Div" onclick="return testIt(5)">
|
|
<input name=Remide type=button value="Rem Div" onclick="return testIt(6)">
|
|
-->
|
|
|
|
Syllable:
|
|
<select id=OpList name=OpList>
|
|
<option value="0055" selected>NOP : No Operation
|
|
<option value="0101">ADD : Add
|
|
<option value="0301">SUB : Subtract
|
|
<option value="0401">MUL : Multiply
|
|
<option value="1001">DIV : Divide
|
|
<option value="3001">IDV : Integer Divide
|
|
<option value="7001">RDV : Remainder Divide
|
|
<option value="0125">GEQ : B Greater or Equal A
|
|
<option value="0225">GTR : B Greater Than A
|
|
<option value="0425">NEQ : B Not Equal A
|
|
<option value="4125">LEQ : B Less or Equal A
|
|
<option value="4225">LSS : B Less Than A
|
|
<option value="4425">EQL : B Equal A
|
|
</select>
|
|
|
|
<input id=Step name=Step type=button value="Step" onclick="return stepIt()">
|
|
</p>
|
|
|
|
</body>
|
|
</html> |