Fixed a few more MMU bugs uncovered by the EKBEE1 diagnostics; the end is in sight

This commit is contained in:
Jeff 2016-11-17 23:51:30 -08:00 • committed by Jeff Parsons
commit 7088a185fd
5 changed files with 116 additions and 112 deletions

View file

@ -1063,19 +1063,20 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate)
};
/**
* readCNSW(addr)
* readCNSW(addr, fPreWrite)
*
* If addr is set, then this a normal read, so we should return the SWITCH register (ie, regSwitches).
* If fPreWrite, this is a read-before-write, so we must return the DISPLAY register (ie, regDisplay);
* otherwise, this a normal read, so we should return the SWITCH register (ie, regSwitches).
*
* if addr is NOT set, then this is a read-before-write, so we must return the DISPLAY register (ie, regDisplay).
*
* @this {PanelPDP11}
* @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570)
* @param {boolean} [fPreWrite]
* @return {number}
*/
PanelPDP11.prototype.readCNSW = function(addr)
PanelPDP11.prototype.readCNSW = function(addr, fPreWrite)
{
return (addr? this.regSwitches : this.regDisplay) & 0xffff;
return (fPreWrite? this.regDisplay : this.regSwitches) & 0xffff;
};
/**