Merge branch 'next-release'
This commit is contained in:
commit
1d2be78c7f
7 changed files with 274 additions and 255 deletions
|
|
@ -122,7 +122,7 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
|
||||
var device = this;
|
||||
this.kw11.timer = cpu.addTimer(function() {
|
||||
device.kw11_interrupt();
|
||||
device.interruptKW11();
|
||||
});
|
||||
|
||||
this.kw11.trigger = cpu.addTrigger(PDP11.KW11.VEC, PDP11.KW11.PRI);
|
||||
|
|
@ -141,21 +141,28 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
DevicePDP11.prototype.reset = function()
|
||||
{
|
||||
this.kw11.lks = 0;
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* kw11_interrupt()
|
||||
* interruptKW11()
|
||||
*
|
||||
* We used to call this function only when the the KW11's "Interrupt Enable" bit was set,
|
||||
* but now we call it at 60Hz regardless. In part, this was so we could piggy-back on
|
||||
* it to drive display updates, but more importantly, the KW11's "Monitor" bit is supposed
|
||||
* to be set at the "line frequency" independent of whether KW11 interrupts are enabled.
|
||||
* So we should actually be more compatible now.
|
||||
*
|
||||
* @this {DevicePDP11}
|
||||
*/
|
||||
DevicePDP11.prototype.kw11_interrupt = function()
|
||||
DevicePDP11.prototype.interruptKW11 = function()
|
||||
{
|
||||
this.kw11.lks |= PDP11.KW11.LKS.MON;
|
||||
if (this.kw11.lks & PDP11.KW11.LKS.IE) {
|
||||
this.cpu.setTrigger(this.kw11.trigger);
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
}
|
||||
if (this.cmp) this.cmp.updateDisplays(1);
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -181,10 +188,6 @@ DevicePDP11.prototype.readLKS = function(addr)
|
|||
*/
|
||||
DevicePDP11.prototype.writeLKS = function(data, addr)
|
||||
{
|
||||
this.kw11.lks = data;
|
||||
if (data & PDP11.KW11.LKS.IE) {
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
}
|
||||
this.kw11.lks = data & ~PDP11.KW11.LKS.MON;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -836,9 +836,7 @@ PanelPDP11.prototype.advanceAddr = function()
|
|||
var inc = fGenRegs? 1 : 2;
|
||||
var mask = fGenRegs? 0xf : this.bus.nBusMask;
|
||||
if (!this.getSwitch(PanelPDP11.SWITCH.STEP)) inc = -inc;
|
||||
this.regAddr = (this.regAddr & ~mask) | ((this.regAddr + inc) & mask);
|
||||
this.setLEDArray("A", this.regAddr, 22);
|
||||
return this.regAddr;
|
||||
return this.setAddr((this.regAddr & ~mask) | ((this.regAddr + inc) & mask));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -943,7 +941,9 @@ PanelPDP11.prototype.stop = function(ms, nCycles)
|
|||
PanelPDP11.prototype.updateDisplay = function(nUpdate)
|
||||
{
|
||||
if (this.cLiveRegs) {
|
||||
if (nUpdate < 0 || !this.cpu.isRunning() || this.fDisplayLiveRegs) {
|
||||
var fRunning = this.cpu.isRunning();
|
||||
if (nUpdate < 0 || !fRunning || this.fDisplayLiveRegs) {
|
||||
|
||||
/*
|
||||
* We arbitrarily separate the display elements into two categories: cheap and expensive.
|
||||
*
|
||||
|
|
@ -963,8 +963,12 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate)
|
|||
this.nPeriodicCount = 0;
|
||||
}
|
||||
|
||||
this.setLEDArray("D", this.regData, 16);
|
||||
this.setLEDArray("A", this.regAddr, 22);
|
||||
/*
|
||||
* Update the ADDRESS and DATA LEDs by setting their values, which may or may not have changed....
|
||||
*/
|
||||
this.setAddr(nUpdate > 0 && fRunning? this.cpu.getPC() : this.regAddr);
|
||||
this.setData(this.regData);
|
||||
|
||||
/*
|
||||
* Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1007,6 +1007,11 @@ RL11.prototype.readData = function(drive, iCylinder, iHead, iSector, nWords, add
|
|||
var disk = drive.disk;
|
||||
var sector = null, ibSector;
|
||||
|
||||
if (!disk) {
|
||||
err = PDP11.RL11.ERRC.HNF; // TODO: Review
|
||||
nWords = 0;
|
||||
}
|
||||
|
||||
while (nWords--) {
|
||||
if (!sector) {
|
||||
sector = drive.disk.seek(iCylinder, iHead, iSector + 1);
|
||||
|
|
@ -1063,6 +1068,11 @@ RL11.prototype.writeData = function(drive, iCylinder, iHead, iSector, nWords, ad
|
|||
var disk = drive.disk;
|
||||
var sector = null, ibSector;
|
||||
|
||||
if (!disk) {
|
||||
err = PDP11.RL11.ERRC.HNF; // TODO: Review
|
||||
nWords = 0;
|
||||
}
|
||||
|
||||
while (nWords--) {
|
||||
var data = this.bus.getWord(addr);
|
||||
if (this.bus.checkFault()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue