Merge branch 'next-release'

This commit is contained in:
Jeff Parsons 2016-11-08 14:22:48 -08:00
commit 2bd5b657aa
9 changed files with 997 additions and 972 deletions

View file

@ -186,6 +186,7 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
this.cmp = cmp;
this.bus = bus;
this.dbg = dbg;
this.panel = cmp.panel;
for (var i = 0; i < CPUPDP11.BUTTONS.length; i++) {
var control = this.bindings[CPUPDP11.BUTTONS[i]];

View file

@ -1785,7 +1785,16 @@ PDP11.opWAIT = function(opCode)
* the PDP-11 KW11 (60Hz Line Clock) timer is the perfect candidate. See device.js.
*
* if (!(this.opFlags & PDP11.OPFLAG.WAIT) && this.cmp) this.cmp.updateDisplays();
*
* However, that being said, it's been reported that the WAIT instruction puts the contents of R0 into the
* Front Panel's "DATA PATH". However, I can't find any supporting documentation of that. Another explanation
* would be that the data path is being updated constantly, and that when R0 is the last register to be updated
* before a WAIT instruction, it simply predominates the data being displayed.
*
* But for now, we'll go with popular lore and propagate R0 to the Panel's "DATA PATH" setting.
*/
if (this.panel) this.panel.setDataPath(this.regsGen[0]);
this.opFlags |= PDP11.OPFLAG.WAIT;
this.advancePC(-2);
this.nStepCycles -= 3;

View file

@ -853,6 +853,24 @@ PanelPDP11.prototype.setData = function(value)
return this.regData;
};
/**
* setDataPath(value)
*
* This interface is for refreshing the Front Panel's "DATA PATH" display, which technically,
* is separate from the "DISPLAY REGISTER" (regData). However, our Front Panel doesn't currently
* provide a toggle between "DISPLAY REGISTER" and "DATA PATH" views, so we use the same variable
* for both.
*
* Because this is a potentially high-frequency function, we do NOT update the LED array here.
*
* @this {PanelPDP11}
* @param {number} value
*/
PanelPDP11.prototype.setDataPath = function(value)
{
this.regData = value;
};
/**
* setLED(sBinding, value)
*
@ -983,8 +1001,8 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate)
/**
* readCNSW(addr)
*
* If addr is set, then this a normal read, so we should return normal results (ie, switches);
* if addr is NOT set, then this is a read-before-write, so we must return the value being updated.
* If addr is set, then this a normal read, so we should return normal results (ie, SWITCH register);
* if addr is NOT set, then this is a read-before-write, so we must return the DISPLAY register value.
*
* @this {PanelPDP11}
* @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570)
@ -998,6 +1016,9 @@ PanelPDP11.prototype.readCNSW = function(addr)
/**
* writeCNSW(value, addr)
*
* Handler for DISPLAY register writes. Because this is a potentially high-frequency function,
* we do NOT update the LED array here.
*
* @this {PanelPDP11}
* @param {number} value
* @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570)