From 7342ea254ed643ee06c9d9cca307b475c82f5db8 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 15 Nov 2016 10:38:43 -0800 Subject: [PATCH] Apparently, 248Kb 11/70 configurations are not normal (diagnostic EKBEE1 complains), so all those machine configs have been bumped to 256Kb --- .../pdp11/machine/1170/monitor/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/monitor/machine.xml | 2 +- devices/pdp11/machine/1170/panel/README.md | 2 +- devices/pdp11/machine/1170/panel/debugger/README.md | 2 +- .../pdp11/machine/1170/panel/debugger/machine.xml | 4 ++-- .../machine/1170/panel/debugger/xxdp/machine.xml | 4 ++-- devices/pdp11/machine/1170/panel/machine.xml | 4 ++-- .../pdp11/machine/1170/vt100/debugger/machine.xml | 4 ++-- devices/pdp11/machine/1170/vt100/machine.xml | 4 ++-- modules/pdp11/lib/cpustate.js | 13 +++++++++++++ modules/pdp11/lib/device.js | 3 ++- modules/pdp11/lib/panel.js | 10 +++++----- 12 files changed, 34 insertions(+), 20 deletions(-) diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index 1048b5e45..690f787ad 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 Boot Monitor with Debugger - + diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index 4555932a2..96354a298 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 Boot Monitor - + diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md index 279007e60..31432d16f 100644 --- a/devices/pdp11/machine/1170/panel/README.md +++ b/devices/pdp11/machine/1170/panel/README.md @@ -1,6 +1,6 @@ --- layout: page -title: PDP-11/70 with Front Panel +title: PDP-11/70 with 256Kb and Front Panel permalink: /devices/pdp11/machine/1170/panel/ machines: - id: test1170 diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 4b89bcfc8..1aec69300 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -1,6 +1,6 @@ --- layout: page -title: PDP-11/70 with Front Panel and Debugger +title: PDP-11/70 with 256Kb, Front Panel, and Debugger permalink: /devices/pdp11/machine/1170/panel/debugger/ machines: - id: test1170 diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index a26cfcbb9..fe323452f 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 with Front Panel and Debugger + PDP-11/70 with 256Kb, Front Panel and Debugger - + diff --git a/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml b/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml index a26cfcbb9..fe323452f 100644 --- a/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 with Front Panel and Debugger + PDP-11/70 with 256Kb, Front Panel and Debugger - + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index a53724d35..3c1d4dead 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 with Front Panel + PDP-11/70 with 256Kb and Front Panel - + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index 1fa4fe659..25cda89f2 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 with Front Panel + PDP-11/70 with 256Kb, Front Panel, and Debugger - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 7c5d4f169..1d9c53769 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 with Front Panel + PDP-11/70 with 256Kb and Front Panel - + diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index a9f7c204c..3410dd4e4 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -262,6 +262,19 @@ CPUStatePDP11.prototype.resetMMU = function() if (this.bus) this.setMemoryAccess(); }; +/** + * getMMUState() + * + * Returns bit 0 set if 22-bit, bit 1 set if 18-bit, or bit 2 set if 16-bit; used by the Panel component. + * + * @this {CPUStatePDP11} + * @return {number} + */ +CPUStatePDP11.prototype.getMMUState = function() +{ + return this.mmuEnable? ((this.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; +}; + /** * setMemoryAccess() * diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 52610df01..13a8553a4 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -873,7 +873,8 @@ DevicePDP11.prototype.readSIZE = function(addr) /* * TODO: getMemorySize() returns an aggregate total, so if there are multiple discontiguous * chunks of RAM, this could return the wrong result; another interface, getHighestAddress(), - * might be required. + * might be required. Then again, perhaps multiple discontiguous chunks of RAM are not permitted + * in PDP-11 machines. */ return addr == PDP11.UNIBUS.LSIZE? ((this.bus.getMemorySize(MemoryPDP11.TYPE.RAM) >> 6) - 1) : 0; }; diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 1b54ab2af..2000b2e39 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -1007,13 +1007,13 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate) this.updateAddr(nUpdate > 0 && fRunning && !fWaiting? this.cpu.getPC() : this.regAddr); this.updateData(this.regDisplay); + var bits = this.cpu.getMMUState(); /* - * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) + * Bit 0 set if 22-bit, bit 1 set if 18-bit, bit 2 set if 16-bit */ - var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; - this.updateLED(PanelPDP11.LED.B22, bit & 1); - this.updateLED(PanelPDP11.LED.B18, bit & 2); - this.updateLED(PanelPDP11.LED.B16, bit & 4); + this.updateLED(PanelPDP11.LED.B22, bits & 1); + this.updateLED(PanelPDP11.LED.B18, bits & 2); + this.updateLED(PanelPDP11.LED.B16, bits & 4); } } };