Added more PDP-11 paper tape resources

This commit is contained in:
Jeff Parsons 2016-10-23 00:43:20 -07:00 committed by Jeff Parsons
commit d0618c34bc
48 changed files with 309 additions and 152 deletions

View file

@ -1435,7 +1435,7 @@ Computer.prototype.getMachineComponent = function(sType, componentPrev)
* the scroll feature has annoying effect on iOS, so we no longer do it by default (fScroll must be true).
*
* @this {Computer}
* @param {boolean} [fScroll]
* @param {boolean} [fScroll] (true if you really want the control scrolled into view)
*/
Computer.prototype.updateFocus = function(fScroll)
{
@ -1446,7 +1446,7 @@ Computer.prototype.updateFocus = function(fScroll)
* is to ensure that keyboard input is fielded properly.
*/
var x = 0, y = 0;
if (fScroll && window) {
if (!fScroll && window) {
x = window.scrollX;
y = window.scrollY;
}
@ -1454,7 +1454,7 @@ Computer.prototype.updateFocus = function(fScroll)
* TODO: We need a mechanism to determine the "active" display, instead of hard-coding this to aVideo[0].
*/
this.aVideo[0].setFocus();
if (fScroll && window) {
if (!fScroll && window) {
window.scrollTo(x, y);
}
}

View file

@ -1405,11 +1405,28 @@ ComputerPDP11.prototype.getMachineComponent = function(sType, componentPrev)
* where the display is more constrained, so we no longer do it by default (fScroll must be true).
*
* @this {ComputerPDP11}
* @param {boolean} [fScroll]
* @param {boolean} [fScroll] (true if you really want the control scrolled into view)
*/
ComputerPDP11.prototype.setFocus = function(fScroll)
{
if (this.controlPrint) this.controlPrint.focus();
if (this.controlPrint) {
/*
* This seems to be recommended work-around to prevent the browser from scrolling the focused element
* into view. The CPU is not a visual component, so when the CPU wants to set focus, the primary intent
* is to ensure that keyboard input is fielded properly.
*/
var x = 0, y = 0;
if (!fScroll && window) {
x = window.scrollX;
y = window.scrollY;
}
this.controlPrint.focus();
if (!fScroll && window) {
window.scrollTo(x, y);
}
}
};
/**

View file

@ -572,13 +572,31 @@ if (DEBUGGER) {
};
/**
* setFocus()
* setFocus(fScroll)
*
* @this {DebuggerPDP11}
* @param {boolean} [fScroll] (true if you really want the control scrolled into view)
*/
DebuggerPDP11.prototype.setFocus = function()
DebuggerPDP11.prototype.setFocus = function(fScroll)
{
if (this.controlDebug) this.controlDebug.focus();
if (this.controlDebug) {
/*
* This seems to be recommended work-around to prevent the browser from scrolling the focused element
* into view. The CPU is not a visual component, so when the CPU wants to set focus, the primary intent
* is to ensure that keyboard input is fielded properly.
*/
var x = 0, y = 0;
if (!fScroll && window) {
x = window.scrollX;
y = window.scrollY;
}
this.controlDebug.focus();
if (!fScroll && window) {
window.scrollTo(x, y);
}
}
};
/**