Remove all debugger.js files when running uncompiled without the Debugger, and some PDP-11 layout fixes

This commit is contained in:
Jeff Parsons 2016-10-22 01:36:45 -07:00 committed by Jeff Parsons
commit 49b5e34ba2
7 changed files with 22 additions and 11 deletions

View file

@ -93,7 +93,7 @@
<control type="button" binding="clear">Clear</control> <control type="button" binding="clear">Clear</control>
</control> </control>
</control> </control>
<control type="container" class="pcjs-registers" width="35%" padTop="8px" padLeft="8px"> <control type="container" class="pcjs-registers" width="35%" padding="8px">
<name>Registers</name> <name>Registers</name>
<control type="register" label="R0" binding="R0" pos="left" width="60px" padRight="8px" padBottom="8px">0000</control> <control type="register" label="R0" binding="R0" pos="left" width="60px" padRight="8px" padBottom="8px">0000</control>
<control type="register" label="R1" binding="R1" pos="left" width="60px" padRight="8px" padBottom="8px">0000</control> <control type="register" label="R1" binding="R1" pos="left" width="60px" padRight="8px" padBottom="8px">0000</control>
@ -111,7 +111,7 @@
<control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control> <control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control>
</control> </control>
</control> </control>
<control type="container" padTop="8px" padBottom="8px"> <control type="container" class="pcjs-registers" width="35%" padding="8px">
<control type="button" binding="run">Run</control> <control type="button" binding="run">Run</control>
<control type="button" binding="step">Step</control> <control type="button" binding="step">Step</control>
<control type="button" binding="reset">Reset</control> <control type="button" binding="reset">Reset</control>

View file

@ -88,7 +88,7 @@
<control type="container" class="pcjs-textarea" width="60%" padTop="8px" padBottom="8px"> <control type="container" class="pcjs-textarea" width="60%" padTop="8px" padBottom="8px">
<control type="textarea" binding="print" width="100%" height="252px" padRight="8px" pos="relative" style="resize:vertical;"/> <control type="textarea" binding="print" width="100%" height="252px" padRight="8px" pos="relative" style="resize:vertical;"/>
</control> </control>
<control type="container" padTop="8px" padBottom="8px"> <control type="container" class="pcjs-registers" width="35%" padding="8px">
<control type="button" binding="run">Run</control> <control type="button" binding="run">Run</control>
<control type="button" binding="reset">Reset</control> <control type="button" binding="reset">Reset</control>
<control type="button" binding="setSpeed">Fast</control> <control type="button" binding="setSpeed">Fast</control>

View file

@ -27,7 +27,7 @@
<control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control> <control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control>
</control> </control>
</control> </control>
<control type="container" width="35%" padLeft="8px" padBottom="8px"> <control type="container" class="pcjs-registers" width="35%" padLeft="8px" padBottom="8px">
<control type="button" binding="run">Run</control> <control type="button" binding="run">Run</control>
<control type="button" binding="step">Step</control> <control type="button" binding="step">Step</control>
<control type="button" binding="reset">Reset</control> <control type="button" binding="reset">Reset</control>

View file

@ -22,7 +22,7 @@
<control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control> <control type="flag" label="C" binding="CF" width="8px" padRight="4px" padBottom="8px">0</control>
</control> </control>
</control> </control>
<control type="container" width="35%" padLeft="8px" padBottom="8px"> <control type="container" class="pcjs-registers" width="35%" padLeft="8px" padBottom="8px">
<control type="button" binding="run">Run</control> <control type="button" binding="run">Run</control>
<control type="button" binding="reset">Reset</control> <control type="button" binding="reset">Reset</control>
<control type="button" binding="setSpeed">Fast</control> <control type="button" binding="setSpeed">Fast</control>

View file

@ -1929,13 +1929,13 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
} }
} }
/* /*
* Step 2: If there's a "debugger.js" source file in the list of uncompiled files, we need to remove * Step 2: If there are "debugger.js" source files in the list of uncompiled files, we need to remove
* it, which we do by using the Array splice() method, removing the 1 matching element from the array. * them, which we do by using the Array splice() method, removing the matching element(s) from the array.
*/ */
for (i = 0; i < asFiles.length; i++) { for (i = 0; i < asFiles.length; i++) {
if (asFiles[i].indexOf("/debugger.js") >= 0) { if (asFiles[i].indexOf("/debugger.js") >= 0) {
asFiles.splice(i, 1); asFiles.splice(i, 1);
break; i--;
} }
} }
} }

View file

@ -332,6 +332,17 @@ CPUStatePDP11.prototype.getMMR1 = function()
return result; return result;
}; };
/**
* getMMR3()
*
* @this {CPUStatePDP11}
* @return {number}
*/
CPUStatePDP11.prototype.getMMR3 = function()
{
return this.regMMR3;
};
/** /**
* setMMR3() * setMMR3()
* *
@ -1133,7 +1144,7 @@ CPUStatePDP11.prototype.trap = function(vector, reason)
doubleTrap = true; doubleTrap = true;
} }
if (!(this.regMMR0 & 0xe000)) { if (!(this.regMMR0 & PDP11.MMR0.ABORT)) {
this.regMMR1 = 0xf6f6; this.regMMR1 = 0xf6f6;
this.regMMR2 = vector; this.regMMR2 = vector;
} }
@ -2103,7 +2114,7 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
do { do {
if (DEBUGGER && nDebugCheck) { if (DEBUGGER && nDebugCheck) {
if (this.dbg.checkInstruction(this.getPC(), nDebugState)) { if (this.dbg && this.dbg.checkInstruction(this.getPC(), nDebugState)) {
this.stopCPU(); this.stopCPU();
break; break;
} }

View file

@ -290,7 +290,7 @@ DevicePDP11.prototype.writeMMR2 = function(data, addr)
*/ */
DevicePDP11.prototype.readMMR3 = function(addr) DevicePDP11.prototype.readMMR3 = function(addr)
{ {
return this.cpu.regMMR3; return this.cpu.getMMR3();
}; };
/** /**